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 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/ diff --git a/Makefile b/Makefile index 0b21732..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 @@ -26,6 +28,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 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] diff --git a/src/python_template/py.typed b/src/python_template/py.typed new file mode 100644 index 0000000..e69de29