Skip to content

Commit a3863d8

Browse files
committed
update
1 parent 5932407 commit a3863d8

4 files changed

Lines changed: 13 additions & 7 deletions

File tree

template/.github/workflows/lint.yml.jinja

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,14 @@ jobs:
1010
- name: Install uv
1111
uses: astral-sh/setup-uv@v7
1212

13-
# install the requested Python for linting
1413
- name: Set up Python
1514
run: uv python install {{ python_default_version }}
1615

17-
# install dev dependencies (ruff, mypy, pre-commit, etc)
1816
- name: Install dependencies
1917
run: uv sync --extra dev --python {{ python_default_version }}
2018

21-
# check formatting
2219
- name: Check formatting with Ruff
2320
run: uv run --python {{ python_default_version }} ruff format --check .
2421

25-
# lint / autofixable style issues (but don't write fixes in CI)
2622
- name: Run Ruff lint
2723
run: uv run --python {{ python_default_version }} ruff check .

template/.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ repos:
1111
rev: v0.14.2
1212
hooks:
1313
- id: ruff-check
14-
args: [--fix]
14+
args: [--fix, --exit-zero]
1515
- id: ruff-format

template/README.md.jinja

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22

33
{%- if readme_badges %}
44

5+
{%- set is_github_repo = repository_url.startswith("https://github.com/") %}
6+
57
{%- if 'tests' in github_actions %}
68
[![Tests]({{ repository_url }}/actions/workflows/tests.yml/badge.svg)]({{ repository_url }}/actions/workflows/tests.yml)
79
{%- endif %}
810
[![PyPI version](https://badge.fury.io/py/{{ repo_name }}.svg)](https://badge.fury.io/py/{{ repo_name }})
911
![Supported versions](https://img.shields.io/badge/python-{{ python_min_version }}+-blue.svg)
1012
[![Downloads](https://static.pepy.tech/badge/{{ repo_name }})](https://pepy.tech/project/{{ repo_name }})
13+
{%- if copyright_license != "None" and is_github_repo %}
1114
[![license](https://img.shields.io/github/license/{{ github_username }}/{{ repo_name }}.svg)]({{ repository_url }}/blob/master/LICENSE)
1215
{%- endif %}
16+
{%- endif %}
1317

1418
{{ description }}
1519

template/pyproject.toml.jinja

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
name = "{{ package_name }}"
33
version = "0.1.0"
44
description = "{{ description }}"
5-
authors = [{ name = "{{ author_name }}", email = "{{ author_email }}" }]
5+
{%- if author_name or author_email %}
6+
authors = [{
7+
{%- if author_name %} name = "{{ author_name }}"{% endif %}
8+
{%- if author_name and author_email %}, {% endif %}
9+
{%- if author_email %} email = "{{ author_email }}"{% endif %}
10+
}]
11+
{%- endif %}
612
{%- if copyright_license != "None" %}
713
license = { file = "LICENSE" }
814
{%- endif %}
@@ -61,7 +67,7 @@ keywords = [
6167
]
6268

6369
[project.optional-dependencies]
64-
test = ["pytest"]
70+
test = ["pytest", "coverage"]
6571
dev = ["pytest", "ruff", "pre-commit", "coverage", "mypy"]
6672

6773
[project.urls]

0 commit comments

Comments
 (0)