ADR-013 — uv as official package manager
Status: Accepted
Context
The project previously documented pip install -e ".[dev]" as the standard installation command. While pip works correctly with the pyproject.toml + hatchling setup, uv offers significant advantages for development workflows: faster dependency resolution, deterministic lock files, and integrated virtual environment management.
The pyproject.toml build backend (hatchling) is fully compatible with uv without modification.
Options evaluated
| Option | Pros | Cons |
|---|---|---|
Keep pip |
No change required, universally available | Slower, no lock file, no integrated venv management |
Adopt uv |
Fast, lock file for reproducibility, single tool for venv + install + run | Requires uv to be installed separately |
Add poetry |
Lock file, venv management | Requires rewriting pyproject.toml, heavier tooling |
Decision
We adopt uv as the official package manager for development.
uv syncreplacespip install -e ".[dev]"for environment setupuv sync --no-devreplacespip install -e .for production-only installsuv run <command>is the canonical way to invoke tools (pytest,mypy,ruff)uv.lockis committed to the repository for reproducible development environments.python-versionpins the minimum Python version (3.10) foruvto use
Dev dependencies are moved from [project.optional-dependencies] to [dependency-groups] (PEP 735): uv installs all dependency groups by default with uv sync, eliminating the need for --extra dev.
Consequences
- Developers must install
uvbefore working on the project (brew install uvorpip install uv) uv.lockmust be updated when dependencies change (uv lockor automatically viauv sync)- CI/CD pipelines must install
uvbefore running setup steps - The
mock_server/Dockerfile retainspip— it is a standalone Flask container with no relation to this module's development workflow