Migrate dev tooling from pip-tools/tox to uv#309
Open
hf-krechan wants to merge 2 commits into
Open
Conversation
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>
6 tasks
Contributor
Author
|
@copilot resolve the merge conflicts in this pull request |
Contributor
Resolved in commit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tests,linting,type_check,spell_check,coverage,formatting) from[project.optional-dependencies]to PEP 735[dependency-groups], add a bundleddevgroup, and set[tool.uv] default-groups = []so per-group CI syncs stay isolated.test_packaginggroup (build/twine) — packaging now uses nativeuv build/uv publish --dry-run.tox.iniandrequirements.txtwithuv.lock.astral-sh/setup-uv@v9.0.0+uv sync --group X+uv run <tool>instead ofpip 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..github/dependabot.ymlto track theuvecosystem instead ofpip.black/isorthook pins to match the new group versions, and add theastral-sh/uv-pre-commituv-lockhook to keep the lockfile current automatically.Test plan
Ran the full verification section from the migration recipe locally:
uv lockuv sync --group dev --extra sqlmodels --extra ahbicht --extra cliuv run pytest -vv(245 passed, 38 skipped — skips are tests gated on thexml-migs-and-ahbsgit submodule, which needs a PAT only available in CI;coverage.yml/unittests.yml/python-publish.ymlcheck it out withsubmodules: "recursive")UV_PROJECT_ENVIRONMENT=<scratch> uv sync --group X ...) followed by the exact command each workflow runs:linting:pylint fundamendandpylint unittests --rcfile=unittests/.pylintrc— 10.00/10type_check:mypy --strictonsrc/fundamendandunittests— no issuesspell_check:codespellonsrcandREADME.md— cleancoverage:coverage run -m pytest+coverage html/reportfromunittests/— mechanics work; % is locally low only because the submodule isn't checked out hereformatting:black . --checkandisort . --check— cleanuv buildanduv publish --dry-run(exits 0 without real credentials, confirming it's safe to run inpackaging_test.ymlon every PR)pre-commit run --all-files—uv-lock,check-yaml,black,isortall pass (end-of-file-fixer/trailing-whitespaceflagged 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)gh api .../branches/main/protection) — all 15 required check names are still produced verbatim🤖 Generated with Claude Code