Skip to content

Migrate project from Poetry to UV - #834

Merged
youtux merged 3 commits into
masterfrom
switch-to-uv
Sep 14, 2026
Merged

youtux merged 3 commits into
masterfrom
switch-to-uv

Conversation

@youtux

@youtux youtux commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI lite review requested due to automatic review settings September 14, 2026 22:50
@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.13%. Comparing base (a7cbc52) to head (e0346d3).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #834   +/-   ##
=======================================
  Coverage   96.13%   96.13%           
=======================================
  Files          55       55           
  Lines        2430     2430           
  Branches      137      137           
=======================================
  Hits         2336     2336           
  Misses         57       57           
  Partials       37       37           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

Unresolved moderate findings remain in project metadata, documentation, CI, and direnv integration.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Migrates project packaging, dependency management, CI, and contributor workflows from Poetry to uv.

Changes:

  • Replaces Poetry configuration with uv dependency groups and uv_build.
  • Updates tox, pre-commit, CI, and contributor documentation.
  • Removes Poetry-specific direnv integration.
File summaries
File Changes and review notes
tox.ini Uses the uv-managed development dependency group for mypy. No final findings.
pyproject.toml Defines uv groups and build backend. Moderate: retain the MIT classifier and correct the Python-version markers, then regenerate uv.lock.
CONTRIBUTING.md Updates development and release commands. Moderate: use uv run --group build for the Twine command.
.pre-commit-config.yaml Adds uv lock validation. No final findings.
.gitignore Removes obsolete Poetry-related commentary. No final findings.
.github/workflows/main.yml Migrates build and test jobs to uv. Moderate: use --only-group build and --locked; nit: enable uv caching.
.envrc Removes Poetry-specific activation. Moderate: activate the uv-managed .venv or document the breaking change.
Review details

Suppressed comments (6)

.envrc:1

  • Deleting this tracked .envrc removes the repository's direnv integration, so users who relied on entering the project to activate the Poetry environment will no longer get any virtualenv. The uv migration should replace the Poetry lookup/source with activation of the uv-managed .venv (or explicitly document this breaking change), rather than silently dropping the workflow.
    .github/workflows/main.yml:21
  • Because [tool.uv] sets default-groups = "all", --group build adds the build group to the dev group instead of selecting build dependencies only. The build job therefore now resolves and installs the documentation tooling that the old poetry install --only build deliberately excluded; use --only-group build here.
        run: uv run --group build twine check --strict dist/*

.github/workflows/main.yml:78

  • uv sync updates the lockfile when the project metadata and uv.lock diverge, so this CI step can silently resolve a new dependency set instead of failing on a stale lock. Since the lock is committed and checked by pre-commit, make CI enforce it with --locked.
        run: uv sync --only-group dev

.github/workflows/main.yml:70

  • The previous workflow cached each Poetry virtualenv, but this migration removes that cache and leaves setup-uv with its cache disabled. Every Python matrix job will therefore redownload the full dependency set; enable the uv cache here to retain equivalent CI reuse.
        uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0

pyproject.toml:16

  • This migration removes the existing License :: OSI Approved :: MIT License Trove classifier. The separate license = "MIT" field does not preserve that classifier in package metadata, so PyPI classifier consumers lose existing license metadata; keep the classifier.
    "Operating System :: POSIX",

pyproject.toml:61

  • python_full_version includes the prerelease segment, so the 3.15-dev matrix interpreter (for example, 3.15.0a1) still satisfies < '3.15'. This makes CI install sphinx-autobuild and its watchfiles dependency on the prerelease interpreter, contrary to the stated compatibility rationale and potentially causing the job to fail; use python_version < '3.15' for both groups and regenerate uv.lock.
    "sphinx ; python_full_version < '3.15'",
    "sphinx-autobuild ; python_full_version < '3.15'",
  • Files reviewed: 6/9 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread CONTRIBUTING.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The migration is internally consistent across packaging, CI, tooling, and contributor documentation.

Review details
  • Files reviewed: 6/9 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@youtux
youtux merged commit 33b2b30 into master Sep 14, 2026
21 checks passed
@youtux
youtux deleted the switch-to-uv branch September 14, 2026 23:45
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