Skip to content

✨ Add UV dependency management#20

Open
asaf-kali wants to merge 1 commit into
mainfrom
feat/pmr
Open

✨ Add UV dependency management#20
asaf-kali wants to merge 1 commit into
mainfrom
feat/pmr

Conversation

@asaf-kali
Copy link
Copy Markdown
Owner

@asaf-kali asaf-kali commented Feb 24, 2026

Summary by CodeRabbit

  • Chores
    • Updated project build system to UV for improved build performance and modern tooling support
    • Migrated project configuration to PEP 621 standards for better ecosystem compatibility
    • Reorganized project metadata structure and dependency management

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 24, 2026

Walkthrough

Migration of project configuration from Poetry-centric structure to PEP 621 standard format. Relocates metadata, dependencies, and URLs to standardized sections, and switches build backend from poetry-core to UV Build with corresponding [tool.uv] configuration.

Changes

Cohort / File(s) Summary
Project Metadata Migration
pyproject.toml
Restructured from [tool.poetry] to [project] table with PEP 621 compliance. Authors converted from string to structured objects. Moved URLs from [tool.poetry.urls] to [project.urls]. Reorganized dependencies from [tool.poetry.dependencies] and [tool.poetry.group.*] into unified [dependency-groups] with explicit test, lint, and dev groups. Build backend switched from poetry-core to uv_build. Added [tool.uv] section for packaging configuration with default groups and build-backend settings. Semantic-release configuration retained, referencing new manifest structure.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title mentions only UV dependency management, but the PR includes a comprehensive migration from Poetry to PEP 621 standards, UV build backend, and dependency-groups restructuring—the main change extends well beyond just dependency management. Consider a more comprehensive title such as 'Migrate from Poetry to UV with PEP 621 project metadata' to accurately reflect the scope of the modernization effort.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)

✅ Unit Test PR creation complete.

  • Create PR with unit tests
  • Commit unit tests in branch feat/pmr
  • Post copyable unit tests in a comment

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 and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@pyproject.toml`:
- Around line 1-3: The semantic-release config still points to the old Poetry
key; update the TOML path used by tool.semantic_release.version_toml to
reference the PEP 621 location by replacing the "tool.poetry.version" reference
with "project.version" so semantic-release reads/writes the version in the
[project] version field; ensure the existing [project] version = "5.5.5" remains
present.
- Around line 27-45: Replace remaining Poetry group install commands with UV
equivalents: change occurrences of "poetry install --only lint" / "poetry
install --only test" / "poetry install --only dev" to "uv sync --group lint" /
"uv sync --group test" / "uv sync --group dev" respectively (update the Makefile
targets and workflow job steps that call those exact strings). Also update the
semantic-release toml mapping by changing version_toml from
["pyproject.toml:tool.poetry.version"] to ["pyproject.toml:project.version"] so
release tooling reads the new PEP 621 location; ensure the change is applied to
the existing version_toml entry in pyproject.toml.

ℹ️ Review info

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 55b3c23 and 3cf6ae3.

⛔ Files ignored due to path filters (2)
  • poetry.lock is excluded by !**/*.lock
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • pyproject.toml

Comment thread pyproject.toml
Comment on lines +1 to 3
[project]
name = "codenames"
version = "5.5.5"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat -n pyproject.toml | head -100

Repository: asaf-kali/codenames

Length of output: 2751


Update version_toml to reference the migrated version location.

The project uses PEP 621 standard [project] section with version = "5.5.5" at line 3, but tool.semantic_release.version_toml at line 62 still references the non-existent tool.poetry.version. This breaks semantic-release's automated version bumping.

Fix
 [tool.semantic_release]
-version_toml = ["pyproject.toml:tool.poetry.version"]
+version_toml = ["pyproject.toml:project.version"]
 commit_parser = "emoji"
🧰 Tools
🪛 GitHub Actions: Pipeline

[error] 1-1: Poetry configuration error: [tool.poetry] section not found in pyproject.toml. The step 'make install-lint' (which runs 'poetry install --only lint') failed due to missing Poetry config.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pyproject.toml` around lines 1 - 3, The semantic-release config still points
to the old Poetry key; update the TOML path used by
tool.semantic_release.version_toml to reference the PEP 621 location by
replacing the "tool.poetry.version" reference with "project.version" so
semantic-release reads/writes the version in the [project] version field; ensure
the existing [project] version = "5.5.5" remains present.

Comment thread pyproject.toml
Comment on lines +27 to +45
[dependency-groups]
test = [
"pytest>=7.2,<8",
"coverage>=7.2,<8",
"pytest-retry>=1.6,<2",
]
lint = [
"ruff>=0.7",
"black>=24.10",
"isort>=5.12.0",
"mypy>=1.13.0",
"pylint>=3.3.3",
"types-requests>=2.28.11.17,<3",
]
dev = [
"pre-commit>=3.2.2",
"twine>=5.0",
"python-semantic-release>=8.0,<9",
]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# Find remaining Poetry install commands in CI/automation
rg -n 'poetry\s+install|--only\s+(lint|test|dev)' --type py --type toml --type yaml --type yml --type sh

Repository: asaf-kali/codenames

Length of output: 90


🏁 Script executed:

# Find Makefile and CI workflow files
fd -type f \( -name 'Makefile' -o -name 'makefile' -o -name '*.yml' -o -name '*.yaml' \) | head -20

Repository: asaf-kali/codenames

Length of output: 233


🏁 Script executed:

# Check the full pyproject.toml to see semantic-release config and UV settings
cat -n pyproject.toml | tail -50

Repository: asaf-kali/codenames

Length of output: 1144


🏁 Script executed:

# Search for remaining Poetry install commands without file type filter
rg 'poetry\s+install|--only\s+(lint|test|dev)' -n

Repository: asaf-kali/codenames

Length of output: 256


🏁 Script executed:

# Find CI workflow files
fd -e yaml -e yml | grep -E '\.(github|gitlab)' | head -20

Repository: asaf-kali/codenames

Length of output: 45


🏁 Script executed:

# Check full pyproject.toml for semantic-release config
cat pyproject.toml | grep -A 10 '\[tool.semantic_release\]'

Repository: asaf-kali/codenames

Length of output: 373


🏁 Script executed:

# Check full pyproject.toml for UV config
cat pyproject.toml | grep -A 10 '\[tool.uv\]'

Repository: asaf-kali/codenames

Length of output: 269


🏁 Script executed:

# Look for Makefile and check install targets
find . -name 'Makefile' -o -name 'makefile' | head -5

Repository: asaf-kali/codenames

Length of output: 73


🏁 Script executed:

# Check if poetry is listed in pyproject.toml as a dependency
rg 'poetry' pyproject.toml

Repository: asaf-kali/codenames

Length of output: 116


🏁 Script executed:

# Find GitHub workflows
find .github/workflows -type f 2>/dev/null | head -20

Repository: asaf-kali/codenames

Length of output: 93


🏁 Script executed:

# Check content of GitHub workflows if they exist
find .github -name '*.yml' -o -name '*.yaml' 2>/dev/null | xargs cat 2>/dev/null | grep -A 2 -B 2 'poetry\|uv\|install'

Repository: asaf-kali/codenames

Length of output: 1412


🏁 Script executed:

# Find where project.version is defined
rg -n 'version\s*=' pyproject.toml | head -10

Repository: asaf-kali/codenames

Length of output: 82


🏁 Script executed:

# See the [project] section
cat pyproject.toml | head -30

Repository: asaf-kali/codenames

Length of output: 888


🏁 Script executed:

# Check the lint-install action file
cat .github/actions/lint-install/action.yml 2>/dev/null || cat .github/workflows/lint-install.yml 2>/dev/null || ls -la .github/actions/

Repository: asaf-kali/codenames

Length of output: 429


🌐 Web query:

UV python dependency groups default-groups configuration schema

💡 Result:

In uv, dependency groups are declared using the standard [dependency-groups] table from PEP 735 (each group key maps to a list of requirement strings and/or objects like {include-group = "..."}). [1], [2]

To control which groups uv installs/syncs by default, configure:

[tool.uv]
default-groups = ["dev"]      # default
# or
default-groups = ["dev", "lint"]
# or
default-groups = "all"

Schema for tool.uv.default-groups:

  • Location: [tool.uv]
  • Type: str | list[str]
  • Default: ["dev"]
  • Special value: "all" enables all dependency groups by default. [1], [3]

Related (per-group) settings schema:

  • Location: [tool.uv.dependency-groups]
  • Type: dict
  • Purpose: currently used to attach metadata like requires-python to a group (not to define the group’s dependencies). [1], [3]

Sources

  1. PEP 735 – Dependency Groups in pyproject.toml https://peps.python.org/pep-0735/
  2. uv docs: Managing dependencies (dependency groups, nesting) https://docs.astral.sh/uv/concepts/projects/dependencies/
  3. uv docs: Settings (default-groups, dependency-groups) https://docs.astral.sh/uv/reference/settings/

Migrate install commands to UV and fix semantic-release version path—Poetry groups no longer exist.

Three locations still reference Poetry's dependency groups, but pyproject.toml now uses UV:

  1. Makefile (lines 22, 25, 28, 31): Replace poetry install --only lint etc. with uv sync --group lint
  2. .github/workflows/pipeline.yml: Replace poetry install --only dev with uv sync --group dev
  3. pyproject.toml line 62: Update version_toml = ["pyproject.toml:tool.poetry.version"] to version_toml = ["pyproject.toml:project.version"] so semantic-release can find the version at its new location.

Without these changes, CI will fail when Poetry commands run against the UV-only dependency schema, and release version bumping will fail.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pyproject.toml` around lines 27 - 45, Replace remaining Poetry group install
commands with UV equivalents: change occurrences of "poetry install --only lint"
/ "poetry install --only test" / "poetry install --only dev" to "uv sync --group
lint" / "uv sync --group test" / "uv sync --group dev" respectively (update the
Makefile targets and workflow job steps that call those exact strings). Also
update the semantic-release toml mapping by changing version_toml from
["pyproject.toml:tool.poetry.version"] to ["pyproject.toml:project.version"] so
release tooling reads the new PEP 621 location; ensure the change is applied to
the existing version_toml entry in pyproject.toml.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 27, 2026

Note

Unit test generation is a public access feature. Expect some limitations and changes as we gather feedback and continue to improve it.


Generating unit tests... This may take up to 20 minutes.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 27, 2026

✅ Created PR with unit tests: #21

@asaf-kali asaf-kali force-pushed the main branch 2 times, most recently from b06a308 to 55b3c23 Compare April 12, 2026 13:01
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.

1 participant