replace setup.py with pyproject.toml and use uv in CI#250
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR modernizes the project's build system by replacing the legacy setup.py with a standards-compliant pyproject.toml and migrating CI workflows to use uv for faster, more reliable Python environment management.
Key changes:
- Migration from setup.py to pyproject.toml using hatchling as the build backend
- Replacement of pip-based CI with uv for dependency management and test execution
- Cleanup of development dependencies and workflow simplification
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| setup.py | Removed legacy setup.py containing manual package configuration |
| requirements-dev.txt | Removed in favor of pyproject.toml dependency groups |
| pyproject.toml | New standards-compliant build configuration with hatchling backend |
| peru.py | Updated comment to mention uv run peru as an alternative |
| .github/workflows/push.yml | Migrated CI from setup-python + pip to setup-uv for dependency management |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| @@ -0,0 +1,40 @@ | |||
| [project] | |||
| name = "peru" | |||
| version = "1.3.4" | |||
There was a problem hiding this comment.
The version is now hardcoded in pyproject.toml instead of being read from peru/VERSION file. This creates a maintenance burden of updating the version in two places. Consider removing this line and relying solely on the hatch.version configuration (lines 33-35) which already reads from peru/VERSION.
| version = "1.3.4" |
There was a problem hiding this comment.
Ooo this is a good catch, fixed with d30cc4d.
| @@ -1,4 +0,0 @@ | |||
| coverage | |||
There was a problem hiding this comment.
We no longer track coverage in CI. I haven't ported this dependency over.
There was a problem hiding this comment.
FWIW there are no uv-specific fields in this file, and other Python build frontends can understand it. All of the following work:
uv buildpip wheel .python -m buildhatch build
I was doing some regular maintenance today. I've already landed f9d69dc (seems like some runners no longer have
svnand/orhgby default) and 923cf38 (3.14 removed an old deprecated API that we didn't see warnings about because it was in a plugin). While I've here I feel like doing a build system overhaul for this decade, but this is a bigger change, so I want to get your thoughts @olson-sean-k.setup.py.