Skip to content

Migrate dev tooling from pip-tools/tox to uv#309

Open
hf-krechan wants to merge 2 commits into
mainfrom
migrate-to-uv
Open

Migrate dev tooling from pip-tools/tox to uv#309
hf-krechan wants to merge 2 commits into
mainfrom
migrate-to-uv

Conversation

@hf-krechan

Copy link
Copy Markdown
Contributor

Summary

  • Move dev-tool extras (tests, linting, type_check, spell_check, coverage, formatting) from [project.optional-dependencies] to PEP 735 [dependency-groups], add a bundled dev group, and set [tool.uv] default-groups = [] so per-group CI syncs stay isolated.
  • Drop the test_packaging group (build/twine) — packaging now uses native uv build / uv publish --dry-run.
  • Replace tox.ini and requirements.txt with uv.lock.
  • Rewrite all GitHub Actions workflows to use astral-sh/setup-uv@v9.0.0 + uv sync --group X + uv run <tool> instead of pip install tox + tox -e X. Job ids, job names, and matrix key names/order are preserved exactly (pytest, black, Python Code Quality and Lint (${{ matrix.linter-env }}), check_packaging, coverage) to keep the existing required-status-check names in branch protection intact.
  • Update .github/dependabot.yml to track the uv ecosystem instead of pip.
  • Bump the pre-commit black/isort hook pins to match the new group versions, and add the astral-sh/uv-pre-commit uv-lock hook to keep the lockfile current automatically.

Test plan

Ran the full verification section from the migration recipe locally:

  • uv lock
  • uv sync --group dev --extra sqlmodels --extra ahbicht --extra cli
  • uv run pytest -vv (245 passed, 38 skipped — skips are tests gated on the xml-migs-and-ahbs git submodule, which needs a PAT only available in CI; coverage.yml/unittests.yml/python-publish.yml check it out with submodules: "recursive")
  • Per-group isolated syncs (UV_PROJECT_ENVIRONMENT=<scratch> uv sync --group X ...) followed by the exact command each workflow runs:
    • linting: pylint fundamend and pylint unittests --rcfile=unittests/.pylintrc — 10.00/10
    • type_check: mypy --strict on src/fundamend and unittests — no issues
    • spell_check: codespell on src and README.md — clean
    • coverage: coverage run -m pytest + coverage html/report from unittests/ — mechanics work; % is locally low only because the submodule isn't checked out here
    • formatting: black . --check and isort . --check — clean
  • uv build and uv publish --dry-run (exits 0 without real credentials, confirming it's safe to run in packaging_test.yml on every PR)
  • pre-commit run --all-filesuv-lock, check-yaml, black, isort all pass (end-of-file-fixer/trailing-whitespace flagged pre-existing whitespace issues in unrelated files, left untouched since they're out of scope for this migration)
  • grep -rnE "setup-uv@v[0-9]+$" .github/workflows/ returns nothing (no floating-major tags)
  • Diffed the rewritten workflow job/matrix names against the repo's required status checks (gh api .../branches/main/protection) — all 15 required check names are still produced verbatim

🤖 Generated with Claude Code

Move dev-tool extras (tests, linting, type_check, spell_check, coverage,
formatting) to PEP 735 dependency-groups, add a dev group, and drop the
build/twine test_packaging group in favor of native `uv build` /
`uv publish --dry-run`. Replace tox.ini and requirements.txt with
uv.lock, and rewrite the GitHub Actions workflows and dependabot config
to use astral-sh/setup-uv + uv sync/run instead of tox. Bump the
pre-commit black/isort pins to match the new group versions and add the
uv-lock pre-commit hook to keep the lockfile current.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@hf-krechan

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Copilot AI commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved in commit 79864f9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants