This is a template Python project using UV for package management and Ruff for
linting and formatting. All code lives in src/ and is tested with pytest to
100% coverage.
-
Install uv or run
./bootstrap.shwhich performs all setup steps automatically. -
If running manually, install dependencies from
uv.lockfor a fully reproducible environment:uv sync --locked
-
Run the tests:
uv run pytest --cov=project_name --cov-report=term-missing --cov-fail-under=100All project and development dependencies are pinned in pyproject.toml to
ensure the versions installed in CI match what gets deployed. Update these pins
whenever you want to upgrade packages.
Use Ruff for linting/formatting and Mypy for static type checking:
uv run ruff check --fix .
uv run mypy .A .pre-commit-config.yaml is included. Install the hooks so they run
automatically on each commit:
pre-commit install
pre-commit run --all-files # optional, run on entire repoThese hooks handle formatting and lightweight checks only. Run Mypy and the tests yourself before committing to match the CI pipeline:
uv run mypy .
uv run pytest --cov=project_name --cov-report=term-missing --cov-fail-under=100CI will execute the same commands.
Update the version in pyproject.toml, then build and upload the distribution:
uv run python -m build
uv run twine upload dist/*