Migrate from Poetry to uv#274
Merged
Merged
Conversation
Replace Poetry/poetry-dynamic-versioning with uv as the package manager and setuptools + setuptools-scm + Cython as the build backend: - pyproject.toml: PEP 621 [project] metadata, PEP 735 [dependency-groups], and [tool.uv] cache-keys so `uv sync` rebuilds the Cython extension whenever its sources change. - build.py -> setup.py (same extension config); add MANIFEST.in for sdists. - Version derived from git tags via setuptools-scm, exposed at runtime through importlib.metadata. - bootstrap installs uv instead of Poetry; Cython support is now wired by default and stripped when declined. - CI: astral-sh/setup-uv with locked syncs; lint/docs split out of the test matrix with cancel-in-progress concurrency; PyPI Trusted Publishing (OIDC) replaces PYPI_TOKEN; wheel builds gated to compiled-code changes on PRs; native ubuntu-24.04-arm runners replace QEMU for aarch64 wheels; lightweight pre-commit hooks move to pre-commit.ci. - Support window bumped to Python 3.10-3.14 (cibuildwheel v3.2). - Dependabot: uv + github-actions ecosystems with grouped minor/patch PRs. - Dockerfile/ReadTheDocs converted to uv; .dockerignore no longer ships the local venv and build artifacts. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UarJmE1ctKM1J5U8oSMVEY
There was a problem hiding this comment.
Pull request overview
This PR migrates the template from Poetry/poetry-dynamic-versioning to uv for dependency management and to a setuptools + setuptools-scm + Cython build backend, updating developer workflows and CI/CD to match.
Changes:
- Replace Poetry-based packaging with PEP 621/735 metadata in
pyproject.toml,setup.pyfor the Cython extension, and versioning viasetuptools-scm+importlib.metadata. - Update automation (GitHub Actions, Dependabot, pre-commit, bootstrap, Docker, ReadTheDocs) to use
uvand modernize release publishing (OIDC / trusted publishing). - Remove Poetry artifacts and adjust docs/readme for the new workflow and updated Python support window.
Reviewed changes
Copilot reviewed 17 out of 20 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| setup.py | Adds setuptools-based Cython extension build configuration. |
| README.rst | Updates template documentation to reference uv, setuptools-scm, and trusted publishing. |
| pythontemplate/init.py | Switches runtime version lookup to importlib.metadata. |
| pyproject.toml | Migrates to PEP 621/735 metadata; switches build backend to setuptools + setuptools-scm + Cython and configures uv. |
| poetry.lock | Removes Poetry lockfile. |
| MANIFEST.in | Ensures Cython/C sources are included in sdists. |
| docs/source/Installation.rst | Updates installation/dev instructions for uv and Python >=3.10. |
| Dockerfile | Switches container build to use uv and a newer Ubuntu base image. |
| build.py | Removes Poetry-era build script. |
| bootstrap | Updates bootstrap flow to install/use uv and adjusts Cython opt-in/out behavior. |
| .readthedocs.yaml | Updates RTD build to use uv and newer build image/tooling. |
| .pre-commit-config.yaml | Adds uv lock hook and configures pre-commit.ci behavior. |
| .gitignore | Updates ignored files for uv and wheelhouse artifacts. |
| .github/workflows/tests.yaml | Reworks CI to use uv (locked sync), splits lint/docs from test matrix, adds concurrency control. |
| .github/workflows/deploy.yaml | Switches deploy workflow to uv build/publish and OIDC permissions. |
| .github/workflows/build_wheels.yaml | Updates cibuildwheel config, adds concurrency and PR-path gating, modernizes build matrix. |
| .github/dependabot.yml | Migrates Dependabot to uv + github-actions ecosystems with grouping. |
| .github/contributing.md | Updates contributor docs to use uv commands. |
| .dockerignore | Stops shipping local venv/build artifacts into Docker context and ignores common caches/artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| description = "" | ||
| authors = ["YOUR_NAME_HERE"] | ||
| authors = [{name = "YOUR_NAME_HERE"}] | ||
| license = "Apache-2.0" |
| python -m pip install git+https://github.com/GIT_USERNAME/GIT_REPONAME.git | ||
|
|
||
| For development, its recommended to use Poetry: | ||
| For development, its recommended to use uv: |
| To confirm docstrings are valid, build the docs by running `poetry run make html` in the `docs/` folder. | ||
| To confirm docstrings are valid, build the docs by running `uv run make html` in the `docs/` folder. | ||
|
|
||
| I typically write dosctrings first, it will act as a guide to limit scope and encourage unit-testable code. |
Comment on lines
+13
to
+16
| pre_create_environment: | ||
| - asdf plugin add uv | ||
| - asdf install uv latest | ||
| - asdf global uv latest |
BrianPugh
added a commit
that referenced
this pull request
Jul 6, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UarJmE1ctKM1J5U8oSMVEY
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.
Replace Poetry/poetry-dynamic-versioning with uv as the package manager and setuptools + setuptools-scm + Cython as the build backend:
uv syncrebuilds the Cython extension whenever its sources change.Claude-Session: https://claude.ai/code/session_01UarJmE1ctKM1J5U8oSMVEY