Opinionated Python project template using uv, Ruff, pre-commit, and GitHub Actions.
This repository is a GitHub template intended to bootstrap modern Python projects with:
- Fast dependency management (
uv) - Deterministic code quality (
ruff,pre-commit) - Clear CI responsibilities
- Optional documentation and binary release workflows
This template favors clarity, explicitness, and maintainability over complex automation.
- Click Use this template on GitHub
- Create your new repository
- Clone it locally
- Run the setup script
- Git
- Python 3.11+
uv— https://github.com/astral-sh/uv
./scripts/dev-setup.sh.\scripts\dev-setup.ps1If script execution is restricted:
PowerShell -ExecutionPolicy Bypass -File scripts\dev-setup.ps1uv run ruff check . --fix
uv run ruff format .
uv run pytest- pre-commit enforces fast, deterministic checks (lint, format)
- pytest runs in CI, not on every commit
- CI is the authority, not the developer machine
- Heavy or OS-specific builds are CI-only
Documentation uses MkDocs.
- Validated locally via pre-commit (
mkdocs build --strict) - Fully built in CI
- Optional publication during release See README.mkdocs.md for details.
Releases are driven by Git tags (vX.Y.Z).
During a release:
- Documentation is built
- Documentation publication is optional
- Linux and/or Windows binaries may be built using PyInstaller
All release logic is handled by GitHub Actions. See README.release-workflow.md for details.
Tool versions are intentionally pinned.
Upgrades must:
- Update versions explicitly
- Apply Ruff formatting and fixes
- Update pre-commit hooks
- Commit all generated changes
MIT