Skip to content

chore: migrate from PDM to uv for dependency management#15

Open
dphoria wants to merge 1 commit intomasterfrom
admin/pdm-uv
Open

chore: migrate from PDM to uv for dependency management#15
dphoria wants to merge 1 commit intomasterfrom
admin/pdm-uv

Conversation

@dphoria
Copy link
Owner

@dphoria dphoria commented Feb 22, 2026

Migrates the project from PDM to uv for dependency management.

  • Replace pdm.lock with uv.lock, update pyproject.toml (dependency-groups)
  • Use uv in CI (setup-uv, uv sync, uv run) and Dockerfile
  • Update .gitignore for uv (.uv/) and remove PDM entries
  • Update README setup instructions

Made with Cursor


Note

Medium Risk
Build/CI and container dependency resolution is changing end-to-end; risk is mainly around lockfile parity and environment reproducibility across workflows and Docker images.

Overview
Migrates Python dependency management from PDM to uv across GitHub Actions and Docker builds, swapping pdm sync/run/install usage for uv sync/run and updating caching to key off uv.lock.

Replaces pdm.lock with a generated uv.lock, updates pyproject.toml to use dependency-groups (and drops PDM-specific config), refreshes .gitignore to ignore uv artifacts, and updates the README install instructions to use uv.

Written by Cursor Bugbot for commit bd58653. This will update automatically on new commits. Configure here.

- Replace pdm.lock with uv.lock, update pyproject.toml (dependency-groups)
- Use uv in CI (setup-uv, uv sync, uv run) and Dockerfile
- Update .gitignore for uv (.uv/) and remove PDM entries
- Update README setup instructions

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on March 1

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.


WORKDIR /bill
RUN pdm install --check --prod --no-editable
RUN uv sync --no-dev --no-editable
Copy link

Choose a reason for hiding this comment

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

Dockerfile missing --frozen flag for reproducible builds

Medium Severity

The uv sync command in the Dockerfile lacks a --frozen or --locked flag, replacing the safety check that PDM's --check flag provided. Without it, if uv.lock and pyproject.toml are out of sync, uv sync will silently re-resolve dependencies during the Docker build instead of failing, leading to non-reproducible production builds. The uv documentation recommends --frozen for Dockerfiles.

Fix in Cursor Fix in Web

RUN pip install -U pdm
ENV PDM_CHECK_UPDATE=false
COPY pyproject.toml pdm.lock /bill/
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
Copy link

Choose a reason for hiding this comment

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

Unpinned uv image tag reduces Docker build reproducibility

Low Severity

Using ghcr.io/astral-sh/uv:latest copies an unpinned version of uv into the build. A new uv release could change dependency resolution behavior or introduce breaking changes, causing unexpected build failures or different dependency installations across builds. The uv Docker guide recommends pinning to a specific version tag.

Fix in Cursor Fix in Web

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