chore(packaging): consolidate uv project metadata#271
Conversation
📝 WalkthroughWalkthroughRemoves Changesuv Migration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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.mddevelopment/macOS instructions to useuv, and deletespyproject-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.
| "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" |
| license = {file = "LICENSE"} | ||
| name = "sampleworks" | ||
| readme = "README.md" | ||
| requires-python = ">= 3.11, <3.14" |
| ] | ||
| 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'"] |
| 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
pyproject.toml (1)
300-301: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winPin
rc-foundryto 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
📒 Files selected for processing (3)
README.mdpyproject-hatch.tomlpyproject.toml
💤 Files with no reviewable changes (1)
- pyproject-hatch.toml
| "jax", | ||
| "jaxtyping", | ||
| "loguru", | ||
| "numpy<2.0", |
There was a problem hiding this comment.
🩺 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.tomlRepository: 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:
- 1: https://numpy.org/devdocs/release/1.26.4-notes.html
- 2: https://numpy.org/devdocs/release/2.1.0-notes.html
- 3: https://numpy.org/devdocs/release/2.3.1-notes.html
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.
| ```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 |
There was a problem hiding this comment.
📐 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.
Summary
pyproject.tomlfor uv-based source-checkout developmenttestdependency group, project URLs, and explicit Hatch wheel/sdist build targetspyproject-hatch.tomland update README uv/macOS development instructionsValidation
python3parsedpyproject.tomlwithtomllibuv lock --dry-runuv build --out-dir /var/folders/s5/8vdrgsls6pd3s4xd1scwhc5h0000gn/T/opencode/sampleworks-uv-buildpixi lockreportedLock-file was already up-to-datesampleworks-uv,diffuse-small, sampleworks image, ephemeral): synced branch and verifiedpyproject-hatch.tomlis absent/home/dev/.local/bin/uv build --out-dir /tmp/sampleworks-uv-dist/home/dev/.local/bin/uv lock --dry-run --python 3.12analyses/,experiments/, andsampleworks/data/protein_configs.csvcontentsACTL pod was torn down after validation.