Skip to content

chore(packaging): consolidate uv project metadata#271

Open
xraymemory wants to merge 2 commits into
mainfrom
michaelanzuoni/pyproject-uv-packaging
Open

chore(packaging): consolidate uv project metadata#271
xraymemory wants to merge 2 commits into
mainfrom
michaelanzuoni/pyproject-uv-packaging

Conversation

@xraymemory

@xraymemory xraymemory commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • consolidate package metadata into the canonical pyproject.toml for uv-based source-checkout development
  • add PEP 621 metadata, a test dependency group, project URLs, and explicit Hatch wheel/sdist build targets
  • delete stale pyproject-hatch.toml and update README uv/macOS development instructions
  • keep existing Pixi feature names untouched; package extras were intentionally avoided because they collide with Pixi feature names in this repo

Validation

  • local: python3 parsed pyproject.toml with tomllib
  • local: uv lock --dry-run
  • local: uv build --out-dir /var/folders/s5/8vdrgsls6pd3s4xd1scwhc5h0000gn/T/opencode/sampleworks-uv-build
  • Docker/linux-amd64: pixi lock reported Lock-file was already up-to-date
  • ACTL (sampleworks-uv, diffuse-small, sampleworks image, ephemeral): synced branch and verified pyproject-hatch.toml is absent
  • ACTL: /home/dev/.local/bin/uv build --out-dir /tmp/sampleworks-uv-dist
  • ACTL: /home/dev/.local/bin/uv lock --dry-run --python 3.12
  • ACTL: validated wheel metadata and packaged analyses/, experiments/, and sampleworks/data/protein_configs.csv contents

ACTL pod was torn down after validation.

Copilot AI review requested due to automatic review settings June 24, 2026 15:25
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Removes pyproject-hatch.toml entirely and migrates the project's development tooling from Pixi/Hatch to uv. pyproject.toml gains a tighter hatchling>=1.27 pin, expanded core and optional dependency groups (including ML libraries and platform markers), a dependency-groups.test entry, and a [tool.uv.sources] block. README.md development and macOS sections are rewritten to use uv sync/uv run commands.

Changes

uv Migration

Layer / File(s) Summary
pyproject.toml: build system, dependencies, and uv sources
pyproject.toml
Tightens hatchling to >=1.27, adds dependency-groups.test, expands core dependencies with numpy<2.0, jax, torch, and others, introduces optional groups (analysis, boltz, dev, eval, protenix, rf3, test) with platform markers, and adds [tool.uv.sources] pointing rc-foundry at its GitHub repo. pyproject-hatch.toml (137 lines) is deleted entirely.
README: uv-based development and macOS instructions
README.md
Replaces Pixi-based "Development" instructions with uv sync/uv run commands and uv sync --extra <group> guidance for optional model extras. Rewrites the macOS section to use brew install uv and uv sync --group dev, removing the prior homebrew/hatch workflow.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • marcuscollins

Poem

🐇 Hop hop, away with Pixi and Hatch!
uv sync is the new snappy dispatch.
One lock, one tool, no fuss to unmatch,
The README now shows the whole dev batch.
This bunny approves — what a tidy catch! 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main packaging metadata consolidation into pyproject.toml with uv-based development support.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch michaelanzuoni/pyproject-uv-packaging

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Consolidates packaging/build metadata into the canonical pyproject.toml to support uv-based source-checkout development, while removing the stale pyproject-hatch.toml and updating developer documentation accordingly.

Changes:

  • Adds/expands PEP 621 metadata (classifiers, description/keywords, URLs) plus optional-dependency extras and uv git source configuration in pyproject.toml.
  • Adds explicit Hatch build target configuration for sdist/wheel contents.
  • Updates README.md development/macOS instructions to use uv, and deletes pyproject-hatch.toml.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
README.md Documents uv-based dev workflow, extras usage, and updated macOS guidance.
pyproject.toml Becomes the single source of truth for packaging metadata, extras, Hatch build config, and uv sources.
pyproject-hatch.toml Removed as stale/duplicative packaging configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyproject.toml
Comment on lines +44 to +50
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Bio-Informatics",
"Topic :: Scientific/Engineering :: Chemistry"
Comment thread pyproject.toml
license = {file = "LICENSE"}
name = "sampleworks"
readme = "README.md"
requires-python = ">= 3.11, <3.14"
Comment thread pyproject.toml Outdated
]
dev = ["pytest", "pytest-cov", "mypy", "prek", "ty", "ruff", "pytest-loguru", "python-semantic-release"]
eval = ["gemmi>=0.6.7", "joblib", "pandas>=2.2.3", "reciprocalspaceship>=1.0.3"]
protenix = ["protenix", "triton; platform_system == 'Linux' and platform_machine == 'x86_64'"]
Comment thread README.md Outdated
Comment on lines +366 to +369
uv sync --extra boltz --group dev
uv sync --extra protenix --group dev # Linux/CUDA only
uv sync --extra rf3 --group dev # uses tool.uv.sources for rc-foundry
uv sync --extra analysis --extra eval --group dev

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
pyproject.toml (1)

