Skip to content

Migrate dev environment to uv#1371

Merged
fizyk merged 1 commit into
mainfrom
uv
Jul 20, 2026
Merged

Migrate dev environment to uv#1371
fizyk merged 1 commit into
mainfrom
uv

Conversation

@fizyk

@fizyk fizyk commented Jul 19, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Developer Experience
    • Migrated setup, dependency management, linting, and developer workflows from Pipenv to uv.
    • Updated documentation on the database test fixture and contributor instructions.
  • Build and Release
    • Switched the build backend to uv build and refreshed packaging/licensing metadata.
    • Improved automated release/changelog tooling and dependency update scheduling.
  • Maintenance
    • Updated CI workflows to use uv-based reusable actions for testing and coverage handling.
    • Streamlined diagram rendering via shared workflow and adjusted pre-commit hooks for uv.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Ignoring CodeRabbit configuration file changes. For security, only the configuration from the base branch is applied for open source repositories.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 9c1a8232-2c0a-449f-badf-0fc7ad9d9590

📥 Commits

Reviewing files that changed from the base of the PR and between ca7b2bc and 3502d27.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (19)
  • .coderabbit.yaml
  • .github/dependabot.yml
  • .github/workflows/async-postgres.yml
  • .github/workflows/build.yml
  • .github/workflows/diagram.yml
  • .github/workflows/dockerised-postgres.yml
  • .github/workflows/oldest-postgres.yml
  • .github/workflows/pr-check.yml
  • .github/workflows/pre-commit.yml
  • .github/workflows/release.yml
  • .github/workflows/single-postgres-windows.yml
  • .github/workflows/single-postgres.yml
  • .gitignore
  • .pre-commit-config.yaml
  • CONTRIBUTING.rst
  • Pipfile
  • README.rst
  • newsfragments/+9152f59e.misc.rst
  • pyproject.toml
💤 Files with no reviewable changes (2)
  • .gitignore
  • README.rst
🚧 Files skipped from review as they are similar to previous changes (15)
  • .github/workflows/pre-commit.yml
  • newsfragments/+9152f59e.misc.rst
  • .github/workflows/build.yml
  • .github/workflows/pr-check.yml
  • .github/workflows/dockerised-postgres.yml
  • .github/workflows/release.yml
  • Pipfile
  • .github/workflows/single-postgres.yml
  • .github/workflows/single-postgres-windows.yml
  • .github/workflows/diagram.yml
  • .github/dependabot.yml
  • .pre-commit-config.yaml
  • .github/workflows/oldest-postgres.yml
  • .github/workflows/async-postgres.yml
  • pyproject.toml

📝 Walkthrough

Walkthrough

The project migrates packaging, dependency management, pre-commit hooks, Dependabot, documentation, and CI workflows from Pipenv to uv. Reusable workflow references are updated, database test coverage flows are preserved, and the build backend changes to uv_build.

Changes

uv migration

