From 6336c18c6984b570bd186a1629735cbf0ff0cb1d Mon Sep 17 00:00:00 2001 From: Szymon Talaga Date: Sun, 19 Jul 2026 20:33:50 +0200 Subject: [PATCH 1/4] Redesign to reflect new package development principles of 'python-package-template'. --- .gitignore | 1 - .pre-commit-config.yaml | 1 - CHANGELOG.md | 70 ++--- CODE_OF_CONDUCT.md | 2 +- README.md | 224 ++++++++++++-- copier.yaml | 81 +++-- docs/index.md | 13 +- pyproject.toml | 40 ++- .../skills/agent-context-update/SKILL.md | 26 ++ .../.github/skills/docstring-audit/SKILL.md | 12 + template/.github/skills/fix-bugs/SKILL.md | 11 + template/.github/skills/investigate/SKILL.md | 12 + template/.github/skills/test-audit/SKILL.md | 12 + .../skills/test-coverage-audit/SKILL.md | 11 + ... tasks == 'tox' %}ci.yaml{% endif %}.jinja | 100 ------ template/.gitignore.jinja | 1 - template/.pre-commit-config.yaml.jinja | 16 +- template/AGENTS.md | 48 +++ template/CODE_OF_CONDUCT.md.jinja | 132 -------- template/Makefile | 49 +++ template/README.md.jinja | 1 - template/pyproject.toml.jinja | 106 +++---- template/scripts/release.py.jinja | 45 +-- ...if dynamic_version %}.gitignore{% endif %} | 1 - .../cli.py.jinja | 45 --- ...version %}test_version.py{% endif %}.jinja | 5 +- ...duct %}CODE_OF_CONDUCT.md{% endif %}.jinja | 31 ++ .../changelog.md | 5 - .../index.md.jinja | 33 -- .../license.md | 7 - .../reference/api.md.jinja | 5 - .../reference/index.md.jinja | 12 - ...f cli == 'click' %}cli.md{% endif %}.jinja | 12 - ...d cli != 'click' %}cli.md{% endif %}.jinja | 15 - .../index.md.jinja | 1 - ... == 'mkdocs' %}mkdocs.yml{% endif %}.jinja | 105 ------- ...sks == 'nox' %}noxfile.py{% endif %}.jinja | 25 +- ...tasks == 'tox' %}tox.toml{% endif %}.jinja | 148 --------- .../{{ package_name }}/__init__.py.jinja | 0 .../{{ package_name }}/py.typed | 0 .../__main__.py.jinja | 0 .../cli.py.jinja | 28 ++ .../__main__.py.jinja | 0 .../cli.py.jinja | 2 - .../__main__.py.jinja | 0 .../cli.py.jinja | 6 +- .../__main__.py.jinja | 0 .../cli.py.jinja | 16 +- uv.lock | 288 +++++++++++++++--- zensical.toml | 8 +- 50 files changed, 861 insertions(+), 951 deletions(-) create mode 100644 template/.github/skills/agent-context-update/SKILL.md create mode 100644 template/.github/skills/docstring-audit/SKILL.md create mode 100644 template/.github/skills/fix-bugs/SKILL.md create mode 100644 template/.github/skills/investigate/SKILL.md create mode 100644 template/.github/skills/test-audit/SKILL.md create mode 100644 template/.github/skills/test-coverage-audit/SKILL.md delete mode 100644 template/.github/workflows/{% if tasks == 'tox' %}ci.yaml{% endif %}.jinja create mode 100644 template/AGENTS.md delete mode 100644 template/CODE_OF_CONDUCT.md.jinja create mode 100644 template/Makefile delete mode 100644 template/src/{% if dynamic_version %}.gitignore{% endif %} delete mode 100644 template/src/{{ package_name }}/{% if cli == 'argparse' %}.{% endif %}/cli.py.jinja create mode 100644 template/{% if code_of_conduct %}CODE_OF_CONDUCT.md{% endif %}.jinja delete mode 100644 template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/changelog.md delete mode 100644 template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/index.md.jinja delete mode 100644 template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/license.md delete mode 100644 template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/reference/api.md.jinja delete mode 100644 template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/reference/index.md.jinja delete mode 100644 template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/reference/{% if cli == 'click' %}cli.md{% endif %}.jinja delete mode 100644 template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/reference/{% if cli and cli != 'click' %}cli.md{% endif %}.jinja delete mode 100644 template/{% if docs == 'mkdocs' %}mkdocs.yml{% endif %}.jinja delete mode 100644 template/{% if tasks == 'tox' %}tox.toml{% endif %}.jinja rename template/{src => {{ package_root }}}/{{ package_name }}/__init__.py.jinja (100%) rename template/{src => {{ package_root }}}/{{ package_name }}/py.typed (100%) rename template/{src => {{ package_root }}}/{{ package_name }}/{% if cli == 'argparse' %}.{% endif %}/__main__.py.jinja (100%) create mode 100644 template/{{ package_root }}/{{ package_name }}/{% if cli == 'argparse' %}.{% endif %}/cli.py.jinja rename template/{src => {{ package_root }}}/{{ package_name }}/{% if cli == 'click' %}.{% endif %}/__main__.py.jinja (100%) rename template/{src => {{ package_root }}}/{{ package_name }}/{% if cli == 'click' %}.{% endif %}/cli.py.jinja (90%) rename template/{src => {{ package_root }}}/{{ package_name }}/{% if cli == 'cyclopts' %}.{% endif %}/__main__.py.jinja (100%) rename template/{src => {{ package_root }}}/{{ package_name }}/{% if cli == 'cyclopts' %}.{% endif %}/cli.py.jinja (79%) rename template/{src => {{ package_root }}}/{{ package_name }}/{% if cli == 'typer' %}.{% endif %}/__main__.py.jinja (100%) rename template/{src => {{ package_root }}}/{{ package_name }}/{% if cli == 'typer' %}.{% endif %}/cli.py.jinja (57%) diff --git a/.gitignore b/.gitignore index a234f31..eb0aacb 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,6 @@ __pycache__/ # Python environments .nox/ -.tox/ .venv/ # Testing diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b88b32d..2006e78 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -52,5 +52,4 @@ repos: additional_dependencies: - mdformat-footnote - mdformat-front-matters - - mdformat-mkdocs - mdformat-simple-breaks diff --git a/CHANGELOG.md b/CHANGELOG.md index 05e4dcc..9fdf903 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,14 +9,14 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/). -## [2025.12.10.1](https://github.com/leodevian/modern-python/tree/v2025.12.10.1) +## [2025.12.10.1](https://github.com/sztal/python-package-template/tree/v2025.12.10.1) ### Changed - Rename release jobs. -## [2025.12.10](https://github.com/leodevian/modern-python/tree/v2025.12.10) +## [2025.12.10](https://github.com/sztal/python-package-template/tree/v2025.12.10) ### Changed @@ -30,7 +30,7 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/). - Use `null` for null values in YAML. -## [2025.12.9](https://github.com/leodevian/modern-python/tree/v2025.12.9) +## [2025.12.9](https://github.com/sztal/python-package-template/tree/v2025.12.9) ### Removed @@ -55,7 +55,7 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/). - Remove the CLI reference from the MkDocs documentation when the project does not provide `console_scripts` entry points. -## [5.0.0](https://github.com/leodevian/modern-python/tree/v5.0.0) +## [5.0.0](https://github.com/sztal/python-package-template/tree/v5.0.0) ### Removed @@ -86,7 +86,7 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/). - Add TOML support for Coverage.py. -## [4.11.0](https://github.com/leodevian/modern-python/tree/v4.11.0) +## [4.11.0](https://github.com/sztal/python-package-template/tree/v4.11.0) ### Changed @@ -94,7 +94,7 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/). - Remove the trailing slash from the documentation URL. -## [4.10.0](https://github.com/leodevian/modern-python/tree/v4.10.0) +## [4.10.0](https://github.com/sztal/python-package-template/tree/v4.10.0) ### Removed @@ -112,7 +112,7 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/). - Use blacken-docs to format Python code blocks in documentation files. -## [4.9.0](https://github.com/leodevian/modern-python/tree/v4.9.0) +## [4.9.0](https://github.com/sztal/python-package-template/tree/v4.9.0) ### Changed @@ -121,14 +121,14 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/). - Use raw strings in `mkdocs.yaml`. -## [4.8.0](https://github.com/leodevian/modern-python/tree/v4.8.0) +## [4.8.0](https://github.com/sztal/python-package-template/tree/v4.8.0) ### Changed - Turn off live logs when running tests. -## [4.7.0](https://github.com/leodevian/modern-python/tree/v4.7.0) +## [4.7.0](https://github.com/sztal/python-package-template/tree/v4.7.0) ### Changed @@ -136,14 +136,14 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/). - Stop reading `VERSION.txt` to set the version attribute. -## [4.6.0](https://github.com/leodevian/modern-python/tree/v4.6.0) +## [4.6.0](https://github.com/sztal/python-package-template/tree/v4.6.0) ### Changed - Update pre-commit hooks. -## [4.5.0](https://github.com/leodevian/modern-python/tree/v4.5.0) +## [4.5.0](https://github.com/sztal/python-package-template/tree/v4.5.0) ### Changed @@ -156,14 +156,14 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/). - Fix command in Nox session `typecheck`. -## [4.4.0](https://github.com/leodevian/modern-python/tree/v4.4.0) +## [4.4.0](https://github.com/sztal/python-package-template/tree/v4.4.0) ### Changed - Rename dependency group `tests` into `test`. -## [4.3.0](https://github.com/leodevian/modern-python/tree/v4.3.0) +## [4.3.0](https://github.com/sztal/python-package-template/tree/v4.3.0) ### Added @@ -174,7 +174,7 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/). - Drop support for Python 3.9 and add support for Python 3.14. -## [4.2.0](https://github.com/leodevian/modern-python/tree/v4.2.0) +## [4.2.0](https://github.com/sztal/python-package-template/tree/v4.2.0) ### Changed @@ -182,35 +182,35 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/). - Use the default cache dependency glob for `astral-sh/setup-uv`. -## [4.1.3](https://github.com/leodevian/modern-python/tree/v4.1.3) +## [4.1.3](https://github.com/sztal/python-package-template/tree/v4.1.3) ### Fixed - Remove an unused `noqa` directive in `scripts/release.py` when the project version is provided dynamically. -## [4.1.2](https://github.com/leodevian/modern-python/tree/v4.1.2) +## [4.1.2](https://github.com/sztal/python-package-template/tree/v4.1.2) ### Fixed - Remove an unused import in `scripts/release.py` when the project version is provided dynamically. -## [4.1.1](https://github.com/leodevian/modern-python/tree/v4.1.1) +## [4.1.1](https://github.com/sztal/python-package-template/tree/v4.1.1) ### Fixed - Add the project description to `README.md`. -## [4.1.0](https://github.com/leodevian/modern-python/tree/v4.1.0) +## [4.1.0](https://github.com/sztal/python-package-template/tree/v4.1.0) ### Changed - Rename the `print_error` function to `print_err` in `scripts/release.py`. -## [4.0.0](https://github.com/leodevian/modern-python/tree/v4.0.0) +## [4.0.0](https://github.com/sztal/python-package-template/tree/v4.0.0) ### Security @@ -235,14 +235,14 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/). - Install the package in editable mode to build the documentation. -## [3.1.1](https://github.com/leodevian/modern-python/tree/v3.1.1) +## [3.1.1](https://github.com/sztal/python-package-template/tree/v3.1.1) ### Changed - Sort version flags for Cyclopts CLIs. -## [3.1.0](https://github.com/leodevian/modern-python/tree/v3.1.0) +## [3.1.0](https://github.com/sztal/python-package-template/tree/v3.1.0) ### Changed @@ -250,7 +250,7 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/). - Update the release script `scripts/release.py`. -## [3.0.0](https://github.com/leodevian/modern-python/tree/v3.0.0) +## [3.0.0](https://github.com/sztal/python-package-template/tree/v3.0.0) ### Added @@ -262,7 +262,7 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/). - Import the extension loader from `copier_template_extensions` instead of `copier_templates_extensions`. -## [2.4.0](https://github.com/leodevian/modern-python/tree/v2.4.0) +## [2.4.0](https://github.com/sztal/python-package-template/tree/v2.4.0) ### Added @@ -273,7 +273,7 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/). - Shorten URLs. -## [2.3.0](https://github.com/leodevian/modern-python/tree/v2.3.0) +## [2.3.0](https://github.com/sztal/python-package-template/tree/v2.3.0) ### Added @@ -288,14 +288,14 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/). - Update pre-commit hooks. -## [2.2.0](https://github.com/leodevian/modern-python/tree/v2.2.0) +## [2.2.0](https://github.com/sztal/python-package-template/tree/v2.2.0) ### Changed - Capitalize `Project-URL` labels in `pyproject.toml`. -## [2.1.0](https://github.com/leodevian/modern-python/tree/v2.1.0) +## [2.1.0](https://github.com/sztal/python-package-template/tree/v2.1.0) ### Security @@ -312,7 +312,7 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/). - Update pre-commit hooks to their latest versions. -## [2.0.0](https://github.com/leodevian/modern-python/tree/v2.0.0) +## [2.0.0](https://github.com/sztal/python-package-template/tree/v2.0.0) ### Added @@ -326,7 +326,7 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/). - Sort CLI options in source code and tests. -## [1.5.0](https://github.com/leodevian/modern-python/tree/v1.5.0) +## [1.5.0](https://github.com/sztal/python-package-template/tree/v1.5.0) ### Changed @@ -339,7 +339,7 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/). - Always install uv to run Nox sessions. -## [1.4.0](https://github.com/leodevian/modern-python/tree/v1.4.0) +## [1.4.0](https://github.com/sztal/python-package-template/tree/v1.4.0) ### Added @@ -350,7 +350,7 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/). - Use pre-commit instead of pre-commit-uv. -## [1.3.0](https://github.com/leodevian/modern-python/tree/v1.3.0) +## [1.3.0](https://github.com/sztal/python-package-template/tree/v1.3.0) ### Changed @@ -360,14 +360,14 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/). - Update pre-commit hooks. -## [1.2.1](https://github.com/leodevian/modern-python/tree/v1.2.1) +## [1.2.1](https://github.com/sztal/python-package-template/tree/v1.2.1) ### Fixed - Prevent coverage warnings for unclosed SQLite connections being raised as errors. -## [1.2.0](https://github.com/leodevian/modern-python/tree/v1.2.0) +## [1.2.0](https://github.com/sztal/python-package-template/tree/v1.2.0) ### Added @@ -378,14 +378,14 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/). - Stop setting the log level to `INFO` during testing. -## [1.1.1](https://github.com/leodevian/modern-python/tree/v1.1.1) +## [1.1.1](https://github.com/sztal/python-package-template/tree/v1.1.1) ### Fixed - Fix the extension of the version test. -## [1.1.0](https://github.com/leodevian/modern-python/tree/v1.1.0) +## [1.1.0](https://github.com/sztal/python-package-template/tree/v1.1.0) ### Changed @@ -407,7 +407,7 @@ This project uses [*towncrier*](https://towncrier.readthedocs.io/). - Removed unused import in `noxfile.py`: `from nox.command import CommandFailed`. -## [1.0.0](https://github.com/leodevian/modern-python/tree/v1.0.0) +## [1.0.0](https://github.com/sztal/python-package-template/tree/v1.0.0) ### Added diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 7c6ab1a..3043dfb 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -60,7 +60,7 @@ representative at an online or offline event. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at -leodevian.gh@gmail.com. +stalaga@protonmail.com. All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the diff --git a/README.md b/README.md index 72f5de3..413ee19 100644 --- a/README.md +++ b/README.md @@ -1,53 +1,219 @@ -# modern-python +# python-package-template [![Copier](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-grayscale-inverted-border-purple.json)](https://github.com/copier-org/copier) -![Latest release](https://img.shields.io/github/v/release/leodevian/modern-python) -[![CI](https://img.shields.io/github/actions/workflow/status/leodevian/modern-python/ci.yaml?branch=main&logo=github&label=CI)](https://github.com/leodevian/modern-python/actions/workflows/ci.yaml) -[![License](https://img.shields.io/github/license/leodevian/modern-python)](https://github.com/leodevian/modern-python/blob/main/LICENSE) +![Latest release](https://img.shields.io/github/v/release/sztal/python-package-template) +[![CI](https://img.shields.io/github/actions/workflow/status/sztal/python-package-template/ci.yaml?branch=main&logo=github&label=CI)](https://github.com/sztal/python-package-template/actions/workflows/ci.yaml) +[![License](https://img.shields.io/github/license/sztal/python-package-template)](https://github.com/sztal/python-package-template/blob/main/LICENSE) [![mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org) -[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv) -[Copier](https://copier.readthedocs.io/) template for modern Python packages. +Copier template for modern Python packages. This repository is the template +engine and its source material, not one of the packages generated by it. -> [!NOTE] -> This Copier template requires: -> -> - [Git](https://git-scm.com/) version 2. -> - [Python](https://www.python.org/) 3.10 or more. -> - [Copier](https://copier.readthedocs.io/) version 9.6 or more. -> - [Copier Template-Extensions](https://github.com/copier-org/copier-template-extensions) version 0.3.2 or more. -> -> To install Git, [download and install it from git-scm.com](https://git-scm.com/downloads). -> -> To install Python, [download and install it from python.org](https://www.python.org/downloads/), -> or [install uv](https://docs.astral.sh/uv/getting-started/installation/) to install it. +## What Copier Does -To install Copier and Copier Template-Extensions, use [uv](https://docs.astral.sh/uv/) -or [pipx](https://pipx.pypa.io/): +Copier reads the answers and rendering rules in `copier.yaml`, evaluates the +files under `template/`, and writes a new project into a destination directory. +The generated project is independent: it gets its own `pyproject.toml`, source +tree, tests, documentation, CI configuration, and Git history. + +The main flow is: + +```text +copier.yaml + template/ + extensions/ + | + | answers and Jinja rendering + v + generated Python project +``` + +The generated project also receives `.copier-answers.yml`. Copier uses that +file during `copier update` to remember the choices made when the project was +created and to apply later template changes consistently. + +## Requirements + +- [Git](https://git-scm.com/) 2 or newer +- [Python](https://www.python.org/) 3.10 or newer +- [Copier](https://copier.readthedocs.io/) 9.6 or newer +- [Copier Template-Extensions](https://github.com/copier-org/copier-template-extensions) 0.3.2 or newer + +Install Copier with [uv](https://docs.astral.sh/uv/) or `pipx`: ```bash -# Use uv. +# uv uv tool install copier --with copier-template-extensions -# Use pipx. + +# pipx pipx install copier pipx inject copier copier-template-extensions ``` -## Usage +## Generate A Project -Run `copier copy` to generate your Python package: +Use the GitHub shorthand or a Git URL as the template source: ```bash -# Use HTTPS. -copier copy --trust gh:leodevian/modern-python ./path/to/directory -# Use SSH. -copier copy --trust git@github.com:leodevian/modern-python ./path/to/directory +# HTTPS through the GitHub shorthand. +copier copy --trust gh:sztal/python-package-template ./path/to/project + +# SSH. +copier copy --trust git@github.com:sztal/python-package-template ./path/to/project ``` -Run `copier update` to update your Python package to the latest version: +Copier asks for the visible project choices and applies defaults for derived +values. Important choices include: + +- `project_name` and `project_description`: project metadata and documentation +- `target_python`: the Ruff and mypy target, from `py310` through `py314`; the default is `py314` +- `package_layout`: flat, `src`, or namespace package layout +- `entry_points` and `cli`: optional command-line support and its framework +- `features`: task automation, documentation, and doctests +- `docs`: Zensical when documentation is enabled +- `code_of_conduct`: whether to generate `CODE_OF_CONDUCT.md` + +Names, repository URLs, package paths, documentation URLs, copyright details, +and similar values are derived from the answers. The Git name and email used +as defaults come from the local Git configuration. + +To provide answers non-interactively, pass Copier data explicitly: + +```bash +copier copy --trust \ + --data project_name=example \ + --data project_description='An example package' \ + --data target_python=py314 \ + gh:sztal/python-package-template ./example +``` + +## Update A Project + +Run this command from a generated project: ```bash copier update --trust ``` + +Copier compares the saved `.copier-answers.yml` with the current template and +updates files while preserving project-specific changes where possible. Review +the resulting diff before committing an update, especially when changing +package layout or documentation settings. + +## Template Mechanics + +### `copier.yaml` + +This is the template manifest and answer schema. It controls: + +- the minimum Copier version; +- the `template/` source directory; +- the `.jinja` suffix used by template files; +- the Jinja extensions loaded during rendering; +- files that should be skipped or preserved; +- the post-generation message; +- interactive answers, defaults, choices, conditional answers, and derived values. + +Answers with `when: false` are internal implementation values. For example, +`package_name`, `package_root`, and `repository_url` are derived from visible +answers and are used by templates without asking the user to enter them. + +### `template/` + +This directory contains the files that can appear in a generated project. +Files ending in `.jinja` are rendered as Jinja templates; ordinary files are +copied as-is. Jinja expressions such as `{{ package_name }}` substitute an +answer, while `{% if docs %}` and similar blocks include content only when a +feature is enabled. + +Some filenames contain Jinja expressions too. For example: + +```text +template/{% if docs == 'zensical' %}zensical.toml{% endif %}.jinja +``` + +When `docs` is `zensical`, Copier renders this as `zensical.toml`. When another +documentation option is selected, the filename renders to an empty name and +the file is not generated. This is why conditional filenames are used instead +of putting an unused configuration file in every generated project. + +The same mechanism is used for `noxfile.py`, `zensical.toml`, the optional Code +of Conduct, CLI framework files, and the package source tree. + +### `zensical.toml` in this repository + +The root [zensical.toml](zensical.toml) is **not** a generated-project +template. It configures Zensical for this repository's own documentation site: +site metadata, navigation, theme features, icons, fonts, social links, and +Markdown extensions. + +The generated-project version is a separate conditional file: + +```text +template/{% if docs == 'zensical' %}zensical.toml{% endif %}.jinja +``` + +That file is copied only when a generated project chooses Zensical and points +its site metadata at that generated project's repository and documentation. + +### Extensions + +The `extensions/` package provides small Jinja helpers used by `copier.yaml`: + +- `git.py`: reads Git identity values for author and maintainer defaults; +- `slugify.py`: derives distribution and import-safe package names; +- `today.py`: supplies the current date for generated metadata. + +These helpers are loaded through `_jinja_extensions` in `copier.yaml`. + +## Generated Components + +The template produces a complete project workflow rather than only a package +directory: + +- `pyproject.toml`: Hatchling build backend, Git-tag versioning through + `uv-dynamic-versioning`, project metadata, dependency groups, Ruff, pytest, + coverage, mypy, and Towncrier settings; +- `src/`, a flat package directory, or a namespace package directory: + selected by `package_layout`; +- `tests/`: pytest fixtures and version checks; +- `noxfile.py`: test, lint, type-check, and documentation sessions using uv; +- `.pre-commit-config.yaml`: Ruff checking and formatting plus repository + hygiene hooks; +- `Makefile`: short commands for installation, testing, linting, formatting, + coverage, and builds; +- `docs/` and `zensical.toml`: optional Zensical documentation support; +- `.github/workflows/`: CI and release workflows; +- `AGENTS.md` and `.github/skills/`: generated repository context for coding + agents, including a first-run inspection checklist; +- `scripts/release.py`: Towncrier and Git-tag release automation; +- `LICENSE`, `CHANGELOG.md`, and optional `CODE_OF_CONDUCT.md`. + +The generated build uses Git tags as its version source. A release tag such as +`v1.2.3` produces package metadata with version `1.2.3`. + +## Working On This Template + +After changing the template, render representative projects before committing: + +```bash +uv run copier copy --trust --defaults \ + --data project_name=smoke-test \ + --data project_description='Template smoke test' \ + . /tmp/smoke-test +``` + +At minimum, check the default flat layout, a `src` layout, a namespace layout, +both documentation backends, and the optional Code of Conduct. For generated +projects, initialize Git, create a version tag, and run: + +```bash +uv build +uv run pytest +nox -s lint +nox -s typecheck +``` + +When changing a template filename or answer, inspect the generated tree and +the `.copier-answers.yml` file. A small filename expression can determine +whether an entire component exists in the output. diff --git a/copier.yaml b/copier.yaml index cdb0a66..b0b9ec1 100644 --- a/copier.yaml +++ b/copier.yaml @@ -60,6 +60,17 @@ project_description: type: str help: Your project description? +target_python: + type: str + help: Which Python version should tools target? + default: py314 + choices: + Python 3.10: py310 + Python 3.11: py311 + Python 3.12: py312 + Python 3.13: py313 + Python 3.14: py314 + user_name: type: str help: Your name? @@ -73,7 +84,7 @@ user_email: github_user: type: str help: Your GitHub username? - default: leodevian + default: sztal repository_path: type: str @@ -117,33 +128,54 @@ license: MIT License: MIT Mozilla Public License 2.0: MPL-2.0 -backend: +dynamic_version: + type: bool + help: Whether the version is dynamic. + default: true + when: false + +package_layout: type: str - help: Which build backend do you want to use? - default: uv + help: Which package layout do you want to use? + default: flat choices: - Hatchling: hatch - uv: uv + Flat package: flat + Source package: src + Namespace package: namespace -hatch_plugins: +namespace_name: type: str - help: Which Hatch plugins do you want to use? - multiselect: true - default: [hatch-vcs] - when: "{{ backend == 'hatch' }}" - choices: - hatch-vcs: hatch-vcs + help: What is the top-level namespace name? + default: "{{ package_name }}" + when: "{{ package_layout == 'namespace' }}" + validator: >- + {% if namespace_name == '' %} + The namespace name is required. + {% endif %} -dynamic_version: - type: bool - help: Whether the version is dynamic. - default: "{{ backend == 'hatch' and 'hatch-vcs' in hatch_plugins }}" +package_root: + type: str + help: The package source root. + default: >- + {% if package_layout == 'src' %}src{% elif package_layout == 'namespace' %}{{ namespace_name }}{% else %}.{% endif %} + when: false + +package_path: + type: str + help: The package path. + default: "{{ package_root }}/{{ package_name }}" when: false +code_of_conduct: + type: bool + help: Do you want to include a Code of Conduct? + default: false + entry_points: type: str help: Which entry points do you want to add? multiselect: true + default: [] choices: Command-line interface: cli @@ -170,10 +202,8 @@ features: tasks: type: str help: Which task automation tool do you want to use? - when: "{{ 'tasks' in features }}" - choices: - tox: tox - Nox: nox + default: nox + when: false install: type: str @@ -186,17 +216,16 @@ install: docs: type: str - help: Which static site generator do you want to use? - when: "{{ 'docs' in features }}" - choices: - MkDocs: mkdocs - Zensical: zensical + help: Documentation backend. + default: "{{ 'zensical' if 'docs' in features else '' }}" + when: false doctest: type: str help: Which interactive Python examples do you want to test? when: "{{ 'doctest' in features }}" multiselect: true + default: [] choices: Docstrings: docstrings Documentation: diff --git a/docs/index.md b/docs/index.md index 285d6f5..e294a17 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,14 +2,13 @@ icon: lucide/house --- -# modern-python +# python-package-template [![Copier](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/copier-org/copier/master/img/badge/badge-grayscale-inverted-border-purple.json)](https://github.com/copier-org/copier) -![Latest release](https://img.shields.io/github/v/release/leodevian/modern-python) -[![CI](https://img.shields.io/github/actions/workflow/status/leodevian/modern-python/ci.yaml?branch=main&logo=github&label=CI)](https://github.com/leodevian/modern-python/actions/workflows/ci.yaml) -[![License](https://img.shields.io/github/license/leodevian/modern-python)](https://github.com/leodevian/modern-python/blob/main/LICENSE) +![Latest release](https://img.shields.io/github/v/release/sztal/python-package-template) +[![CI](https://img.shields.io/github/actions/workflow/status/sztal/python-package-template/ci.yaml?branch=main&logo=github&label=CI)](https://github.com/sztal/python-package-template/actions/workflows/ci.yaml) +[![License](https://img.shields.io/github/license/sztal/python-package-template)](https://github.com/sztal/python-package-template/blob/main/LICENSE) [![mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org) -[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv) @@ -52,13 +51,13 @@ Run `copier copy` to generate your Python package: === "HTTPS" ```bash - copier copy --trust gh:leodevian/modern-python ./path/to/directory + copier copy --trust gh:sztal/python-package-template ./path/to/directory ``` === "SSH" ```bash - copier copy --trust git@github.com:leodevian/modern-python ./path/to/directory + copier copy --trust git@github.com:sztal/python-package-template ./path/to/directory ``` Run `copier update` to update your Python package to the latest version: diff --git a/pyproject.toml b/pyproject.toml index 751cb6f..3330fc3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [project] -name = "modern-python" +name = "python-package-template" version = "2025.12.10.1" description = "Copier template for Python projects" readme = "README.md" @@ -12,10 +12,10 @@ license-files = [ "LICENSE", ] maintainers = [ - { name = "Léo Bernard", email = "leodevian.gh@gmail.com" }, + { name = "Szymon Talaga", email = "stalaga@protonmail.com" }, ] authors = [ - { name = "Léo Bernard", email = "leodevian.gh@gmail.com" }, + { name = "Szymon Talaga", email = "stalaga@protonmail.com" }, ] requires-python = ">=3.10" classifiers = [ @@ -39,11 +39,11 @@ dependencies = [ "copier>=9.6", "copier-template-extensions>=0.3.2", ] -urls.Changelog = "https://github.com/leodevian/modern-python/blob/main/CHANGELOG.md" -urls.Documentation = "https://github.com/leodevian/modern-python/tree/main/docs" -urls.Homepage = "https://github.com/leodevian/modern-python" -urls.Issues = "https://github.com/leodevian/modern-python/issues" -urls.Repository = "https://github.com/leodevian/modern-python" +urls.Changelog = "https://github.com/sztal/python-package-template/blob/main/CHANGELOG.md" +urls.Documentation = "https://github.com/sztal/python-package-template/tree/main/docs" +urls.Homepage = "https://github.com/sztal/python-package-template" +urls.Issues = "https://github.com/sztal/python-package-template/issues" +urls.Repository = "https://github.com/sztal/python-package-template" [dependency-groups] dev = [ @@ -52,7 +52,11 @@ dev = [ { include-group = "test" }, { include-group = "type" }, ] -test = [ ] +test = [ + "coverage[toml]>=7.11", + "pytest>=9", + "pytest-xdist>=3.8", +] type = [ "mypy>=1.19", { include-group = "test" }, @@ -68,6 +72,8 @@ release = [ ] [tool.ruff] +line-length = 88 +target-version = "py310" extend-exclude = [ ] lint.select = [ "ALL", @@ -90,16 +96,24 @@ lint.pydocstyle.convention = "google" lint.future-annotations = true [tool.pyproject-fmt] -max_supported_python = "3.14" +[tool.pytest.ini_options] +addopts = "-v --tb=short" +filterwarnings = [ + "error", +] +testpaths = [ + "tests", +] +strict = true [tool.towncrier] -name = "modern-python" +name = "python-package-template" filename = "CHANGELOG.md" directory = "changelog.d" start_string = "\n" underlines = [ "", "", "" ] -title_format = "## [{version}](https://github.com/leodevian/modern-python/tree/v{version})" -issue_format = "[#{issue}](https://github.com/leodevian/modern-python/issues/{issue})" +title_format = "## [{version}](https://github.com/sztal/python-package-template/tree/v{version})" +issue_format = "[#{issue}](https://github.com/sztal/python-package-template/issues/{issue})" [[tool.towncrier.type]] directory = "security" diff --git a/template/.github/skills/agent-context-update/SKILL.md b/template/.github/skills/agent-context-update/SKILL.md new file mode 100644 index 0000000..0594166 --- /dev/null +++ b/template/.github/skills/agent-context-update/SKILL.md @@ -0,0 +1,26 @@ +--- +name: agent-context-update +description: Audit the repository and update AGENTS.md and all generated skills so they match the current project. +argument-hint: Optional focus area; default is AGENTS.md and every skill +--- + +# Agent Context Update + +Use this skill when the repository structure, architecture, tools, or workflows +have changed and agent guidance may be stale. + +## First run in a newly generated repository + +1. Inspect the complete repository tree and the selected package layout. +2. Read `pyproject.toml`, `README.md`, `Makefile`, `noxfile.py`, and tests. +3. Replace every placeholder in `AGENTS.md` with verified project facts. +4. Update every skill under `.github/skills/` with the actual paths, commands, + environment rules, and testing conventions. +5. Remove assumptions that are not supported by the source tree. +6. Run `make lint`, `make test`, and the relevant Nox sessions. +7. Re-read all agent files and confirm they agree with each other. + +## Later updates + +Keep edits limited to agent guidance. Verify claims against source code and +current commands before documenting them. Do not change runtime behavior. diff --git a/template/.github/skills/docstring-audit/SKILL.md b/template/.github/skills/docstring-audit/SKILL.md new file mode 100644 index 0000000..500511a --- /dev/null +++ b/template/.github/skills/docstring-audit/SKILL.md @@ -0,0 +1,12 @@ +--- +name: docstring-audit +description: Audit public documentation and doctest examples for accuracy. +argument-hint: Optional module or documentation concern +--- + +# Docstring Audit + +Check public classes, functions, and properties for concise accurate +Docstrings. Review examples for runnable doctests and run the configured pytest +checks after documentation changes. Keep comments focused on non-obvious +behavior and avoid documenting implementation details as API contracts. diff --git a/template/.github/skills/fix-bugs/SKILL.md b/template/.github/skills/fix-bugs/SKILL.md new file mode 100644 index 0000000..f8bc717 --- /dev/null +++ b/template/.github/skills/fix-bugs/SKILL.md @@ -0,0 +1,11 @@ +--- +name: fix-bugs +description: Fix confirmed bugs with focused regression tests. +argument-hint: Optional bug or module to fix +--- + +# Fix Bugs + +Confirm the bug against current source, make the smallest focused change, add +a regression test that fails before the fix, and run `make lint` and `make test`. +Do not mix unrelated refactors or test-audit work into a bug fix. diff --git a/template/.github/skills/investigate/SKILL.md b/template/.github/skills/investigate/SKILL.md new file mode 100644 index 0000000..84b9452 --- /dev/null +++ b/template/.github/skills/investigate/SKILL.md @@ -0,0 +1,12 @@ +--- +name: investigate +description: Investigate a reported behavior without changing existing source files. +argument-hint: Describe the issue, command, failure, or behavior +--- + +# Investigate + +Start from the nearest failing test, command, symbol, or file. Reproduce the +behavior when possible, identify the controlling code path, and report facts, +hypotheses, evidence, and a minimal fix direction. Do not modify existing +source, tests, configuration, or documentation files during investigation. diff --git a/template/.github/skills/test-audit/SKILL.md b/template/.github/skills/test-audit/SKILL.md new file mode 100644 index 0000000..4016aec --- /dev/null +++ b/template/.github/skills/test-audit/SKILL.md @@ -0,0 +1,12 @@ +--- +name: test-audit +description: Audit pytest coverage and quality against the package source. +argument-hint: Optional module or test concern +--- + +# Test Audit + +Review public behavior, error paths, and meaningful edge cases. Prefer shared +fixtures, factory helpers, parametrization, and short behavioral assertions. +Do not test trivial implementation details. If an audit reveals a source bug, +record it for a separate bug-fixing task instead of fixing it here. diff --git a/template/.github/skills/test-coverage-audit/SKILL.md b/template/.github/skills/test-coverage-audit/SKILL.md new file mode 100644 index 0000000..f586d19 --- /dev/null +++ b/template/.github/skills/test-coverage-audit/SKILL.md @@ -0,0 +1,11 @@ +--- +name: test-coverage-audit +description: Find meaningful missing pytest coverage and add focused tests. +argument-hint: Optional module or coverage concern +--- + +# Test Coverage Audit + +Start with `make coverage`, then inspect uncovered behavior alongside its tests. +Prioritize branches, validation, error paths, and public behavior. Avoid adding +tests only to execute trivial lines. Record source bugs for a separate fix task. diff --git a/template/.github/workflows/{% if tasks == 'tox' %}ci.yaml{% endif %}.jinja b/template/.github/workflows/{% if tasks == 'tox' %}ci.yaml{% endif %}.jinja deleted file mode 100644 index d2ffdf4..0000000 --- a/template/.github/workflows/{% if tasks == 'tox' %}ci.yaml{% endif %}.jinja +++ /dev/null @@ -1,100 +0,0 @@ ---- -name: CI - -on: - push: - branches: [main] - tags: ['*'] - pull_request: null - workflow_dispatch: null - -concurrency: - group: {% raw %}${{ github.workflow }}-${{ github.ref }}{% endraw %} - cancel-in-progress: true - -permissions: {} - -jobs: - check: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - env: - - lint - - typecheck -{%- if docs %} - - docs -{%- endif %} - steps: - - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - name: Install the latest version of uv - uses: astral-sh/setup-uv@v7 - with: - enable-cache: true - github-token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %} - - name: Install tox and extend it with tox-uv - run: >- - uv tool install tox - --python-preference only-managed - --python 3.14 - --with tox-uv - - name: Set up {% raw %}${{ matrix.env }}{% endraw %} - run: >- - tox run - --notest - --skip-missing-interpreters false - -e {% raw %}${{ matrix.env }}{% endraw %} - - name: Run {% raw %}${{ matrix.env }}{% endraw %} - run: >- - tox run -{%- if install == 'uv pip' %} - --skip-pkg-install -{%- else %} - --skip-uv-sync -{%- endif %} - -e {% raw %}${{ matrix.env }}{% endraw %} - - tests: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python_version: - - '3.14' - - '3.13' - - '3.12' - - '3.11' - - '3.10' - steps: - - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - name: Install the latest version of uv - uses: astral-sh/setup-uv@v7 - with: - enable-cache: true - github-token: {% raw %}${{ secrets.GITHUB_TOKEN }}{% endraw %} - - name: Install tox and extend it with tox-uv - run: >- - uv tool install tox - --python-preference only-managed - --python 3.14 - --with tox-uv - - name: Set up the test suite - run: >- - tox run - --notest - --skip-missing-interpreters false - -e {% raw %}${{ matrix.python_version }}{% endraw %} - - name: Run the test suite - run: >- - tox run -{%- if install == 'uv pip' %} - --skip-pkg-install -{%- else %} - --skip-uv-sync -{%- endif %} - -e {% raw %}${{ matrix.python_version }}{% endraw %} diff --git a/template/.gitignore.jinja b/template/.gitignore.jinja index be18c49..6f83221 100644 --- a/template/.gitignore.jinja +++ b/template/.gitignore.jinja @@ -7,7 +7,6 @@ __pycache__/ # Python environments .nox/ -.tox/ .venv/ # Python packaging diff --git a/template/.pre-commit-config.yaml.jinja b/template/.pre-commit-config.yaml.jinja index 14e28a5..2fb4db5 100644 --- a/template/.pre-commit-config.yaml.jinja +++ b/template/.pre-commit-config.yaml.jinja @@ -14,12 +14,6 @@ repos: rev: v2.11.1 hooks: - id: pyproject-fmt -{% if tasks == 'tox' %} - - repo: https://github.com/tox-dev/tox-toml-fmt - rev: v1.2.1 - hooks: - - id: tox-toml-fmt -{% endif %} - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.14.7 hooks: @@ -48,19 +42,11 @@ repos: {%- endif %} additional_dependencies: - mdformat-gfm -{%- if docs == 'mkdocs' or docs == 'zensical' %} +{%- if docs == 'zensical' %} - id: mdformat files: ^docs/ additional_dependencies: - mdformat-footnote - mdformat-front-matters - - mdformat-mkdocs - mdformat-simple-breaks {%- endif %} - - - repo: https://github.com/adamchainz/blacken-docs - rev: 1.20.0 - hooks: - - id: blacken-docs - additional_dependencies: - - black==25.11.0 diff --git a/template/AGENTS.md b/template/AGENTS.md new file mode 100644 index 0000000..162de9d --- /dev/null +++ b/template/AGENTS.md @@ -0,0 +1,48 @@ +# Agent Instructions - {{ project_name }} + +This file is a starting point for repository-specific agent guidance. The first +agent working in a newly generated repository must inspect the project and +replace the placeholders and assumptions below with verified facts. + +## First-run checklist + +1. Inspect the complete repository tree, excluding generated caches and build output. +2. Verify the package layout: `{{ package_path }}`. +3. Read `pyproject.toml`, `README.md`, `Makefile`, and `noxfile.py`. +4. Replace this file's placeholder architecture and workflow notes with facts from the source. +5. Review every skill under `.github/skills/` and update stale paths or commands. +6. Run the documented checks and record the commands that actually pass. + +## Project overview + +- Distribution: `{{ distribution_name }}` +- Import package: `{{ package_name }}` +- Layout: `{{ package_layout }}` +- Python support: 3.10 through 3.14 +- Build: `uv build` +- Tests: `pytest` through Nox + +## Repository rules + +- Keep runtime code, tests, documentation, and scripts in their existing areas. +- Do not treat generated caches, build artifacts, or virtual environments as source. +- Keep tests focused on observable behavior and add regression coverage for bug fixes. +- Verify package metadata and import paths after changing the package layout. +- Update this file and the skills when architecture or workflow commands change. + +## Commands + +```text +make install +make test +make lint +make build +``` + +Use `nox -s tests`, `nox -s lint`, and `nox -s typecheck` for focused checks. + +## Architecture notes + +Replace this section during the first agent-context update with the package's +actual modules, public API boundaries, data flow, and important invariants. +Avoid copying assumptions from another project into this repository. diff --git a/template/CODE_OF_CONDUCT.md.jinja b/template/CODE_OF_CONDUCT.md.jinja deleted file mode 100644 index eb347b4..0000000 --- a/template/CODE_OF_CONDUCT.md.jinja +++ /dev/null @@ -1,132 +0,0 @@ -# Contributor Covenant Code of Conduct - -## Our Pledge - -We as members, contributors, and leaders pledge to make participation in our -community a harassment-free experience for everyone, regardless of age, body -size, visible or invisible disability, ethnicity, sex characteristics, gender -identity and expression, level of experience, education, socio-economic status, -nationality, personal appearance, race, caste, color, religion, or sexual -identity and orientation. - -We pledge to act and interact in ways that contribute to an open, welcoming, -diverse, inclusive, and healthy community. - -## Our Standards - -Examples of behavior that contributes to a positive environment for our -community include: - -* Demonstrating empathy and kindness toward other people -* Being respectful of differing opinions, viewpoints, and experiences -* Giving and gracefully accepting constructive feedback -* Accepting responsibility and apologizing to those affected by our mistakes, - and learning from the experience -* Focusing on what is best not just for us as individuals, but for the overall - community - -Examples of unacceptable behavior include: - -* The use of sexualized language or imagery, and sexual attention or advances of - any kind -* Trolling, insulting or derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or email address, - without their explicit permission -* Other conduct which could reasonably be considered inappropriate in a - professional setting - -## Enforcement Responsibilities - -Community leaders are responsible for clarifying and enforcing our standards of -acceptable behavior and will take appropriate and fair corrective action in -response to any behavior that they deem inappropriate, threatening, offensive, -or harmful. - -Community leaders have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions that are -not aligned to this Code of Conduct, and will communicate reasons for moderation -decisions when appropriate. - -## Scope - -This Code of Conduct applies within all community spaces, and also applies when -an individual is officially representing the community in public spaces. -Examples of representing our community include using an official email address, -posting via an official social media account, or acting as an appointed -representative at an online or offline event. - -## Enforcement - -Instances of abusive, harassing, or otherwise unacceptable behavior may be -reported to the community leaders responsible for enforcement at -{{ user_email }}. -All complaints will be reviewed and investigated promptly and fairly. - -All community leaders are obligated to respect the privacy and security of the -reporter of any incident. - -## Enforcement Guidelines - -Community leaders will follow these Community Impact Guidelines in determining -the consequences for any action they deem in violation of this Code of Conduct: - -### 1. Correction - -**Community Impact**: Use of inappropriate language or other behavior deemed -unprofessional or unwelcome in the community. - -**Consequence**: A private, written warning from community leaders, providing -clarity around the nature of the violation and an explanation of why the -behavior was inappropriate. A public apology may be requested. - -### 2. Warning - -**Community Impact**: A violation through a single incident or series of -actions. - -**Consequence**: A warning with consequences for continued behavior. No -interaction with the people involved, including unsolicited interaction with -those enforcing the Code of Conduct, for a specified period of time. This -includes avoiding interactions in community spaces as well as external channels -like social media. Violating these terms may lead to a temporary or permanent -ban. - -### 3. Temporary Ban - -**Community Impact**: A serious violation of community standards, including -sustained inappropriate behavior. - -**Consequence**: A temporary ban from any sort of interaction or public -communication with the community for a specified period of time. No public or -private interaction with the people involved, including unsolicited interaction -with those enforcing the Code of Conduct, is allowed during this period. -Violating these terms may lead to a permanent ban. - -### 4. Permanent Ban - -**Community Impact**: Demonstrating a pattern of violation of community -standards, including sustained inappropriate behavior, harassment of an -individual, or aggression toward or disparagement of classes of individuals. - -**Consequence**: A permanent ban from any sort of public interaction within the -community. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant][homepage], -version 2.1, available at -[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. - -Community Impact Guidelines were inspired by -[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. - -For answers to common questions about this code of conduct, see the FAQ at -[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at -[https://www.contributor-covenant.org/translations][translations]. - -[homepage]: https://www.contributor-covenant.org -[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html -[Mozilla CoC]: https://github.com/mozilla/diversity -[FAQ]: https://www.contributor-covenant.org/faq -[translations]: https://www.contributor-covenant.org/translations diff --git a/template/Makefile b/template/Makefile new file mode 100644 index 0000000..8f8ca63 --- /dev/null +++ b/template/Makefile @@ -0,0 +1,49 @@ +.PHONY: help clean build wheel install test coverage coverage-html lint format + +help: + @echo "Usage: make " + @echo "" + @echo "Targets:" + @echo " help Show this help message" + @echo " clean Remove build artifacts and cache files" + @echo " build Build source distribution and wheel" + @echo " wheel Build wheel only" + @echo " install Install the package with development dependencies" + @echo " test Run the pytest suite" + @echo " coverage Run tests with a terminal coverage report" + @echo " coverage-html Run tests with an HTML coverage report" + @echo " lint Run pre-commit checks" + @echo " format Format Python files with Ruff" + +clean: + rm -rf dist/ build/ .nox/ .pytest_cache/ .ruff_cache/ htmlcov/ + find . -name "*.egg-info" -type d -prune -exec rm -rf {} + + find . -name "__pycache__" -type d -prune -exec rm -rf {} + + find . -name "*.py[cod]" -delete + find . -name ".coverage*" -delete + +build: + uv build + +wheel: + uv build --wheel + +install: + uv sync --group dev + +test: + nox -s tests + +coverage: + uv run coverage run -m pytest + uv run coverage report + +coverage-html: + uv run coverage run -m pytest + uv run coverage html + +lint: + nox -s lint + +format: + uv run ruff format . diff --git a/template/README.md.jinja b/template/README.md.jinja index 503d95b..f53bfc8 100644 --- a/template/README.md.jinja +++ b/template/README.md.jinja @@ -5,7 +5,6 @@ [![CI](https://img.shields.io/github/actions/workflow/status/{{ repository_path }}/ci.yaml?branch=main&logo=github&label=CI)](https://github.com/{{ repository_path }}/actions/workflows/ci.yaml) [![License](https://img.shields.io/github/license/{{ repository_path }})](https://github.com/{{ repository_path }}/blob/main/LICENSE) [![mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org) -[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv) {% if project_description %} diff --git a/template/pyproject.toml.jinja b/template/pyproject.toml.jinja index e96a14e..a5a0927 100644 --- a/template/pyproject.toml.jinja +++ b/template/pyproject.toml.jinja @@ -1,25 +1,20 @@ [build-system] -{%- with requires = [] %} -{%- if backend == 'hatch' %} -build-backend = "hatchling.build" -{%- if 'hatch-vcs' in hatch_plugins %}{% do requires.append('hatch-vcs>=0.4') %}{% endif %} -{%- do requires.append('hatchling>=1.27') %} -{%- elif backend == 'uv' %} -build-backend = "uv_build" -{%- do requires.append('uv-build>=0.8.6') %} -{%- endif %} requires = [ -{%- for requirement in requires | sort %} - "{{ requirement }}", -{%- endfor %} + "hatchling>=1.27", + "uv-dynamic-versioning>=0.14", +] +build-backend = "hatchling.build" + +[tool.hatch.version] +source = "uv-dynamic-versioning" + +[tool.hatch.build.targets.wheel] +packages = [ + "{{ package_path }}", ] -{%- endwith %} [project] name = "{{ distribution_name }}" -{%- if not dynamic_version %} -version = "0.1.0" -{%- endif %} description = "{{ project_description }}" readme = "README.md" license = "{{ license }}" @@ -47,25 +42,24 @@ classifiers = [ "Programming Language :: Python :: Implementation :: CPython", "Typing :: Typed", ] -{%- if dynamic_version %} dynamic = [ "version", ] -{%- endif %} -{%- with dependencies = [] %} -{%- if cli == 'click' %}{% do dependencies.append('click>=8.3') %} -{%- elif cli == 'typer' %}{% do dependencies.append('typer>=0.20') %} -{%- elif cli == 'cyclopts' %}{% do dependencies.append('cyclopts>=4') %}{% endif %} -{%- if dependencies %} +{%- if cli == 'click' %} +dependencies = [ + "click>=8.3", +] +{%- elif cli == 'typer' %} dependencies = [ -{%- for dependency in dependencies | sort %} - "{{ dependency }}", -{%- endfor %} + "typer>=0.20", +] +{%- elif cli == 'cyclopts' %} +dependencies = [ + "cyclopts>=4", ] {%- else %} dependencies = [ ] {%- endif %} -{%- endwith %} {%- if docs %} urls.Changelog = "{{ documentation_url }}/changelog" urls.Documentation = "{{ documentation_url }}/" @@ -96,17 +90,8 @@ type = [ "mypy>=1.15", { include-group = "test" }, ] -{%- if docs == 'mkdocs' %} -docs = [ - "black>=25.11", - "mkdocs>=1.6.1", - "mkdocs-click>=0.9", - "mkdocs-material>=9.7", - "mkdocstrings-python>=2", -] -{%- elif docs == "zensical" %} +{%- if docs == "zensical" %} docs = [ - "black>=25.11", "zensical>=0.0.11", "mkdocstrings-python>=2", ] @@ -117,43 +102,48 @@ lint = [ release = [ "towncrier>=25.8", ] -{% if backend == 'hatch' and hatch_plugins %} -[tool.hatch] -{%- if 'hatch-vcs' in hatch_plugins %} -build.hooks.vcs.version-file = "src/{{ package_name }}/VERSION.txt" -version.fallback-version = "0.0.0" -version.source = "vcs" -version.raw-options.local_scheme = "no-local-version" -{%- endif %} -{% endif %} [tool.ruff] +line-length = 88 +target-version = "{{ target_python }}" lint.select = [ - "ALL", + "E", + "W", + "F", + "I", + "UP", + "B", + "C4", + "SIM", + "PIE", + "RUF", ] lint.ignore = [ + "E501", "COM812", # conflicts with formatter "ISC001", # conflicts with formatter ] lint.per-file-ignores."tests/**" = [ "S101", # using assert is okay in tests ] -lint.isort.required-imports = [ - "from __future__ import annotations", +lint.isort.known-first-party = [ + "{{ package_name }}", ] lint.pydocstyle.convention = "google" -lint.future-annotations = true +format.quote-style = "double" +format.indent-style = "space" +format.docstring-code-format = true [tool.codespell] write-changes = true [tool.pyproject-fmt] -max_supported_python = "3.14" - [tool.pytest] minversion = "9.0" addopts = [ "-ra", -{%- if 'readme' in doctest or 'docs' in doctest and docs == 'mkdocs' %} + "-v", + "--tb=short", +{%- if 'readme' in doctest or 'docs' in doctest %} "--doctest-glob", "*.md", {%- endif %} @@ -171,7 +161,7 @@ testpaths = [ "docs", {%- endif %} {%- if 'docstrings' in doctest %} - "src", + "{{ package_root }}", {%- endif %} "tests", {%- if 'readme' in doctest %} @@ -184,12 +174,8 @@ strict = true html.show_contexts = true html.skip_covered = false paths.source = [ - "src", -{%- if tasks == 'tox' %} - ".tox/**/site-packages", -{%- elif tasks == 'nox' %} + "{{ package_root }}", ".nox/**/site-packages", -{%- endif %} ] report.exclude_also = [ "-> [\"']?(Never|NoReturn)[\"']?:", @@ -261,7 +247,7 @@ name = "Fixed" showcontent = true [tool.mypy] -python_version = "3.10" +python_version = "3.{{ target_python[3:] }}" warn_unreachable = true enable_error_code = [ "ignore-without-code", diff --git a/template/scripts/release.py.jinja b/template/scripts/release.py.jinja index 31cc9db..db4f84d 100644 --- a/template/scripts/release.py.jinja +++ b/template/scripts/release.py.jinja @@ -1,13 +1,8 @@ # /// script # requires-python = ">=3.10" # dependencies = [ -{%- if dynamic_version %} # "packaging>=24.2", -{%- endif %} # "towncrier>=25.8", -{%- if not dynamic_version %} -# "uv>=0.8.6", -{%- endif %} # ] # /// """Release a new version.""" @@ -17,14 +12,11 @@ from __future__ import annotations import argparse -{%- if not dynamic_version %} -import json -{%- endif %} import subprocess -from typing import TYPE_CHECKING -{% if dynamic_version %} from packaging.version import Version -{% endif %} + +from typing import TYPE_CHECKING + if TYPE_CHECKING: from collections.abc import Sequence @@ -39,15 +31,7 @@ def create_parser() -> argparse.ArgumentParser: action="store_true", help="do not update the origin remote and reset the local repository", ) -{%- if dynamic_version %} parser.add_argument("version", type=Version, help="provide the version") -{%- else %} - parser.add_argument( - "version_args", - nargs=argparse.PARSER, - help="arguments or options to pass to the uv version command", - ) -{%- endif %} return parser @@ -55,24 +39,6 @@ def check_repository() -> None: """Check whether the local repository is dirty or clean.""" subprocess.check_call(["git", "diff", "--exit-code"]) -{% if not dynamic_version %} -def update_version(args: Sequence[str] | None) -> str: - """Update and return the version.""" - # Update the version. - version_json = subprocess.check_output( - [ - "uv", - "version", - "--no-sync", - "--output-format", - "json", - *args, - ], - ) - version = json.loads(version_json) - return version["version"] - -{% endif %} def get_current_branch() -> str: """Get the current Git branch.""" return subprocess.check_output( @@ -124,12 +90,7 @@ def main(argv: Sequence[str] | None = None) -> int: # Check whether the local repository is dirty or clean. check_repository() -{% if dynamic_version %} version = str(args.version) -{% else %} - # Run the uv version command to update the version. - version = update_version(args.uv_version_args) -{% endif %} release_branch = f"release/{version}" base_branch = get_current_branch() diff --git a/template/src/{% if dynamic_version %}.gitignore{% endif %} b/template/src/{% if dynamic_version %}.gitignore{% endif %} deleted file mode 100644 index 53309f0..0000000 --- a/template/src/{% if dynamic_version %}.gitignore{% endif %} +++ /dev/null @@ -1 +0,0 @@ -*/VERSION.txt diff --git a/template/src/{{ package_name }}/{% if cli == 'argparse' %}.{% endif %}/cli.py.jinja b/template/src/{{ package_name }}/{% if cli == 'argparse' %}.{% endif %}/cli.py.jinja deleted file mode 100644 index 2597006..0000000 --- a/template/src/{{ package_name }}/{% if cli == 'argparse' %}.{% endif %}/cli.py.jinja +++ /dev/null @@ -1,45 +0,0 @@ -"""The command-line interface.""" - -from __future__ import annotations - -import argparse -from typing import TYPE_CHECKING - -from . import __version__ - -if TYPE_CHECKING: - from collections.abc import Sequence - - -def create_parser() -> argparse.ArgumentParser: - """Create the argument parser. - - Returns: - An argument parser. - """ - parser = argparse.ArgumentParser( - prog="{{ distribution_name }}", - description="run the main program", - ) - parser.add_argument( - "--version", action="version", version=f"%(prog)s {__version__}" - ) - return parser - - -def main(argv: Sequence[str] | None = None) -> int: - """Run the main program. - - Args: - argv: Arguments passed from the command-line. - - Returns: - An exit code. - """ - parser = create_parser() - parser.parse_args(argv) - return 0 - - -if __name__ == "__main__": - raise SystemExit(main()) diff --git a/template/tests/{% if dynamic_version %}test_version.py{% endif %}.jinja b/template/tests/{% if dynamic_version %}test_version.py{% endif %}.jinja index b8bfc55..0d8e9ce 100644 --- a/template/tests/{% if dynamic_version %}test_version.py{% endif %}.jinja +++ b/template/tests/{% if dynamic_version %}test_version.py{% endif %}.jinja @@ -2,13 +2,12 @@ from __future__ import annotations -import importlib.resources +import importlib.metadata from {{ package_name }} import __version__ def test_version() -> None: """Test that the version attribute matches the package version.""" - version_path = importlib.resources.files("{{ package_name }}") - version = version_path.read_text().rstrip() + version = importlib.metadata.version("{{ distribution_name }}") assert __version__ == version diff --git a/template/{% if code_of_conduct %}CODE_OF_CONDUCT.md{% endif %}.jinja b/template/{% if code_of_conduct %}CODE_OF_CONDUCT.md{% endif %}.jinja new file mode 100644 index 0000000..9202f70 --- /dev/null +++ b/template/{% if code_of_conduct %}CODE_OF_CONDUCT.md{% endif %}.jinja @@ -0,0 +1,31 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We pledge to make participation in this project a harassment-free experience +for everyone and to act in ways that contribute to an open, welcoming, diverse, +inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment include: + +- Demonstrating empathy and kindness +- Respecting differing opinions and experiences +- Giving and accepting constructive feedback +- Accepting responsibility for mistakes +- Focusing on what is best for the community + +Unacceptable behavior includes harassment, discrimination, personal attacks, +unwelcome sexual language or imagery, publishing private information without +permission, and other conduct that would be inappropriate in a professional +setting. + +## Enforcement + +Report unacceptable behavior to {{ user_email }}. Project maintainers will +review reports promptly and fairly while respecting the reporter's privacy. + +This code is adapted from the [Contributor Covenant][covenant]. + +[covenant]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html diff --git a/template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/changelog.md b/template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/changelog.md deleted file mode 100644 index dbb97fd..0000000 --- a/template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/changelog.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -icon: material/rocket ---- - ---8<-- "CHANGELOG.md" diff --git a/template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/index.md.jinja b/template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/index.md.jinja deleted file mode 100644 index 2f68deb..0000000 --- a/template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/index.md.jinja +++ /dev/null @@ -1,33 +0,0 @@ ---- -icon: material/home ---- - -# {{ project_name }} - -[![PyPI](https://img.shields.io/pypi/v/{{ distribution_name }})](https://pypi.org/project/{{ distribution_name }}/) -[![Supported Python versions](https://img.shields.io/pypi/pyversions/{{ distribution_name }}?logo=python)](https://pypi.org/project/{{ distribution_name }}/) -[![CI](https://img.shields.io/github/actions/workflow/status/{{ repository_path }}/ci.yaml?branch=main&logo=github&label=CI)](https://github.com/{{ repository_path }}/actions/workflows/ci.yaml) -[![License](https://img.shields.io/github/license/{{ repository_path }})](https://github.com/{{ repository_path }}/blob/main/LICENSE) -[![mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org) -[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) -[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) -[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv) -{% if description %} -{{ description }}. -{% endif %} -## Installation - -Install `{{ distribution_name }}` using [pip](https://pip.pypa.io/) or [uv](https://docs.astral.sh/uv/): - -``` -pip install {{ distribution_name }} -``` -{% if cli %} -## Execution - -Execute `{{ distribution_name }}` using [uvx](https://docs.astral.sh/uv/): - -``` -uvx {{ distribution_name }} -``` -{% endif -%} diff --git a/template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/license.md b/template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/license.md deleted file mode 100644 index 02b8c78..0000000 --- a/template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/license.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -icon: material/license ---- - -```text ---8<-- "LICENSE" -``` diff --git a/template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/reference/api.md.jinja b/template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/reference/api.md.jinja deleted file mode 100644 index 8c598ec..0000000 --- a/template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/reference/api.md.jinja +++ /dev/null @@ -1,5 +0,0 @@ ---- -icon: material/book ---- - -# ::: {{ package_name }} diff --git a/template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/reference/index.md.jinja b/template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/reference/index.md.jinja deleted file mode 100644 index ea2a15b..0000000 --- a/template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/reference/index.md.jinja +++ /dev/null @@ -1,12 +0,0 @@ ---- -icon: material/book-open ---- - -# Reference - -The reference section provides: - -- [API](./api.md): The reference for all classes, functions, parameters and attributes. -{% if cli %} -- [Commands](./cli.md): The reference for the command-line interface. -{% endif -%} diff --git a/template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/reference/{% if cli == 'click' %}cli.md{% endif %}.jinja b/template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/reference/{% if cli == 'click' %}cli.md{% endif %}.jinja deleted file mode 100644 index dd2ed86..0000000 --- a/template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/reference/{% if cli == 'click' %}cli.md{% endif %}.jinja +++ /dev/null @@ -1,12 +0,0 @@ ---- -icon: material/play ---- - -# Commands - -::: mkdocs-click - :module: {{ package_name }}.cli - :command: main - :prog_name: {{ distribution_name }} - :depth: 1 - :style: table diff --git a/template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/reference/{% if cli and cli != 'click' %}cli.md{% endif %}.jinja b/template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/reference/{% if cli and cli != 'click' %}cli.md{% endif %}.jinja deleted file mode 100644 index 059cd44..0000000 --- a/template/{% if docs %}docs{% endif %}/{% if docs == 'mkdocs' %}.{% endif %}/reference/{% if cli and cli != 'click' %}cli.md{% endif %}.jinja +++ /dev/null @@ -1,15 +0,0 @@ ---- -icon: material/play ---- - -# Commands - -## {{ distribution_name }} - -Run the main program. - -**Usage:** - -``` -{{ distribution_name }} [OPTIONS] -``` diff --git a/template/{% if docs %}docs{% endif %}/{% if docs == 'zensical' %}.{% endif %}/index.md.jinja b/template/{% if docs %}docs{% endif %}/{% if docs == 'zensical' %}.{% endif %}/index.md.jinja index 26ea401..9f290dd 100644 --- a/template/{% if docs %}docs{% endif %}/{% if docs == 'zensical' %}.{% endif %}/index.md.jinja +++ b/template/{% if docs %}docs{% endif %}/{% if docs == 'zensical' %}.{% endif %}/index.md.jinja @@ -9,7 +9,6 @@ icon: lucide/house [![CI](https://img.shields.io/github/actions/workflow/status/{{ repository_path }}/ci.yaml?branch=main&logo=github&label=CI)](https://github.com/{{ repository_path }}/actions/workflows/ci.yaml) [![License](https://img.shields.io/github/license/{{ repository_path }})](https://github.com/{{ repository_path }}/blob/main/LICENSE) [![mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org) -[![black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv) {% if description %} diff --git a/template/{% if docs == 'mkdocs' %}mkdocs.yml{% endif %}.jinja b/template/{% if docs == 'mkdocs' %}mkdocs.yml{% endif %}.jinja deleted file mode 100644 index 434e3af..0000000 --- a/template/{% if docs == 'mkdocs' %}mkdocs.yml{% endif %}.jinja +++ /dev/null @@ -1,105 +0,0 @@ ---- -site_name: {{ project_name }} -site_url: {{ documentation_url }}/ -repo_url: {{ repository_url }} -repo_name: {{ repository_path }} -edit_uri: edit/main/docs/ -site_description: '{{ project_description }}' -site_author: {{ user_name }} -copyright: Copyright © {{ copyright_year }} {{ copyright_owner }} - -nav: - - Home: - - index.md - - Changelog: changelog.md - - License: license.md - - Reference: - - reference/index.md - - API: reference/api.md -{%- if cli %} - - Commands: reference/cli.md -{%- endif %} - -validation: - omitted_files: warn - absolute_links: warn - unrecognized_links: warn - -theme: - name: material - features: - - content.action.edit - - content.action.view - - content.code.annotate - - content.code.copy - - content.tabs.link - - navigation.footer - - navigation.indexes - - navigation.path - - navigation.sections - - navigation.tabs - - navigation.tabs.sticky - - navigation.top - - navigation.tracking - - search.highlight - - search.share - - search.suggest - - toc.follow - palette: - - media: '(prefers-color-scheme)' - toggle: - icon: material/brightness-auto - name: Switch to light mode - - media: '(prefers-color-scheme: light)' - scheme: default - toggle: - icon: material/brightness-7 - name: Switch to dark mode - - media: '(prefers-color-scheme: dark)' - scheme: slate - toggle: - icon: material/brightness-4 - name: Switch to system preference - -watch: - - CHANGELOG.md - - src/{{ package_name }} - -markdown_extensions: -{%- if cli == 'click' %} - - attr_list - - mkdocs-click -{%- endif %} - - pymdownx.highlight: - use_pygments: true - pygments_lang_class: true - - pymdownx.snippets - - pymdownx.superfences - - pymdownx.tabbed: - alternate_style: true - -plugins: - - search - - mkdocstrings: - handlers: - python: - inventories: - - https://docs.python.org/3/objects.inv - options: - parameter_headings: true - show_root_heading: true - show_symbol_type_heading: true - show_symbol_type_toc: true - type_parameter_headings: true - inherited_members: true - members_order: source - summary: true - docstring_style: google - docstring_options: - ignore_init_summary: true - docstring_section_style: table - merge_init_into_class: true - show_signature_annotations: true - show_signature_type_parameters: true - separate_signature: true - signature_crossrefs: true diff --git a/template/{% if tasks == 'nox' %}noxfile.py{% endif %}.jinja b/template/{% if tasks == 'nox' %}noxfile.py{% endif %}.jinja index 27e67dc..47b0bdc 100644 --- a/template/{% if tasks == 'nox' %}noxfile.py{% endif %}.jinja +++ b/template/{% if tasks == 'nox' %}noxfile.py{% endif %}.jinja @@ -10,7 +10,6 @@ from __future__ import annotations import os -from pathlib import Path import nox @@ -104,7 +103,7 @@ def typecheck(session: nox.Session) -> None: session=session, ) {%- endif %} - session.run("mypy", *(session.posargs or ("src", "tests"))) + session.run("mypy", *(session.posargs or ("{{ package_root }}", "tests"))) {% if docs %} @nox.session(python=DEFAULT_PYTHON_VERSION, tags=["checks"]) @@ -115,18 +114,6 @@ def docs(session: nox.Session) -> None: {%- else %} uv_sync("--group", "docs", session=session) {%- endif %} - tmp_dir = Path(session.create_tmp()) -{%- if docs == 'mkdocs' %} - session.run( - "mkdocs", - "build", - "--clean", - "--strict", - "--site-dir", - tmp_dir, - *session.posargs, - ) -{%- elif docs == 'zensical' %} session.run( "zensical", "build", @@ -134,7 +121,6 @@ def docs(session: nox.Session) -> None: "--strict", *session.posargs, ) -{%- endif %} @nox.session(python=DEFAULT_PYTHON_VERSION) def autodocs(session: nox.Session) -> None: @@ -144,21 +130,12 @@ def autodocs(session: nox.Session) -> None: {%- else %} uv_sync("--group", "docs", session=session) {%- endif %} -{%- if docs == 'mkdocs' %} - session.run( - "mkdocs", - "serve", - "--open", - *session.posargs, - ) -{%- elif docs == 'zensical' %} session.run( "zensical", "serve", "--open", *session.posargs, ) -{%- endif %} {% endif %}{% if install == 'uv sync' %} def uv_sync(*args: str, session: nox.Session) -> None: diff --git a/template/{% if tasks == 'tox' %}tox.toml{% endif %}.jinja b/template/{% if tasks == 'tox' %}tox.toml{% endif %}.jinja deleted file mode 100644 index 7aa9e25..0000000 --- a/template/{% if tasks == 'tox' %}tox.toml{% endif %}.jinja +++ /dev/null @@ -1,148 +0,0 @@ -requires = [ - "tox>=4.23.2", - "tox-uv>=1.25", - "uv>=0.8.6", -] -env_list = [ - "lint", - "typecheck", -{%- if docs %} - "docs", -{%- endif %} - "3.14", - "3.13", - "3.12", - "3.11", - "3.10", -] -labels.checks = [ - "lint", - "typecheck", -{%- if docs %} - "docs", -{%- endif %} -] -labels.tests = [ - "3.14", - "3.13", - "3.12", - "3.11", - "3.10", -] - -[env_run_base] -{%- if install == 'uv sync' %} -runner = "uv-venv-lock-runner" -{%- endif %} -description = "run tests under {env_name}" -package = "wheel" -wheel_build_env = ".pkg" -pass_env = [ - "PYTEST_*", -] -set_env = [ - { COVERAGE_FILE = { replace = "env", name = "COVERAGE_FILE", default = "{env_tmp_dir}{/}.coverage" } }, -] -dependency_groups = [ "test" ] -commands = [ - [ - "coverage", - "run", - "-m", - "pytest", - { replace = "posargs", extend = true, default = [ - "--durations", - "15", - "-n", - { replace = "env", name = "PYTEST_XDIST_AUTO_NUM_WORKERS", default = "auto" }, - ] }, - ], - [ "coverage", "combine" ], - [ "coverage", "report" ], -] - -[env.lint] -description = "run pre-commit linting" -skip_install = true -pass_env = [ - "DISABLE_PRE_COMMIT_UV_PATCH", -] -set_env = [ - { FORCE_PRE_COMMIT_UV_PATCH = "1" }, -] -dependency_groups = [ "lint" ] -commands = [ - [ - "pre-commit", - "run", - "--all-files", - { replace = "posargs", extend = true }, - ], -] - -[env.typecheck] -description = "typecheck Python code" -dependency_groups = [ "type" ] -commands = [ - [ - "mypy", - { replace = "posargs", extend = true, default = [ - "src", - "tests", - ] }, - ], -] -{%- if docs %} - -[env.docs] -description = "build the documentation" -package = "editable" -dependency_groups = [ "docs" ] -{%- if docs == 'mkdocs' %} -commands = [ - [ - "mkdocs", - "build", - "--clean", - "--strict", - "--site-dir", - "{env_tmp_dir}", - { replace = "posargs", extend = true }, - ], -] -{%- elif docs == 'zensical' %} -commands = [ - [ - "zensical", - "build", - "--clean", - "--strict", - { replace = "posargs", extend = true }, - ], -] -{%- endif %} - -[env.autodocs] -description = "serve the documentation locally" -package = "editable" -dependency_groups = [ "docs" ] -{%- if docs == 'mkdocs' %} -commands = [ - [ - "mkdocs", - "serve", - "--open", - { replace = "posargs", extend = true }, - ], -] -{%- elif docs == 'zensical' %} -commands = [ - [ - "zensical", - "serve", - "--open", - { replace = "posargs", extend = true }, - ], -] -{%- endif %} -{%- endif %} diff --git a/template/src/{{ package_name }}/__init__.py.jinja b/template/{{ package_root }}/{{ package_name }}/__init__.py.jinja similarity index 100% rename from template/src/{{ package_name }}/__init__.py.jinja rename to template/{{ package_root }}/{{ package_name }}/__init__.py.jinja diff --git a/template/src/{{ package_name }}/py.typed b/template/{{ package_root }}/{{ package_name }}/py.typed similarity index 100% rename from template/src/{{ package_name }}/py.typed rename to template/{{ package_root }}/{{ package_name }}/py.typed diff --git a/template/src/{{ package_name }}/{% if cli == 'argparse' %}.{% endif %}/__main__.py.jinja b/template/{{ package_root }}/{{ package_name }}/{% if cli == 'argparse' %}.{% endif %}/__main__.py.jinja similarity index 100% rename from template/src/{{ package_name }}/{% if cli == 'argparse' %}.{% endif %}/__main__.py.jinja rename to template/{{ package_root }}/{{ package_name }}/{% if cli == 'argparse' %}.{% endif %}/__main__.py.jinja diff --git a/template/{{ package_root }}/{{ package_name }}/{% if cli == 'argparse' %}.{% endif %}/cli.py.jinja b/template/{{ package_root }}/{{ package_name }}/{% if cli == 'argparse' %}.{% endif %}/cli.py.jinja new file mode 100644 index 0000000..9c35a9c --- /dev/null +++ b/template/{{ package_root }}/{{ package_name }}/{% if cli == 'argparse' %}.{% endif %}/cli.py.jinja @@ -0,0 +1,28 @@ +"""The command-line interface.""" + +from __future__ import annotations + +import argparse +from typing import TYPE_CHECKING + +from . import __version__ + +if TYPE_CHECKING: + from collections.abc import Sequence + + +def create_parser() -> argparse.ArgumentParser: + """Create the argument parser.""" + parser = argparse.ArgumentParser(prog="{{ distribution_name }}") + parser.add_argument("--version", action="version", version=f"%(prog)s {__version__}") + return parser + + +def main(argv: Sequence[str] | None = None) -> int: + """Run the main program.""" + create_parser().parse_args(argv) + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/template/src/{{ package_name }}/{% if cli == 'click' %}.{% endif %}/__main__.py.jinja b/template/{{ package_root }}/{{ package_name }}/{% if cli == 'click' %}.{% endif %}/__main__.py.jinja similarity index 100% rename from template/src/{{ package_name }}/{% if cli == 'click' %}.{% endif %}/__main__.py.jinja rename to template/{{ package_root }}/{{ package_name }}/{% if cli == 'click' %}.{% endif %}/__main__.py.jinja diff --git a/template/src/{{ package_name }}/{% if cli == 'click' %}.{% endif %}/cli.py.jinja b/template/{{ package_root }}/{{ package_name }}/{% if cli == 'click' %}.{% endif %}/cli.py.jinja similarity index 90% rename from template/src/{{ package_name }}/{% if cli == 'click' %}.{% endif %}/cli.py.jinja rename to template/{{ package_root }}/{{ package_name }}/{% if cli == 'click' %}.{% endif %}/cli.py.jinja index a08b68f..4c188da 100644 --- a/template/src/{{ package_name }}/{% if cli == 'click' %}.{% endif %}/cli.py.jinja +++ b/template/{{ package_root }}/{{ package_name }}/{% if cli == 'click' %}.{% endif %}/cli.py.jinja @@ -4,8 +4,6 @@ from __future__ import annotations import click -from . import __version__ - @click.command() @click.help_option("--help", "-h") diff --git a/template/src/{{ package_name }}/{% if cli == 'cyclopts' %}.{% endif %}/__main__.py.jinja b/template/{{ package_root }}/{{ package_name }}/{% if cli == 'cyclopts' %}.{% endif %}/__main__.py.jinja similarity index 100% rename from template/src/{{ package_name }}/{% if cli == 'cyclopts' %}.{% endif %}/__main__.py.jinja rename to template/{{ package_root }}/{{ package_name }}/{% if cli == 'cyclopts' %}.{% endif %}/__main__.py.jinja diff --git a/template/src/{{ package_name }}/{% if cli == 'cyclopts' %}.{% endif %}/cli.py.jinja b/template/{{ package_root }}/{{ package_name }}/{% if cli == 'cyclopts' %}.{% endif %}/cli.py.jinja similarity index 79% rename from template/src/{{ package_name }}/{% if cli == 'cyclopts' %}.{% endif %}/cli.py.jinja rename to template/{{ package_root }}/{{ package_name }}/{% if cli == 'cyclopts' %}.{% endif %}/cli.py.jinja index e6b9a46..ad62938 100644 --- a/template/src/{{ package_name }}/{% if cli == 'cyclopts' %}.{% endif %}/cli.py.jinja +++ b/template/{{ package_root }}/{{ package_name }}/{% if cli == 'cyclopts' %}.{% endif %}/cli.py.jinja @@ -11,11 +11,7 @@ app = cyclopts.App(version=f"{{ distribution_name }}, version {__version__}") @app.default def main() -> int: - """Run the main program. - - Returns: - An exit code. - """ + """Run the main program.""" return 0 diff --git a/template/src/{{ package_name }}/{% if cli == 'typer' %}.{% endif %}/__main__.py.jinja b/template/{{ package_root }}/{{ package_name }}/{% if cli == 'typer' %}.{% endif %}/__main__.py.jinja similarity index 100% rename from template/src/{{ package_name }}/{% if cli == 'typer' %}.{% endif %}/__main__.py.jinja rename to template/{{ package_root }}/{{ package_name }}/{% if cli == 'typer' %}.{% endif %}/__main__.py.jinja diff --git a/template/src/{{ package_name }}/{% if cli == 'typer' %}.{% endif %}/cli.py.jinja b/template/{{ package_root }}/{{ package_name }}/{% if cli == 'typer' %}.{% endif %}/cli.py.jinja similarity index 57% rename from template/src/{{ package_name }}/{% if cli == 'typer' %}.{% endif %}/cli.py.jinja rename to template/{{ package_root }}/{{ package_name }}/{% if cli == 'typer' %}.{% endif %}/cli.py.jinja index 24a2e23..65eebec 100644 --- a/template/src/{{ package_name }}/{% if cli == 'typer' %}.{% endif %}/cli.py.jinja +++ b/template/{{ package_root }}/{{ package_name }}/{% if cli == 'typer' %}.{% endif %}/cli.py.jinja @@ -12,11 +12,7 @@ app = typer.Typer(context_settings={"help_option_names": ["--help", "-h"]}) def show_version(value: bool) -> None: # noqa: FBT001 - """Show the version and exit. - - Args: - value: A boolean indicating whether to show the version and exit. - """ + """Show the version and exit.""" if value: typer.echo(f"{{ distribution_name }}, version {__version__}") raise typer.Exit(0) @@ -24,15 +20,7 @@ def show_version(value: bool) -> None: # noqa: FBT001 @app.command() def main( - version: Annotated[ # noqa: ARG001, FBT002 - bool, - typer.Option( - "--version", - callback=show_version, - is_eager=True, - help="Show the version and exit.", - ), - ] = False, + version: Annotated[bool, typer.Option("--version", callback=show_version, is_eager=True)] = False, ) -> None: """Run the main program.""" return diff --git a/uv.lock b/uv.lock index 42050a2..7ac2655 100644 --- a/uv.lock +++ b/uv.lock @@ -78,6 +78,109 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c6/da/117372469b9bb1555ae7f8a0b1f3e00345044e6006c50f3f6d3cb20c9843/copier_template_extensions-0.3.3-py3-none-any.whl", hash = "sha256:bf6bbdebada26132640d6e1128723fa1ff7eb59d008de07a7543c51e0facb0ea", size = 9893, upload-time = "2025-07-15T10:40:39.928Z" }, ] +[[package]] +name = "coverage" +version = "7.15.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/76/d0/55fe630f4cf94e3fcba868240fad8c8cdd1f764e2a932f8926347e6ec4cd/coverage-7.15.2.tar.gz", hash = "sha256:3df60dc267f0a2ca23cb7a9ab1109c62b9335ffbf519fcfe167157c28c09b81d", size = 927741, upload-time = "2026-07-15T18:56:19.558Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/10/03/060ce69008ac97bbc01b1411b3e55b61f6f015659400b46749b662107831/coverage-7.15.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:9b5bd92ff1ec22e535eab0de75fa6db021992791f461a2aceb7822c625a1187d", size = 221284, upload-time = "2026-07-15T18:53:29.52Z" }, + { url = "https://files.pythonhosted.org/packages/fc/a3/d936e8b53edd9684100a6aefaf3fcabaa54728fe33324436c8d279c047aa/coverage-7.15.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:44826758cfe73fcd0e6af5deb4ba6d5417cc1d13df3acb35c93484a11160f846", size = 221799, upload-time = "2026-07-15T18:53:31.708Z" }, + { url = "https://files.pythonhosted.org/packages/ae/a3/ca234b06aec7ee28226f11d39a696b4481fe5eddfce8e03bf39979bb8ffb/coverage-7.15.2-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:09f5c6ec5901f667bd97dd140b5b9a2586b10efec66f46fb1e6d8135f8b95bdf", size = 248544, upload-time = "2026-07-15T18:53:33.212Z" }, + { url = "https://files.pythonhosted.org/packages/2b/89/dda79527bb7573ba91828b2fb91b3105d87378d6a2749ca0c0924ce0addd/coverage-7.15.2-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:1d16e3a7104ea84f03e614611b3edbf6fb6892554b3ab0fe7fbb3f2b2ef04376", size = 250374, upload-time = "2026-07-15T18:53:34.683Z" }, + { url = "https://files.pythonhosted.org/packages/67/c6/c33755a34572f81f49a8c0cdf6b622f35ccb3238b136e1909daf0cdd4319/coverage-7.15.2-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d46e62cb35d91e6e2589fda6d28074426b0e276422b5d2ebef2c6b11dc60dbfd", size = 252239, upload-time = "2026-07-15T18:53:36.205Z" }, + { url = "https://files.pythonhosted.org/packages/b9/6f/dc341741b375be53a5baeee5b4bf0f0e525d38caed428f7932d23bb7bcb1/coverage-7.15.2-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:dfd3db045e95960ae3683059571e597fda7cc610106a8916f77c5839048c1deb", size = 254150, upload-time = "2026-07-15T18:53:37.863Z" }, + { url = "https://files.pythonhosted.org/packages/e9/8d/966a18a5b195cb4e77b14c53f5f3dce22b5da05e6de7fafd1e08f2d2067a/coverage-7.15.2-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:affd532502d34c0472d0cdb181325c89f1d2c44992fef0c17e88e7b1576259a1", size = 249234, upload-time = "2026-07-15T18:53:39.394Z" }, + { url = "https://files.pythonhosted.org/packages/c5/8b/8b2e367496ab48484d48e79984fec76cdc1b7cb5d3a00ee799a5602e3ec9/coverage-7.15.2-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:d17d7512151fedfcc64c1821a8977fc9be0dbf495754669afcab7b57abc98ae9", size = 250276, upload-time = "2026-07-15T18:53:41.027Z" }, + { url = "https://files.pythonhosted.org/packages/63/92/1199318a200eb6c8c6ce0192c892c8710ac791abbe0f35099294620bbfda/coverage-7.15.2-cp310-cp310-musllinux_1_2_i686.whl", hash = "sha256:e26ff680768b8095e8874aabe0e9d3a47a2a9f176a8340d05f8604c56457c23a", size = 248283, upload-time = "2026-07-15T18:53:42.557Z" }, + { url = "https://files.pythonhosted.org/packages/56/da/be284a55c5619bda891a89c27dfd59324a2c6a14d755cf6aac6960ceebeb/coverage-7.15.2-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:7e8f27131dc7cd53de2c137dd207b3720919320b3c20d499dc30aa9ee6173287", size = 252093, upload-time = "2026-07-15T18:53:44.271Z" }, + { url = "https://files.pythonhosted.org/packages/d4/53/ee112da833ddd77b73c6d781a98029b45b584b136615b4900ed0569f887e/coverage-7.15.2-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:728a33676d4c3f0db977990a4bd421dcaa3be3e53b5b6273036fff6666008e89", size = 248552, upload-time = "2026-07-15T18:53:45.7Z" }, + { url = "https://files.pythonhosted.org/packages/82/6a/802cfc802e9113494c80bf3f284cd4d72faeb1f24e244f61046af364f2ca/coverage-7.15.2-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:29c052f7c83ccfcc5c577eaae025d2e4a9bb80daf03c0ac31c996e83b000ce88", size = 249154, upload-time = "2026-07-15T18:53:47.256Z" }, + { url = "https://files.pythonhosted.org/packages/2c/65/529808e91d651147edae408fd9e894abc3b8cad7f3e594bbc36719a3e13a/coverage-7.15.2-cp310-cp310-win32.whl", hash = "sha256:1268ac8fb9ddcd783d3948dbabaf80a5d53bfdaa0575e873e2139a692f797443", size = 223334, upload-time = "2026-07-15T18:53:48.768Z" }, + { url = "https://files.pythonhosted.org/packages/68/0f/0e1829d7001130876dfbc0b4e1c737ea7c155b809e3e4a98a0aa268e2369/coverage-7.15.2-cp310-cp310-win_amd64.whl", hash = "sha256:9f4432898c4bf2fba0435bbe35dd4437d7264565e5a88a21f5b49d8662a6b629", size = 223959, upload-time = "2026-07-15T18:53:50.429Z" }, + { url = "https://files.pythonhosted.org/packages/7d/3a/54536704f507d4573bf9161c4d0dd3dd59b6d85e48c664e901b6844d8e33/coverage-7.15.2-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:2f1ec6f304b156669cfde653b4e9a953f5de87e247ea02ac599bce0ab2744036", size = 221414, upload-time = "2026-07-15T18:53:51.941Z" }, + { url = "https://files.pythonhosted.org/packages/b6/d9/8ba925d29743e3577b21e4d8c11a702b76bc93c41e7fdfd1177af63d4b8d/coverage-7.15.2-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4d3361879d736f469f45723c11ea1a5bbdaf1f6928f0e632c940378b5aa9b660", size = 221913, upload-time = "2026-07-15T18:53:53.682Z" }, + { url = "https://files.pythonhosted.org/packages/09/54/a855f3aa0187f2b431ade4e4791b77b56282cfb5d201c83ec26a31b5b36a/coverage-7.15.2-cp311-cp311-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:c6a98d698f9e2c8008d0370ec7fc452ebfcc530002ae2d0061170d768b992589", size = 252332, upload-time = "2026-07-15T18:53:55.467Z" }, + { url = "https://files.pythonhosted.org/packages/8e/d3/13ac97b4370640ba3452fc8559b06cc2f479ce3ba4a0b632a73e44c38a7d/coverage-7.15.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:d50dd325e18ec25bfcc10cd7f99b04df1ab9ec76b0918c260e60817ad0643dee", size = 254243, upload-time = "2026-07-15T18:53:57.055Z" }, + { url = "https://files.pythonhosted.org/packages/88/83/5eca144942d8d0659d3f55176517f4a59cdc65eefd17146a0770935a3ebd/coverage-7.15.2-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:67d7602480a47bdf5b675635403625553ebaa70d5a62a657c035149fd401cea0", size = 256352, upload-time = "2026-07-15T18:53:58.83Z" }, + { url = "https://files.pythonhosted.org/packages/4e/ba/d3db2e01a50fc88cdb4c0f19542bcf6f61489e34dc9aa3538413e2459a38/coverage-7.15.2-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:cee0f89f4767a6057c8fbf168f8135f18be651300496086bd873e3189fed0487", size = 258313, upload-time = "2026-07-15T18:54:00.497Z" }, + { url = "https://files.pythonhosted.org/packages/78/b3/aba83416e9177df28e5186d856c19158c59fc0e7e814aaa61a4a2354ad1b/coverage-7.15.2-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:a29ec5305a7335aacee2d799e3422e91e1c8a12474986e2b3b07e315c91be82f", size = 252449, upload-time = "2026-07-15T18:54:02.456Z" }, + { url = "https://files.pythonhosted.org/packages/6a/a5/4b00ecac0194431ab451b0f6710f8e2517d04cef60f821b14dec4637d575/coverage-7.15.2-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:48ccc6395958eda89093ecdc35644c86f23a8b23a7f4d44958812b721aad67c1", size = 254043, upload-time = "2026-07-15T18:54:04.072Z" }, + { url = "https://files.pythonhosted.org/packages/75/b6/cfa209b4313ee7f1b34da47efcd789ea51c024ad35af390e00f5a3c10a2e/coverage-7.15.2-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:81f382c5a94b434ec1f6da607edb904c76d7212e618cd4d1bc9f97bed4120ef5", size = 252107, upload-time = "2026-07-15T18:54:06.745Z" }, + { url = "https://files.pythonhosted.org/packages/36/67/e8cac5a6954038c98d7fe7eb9802afe7ab3ecb637bb7cc00e69b4148b56d/coverage-7.15.2-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:bbc808daf4f5cd567af8075ecc72d21c6dfef9a254709a621a84c217c935ebc0", size = 255873, upload-time = "2026-07-15T18:54:08.48Z" }, + { url = "https://files.pythonhosted.org/packages/2c/92/395cca9f330a86c3fe3471d73e2c102116c4c58fdc619dbbc125c6e93a54/coverage-7.15.2-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:a4c46b247b5d4b78f613bd89fea926d32b25c6cc61a50bd1e99ba310348f3dad", size = 251826, upload-time = "2026-07-15T18:54:10.083Z" }, + { url = "https://files.pythonhosted.org/packages/51/60/3e91b20295439652424f426b7086ec5bf4fbe3f604c73eda22b986c4fd6b/coverage-7.15.2-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:094dd37f3ef7b2da8b068b583d1f4c40f91c65197e16c52a71962d5d537fc5db", size = 252735, upload-time = "2026-07-15T18:54:11.878Z" }, + { url = "https://files.pythonhosted.org/packages/a5/eb/8c07839005e5e3c6b3877d3a6e2a80ce766589f31dd2b6882b78d59a7b8c/coverage-7.15.2-cp311-cp311-win32.whl", hash = "sha256:a63b9e190711134d581c4d703df5df09851b1acf99792c7aacbbe9f41f0283c9", size = 223500, upload-time = "2026-07-15T18:54:13.525Z" }, + { url = "https://files.pythonhosted.org/packages/2e/98/59d83c257cd59f0fbaf9d9ddb26b744a576760dfd1ae16e516408894a02b/coverage-7.15.2-cp311-cp311-win_amd64.whl", hash = "sha256:8bb9f4b4279187560796a4cdaca3b0a93dd97e48ee667df005f4ed9a97403688", size = 223973, upload-time = "2026-07-15T18:54:15.163Z" }, + { url = "https://files.pythonhosted.org/packages/ea/09/2d285c8bef5c4f695d120c1c96dc11715638aa8e134069f210bb6a62a9fe/coverage-7.15.2-cp311-cp311-win_arm64.whl", hash = "sha256:8c726b232659cbd2ae57ade46509eb068c9bd7a06df9fcbff6fe484870006934", size = 223519, upload-time = "2026-07-15T18:54:16.803Z" }, + { url = "https://files.pythonhosted.org/packages/6a/50/eb5bf42e531611a9f8d272556b1ed4de503f84a91413584094487cf69f8f/coverage-7.15.2-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:1adac78e5abc7c5438f7a209c9ca69d06542f0bf481d728b6989ea80b813fdf9", size = 221587, upload-time = "2026-07-15T18:54:18.439Z" }, + { url = "https://files.pythonhosted.org/packages/06/d1/da99af464c335d4e023a6efcd7ec30f63b88a43c93745154ab74ffb31cea/coverage-7.15.2-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:b868acc62aa5de3be7a9d05c2333bf8359ca987e43f9cb30ff8fbda6a024ab73", size = 221943, upload-time = "2026-07-15T18:54:20.062Z" }, + { url = "https://files.pythonhosted.org/packages/5b/8a/13c42723d61ca447eafa18732e8141dd6a63f2732e1c7e1502c182dd88d7/coverage-7.15.2-cp312-cp312-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:6f6966fc30e6f06ca8f98fb0ce51eda6b111b3ee8d066a8b1ec9e77fa06ab55d", size = 253450, upload-time = "2026-07-15T18:54:21.765Z" }, + { url = "https://files.pythonhosted.org/packages/d7/29/99021303f98fbdcb63504b4d07bea4cc025b9b2dd907c4f07c85d50a0dab/coverage-7.15.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:68af907f595ab01a78f794932ff3bdf929c316d3000810d38dbc247129e26f8b", size = 256187, upload-time = "2026-07-15T18:54:23.4Z" }, + { url = "https://files.pythonhosted.org/packages/f9/a8/fd503715ed6ca9c5d742923aa5209257340b367a867b2ced0c7d4ba8a0b9/coverage-7.15.2-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:afa29e2eff3d5729267e2cb2fd4ce9d61c952932fb2694e34ccb5d9540c6a296", size = 257301, upload-time = "2026-07-15T18:54:25.183Z" }, + { url = "https://files.pythonhosted.org/packages/da/40/3f4b8fb409810036ebc2857d36adc0498c6e957b5df0290c5036b2e143f1/coverage-7.15.2-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:bbf44513ceb1589e31948e20eafbde9deaface90e1a1afa5f5f77b4423d17ce6", size = 259562, upload-time = "2026-07-15T18:54:27.204Z" }, + { url = "https://files.pythonhosted.org/packages/0b/8a/9bdffbef47db77cce3d6b02a28f7e919b19f0106c4b080c2c2246040f885/coverage-7.15.2-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:9deddf09eecb717b7f980414b43d90a5b22ff3967d2949ab29cb0aa83d9e9098", size = 253841, upload-time = "2026-07-15T18:54:29.134Z" }, + { url = "https://files.pythonhosted.org/packages/1b/1e/9031efde019d31a06646261fce6dfc5c3c74e951e27a71e5c9a424563178/coverage-7.15.2-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ae901f7e55ba405c84ee1cab3d3e962e4e871e4a2bcb9c90911adbd69b42ac5a", size = 255221, upload-time = "2026-07-15T18:54:31.142Z" }, + { url = "https://files.pythonhosted.org/packages/56/db/787acde872389fc84a9ef9d8cd1ccc658e391ab4cb5b28092a714426a394/coverage-7.15.2-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a0f47002c6eeb7c280228467a4cb0cc15ca2103a8421b986b2d3ec04a0f9bd8b", size = 253366, upload-time = "2026-07-15T18:54:32.886Z" }, + { url = "https://files.pythonhosted.org/packages/2f/9b/6f57bc4b93c842eef1695f8cdaf2318e35e7ba54f5ba80d84be213ab7858/coverage-7.15.2-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:1cd7a5beb7af3e864a13b1f0fb26efd3695da43ef0daf71e586adfffaf34d5b2", size = 257434, upload-time = "2026-07-15T18:54:34.7Z" }, + { url = "https://files.pythonhosted.org/packages/88/26/b3186a21b2acc83e451118978905c81c7072c3333707804db09a78c096a2/coverage-7.15.2-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:97a5c5457a9fb1d6c4e06cfb5dc835871fbfb6a6a51addc9e925bdeff5ef7440", size = 252935, upload-time = "2026-07-15T18:54:36.548Z" }, + { url = "https://files.pythonhosted.org/packages/20/c2/c9f3376b2e717ea69ed7a6e9a5fcab968fb0b290db6cf4bd9a1fc7541b75/coverage-7.15.2-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:0901cfe6c13bcd2302da4f83e884555d2a22bda6e4c476f09ef204ba20ca536e", size = 254807, upload-time = "2026-07-15T18:54:38.296Z" }, + { url = "https://files.pythonhosted.org/packages/f0/e1/dfc15401f4a8aaeb486e1ba3e9e3c40522a6e38bd0ecf0b3f29cb8082957/coverage-7.15.2-cp312-cp312-win32.whl", hash = "sha256:b171bdd71cb7ff792bf32e376173b0ace7e7963e7e57c58dfc42063a6a7174cd", size = 223641, upload-time = "2026-07-15T18:54:40.103Z" }, + { url = "https://files.pythonhosted.org/packages/91/40/81b6d809d320cd366ec5bdf8176575e897dcb8efe7fb4b489ef9e93e4d13/coverage-7.15.2-cp312-cp312-win_amd64.whl", hash = "sha256:582edc45c2040543fef83341be23c43024a3ab3ae0c2d8bc498a06282905ad40", size = 224172, upload-time = "2026-07-15T18:54:41.882Z" }, + { url = "https://files.pythonhosted.org/packages/ef/28/9f14ec438149f7de557f45518f09b4a7917b795cc37083aa7db482693f8c/coverage-7.15.2-cp312-cp312-win_arm64.whl", hash = "sha256:a638db90c61cd219aeee65e83a24fdaa57269a741ae0cf773309208ac862cee3", size = 223556, upload-time = "2026-07-15T18:54:43.674Z" }, + { url = "https://files.pythonhosted.org/packages/fc/d5/f8c838e6b7282976f7c918884b792df7a0c42c5bba5d99c60ad2d221d56d/coverage-7.15.2-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:1121caa19159a38b5463eaae4b1e1fde81e525b15ecc5e000cd5b1a108f743a8", size = 221606, upload-time = "2026-07-15T18:54:45.448Z" }, + { url = "https://files.pythonhosted.org/packages/bf/37/97c926376364f66298cc44893b89cdf17b8bc406376497c4061ae4b8a8ff/coverage-7.15.2-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a300c6934e0989c327b9e8a1e110329da4641149f872bbe9f70168be66da76c1", size = 221982, upload-time = "2026-07-15T18:54:47.341Z" }, + { url = "https://files.pythonhosted.org/packages/b7/30/a36050a6e83c2135ee0776f452ca3948224befc6d7f26acecc082d0c106a/coverage-7.15.2-cp313-cp313-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:2617f8799d268fabdeef42a7e89ac3a23e1deee9025427db2df970f99a89a578", size = 252972, upload-time = "2026-07-15T18:54:49.2Z" }, + { url = "https://files.pythonhosted.org/packages/31/d3/06b5f1daf95f0f15ab05bd75f26ba5f3c8b33d0bb72f3aaa3cf41d1bad3a/coverage-7.15.2-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:7dc2950a2992cd676d35c20ae63522836deeb034f08874699d14068710af3dc1", size = 255569, upload-time = "2026-07-15T18:54:51.098Z" }, + { url = "https://files.pythonhosted.org/packages/81/1c/9afb3f8de2b8d36960391c48559a2e3ff96594b58099f115921549ea8d0d/coverage-7.15.2-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9e36686f7a442185db2400b3df171aac520869faf9deb59df687d28659eda2a6", size = 256806, upload-time = "2026-07-15T18:54:53.145Z" }, + { url = "https://files.pythonhosted.org/packages/64/d8/b989f96061a5e32d82fddd1b1b9ff48a7c8f8ae7606f0e80fd9de54b1e33/coverage-7.15.2-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:7d29ca7bd67af6e12e74632d65f026eabc1364da5c254494cd914446a28a3ef7", size = 258936, upload-time = "2026-07-15T18:54:55.015Z" }, + { url = "https://files.pythonhosted.org/packages/b8/fa/f99771f5110457c7b511c1935ca49ddf288218eaa84322e028b9334146ae/coverage-7.15.2-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:db9c8438057e5b0f6a22a0af99c0c1d26b57fbbdbd1be5861ddb8f897fcc3a2d", size = 253178, upload-time = "2026-07-15T18:54:57.527Z" }, + { url = "https://files.pythonhosted.org/packages/f6/96/c098a6044d119c751ceede7be91035fa8310170ec24a6523aff72f0a5793/coverage-7.15.2-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:63022c4c8dec1d0342f05c3ede99842fe3d007689acc45e86f123a1746e4a026", size = 254934, upload-time = "2026-07-15T18:54:59.41Z" }, + { url = "https://files.pythonhosted.org/packages/b2/a2/1457b3a7a50c8d77500103b97a046db863e2f59a1cf6d2f814595f349885/coverage-7.15.2-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:6c0be82b4d4aa5b2704e08518e2252f3e3d110164bcca826816801052e48a7aa", size = 252898, upload-time = "2026-07-15T18:55:01.338Z" }, + { url = "https://files.pythonhosted.org/packages/6c/0e/76958874c471ecfcdde0d2b2747bb2c61bdbf34a40636f4ce9db9923e643/coverage-7.15.2-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:4510fb9cdf6bb02dfa6af0be4a534b8102d086e22e4a33f8836df663da3d660d", size = 257056, upload-time = "2026-07-15T18:55:03.243Z" }, + { url = "https://files.pythonhosted.org/packages/7c/7c/3d7c4e3bf58baa40327dc7edc2272b17cf02299366d52763db1b0ca1556a/coverage-7.15.2-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:42ec3d989421b174a2ab607c1539f24127ad362757b7f1c0c0d7a2993f7eb37b", size = 252718, upload-time = "2026-07-15T18:55:05.029Z" }, + { url = "https://files.pythonhosted.org/packages/c8/b8/1cecffed9ce14fb25be9ba42d37b6bb61485c9a3ddd43cd3dde36b6087d8/coverage-7.15.2-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:e8f91bce78e32343af184c3b7fa28fcf5a9e2641f4b6623d392038f804939188", size = 254490, upload-time = "2026-07-15T18:55:06.889Z" }, + { url = "https://files.pythonhosted.org/packages/6c/2c/42984561bc7f4c045dca67516a0c50ee5ef8d84352dbeb5559dc86c4823e/coverage-7.15.2-cp313-cp313-win32.whl", hash = "sha256:434e68d531858205895eb0d74b73d20b84260de426387d53c422a5acda2cf050", size = 223647, upload-time = "2026-07-15T18:55:08.941Z" }, + { url = "https://files.pythonhosted.org/packages/41/9f/39c7c9245efc583beddf89a87683574e663ed93637f3afb6cd7b88405676/coverage-7.15.2-cp313-cp313-win_amd64.whl", hash = "sha256:26c3b04a6377fd7c09800921fa934e3a17c0020439cd59df73e73ae1d4b6a78c", size = 224190, upload-time = "2026-07-15T18:55:10.789Z" }, + { url = "https://files.pythonhosted.org/packages/c7/de/3a2883cf8a213659280ef4b403059e17a9acaeb7fc7fd4105e1226ff2e6d/coverage-7.15.2-cp313-cp313-win_arm64.whl", hash = "sha256:3ed010aa1b69cda8e827aabfca9866216c980e2dca82ab9a78c5f83689964c8b", size = 223583, upload-time = "2026-07-15T18:55:12.678Z" }, + { url = "https://files.pythonhosted.org/packages/81/5f/aed265fd7a3551a394f36dfe41868aee709b7f95db4052205b4ad1563ac3/coverage-7.15.2-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:40f633c5c5fc783732f6312280122e859538fa24461235597c13d803ea9a108a", size = 221650, upload-time = "2026-07-15T18:55:14.527Z" }, + { url = "https://files.pythonhosted.org/packages/6b/2c/222ba12a545189017120f8eddfc1a0bd4616b47d5d4a8d99421edb2fe4c6/coverage-7.15.2-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:075560438765b7a2ef43bf7aa7758661b53d889df47f062a31bda6c1ade553a2", size = 221988, upload-time = "2026-07-15T18:55:16.674Z" }, + { url = "https://files.pythonhosted.org/packages/aa/38/304b5877ab46e6c290b4292cfcf3fe28245f0e5597cad7f6acc91fc7e0a4/coverage-7.15.2-cp314-cp314-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:25fd15dd40a0a2c51a500d664ca29053c09c3259d998407bf982b6e114696138", size = 253029, upload-time = "2026-07-15T18:55:18.856Z" }, + { url = "https://files.pythonhosted.org/packages/6c/58/821b533b8db9e44cf1d8a97bd525149ced40dde1d0093da02cb78e715244/coverage-7.15.2-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:b9a6367e4aff723e8ee8190836836124284e8fcd4265e307c844010cfa074f3f", size = 255536, upload-time = "2026-07-15T18:55:21.027Z" }, + { url = "https://files.pythonhosted.org/packages/f1/f2/7aa06604c389d32ea7f0a6a988359a7eafc3cd3f8e7bc2e88cd2fdf0b877/coverage-7.15.2-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9854ca62c152874b2060772503535be2e8f53f70b8aaa7686b094888d872f984", size = 256881, upload-time = "2026-07-15T18:55:23.125Z" }, + { url = "https://files.pythonhosted.org/packages/a2/4f/1ef342339c7916d0096bc5888cc0f653882cc7bc8f897d5cb89143287c9b/coverage-7.15.2-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:913b6c56e110da40e035bbd168353bf7aaa2544a5eaccea5d98a4629aac156c7", size = 259196, upload-time = "2026-07-15T18:55:25.099Z" }, + { url = "https://files.pythonhosted.org/packages/fe/f4/7ed055d7a9c5ec13b161773a115a5ccc6b0081d568c31fad830806306cc7/coverage-7.15.2-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:aaccad4129d735a8a4d526f26929894c9a4e8ef7034566f210b176749d6906e3", size = 253036, upload-time = "2026-07-15T18:55:27.018Z" }, + { url = "https://files.pythonhosted.org/packages/14/79/ea82cca18c242a3a38b6c017da39726aa62dcb64aa635abf79b92009975c/coverage-7.15.2-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:a164b50081fc7357331c4024ef4d17b78ba325f8380d05f5a69599a7e05257ee", size = 254887, upload-time = "2026-07-15T18:55:29.084Z" }, + { url = "https://files.pythonhosted.org/packages/a4/ba/a136db3c0d9562b00e10b72540dbf3a33cd3bc5b95060c9308e247494623/coverage-7.15.2-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:bfd341ccf78128e72c094bc70cc25b3ef309c33c7c2c66ba3ed4309549e02de1", size = 252852, upload-time = "2026-07-15T18:55:31.184Z" }, + { url = "https://files.pythonhosted.org/packages/17/17/ea334246b16b7d059953fad6fdefa11e33c68efbd3fe37b1098120a1fac2/coverage-7.15.2-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:1473b3ba8e7ee0f076117b1a72c23f579a2b9e2bb742f48a8d86ea27ca93f91a", size = 257128, upload-time = "2026-07-15T18:55:33.163Z" }, + { url = "https://files.pythonhosted.org/packages/ed/c3/074fb66d46d607855f710876b117cbda562c5ab08363528e78820449f937/coverage-7.15.2-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:17c432b5f73ad52ef46fb06019f6fa7c66ce381961cf0f7dfd1d3a4bd3a98145", size = 252668, upload-time = "2026-07-15T18:55:35.063Z" }, + { url = "https://files.pythonhosted.org/packages/e1/c1/f620850ada9b36435921c9a3a8057013422b1d964eb4bf37fe138724d192/coverage-7.15.2-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:77f0ef5011df53a4bd1b35211ab122287f8d9b8d7aa1c4553e5c2deb24b1d446", size = 254325, upload-time = "2026-07-15T18:55:37.125Z" }, + { url = "https://files.pythonhosted.org/packages/cc/31/a729ca3689404493af82ef8e6ff70bd88bdda8da89aeef6ca9b387aeb2b4/coverage-7.15.2-cp314-cp314-win32.whl", hash = "sha256:f653e5d7248c1191ec988a85c72edeab46c3ff44f90639a4ed4874ec0be90243", size = 223844, upload-time = "2026-07-15T18:55:39.078Z" }, + { url = "https://files.pythonhosted.org/packages/c6/83/5d809dc808fb1698c671f3e372259bb9158e64b7ea526fc6ab7de64de9fe/coverage-7.15.2-cp314-cp314-win_amd64.whl", hash = "sha256:9911f31aad8906abe337c271343485cf20df5e70df5d2f57f9f136e7b55f26bc", size = 224331, upload-time = "2026-07-15T18:55:41.346Z" }, + { url = "https://files.pythonhosted.org/packages/16/4e/35e488548e952795829e129995c4174df33bf432b591d1aa42c8d9e4e7ad/coverage-7.15.2-cp314-cp314-win_arm64.whl", hash = "sha256:e38def96ad59853824c97953fdcd2c320a84ba3ce99b417db78af8bb6c3db635", size = 223760, upload-time = "2026-07-15T18:55:43.518Z" }, + { url = "https://files.pythonhosted.org/packages/ed/49/dd2c86cd6374038f6e415fb5bfb86db5218553209c081384a020369dee79/coverage-7.15.2-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:835ec4e20b45f0a7f63ed78f94065aca00de033403df8377bfe8b9c6abc0a7be", size = 222384, upload-time = "2026-07-15T18:55:45.569Z" }, + { url = "https://files.pythonhosted.org/packages/d3/74/173ff17a1c0808e5a438f549f6f145d5ac7528f2791310b63523e3200ac7/coverage-7.15.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:7466cc7ab6dc0db871d264bf99e8779f0917ee63d40730af0552f71535a6e072", size = 222647, upload-time = "2026-07-15T18:55:47.544Z" }, + { url = "https://files.pythonhosted.org/packages/84/f8/b8cba872162356fb44ac79c10309d987206a4461e32072fc29228dad7331/coverage-7.15.2-cp314-cp314t-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl", hash = "sha256:e370c12133095ff18432de8c044962be85a5a96d90c6fcbce8e17e76236d2328", size = 264013, upload-time = "2026-07-15T18:55:49.768Z" }, + { url = "https://files.pythonhosted.org/packages/ee/67/a807a7586d0b8cae485308ddd55756f0806c92f8e0b411bacbf23c48edf3/coverage-7.15.2-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:fe41909c9515c3bfdb5f02c4d1f857dba322d9a9a1178069b91eea77889df63a", size = 266135, upload-time = "2026-07-15T18:55:51.941Z" }, + { url = "https://files.pythonhosted.org/packages/ce/67/cd78771dc985f7e4ebdcc82b1a96d9a932af9e806f01f2f91a89f4c72e80/coverage-7.15.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6aa28cfb6488e5453b5b762d65f73aa586380f6693a04d58078ce228a29b06c0", size = 268555, upload-time = "2026-07-15T18:55:54.065Z" }, + { url = "https://files.pythonhosted.org/packages/18/3e/10134cf81275188c58568f324fc74aedff32c63ca4d5bbc513a91944a6f0/coverage-7.15.2-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:bcc0aae933921d03096f53b0b03eeb702129fd406dee59f08d2efacc68681fa5", size = 269674, upload-time = "2026-07-15T18:55:56.066Z" }, + { url = "https://files.pythonhosted.org/packages/75/4a/771b77de446cba985dc414bbc5844bd21604da05dbc044286df8318a48a7/coverage-7.15.2-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7c63387e21ab21f512c69c9756a8c7dadd322c7275edb064064433c9a09c3743", size = 263101, upload-time = "2026-07-15T18:55:58.107Z" }, + { url = "https://files.pythonhosted.org/packages/5f/b5/70a7011da15f4071943361183aefa27847f3e3aec4fd335f1cb3d3a622b1/coverage-7.15.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:0e55510bc98ae943cece9e667a6c0fe94c6a92913720dea34243657a17993d0c", size = 266007, upload-time = "2026-07-15T18:56:00.468Z" }, + { url = "https://files.pythonhosted.org/packages/b4/0d/f9547e804ce7ad49646ffeffac26699510efbe6c0f751b66fdc960c4e825/coverage-7.15.2-cp314-cp314t-musllinux_1_2_i686.whl", hash = "sha256:2ff08701be2d1556fc78b326c80a3e8042da09352ecb3819105f8e386c8a3071", size = 263611, upload-time = "2026-07-15T18:56:02.615Z" }, + { url = "https://files.pythonhosted.org/packages/ac/59/f576a396659c0efd351f5c1544f67c3560e89c7761cabf7f65e412beeda5/coverage-7.15.2-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:38c9518b7103826c403a461544e3c2e77151e8676d06eaed85911a97e962584a", size = 267344, upload-time = "2026-07-15T18:56:04.622Z" }, + { url = "https://files.pythonhosted.org/packages/7c/5d/c2e4fce3579c0cb635024293f1a32bbe26df101b3e3a69f22243d1352b6c/coverage-7.15.2-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:dee88b1ed88587abd8c0269a1fc1f4cc77f7750d1dfde2869e2a123af420e67d", size = 262456, upload-time = "2026-07-15T18:56:06.641Z" }, + { url = "https://files.pythonhosted.org/packages/bb/dd/956287d69436b66094bc4b57ac2da71e43bfd2a5524e958900b9f582fcf8/coverage-7.15.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:2fbeeeecea279727f8ac16c8e1133ddfeee793e985c86ae343d6a5ce744eef8c", size = 264771, upload-time = "2026-07-15T18:56:08.795Z" }, + { url = "https://files.pythonhosted.org/packages/2c/5a/6f979530c2734c575de77cf58f5f28d51f7123a94b5030fd9156fe5f363c/coverage-7.15.2-cp314-cp314t-win32.whl", hash = "sha256:cb0fddaa6884be6aae36ced9544b5e90f7d5f03845a2853bf47a14953a4e8688", size = 224151, upload-time = "2026-07-15T18:56:10.856Z" }, + { url = "https://files.pythonhosted.org/packages/54/7e/27f6b2a74d484742f4017553e710b01e396b23d809df3e95ca0bb9a2824b/coverage-7.15.2-cp314-cp314t-win_amd64.whl", hash = "sha256:77f091ea3a9cc611cd29f433565476bc1936c084ac8eee00ea0e7e70c27e4199", size = 224981, upload-time = "2026-07-15T18:56:12.928Z" }, + { url = "https://files.pythonhosted.org/packages/b1/48/284863423aa474240f6842bd00d680da22f4e6ea2e466618ef7c9c9e69a9/coverage-7.15.2-cp314-cp314t-win_arm64.whl", hash = "sha256:6fc448c377d6eeb00a47c673494bd9bae29280ca53987e1869e67ebedfe20658", size = 224294, upload-time = "2026-07-15T18:56:15.156Z" }, + { url = "https://files.pythonhosted.org/packages/ec/82/32e3bd191d498e64f6f911ad55d14006a0861e54869d2d32452326399e65/coverage-7.15.2-py3-none-any.whl", hash = "sha256:eb6bcae8d1a9d305351ecb108232441d11c5cfe9de840a04388ba5d2db8d735c", size = 213375, upload-time = "2026-07-15T18:56:17.305Z" }, +] + +[package.optional-dependencies] +toml = [ + { name = "tomli", marker = "python_full_version <= '3.11'" }, +] + [[package]] name = "deepmerge" version = "2.0" @@ -108,6 +211,27 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/36/41/04e2a649058b0713b00d6c9bd22da35618bb157289e05d068e51fddf8d7e/dunamai-1.25.0-py3-none-any.whl", hash = "sha256:7f9dc687dd3256e613b6cc978d9daabfd2bb5deb8adc541fc135ee423ffa98ab", size = 27022, upload-time = "2025-07-04T19:25:54.863Z" }, ] +[[package]] +name = "exceptiongroup" +version = "1.3.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions", marker = "python_full_version < '3.13'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/50/79/66800aadf48771f6b62f7eb014e352e5d06856655206165d775e675a02c9/exceptiongroup-1.3.1.tar.gz", hash = "sha256:8b412432c6055b0b7d14c310000ae93352ed6754f70fa8f7c34141f91c4e3219", size = 30371, upload-time = "2025-11-21T23:01:54.787Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl", hash = "sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", size = 16740, upload-time = "2025-11-21T23:01:53.443Z" }, +] + +[[package]] +name = "execnet" +version = "2.1.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/bf/89/780e11f9588d9e7128a3f87788354c7946a9cbb1401ad38a48c4db9a4f07/execnet-2.1.2.tar.gz", hash = "sha256:63d83bfdd9a23e35b9c6a3261412324f964c2ec8dcd8d3c6916ee9373e0befcd", size = 166622, upload-time = "2025-11-12T09:56:37.75Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ab/84/02fc1827e8cdded4aa65baef11296a9bbe595c474f0d6d758af082d849fd/execnet-2.1.2-py3-none-any.whl", hash = "sha256:67fba928dd5a544b783f6056f449e5e3931a5c378b128bc18501f7ea79e296ec", size = 40708, upload-time = "2025-11-12T09:56:36.333Z" }, +] + [[package]] name = "filelock" version = "3.20.0" @@ -135,6 +259,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/0f/1c/e5fd8f973d4f375adb21565739498e2e9a1e54c858a97b9a8ccfdc81da9b/identify-2.6.15-py2.py3-none-any.whl", hash = "sha256:1181ef7608e00704db228516541eb83a88a9f94433a8c80bb9b5bd54b1d81757", size = 99183, upload-time = "2025-10-02T17:43:39.137Z" }, ] +[[package]] +name = "iniconfig" +version = "2.3.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730", size = 20503, upload-time = "2025-10-18T21:55:43.219Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" }, +] + [[package]] name = "jinja2" version = "3.1.6" @@ -327,52 +460,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/70/bc/6f1c2f612465f5fa89b95bead1f44dcb607670fd42891d8fdcd5d039f4f4/markupsafe-3.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:32001d6a8fc98c8cb5c947787c5d08b0a50663d139f1305bac5885d98d9b40fa", size = 14146, upload-time = "2025-09-27T18:37:28.327Z" }, ] -[[package]] -name = "modern-python" -version = "2025.12.10.1" -source = { virtual = "." } -dependencies = [ - { name = "copier" }, - { name = "copier-template-extensions" }, -] - -[package.dev-dependencies] -dev = [ - { name = "mypy" }, - { name = "pre-commit" }, - { name = "towncrier" }, -] -docs = [ - { name = "zensical" }, -] -lint = [ - { name = "pre-commit" }, -] -release = [ - { name = "towncrier" }, -] -type = [ - { name = "mypy" }, -] - -[package.metadata] -requires-dist = [ - { name = "copier", specifier = ">=9.6" }, - { name = "copier-template-extensions", specifier = ">=0.3.2" }, -] - -[package.metadata.requires-dev] -dev = [ - { name = "mypy", specifier = ">=1.19" }, - { name = "pre-commit", specifier = ">=4.5" }, - { name = "towncrier", specifier = ">=25.8" }, -] -docs = [{ name = "zensical", specifier = ">=0.0.11" }] -lint = [{ name = "pre-commit", specifier = ">=4.5" }] -release = [{ name = "towncrier", specifier = ">=25.8" }] -test = [] -type = [{ name = "mypy", specifier = ">=1.19" }] - [[package]] name = "mypy" version = "1.19.0" @@ -464,6 +551,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/73/cb/ac7874b3e5d58441674fb70742e6c374b28b0c7cb988d37d991cde47166c/platformdirs-4.5.0-py3-none-any.whl", hash = "sha256:e578a81bb873cbb89a41fcc904c7ef523cc18284b7e3b3ccf06aca1403b7ebd3", size = 18651, upload-time = "2025-10-08T17:44:47.223Z" }, ] +[[package]] +name = "pluggy" +version = "1.6.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f9/e2/3e91f31a7d2b083fe6ef3fa267035b518369d9511ffab804f839851d2779/pluggy-1.6.0.tar.gz", hash = "sha256:7dcc130b76258d33b90f61b658791dede3486c3e6bfb003ee5c9bfb396dd22f3", size = 69412, upload-time = "2025-05-15T12:30:07.975Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, +] + [[package]] name = "plumbum" version = "1.10.0" @@ -659,6 +755,106 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/46/a4/aa2bada4a2fd648f40f19affa55d2c01dc7ff5ea9cffd3dfdeb6114951db/pymdown_extensions-10.18-py3-none-any.whl", hash = "sha256:090bca72be43f7d3186374e23c782899dbef9dc153ef24c59dcd3c346f9ffcae", size = 266703, upload-time = "2025-12-07T17:22:11.22Z" }, ] +[[package]] +name = "pytest" +version = "9.1.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "exceptiongroup", marker = "python_full_version < '3.11'" }, + { name = "iniconfig" }, + { name = "packaging" }, + { name = "pluggy" }, + { name = "pygments" }, + { name = "tomli", marker = "python_full_version < '3.11'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e4/47/b9efed96c114afcfa3c9d3fe98a76a1d14c74a9e266d397cf6eb64be5e01/pytest-9.1.1.tar.gz", hash = "sha256:1088fbde8f2b49d95a549a195707afa7a76a3ce9bcadc26b6d71f0ffda5fe313", size = 1636369, upload-time = "2026-06-19T10:58:32.857Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl", hash = "sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c", size = 386536, upload-time = "2026-06-19T10:58:31.347Z" }, +] + +[[package]] +name = "pytest-xdist" +version = "3.8.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "execnet" }, + { name = "pytest" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/78/b4/439b179d1ff526791eb921115fca8e44e596a13efeda518b9d845a619450/pytest_xdist-3.8.0.tar.gz", hash = "sha256:7e578125ec9bc6050861aa93f2d59f1d8d085595d6551c2c90b6f4fad8d3a9f1", size = 88069, upload-time = "2025-07-01T13:30:59.346Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ca/31/d4e37e9e550c2b92a9cbc2e4d0b7420a27224968580b5a447f420847c975/pytest_xdist-3.8.0-py3-none-any.whl", hash = "sha256:202ca578cfeb7370784a8c33d6d05bc6e13b4f25b5053c30a152269fd10f0b88", size = 46396, upload-time = "2025-07-01T13:30:56.632Z" }, +] + +[[package]] +name = "python-package-template" +version = "2025.12.10.1" +source = { virtual = "." } +dependencies = [ + { name = "copier" }, + { name = "copier-template-extensions" }, +] + +[package.dev-dependencies] +dev = [ + { name = "coverage", extra = ["toml"] }, + { name = "mypy" }, + { name = "pre-commit" }, + { name = "pytest" }, + { name = "pytest-xdist" }, + { name = "towncrier" }, +] +docs = [ + { name = "zensical" }, +] +lint = [ + { name = "pre-commit" }, +] +release = [ + { name = "towncrier" }, +] +test = [ + { name = "coverage", extra = ["toml"] }, + { name = "pytest" }, + { name = "pytest-xdist" }, +] +type = [ + { name = "coverage", extra = ["toml"] }, + { name = "mypy" }, + { name = "pytest" }, + { name = "pytest-xdist" }, +] + +[package.metadata] +requires-dist = [ + { name = "copier", specifier = ">=9.6" }, + { name = "copier-template-extensions", specifier = ">=0.3.2" }, +] + +[package.metadata.requires-dev] +dev = [ + { name = "coverage", extras = ["toml"], specifier = ">=7.11" }, + { name = "mypy", specifier = ">=1.19" }, + { name = "pre-commit", specifier = ">=4.5" }, + { name = "pytest", specifier = ">=9" }, + { name = "pytest-xdist", specifier = ">=3.8" }, + { name = "towncrier", specifier = ">=25.8" }, +] +docs = [{ name = "zensical", specifier = ">=0.0.11" }] +lint = [{ name = "pre-commit", specifier = ">=4.5" }] +release = [{ name = "towncrier", specifier = ">=25.8" }] +test = [ + { name = "coverage", extras = ["toml"], specifier = ">=7.11" }, + { name = "pytest", specifier = ">=9" }, + { name = "pytest-xdist", specifier = ">=3.8" }, +] +type = [ + { name = "coverage", extras = ["toml"], specifier = ">=7.11" }, + { name = "mypy", specifier = ">=1.19" }, + { name = "pytest", specifier = ">=9" }, + { name = "pytest-xdist", specifier = ">=3.8" }, +] + [[package]] name = "pywin32" version = "311" diff --git a/zensical.toml b/zensical.toml index d4af959..3fe5b44 100644 --- a/zensical.toml +++ b/zensical.toml @@ -1,10 +1,10 @@ [project] -site_name = "modern-python" +site_name = "python-package-template" site_description = "Copier template for modern Python packages" site_author = "Léo Bernard" copyright = "Copyright © 2025 Léo Bernard" -repo_url = "https://github.com/leodevian/modern-python" -repo_name = "leodevian/modern-python" +repo_url = "https://github.com/sztal/python-package-template" +repo_name = "sztal/python-package-template" edit_uri = "edit/main/docs/" nav = [ { "Home" = [ @@ -57,7 +57,7 @@ code = "JetBrains Mono" [[project.extra.social]] icon = "fontawesome/brands/github" -link = "https://github.com/leodevian/modern-python" +link = "https://github.com/sztal/python-package-template" [project.markdown_extensions] admonition = {} From 64f34c1e6c03ff0d4e83d185cd11b9e922d87864 Mon Sep 17 00:00:00 2001 From: Szymon Talaga Date: Fri, 21 Aug 2026 21:08:49 +0200 Subject: [PATCH 2/4] Agent Host changes for agents/check-copier-variables-agents-md --- template/AGENTS.md.jinja | 77 ++++++++++++++++++++++++++++++++++++ template/STYLE.md | 29 ++++++++++++++ template/devnotes/example.md | 17 ++++++++ 3 files changed, 123 insertions(+) create mode 100644 template/AGENTS.md.jinja create mode 100644 template/STYLE.md create mode 100644 template/devnotes/example.md diff --git a/template/AGENTS.md.jinja b/template/AGENTS.md.jinja new file mode 100644 index 0000000..49376b1 --- /dev/null +++ b/template/AGENTS.md.jinja @@ -0,0 +1,77 @@ +# {{ project_name }} agent guide + +## Project overview + +- Distribution: `{{ distribution_name }}` +- Import package: `{{ package_name }}` +- Source directory: `src/{{ package_name }}/` +- Tests: `tests/` +- Repository: {{ repository_url }} + +{{ project_description }} + +## Working conventions + +Read and follow [STYLE.md](STYLE.md) before changing Python code or tests. +`pyproject.toml` is the source of truth for dependency groups, Ruff, mypy, +pytest, and coverage configuration. + +Keep changes focused, preserve public behavior unless the task intentionally +changes it, and add or update tests for behavior changes. + +## Development notes + +Use `devnotes/` to record concise, task-specific context during development. +Read [devnotes/example.md](devnotes/example.md) before starting a note, and +replace it with notes that capture decisions, validation results, and useful +follow-up work. + +## Validation + +{% if tasks == "tox" -%} +Use tox to run the generated automation: + +```console +uvx tox -m checks +uvx tox -m tests +``` +{%- elif tasks == "nox" %} +Use the generated Nox script to run automation: + +```console +uv run noxfile.py -s lint +uv run noxfile.py -s typecheck +uv run noxfile.py -s tests +``` +{%- else %} +Run the appropriate dependency group directly: + +```console +uv run --group lint pre-commit run --all-files +uv run --group type mypy src tests +uv run --group test pytest +``` +{%- endif %} +{%- if docs %} + +## Documentation + +Documentation lives in `docs/`. Build it with the generated task runner before +submitting documentation changes. +{%- if tasks == "tox" %} + +```console +uvx tox -e docs +``` +{%- elif tasks == "nox" %} + +```console +uv run noxfile.py -s docs +``` +{%- else %} + +```console +uv run --group docs {{ "mkdocs" if docs == "mkdocs" else "zensical" }} build --strict +``` +{%- endif %} +{%- endif %} diff --git a/template/STYLE.md b/template/STYLE.md new file mode 100644 index 0000000..557282d --- /dev/null +++ b/template/STYLE.md @@ -0,0 +1,29 @@ +# Python style guide + +Follow the configured Ruff rules in `pyproject.toml`. This document specifies +the project conventions that complement those rules. + +## Code and documentation + +- Use double quotes for all strings. +- Add type hints to all code. +- Use NumPy-style docstrings only. +- Thoroughly document public classes and methods. +- Private classes, methods, globals, and similar implementation details may + have brief documentation or none when their purpose is clear from context. +- Make errors and warnings concise and informative. Avoid multi-sentence + messages unless a single sentence would sacrifice clarity. + +## Design + +- Prefer legible, concise, minimal code. +- Avoid unnecessary abstractions and large collections of private helpers. +- Inline very short helpers. +- Do not extract simple logic merely because it appears once or twice. Keep + such logic at its call sites when it is likely to need independent changes. + +## Tests + +- Keep test suites DRY and concise. +- Use pytest fixtures, parametrization, and mocks where they make tests more + readable or remove duplication. diff --git a/template/devnotes/example.md b/template/devnotes/example.md new file mode 100644 index 0000000..6b00ad0 --- /dev/null +++ b/template/devnotes/example.md @@ -0,0 +1,17 @@ +# Example development note + +## Goal + +Briefly state the task or investigation. + +## Decisions and findings + +- Record relevant constraints, decisions, and observations as work progresses. + +## Validation + +- List the checks run and their outcomes. + +## Follow-up + +- Note remaining work, risks, or questions for the next contributor. From 7fa4c22b01da1be76434a5433f3e02f4deac8388 Mon Sep 17 00:00:00 2001 From: Szymon Talaga Date: Fri, 21 Aug 2026 21:11:55 +0200 Subject: [PATCH 3/4] Update AGENTS.md.jinja and pyproject.toml.jinja templates --- template/AGENTS.md.jinja | 4 ++-- template/pyproject.toml.jinja | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/template/AGENTS.md.jinja b/template/AGENTS.md.jinja index 49376b1..260f49d 100644 --- a/template/AGENTS.md.jinja +++ b/template/AGENTS.md.jinja @@ -56,8 +56,8 @@ uv run --group test pytest ## Documentation -Documentation lives in `docs/`. Build it with the generated task runner before -submitting documentation changes. +Documentation lives in `docs/`. Build it with the applicable command below +before submitting documentation changes. {%- if tasks == "tox" %} ```console diff --git a/template/pyproject.toml.jinja b/template/pyproject.toml.jinja index a5a0927..ae63539 100644 --- a/template/pyproject.toml.jinja +++ b/template/pyproject.toml.jinja @@ -128,10 +128,11 @@ lint.per-file-ignores."tests/**" = [ lint.isort.known-first-party = [ "{{ package_name }}", ] -lint.pydocstyle.convention = "google" +lint.pydocstyle.convention = "numpy" format.quote-style = "double" format.indent-style = "space" format.docstring-code-format = true +lint.future-annotations = true [tool.codespell] write-changes = true From a11f8028a0dafddafb3da1fb4dfdea46999f5528 Mon Sep 17 00:00:00 2001 From: Szymon Talaga Date: Fri, 21 Aug 2026 21:33:00 +0200 Subject: [PATCH 4/4] docs: add development setup instructions to README template --- template/README.md.jinja | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/template/README.md.jinja b/template/README.md.jinja index f53bfc8..c1e94ee 100644 --- a/template/README.md.jinja +++ b/template/README.md.jinja @@ -17,6 +17,29 @@ Install `{{ distribution_name }}` using [pip](https://pip.pypa.io/) or [uv](http ``` pip install {{ distribution_name }} ``` + +## Development + +Install [uv](https://docs.astral.sh/uv/getting-started/installation/) and +create a virtual environment: + +```bash +uv venv +source .venv/bin/activate +``` + +Install the package and its development dependencies: + +```bash +uv sync --group dev +``` + +Run the test suite and checks with: + +```bash +uv run pytest +uv run pre-commit run --all-files +``` {% if cli %} ## Execution