Skip to content

replace setup.py with pyproject.toml and use uv in CI#250

Merged
oconnor663 merged 3 commits intomasterfrom
uv_in_ci
Oct 21, 2025
Merged

replace setup.py with pyproject.toml and use uv in CI#250
oconnor663 merged 3 commits intomasterfrom
uv_in_ci

Conversation

@oconnor663
Copy link
Copy Markdown
Member

@oconnor663 oconnor663 commented Oct 21, 2025

I was doing some regular maintenance today. I've already landed f9d69dc (seems like some runners no longer have svn and/or hg by 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.

  • After landing this, I need to update the AUR packages I own so that they stop looking for setup.py.

Copy link
Copy Markdown

Copilot AI left a 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 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.

Comment thread pyproject.toml Outdated
@@ -0,0 +1,40 @@
[project]
name = "peru"
version = "1.3.4"
Copy link

Copilot AI Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
version = "1.3.4"

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooo this is a good catch, fixed with d30cc4d.

Comment thread pyproject.toml Outdated
Comment thread .github/workflows/push.yml
oconnor663 and others added 2 commits October 20, 2025 17:10
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread requirements-dev.txt
@@ -1,4 +0,0 @@
coverage
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We no longer track coverage in CI. I haven't ported this dependency over.

Comment thread pyproject.toml
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW there are no uv-specific fields in this file, and other Python build frontends can understand it. All of the following work:

  • uv build
  • pip wheel .
  • python -m build
  • hatch build

@oconnor663 oconnor663 merged commit c0e6c55 into master Oct 21, 2025
42 checks passed
@oconnor663 oconnor663 deleted the uv_in_ci branch October 22, 2025 16:49
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