-
Notifications
You must be signed in to change notification settings - Fork 7
Migrate from Poetry to uv for package management #209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Transform pyproject.toml from Poetry format to PEP 621/735 - Use hatchling as build backend instead of poetry-core - Add dependency-groups for dev dependencies (PEP 735) - Convert Python-conditional dependencies to PEP 508 markers - Add uv.lock and remove poetry.lock - Update noxfile.py to use uv as venv backend - Update .pre-commit-config.yaml: poetry run → uv run - Update Makefile: poetry run → uv run, shell-based version bumping - Update CI workflows to use astral-sh/setup-uv@v4 - Update CLAUDE.md with uv commands - Add .python-version file (3.10) - Remove constraints.txt (no longer needed with uv) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Pin black==24.4.2 and isort==5.13.2 to match poetry.lock versions - Add [tool.black] with target-version=[] to prevent auto-inference from requires-python (which would change formatting behavior) - Revert .python-version to 3.10 (matches noxfile python_dflt) Black 24.x auto-infers target_version from [project].requires-python in PEP 621 format, but Poetry's [tool.poetry.dependencies].python wasn't read by black. Setting target-version=[] maintains the pre- migration formatting behavior. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR migrates the project's package management from Poetry to uv, modernizing the dependency management tooling and aligning with PEP standards. The migration includes converting pyproject.toml to use PEP 621 project metadata and PEP 735 dependency groups, switching from poetry-core to hatchling as the build backend, and updating all CI/CD workflows and developer tooling to use uv.
Changes:
- Converted
pyproject.tomlfrom Poetry format to PEP 621/735 standards with hatchling build backend - Updated CI workflows (GitHub Actions) to use
astral-sh/setup-uv@v4instead of Poetry installation - Modified developer tooling (noxfile, Makefile, pre-commit hooks) to use
uv runinstead ofpoetry run
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Converted to PEP 621 project format with PEP 735 dependency-groups; switched build backend to hatchling |
| noxfile.py | Updated to use uv as venv backend and added type annotations |
| Makefile | Replaced poetry commands with uv; implemented shell-based version bumping |
| .pre-commit-config.yaml | Changed hook entries from poetry run to uv run |
| .github/workflows/tests.yml | Replaced Poetry installation with astral-sh/setup-uv@v4; simplified setup steps |
| .github/workflows/release.yml | Replaced Poetry with uv; simplified build and publish steps |
| .github/workflows/constraints.txt | Deleted constraints file (no longer needed with uv) |
| .python-version | Added file specifying Python 3.10 as default version |
| CLAUDE.md | Added comprehensive developer documentation referencing uv tooling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Address Copilot review feedback: explain why black and isort are pinned to exact versions (for consistent formatting across environments and CI). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Summary
astral-sh/setup-uv@v4Changes
pyproject.toml:
[project]format[dependency-groups]for dev dependenciespoetry-coretohatchlingCI/CD:
astral-sh/setup-uv@v4uv tool install nox --with nox-uvuv buildfor releasesconstraints.txt(no longer needed)Developer tooling:
poetry run→uv runin pre-commit hookspoetry run→uv runin Makefilepoetry version).python-versionfile (3.10)Files:
uv.lockreplacespoetry.lockTest plan
uv sync --all-groupsinstalls all dependenciesuv run pytest tests/test_interface.pypassesuv buildcreates wheel and sdistuv run nox -llists all sessions🤖 Generated with Claude Code