Layer / File(s) Summary
Packaging and dependency declarations
pyproject.toml, Pipfile, .gitignore, newsfragments/*
Packaging uses uv_build and dependency groups; Pipenv development entries and its lockfile ignore rule are removed, the changelog command uses uv run, and a migration news fragment is added.
Development tooling and dependency automation
.pre-commit-config.yaml, CONTRIBUTING.rst, .coderabbit.yaml, .github/dependabot.yml
Pre-commit, contributor instructions, and towncrier guidance use uv commands, while Dependabot manages uv and GitHub Actions updates with cooldown settings.
Database test workflow migration
.github/workflows/*postgres*.yml, README.rst
PostgreSQL workflows use uv setup, execution, and coverage actions while retaining existing test commands and coverage outputs; database fixture behaviour is documented.
Shared workflow integration
.github/workflows/build.yml, .github/workflows/pr-check.yml, .github/workflows/pre-commit.yml, .github/workflows/release.yml, .github/workflows/diagram.yml
Shared workflow references are pinned to the newer revision, uv is selected where supported, and diagram rendering uses a reusable workflow with write permissions.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: migrating the development environment from Pipenv to uv.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Newsfragment Check ✅ Passed PASS: newsfragments/+9152f59e.misc.rst exists, and pyproject.toml defines misc as a valid Towncrier type.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch uv

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.

@codecov

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
Pipfile (1)

7-11: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider deleting Pipfile entirely.

Since the development environment and dependency management have been fully migrated to uv via pyproject.toml, retaining an empty or sparse Pipfile may cause confusion. Consider deleting Pipfile (and Pipfile.lock if it exists) from the repository unless there is a specific downstream tool that still strictly requires it.

🤖 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 `@Pipfile` around lines 7 - 11, Remove the obsolete Pipfile and, if present,
Pipfile.lock, since dependency management is now handled through uv and
pyproject.toml. Do not retain these files unless a documented downstream tool
still requires them.
.github/workflows/oldest-postgres.yml (1)

60-60: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Use uv pip install for faster resolution and better stability.

Consider replacing pip install with uv pip install. uv virtual environments do not include pip by default, so relying on pip being present might cause failures if the environment is not explicitly seeded. Additionally, uv pip install provides significantly better performance.

⚡ Proposed fix
-          command: pip install -r oldest/requirements.txt
+          command: uv pip install -r oldest/requirements.txt
🤖 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/oldest-postgres.yml at line 60, Update the dependency
installation command in the workflow step to use uv pip install instead of pip
install, while preserving the existing oldest/requirements.txt input.
.github/workflows/dockerised-postgres.yml (1)

54-54: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Update step names to reflect the migration to uv.

The step name for setting up the Python environment still references "Pipenv" in the unchanged context just above the modified uses block. Please update these step names across the workflows to avoid confusion in the CI logs and ensure they accurately reflect the uv tooling.

  • .github/workflows/dockerised-postgres.yml#L54-L54: Update the preceding step name to Set up Python (uv) on python ${{ matrix.python-version }} or similar.
  • .github/workflows/oldest-postgres.yml#L40-L40: Update the preceding step name to reflect uv.
  • .github/workflows/single-postgres-windows.yml#L35-L35: Update the preceding step name to reflect uv.
  • .github/workflows/single-postgres.yml#L40-L40: Update the preceding step name to reflect uv.
🤖 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/dockerised-postgres.yml at line 54, Update the preceding
Python setup step names to reference uv instead of Pipenv in
.github/workflows/dockerised-postgres.yml (lines 54-54),
.github/workflows/oldest-postgres.yml (lines 40-40),
.github/workflows/single-postgres-windows.yml (lines 35-35), and
.github/workflows/single-postgres.yml (lines 40-40); preserve the existing
Python version interpolation where present.
🤖 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 121: Update the remaining migration references: in pyproject.toml at
lines 121-121, change README.rst guidance from pipenv run tbump to uv run tbump;
in .pre-commit-config.yaml at lines 52-60, change CONTRIBUTING.rst guidance from
pipenv run pytest to uv run pytest; and at lines 61-68, change .coderabbit.yaml
guidance from pipenv run towncrier create to uv run towncrier create.

---

Nitpick comments:
In @.github/workflows/dockerised-postgres.yml:
- Line 54: Update the preceding Python setup step names to reference uv instead
of Pipenv in .github/workflows/dockerised-postgres.yml (lines 54-54),
.github/workflows/oldest-postgres.yml (lines 40-40),
.github/workflows/single-postgres-windows.yml (lines 35-35), and
.github/workflows/single-postgres.yml (lines 40-40); preserve the existing
Python version interpolation where present.

In @.github/workflows/oldest-postgres.yml:
- Line 60: Update the dependency installation command in the workflow step to
use uv pip install instead of pip install, while preserving the existing
oldest/requirements.txt input.

In `@Pipfile`:
- Around line 7-11: Remove the obsolete Pipfile and, if present, Pipfile.lock,
since dependency management is now handled through uv and pyproject.toml. Do not
retain these files unless a documented downstream tool still requires them.
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b4431dd5-1462-4d43-90e6-90fd7b9926b6

📥 Commits

Reviewing files that changed from the base of the PR and between a7950ce and 95ef9d0.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (16)
  • .github/dependabot.yml
  • .github/workflows/async-postgres.yml
  • .github/workflows/build.yml
  • .github/workflows/diagram.yml
  • .github/workflows/dockerised-postgres.yml
  • .github/workflows/oldest-postgres.yml
  • .github/workflows/pr-check.yml
  • .github/workflows/pre-commit.yml
  • .github/workflows/release.yml
  • .github/workflows/single-postgres-windows.yml
  • .github/workflows/single-postgres.yml
  • .gitignore
  • .pre-commit-config.yaml
  • Pipfile
  • newsfragments/+9152f59e.misc.rst
  • pyproject.toml
💤 Files with no reviewable changes (1)
  • .gitignore

Comment thread pyproject.toml
@fizyk
fizyk merged commit bd9af49 into main Jul 20, 2026
174 of 178 checks passed
@fizyk
fizyk deleted the uv branch July 20, 2026 20:28
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