300-301: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Pin rc-foundry to an immutable ref.

Using only a Git URL tracks a moving target and weakens reproducibility/supply-chain guarantees.

Proposed fix
 [tool.uv.sources]
-rc-foundry = {git = "https://github.com/k-chrispens/foundry.git"}
+rc-foundry = {git = "https://github.com/k-chrispens/foundry.git", rev = "<commit-sha>"}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pyproject.toml` around lines 300 - 301, Pin rc-foundry in the
[tool.uv.sources] entry to an immutable Git ref instead of tracking the moving
default branch. Update the rc-foundry source definition to use a specific tag,
commit SHA, or equivalent fixed ref so the dependency remains reproducible and
stable.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@pyproject.toml`:
- Line 59: The NumPy dependency pin is too restrictive for Python 3.13 support
and must be updated to a range compatible with the project’s requires-python
setting. Adjust the NumPy constraint in pyproject.toml to allow a Python
3.13-supported release, and make sure the matching Pixi dependency pin is
updated to the same version range so both dependency definitions stay
consistent.

In `@README.md`:
- Line 368: Update the README example for uv sync with --extra rf3 to explicitly
mention that rf3 is only supported on Python 3.12 (>=3.12,<3.13). Add this note
in the same section as the existing uv sync command so readers using rc-foundry
or the rf3 extra understand the version requirement before installing on Python
3.11 or 3.13.

---

Nitpick comments:
In `@pyproject.toml`:
- Around line 300-301: Pin rc-foundry in the [tool.uv.sources] entry to an
immutable Git ref instead of tracking the moving default branch. Update the
rc-foundry source definition to use a specific tag, commit SHA, or equivalent
fixed ref so the dependency remains reproducible and stable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1aae4609-b616-4e4f-abd0-fd7b4d7c8b69

📥 Commits

Reviewing files that changed from the base of the PR and between 2777630 and 8bf1f46.

📒 Files selected for processing (3)
  • README.md
  • pyproject-hatch.toml
  • pyproject.toml
💤 Files with no reviewable changes (1)
  • pyproject-hatch.toml

Comment thread pyproject.toml Outdated
"jax",
"jaxtyping",
"loguru",
"numpy<2.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect relevant sections of pyproject.toml with line numbers
nl -ba pyproject.toml | sed -n '50,80p'
echo
nl -ba pyproject.toml | sed -n '290,310p'

Repository: diff-use/sampleworks

Length of output: 198


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Search for numpy and python-version related configuration
rg -n --no-heading 'numpy|requires-python|python_version|python-version|markers|dependencies' pyproject.toml

Repository: diff-use/sampleworks

Length of output: 930


🌐 Web query:

NumPy 1.x Python 3.13 support release notes 2.0 Python 3.13 compatibility

💡 Result:

NumPy 1.x (e.g., 1.26.x) does not provide official Python 3.13 support; the last planned NumPy 1.26.x release explicitly lists supported Python versions as 3.9–3.12 [1]. For Python 3.13 compatibility, NumPy’s official support arrived in the NumPy 2.x line: - NumPy 2.1.0 release notes state it “provides support for the upcoming Python 3.13 release” and that Python versions 3.10–3.13 are supported in this release [2]. - NumPy 2.3.1 release notes state it supports Python 3.11–3.13 [3] (showing ongoing compatibility beyond the initial 2.1 milestone). Requested phrasing (“NumPy 1.x Python 3.13 support release notes 2.0 Python 3.13 compatibility”): NumPy 2.0 release notes are not needed to establish Python 3.13 compatibility here; the cited official release-note evidence points to NumPy 2.1.0 as the first NumPy version in the 2.x series that explicitly supports Python 3.13 [2].

Citations:


Align the NumPy pin with Python 3.13 support numpy<2.0 conflicts with requires-python = ">= 3.11, <3.14" because NumPy 1.x does not support Python 3.13. Update the pin to a 3.13-compatible range, and keep the Pixi dependency pin in sync.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pyproject.toml` at line 59, The NumPy dependency pin is too restrictive for
Python 3.13 support and must be updated to a range compatible with the project’s
requires-python setting. Adjust the NumPy constraint in pyproject.toml to allow
a Python 3.13-supported release, and make sure the matching Pixi dependency pin
is updated to the same version range so both dependency definitions stay
consistent.

Comment thread README.md Outdated
```bash
uv sync --extra boltz --group dev
uv sync --extra protenix --group dev # Linux/CUDA only
uv sync --extra rf3 --group dev # uses tool.uv.sources for rc-foundry

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Document the Python version requirement for --extra rf3.

Line 368 should note that rf3 is currently Python 3.12-only (>=3.12,<3.13) to avoid confusing installs on 3.11/3.13.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@README.md` at line 368, Update the README example for uv sync with --extra
rf3 to explicitly mention that rf3 is only supported on Python 3.12
(>=3.12,<3.13). Add this note in the same section as the existing uv sync
command so readers using rc-foundry or the rf3 extra understand the version
requirement before installing on Python 3.11 or 3.13.

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