Skip to content

Conversation

@neo-jesse
Copy link
Collaborator

@neo-jesse neo-jesse commented Nov 12, 2025

Migrate Python dependency management from Pipenv to UV

Summary

Migrates api and shared-data projects from pipenv to uv for faster dependency resolution and installation. All other projects continue using pipenv.

Key Changes for Api and shared-data

  • Migrated api and shared-data from Pipfile to pyproject.toml with uv.lock
  • Created scripts/python-uv.mk for UV projects; scripts/python.mk remains for pipenv projects
  • Updated GitHub Actions setup action to detect project type (UV vs pipenv) and install dependencies accordingly
  • Fixed dependencies: added opentrons-hardware[FLEX] to api dev deps, numpy to shared-data main deps
  • Fixed mypy errors (redundant casts, unused ignores, untyped decorators)
  • Migrated JSON schema validation from jsonschema.RefResolver to referencing library
  • Refactored GitHub Actions Python setup into modular actions (install-uv, cache-uv, setup)
  • Fixed Windows PATH issues for uv in Make commands
  • Added install-dev-deps: 'true' to workflows that run lint/test for UV projects

Changes for Pipenv Projects

  • Updated all pipenv Makefiles to use pipenv sync --dev to ensure dev dependencies are installed
  • Fixed workflows to properly install dev dependencies for lint/test jobs

Benefits

  • Faster dependency resolution and installation for api and shared-data
  • Standardized pyproject.toml configuration for migrated projects
  • Improved CI reliability with proper caching and dev dependency handling
  • Gradual migration path - other projects can be migrated incrementally

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

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

Very much getting there! A couple little nits to pick; the only big things left are some github actions stuff, the thing with the mypy configuration in api, and a weirdness with the dependencies in api.

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.

4 participants