From 53831de9d8f7eb5d591ae5a6af9f306de8c65a7b Mon Sep 17 00:00:00 2001 From: Kristian Glass Date: Fri, 3 Apr 2026 10:10:01 +0100 Subject: [PATCH 1/6] Expand .gitignore to cover common Python artifacts Co-Authored-By: Claude Sonnet 4.6 --- .gitignore | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.gitignore b/.gitignore index 1bc5aa1..f7f902c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,9 @@ +*.egg-info/ +*.pyc +*.pyo /.coverage +/.venv/ +/__pycache__/ +/build/ +/dist/ +/htmlcov/ From f13d601fdfb102ab0d1bed6f6d76b7eac76d1623 Mon Sep 17 00:00:00 2001 From: Kristian Glass Date: Fri, 3 Apr 2026 10:12:04 +0100 Subject: [PATCH 2/6] Add RUF, PT, SIM, PERF, LOG to ruff lint rules Co-Authored-By: Claude Sonnet 4.6 --- pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index a2fcef1..e1f1c6f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,6 +39,11 @@ select = [ "INP", # flake8-no-pep420 "PLC0415", "TID253", + "RUF", # Ruff-specific rules + "PT", # flake8-pytest-style + "SIM", # flake8-simplify + "PERF", # Perflint + "LOG", # flake8-logging ] [dependency-groups] From f411126360db76ec04cfab0920d8facadce31b0a Mon Sep 17 00:00:00 2001 From: Kristian Glass Date: Fri, 3 Apr 2026 10:13:50 +0100 Subject: [PATCH 3/6] Add make clean target to remove generated artifacts Co-Authored-By: Claude Sonnet 4.6 --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 0b21732..76d9233 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,10 @@ fix: uv run ruff format $(CODEDIRS) uv run ruff check --fix $(CODEDIRS) +.PHONY: clean +clean: + git clean -X --force + .PHONY: test test: uv run coverage run --source $(SRCDIR) --module pytest test From d765b405a80deb3ea805f7cc4adad46373f7d8fb Mon Sep 17 00:00:00 2001 From: Kristian Glass Date: Fri, 3 Apr 2026 10:35:04 +0100 Subject: [PATCH 4/6] Add workflow_dispatch trigger and concurrency cancellation to CI Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d0730ff..eb8ec4d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,11 +1,16 @@ name: Test on: + workflow_dispatch: pull_request: push: branches: - "main" +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: UV_LOCKED: 1 # Ensure lockfile is up to date at test time From 909ef2a6ebe7d4e80a4bb52272e24fc0f1ee80d6 Mon Sep 17 00:00:00 2001 From: Kristian Glass Date: Fri, 3 Apr 2026 10:38:48 +0100 Subject: [PATCH 5/6] Set .DEFAULT_GOAL to check so bare make runs a more useful target Co-Authored-By: Claude Sonnet 4.6 --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 76d9233..c0ee5f8 100644 --- a/Makefile +++ b/Makefile @@ -2,6 +2,8 @@ SRCDIR=src TESTDIR=test CODEDIRS=$(SRCDIR) $(TESTDIR) +.DEFAULT_GOAL := check + .PHONY: bootstrap bootstrap: uv sync --dev From fb5c5a8c678083afc5747f6bdf15d7dd0005e882 Mon Sep 17 00:00:00 2001 From: Kristian Glass Date: Fri, 3 Apr 2026 10:40:39 +0100 Subject: [PATCH 6/6] Add py.typed marker for PEP 561 type annotation support PEP 561 defines how packages signal they ship inline type annotations. Without a py.typed marker file, type checkers (mypy, pyright, etc.) will silently ignore a package's type annotations when it is installed as a dependency, even if the source contains full type hints. The marker is an empty file; its presence is the signal. Adding it declares this package as "typed" so that downstream projects benefit from type checking against the package's annotations. Co-Authored-By: Claude Sonnet 4.6 --- src/python_template/py.typed | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/python_template/py.typed diff --git a/src/python_template/py.typed b/src/python_template/py.typed new file mode 100644 index 0000000..e69de29