github python-developer-tooling-handbook/makefile.uv v0.4.0

latest release: v0.4.1
2 months ago

Six additive changes since v0.3.0. No breaking changes; existing Makefiles keep working.

New targets

  • format-check — non-mutating format check driven by a new FORMAT_CHECK variable (default ruff format --check). Pair with the existing format target so local dev and CI can use the Makefile without overriding FORMAT. (#1)
  • check — umbrella target running lint format-check typecheck test in order. Driven by CHECK_DEPS so projects can reorder, skip, or extend (CHECK_DEPS += docs-test). (#1)
  • coverage / coverage-html — run pytest under coverage.py and emit a terminal or HTML report. New COVERAGE variable (default coverage). Follows the handbook's recommended path: coverage.py + pytest, no pytest-cov plugin needed. clean now also removes .coverage and htmlcov/. (#3)
  • dev / pre-commit-install — one-shot bootstrap for new contributors. dev depends on $(DEV_DEPS) (default sync pre-commit-install). pre-commit-install is a no-op when no .pre-commit-config.yaml is present, so make dev works uniformly across projects with and without pre-commit. (#4)

Documentation

  • Tutorial now mentions the Ruff extend-exclude = [".venv-*"] setting in the install step, so first-time users don't hit make lint walking into per-version venvs after make test-py3.12. (#6)
  • The UV_SYNC_FLAGS variable entry now spells out that --dev is uv's default, so UV_SYNC_FLAGS := --dev is redundant. Added a "Sync without dev dependencies" how-to for the cases where the variable is actually useful (--no-dev, --frozen, --locked, --extra, --group). (#5)

Install

```bash
curl -sSL https://raw.githubusercontent.com/python-developer-tooling-handbook/makefile.uv/v0.4.0/Makefile.uv -o Makefile.uv
```

Upgrading from v0.3.x

Re-run the install command above. No Makefile changes required — every new target and variable has a sensible default. If your project's make check or make dev target conflicts with the new built-ins, either rename your target or override CHECK_DEPS / DEV_DEPS to match what you want.

Don't miss a new makefile.uv release

NewReleases is sending notifications on new releases.