Migrate from poetry to uv for env and package management#461
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThis PR migrates the project's package management from Poetry to uv and switches versioning from poetry-dynamic-versioning to setuptools-scm. The build backend in pyproject.toml now uses setuptools with PEP 621 project metadata, dependencies are reorganized into standard sections, CI/CD workflows are updated to use uv instead of Poetry commands, and version resolution is simplified to use runtime metadata lookups. ChangesPoetry to uv and setuptools-scm Migration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
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 |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 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 @.github/workflows/publish-docs.yml:
- Around line 20-23: The workflow currently references the third-party action as
"uses: astral-sh/setup-uv@v6", which is a floating tag; replace this with the
action pinned to a specific full commit SHA (e.g.,
"astral-sh/setup-uv@<full-commit-sha>") so the workflow is reproducible. Locate
the "uses: astral-sh/setup-uv@v6" entry in the publish-docs.yml file and update
it to the full commit SHA for the v6 release (obtain the SHA from the action's
GitHub repo tags or releases) and keep the existing "with:" inputs unchanged.
Ensure the updated line uses the exact 40-character commit SHA string.
In @.github/workflows/publish-pypi.yml:
- Around line 25-28: Replace the floating tag for the third-party action used in
the publish job: change the uses entry "astral-sh/setup-uv@v6" to the specific
commit SHA (e.g. "astral-sh/setup-uv@<full-commit-sha>") so the publish workflow
pins the exact action version; update the YAML in the publish job where the
action is referenced to use the full commit SHA instead of "v6".
In @.github/workflows/test.yml:
- Around line 36-41: The workflow misses the dev dependency group needed for
tests; update the steps that install and run tests (the "Install frozen
environment", "Run sphinx-docs build test", and "Run pytest" steps) to sync and
run with the dev group included (e.g., add --group dev to the uv sync command
and include --group dev or ensure uv run uses the synced env for the pytest and
sphinx-build steps) so pytest and test-only packages from
[dependency-groups].dev are available on a clean runner.
- Around line 30-33: The workflow uses a floating tag for the setup-uv action
("name: Setup uv" with "uses: astral-sh/setup-uv@v6"); replace the floating tag
with a specific commit SHA to pin the action for reproducible CI and
supply-chain safety. Update both occurrences of the step (the ones currently
using "astral-sh/setup-uv@v6") to use the corresponding commit SHA (e.g.,
"astral-sh/setup-uv@<full-commit-sha>") so the workflow references an immutable
revision.
In `@docs/source/contributing.md`:
- Line 165: Replace the incorrect sphinx-build invocation that uses "docs/source
doctest -W" (which treats "doctest" as the output dir) with an explicit builder
flag so doctest is run as the builder; update the command in the contributing
docs to use the builder option (e.g., "-b doctest" or "--builder doctest") with
the same source dir and warning flag so contributors run Sphinx doctest checks
correctly.
In `@pyproject.toml`:
- Around line 2-3: Update the build-system requirement to ensure SPDX parsing
for [project].license by raising the setuptools minimum in the pyproject.toml
build-system.requires entry (currently "setuptools>=64") to at least
"setuptools>=77.0.0" so the project-level license string (e.g., license =
"BSD-3-Clause") is parsed correctly; alternatively revert to the legacy license
table form if you cannot bump setuptools.
🪄 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: 20bf56e9-c219-4bf7-8614-465c62239baf
⛔ Files ignored due to path filters (2)
poetry.lockis excluded by!**/*.lockuv.lockis excluded by!**/*.lock
📒 Files selected for processing (13)
.github/actions/setup-poetry/action.yml.github/dependabot.yml.github/workflows/publish-docs.yml.github/workflows/publish-pypi.yml.github/workflows/test.yml.gitignore.pre-commit-config.yamlcytotable/__init__.pycytotable/utils.pydocs/source/contributing.mdpyproject.tomlreadme.mdtests/data/in-carta/colas-lab/shrink_colas_lab_data_for_tests.py
💤 Files with no reviewable changes (2)
- .github/actions/setup-poetry/action.yml
- .pre-commit-config.yaml
| try: | ||
| # attempt to gather the development version from dunamai | ||
| # for scenarios where cytotable from source is used. | ||
| import dunamai |
There was a problem hiding this comment.
is this a dependency to remove from anywhere?
| numpy = [ | ||
| { version = "<=1.24.4", python = "<3.11" }, | ||
| { version = ">=1.26.0", python = ">=3.11" }, | ||
| keywords = [ "cellprofiler", "python", "single-cell-analysis", "way-lab" ] |
There was a problem hiding this comment.
| keywords = [ "cellprofiler", "python", "single-cell-analysis", "way-lab" ] | |
| keywords = [ "cellprofiler", "image-based-profiling", "python", "single-cell-analysis" ] |
Good to keep lab agnostic
| typing-extensions = "^4.14.0" | ||
| [dependency-groups] | ||
| dev = [ | ||
| "cytominer-database>=0.3.4,<0.4", |
Description
This PR migrates from poetry to uv for environment and package management.
What is the nature of your change?
Checklist
Please ensure that all boxes are checked before indicating that a pull request is ready for review.
Summary by CodeRabbit
Chores
Bug Fixes
Documentation