Skip to content

Latest commit

 

History

History
66 lines (47 loc) · 1.63 KB

File metadata and controls

66 lines (47 loc) · 1.63 KB

Project Name

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.

Development

  1. Install uv or run ./bootstrap.sh which performs all setup steps automatically.

  2. If running manually, install dependencies from uv.lock for a fully reproducible environment:

    uv sync --locked
  3. Run the tests:

uv run pytest --cov=project_name --cov-report=term-missing --cov-fail-under=100

Dependency management

All 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.

Linting and type checking

Use Ruff for linting/formatting and Mypy for static type checking:

uv run ruff check --fix .
uv run mypy .

Pre-commit hooks

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 repo

These 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=100

CI will execute the same commands.

Releasing

Update the version in pyproject.toml, then build and upload the distribution:

uv run python -m build
uv run twine upload dist/*