-
Notifications
You must be signed in to change notification settings - Fork 187
chore: python project migration to uv #20135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: bump-to-scarthgap
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## bump-to-scarthgap #20135 +/- ##
=====================================================
+ Coverage 25.96% 25.97% +0.01%
=====================================================
Files 3641 3640 -1
Lines 303277 303167 -110
Branches 42379 42588 +209
=====================================================
+ Hits 78735 78737 +2
+ Misses 224519 224407 -112
Partials 23 23
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
sfoster1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's try and do all we can to avoid changes that aren't necessary for the uv cutover. that's stuff like
- Altering the
pipenv_optsdefinition requiring changes to all the makefiles to push--devup - Whatever is causing the typechecking to change and requiring some extra
casts - Whatever made us reformat
ot3controller.py
There's also some other little stuff:
- is there ever a time we would not want to install dev dependencies? can we just remove that argument to the action, or invert it to
no-install-dev-depsand specify it more rarely? - let's rely on python depspecs for the linux only dependencies
- some code duplication around path specification i think we can pull
- let's just double check that the versions of all the dependencies, including dev dependencies, are the same in the new uv and the old pipenv dependency specs. that will let us change fewer things at one time
| id: project-type | ||
| shell: bash | ||
| run: | | ||
| # Only api and shared-data use UV for now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we probe for the existence of a uv.lock file instead, or even cut over the makefile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More than just the 2 projects we are looking at have uv.lock, it's not a good indicator.
sfoster1
left a comment
There was a problem hiding this 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.
ab14763 to
433422a
Compare
b1182a9 to
433422a
Compare
more squashed commits
433422a to
ff23648
Compare
Migrate Python dependency management from Pipenv to UV
Summary
Migrates
apiandshared-dataprojects frompipenvtouvfor faster dependency resolution and installation. All other projects continue usingpipenv.Key Changes for Api and shared-data
apiandshared-datafromPipfiletopyproject.tomlwithuv.lockscripts/python-uv.mkfor UV projects;scripts/python.mkremains for pipenv projectsopentrons-hardware[FLEX]to api dev deps,numpyto shared-data main depsjsonschema.RefResolvertoreferencinglibraryinstall-uv,cache-uv,setup)uvin Make commandsinstall-dev-deps: 'true'to workflows that run lint/test for UV projectsChanges for Pipenv Projects
pipenv sync --devto ensure dev dependencies are installedBenefits
apiandshared-datapyproject.tomlconfiguration for migrated projects