chore(wren-core-py): migrate from Poetry to uv#2363
Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThis PR migrates the ChangesPoetry to uv Migration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
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 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.
🧹 Nitpick comments (2)
.github/workflows/core-py-ci.yml (1)
28-29: ⚡ Quick winConsider pinning the setup-uv action to a commit SHA for supply chain security.
Using
astral-sh/setup-uv@v4references a mutable tag. For stronger supply chain security, consider pinning to a specific commit SHA instead.🔒 Example: Pin to commit SHA
- - name: Install uv - uses: astral-sh/setup-uv@v4 + - name: Install uv + uses: astral-sh/setup-uv@<commit-sha> # v4You can find the commit SHA for v4 at https://github.com/astral-sh/setup-uv/releases
🤖 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 @.github/workflows/core-py-ci.yml around lines 28 - 29, Replace the mutable tag reference to the GitHub Action usage "astral-sh/setup-uv@v4" with a pinned commit SHA to improve supply chain security; locate the workflow step that uses "astral-sh/setup-uv@v4" and change it to the corresponding commit reference (e.g., "astral-sh/setup-uv@<commit-sha>") for the v4 release you intend to use, ensuring you copy the exact SHA from the action's release or tag page and update any workflow documentation/comments accordingly.Source: Linters/SAST tools
core/wren-core-py/pyproject.toml (1)
27-32: Check the pinned PyPI versions (core/wren-core-py/pyproject.toml:27-32)
maturin==1.9.4,pytest==8.4.2, andruff==0.13.1all exist on PyPI.- They’re not the latest releases (maturin 1.14.0, pytest 9.0.3, ruff 0.15.17); if the intent is “current,” bump the pins or document why these older versions are intentionally fixed.
🤖 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 `@core/wren-core-py/pyproject.toml` around lines 27 - 32, The dev dependency pins in dependency-groups -> dev (maturin==1.9.4, pytest==8.4.2, ruff==0.13.1) are older than current PyPI releases; either update the pins to the desired current versions (e.g., maturin 1.14.0, pytest 9.0.3, ruff 0.15.17) in pyproject.toml or add a brief comment in the file explaining why these specific older versions are intentionally fixed (compatibility/CI reproducibility), referencing the dependency names maturin, pytest and ruff and the dependency-groups dev section so reviewers can locate the change.
🤖 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.
Nitpick comments:
In @.github/workflows/core-py-ci.yml:
- Around line 28-29: Replace the mutable tag reference to the GitHub Action
usage "astral-sh/setup-uv@v4" with a pinned commit SHA to improve supply chain
security; locate the workflow step that uses "astral-sh/setup-uv@v4" and change
it to the corresponding commit reference (e.g.,
"astral-sh/setup-uv@<commit-sha>") for the v4 release you intend to use,
ensuring you copy the exact SHA from the action's release or tag page and update
any workflow documentation/comments accordingly.
In `@core/wren-core-py/pyproject.toml`:
- Around line 27-32: The dev dependency pins in dependency-groups -> dev
(maturin==1.9.4, pytest==8.4.2, ruff==0.13.1) are older than current PyPI
releases; either update the pins to the desired current versions (e.g., maturin
1.14.0, pytest 9.0.3, ruff 0.15.17) in pyproject.toml or add a brief comment in
the file explaining why these specific older versions are intentionally fixed
(compatibility/CI reproducibility), referencing the dependency names maturin,
pytest and ruff and the dependency-groups dev section so reviewers can locate
the change.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 9504a5eb-95a4-455e-9c01-e899c4d4d9b7
⛔ Files ignored due to path filters (2)
core/wren-core-py/poetry.lockis excluded by!**/*.lockcore/wren-core-py/uv.lockis excluded by!**/*.lock
📒 Files selected for processing (9)
.claude/CLAUDE.md.github/labeler.yml.github/workflows/core-py-ci.yml.github/workflows/wren-ci.ymlCONTRIBUTING.mdcore/wren-core-py/.claude/CLAUDE.mdcore/wren-core-py/README.mdcore/wren-core-py/justfilecore/wren-core-py/pyproject.toml
💤 Files with no reviewable changes (1)
- .github/labeler.yml
What
core/wren-core-pyis the only Python module still using Poetry; everyother module (
core/wren, SDK CI) already uses uv. This migrates it to uvso the whole repo shares one dependency manager. The build backend stays
maturin — only the dependency manager changes.
Why
Inherited from the wren-engine import:
pyproject.tomlalready had a PEP 621[project]table, but the legacy[tool.poetry]block was never removed(stale version mismatch:
[project]0.6.0 vs[tool.poetry]0.1.0). Poetryhere only managed 3 dev deps (maturin, pytest, ruff) — there's no technical
reason for it. Unifying on uv removes the repeated
pipx install poetrystepsin CI and lets contributors build the whole Rust→bindings→CLI chain with just
uv + Rust + just.
Changes
pyproject.toml— remove[tool.poetry]/[tool.poetry.*]; add[dependency-groups] devwith the same pins (maturin==1.9.4,pytest==8.4.2,ruff==0.13.1).poetry.lockwithuv.lock.justfile& CI —uv sync --no-install-project+uv run --no-sync …for maturin/pytest/ruff. This mirrors
poetry install --no-root: a plainuv syncbuilds the editable maturin extension during dependency install(redundant with the explicit
maturin develop/buildstep), so--no-install-projectskips that and--no-syncstops uv re-syncing beforeeach tool run. CI uses
--lockedto enforceuv.lock.core-py-ci.yml/wren-ci.yml— addastral-sh/setup-uv, droppipx install poetry.README.md,CONTRIBUTING.md,CLAUDE.md; remove the now-dead**/poetry.lockglob from.github/labeler.yml.Notes
test-only deps drift in the new lock (
iniconfig,packaging,pygments) —harmless for a migration.
Summary by CodeRabbit
Release Notes
Chores
uvacross development workflows, CI/CD pipelines, and build configurationsDocumentation