Skip to content
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

Use UV for python env management #113

Merged
merged 6 commits into from
Jan 28, 2025
Merged

Use UV for python env management #113

merged 6 commits into from
Jan 28, 2025

Conversation

nateinaction
Copy link
Member

@nateinaction nateinaction commented Jan 27, 2025

Following #99, we found that a few Windows users had python setups that didn't allow the make commands to complete successfully. There are a few ways to fix this. The first method that I tried was to create a dev container but I didn't enjoy programming in the dev container. It took about 3 minutes to boot up anytime I started my IDE... yuck!

Next I tried UV and I think it makes a lot of our build simpler. What do you all think?

@Mikefly123
Copy link
Member

This sounds pretty cool! I don't have much to contribute to this, but I did want to link this pretty good explainer I watched about UV a while ago:
https://youtu.be/gSKTfG1GXYQ?si=PGzudeVNXqxafxRw

@Mikefly123
Copy link
Member

I just gave this code a try on my Windows Machine and it is lightning quick! I thought for a while I was network throttled downloading packages, but I guess pip is perhaps past its prime.

image

For comparison the "old" make process would take around 15s to download the libraries (~53s overall) vs around 3 s (~40s overall) with the new uv method. The big limiting factor is that copy time to get all the code loaded onto the RP2040. Maybe in the future it would be possible to check the version of the libraries currently on the RP2040 and only remove & update the ones that are out of date?

@nateinaction nateinaction marked this pull request as ready for review January 28, 2025 23:49
@nateinaction nateinaction changed the title [DRAFT] Use UV for python env management Use UV for python env management Jan 28, 2025
@Mikefly123 Mikefly123 self-requested a review January 28, 2025 23:58
Copy link
Member

@Mikefly123 Mikefly123 left a comment

Choose a reason for hiding this comment

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

LGTM!

@nateinaction nateinaction merged commit a042b82 into main Jan 28, 2025
4 checks passed
@nateinaction nateinaction deleted the uv-build-tooling branch January 28, 2025 23:59
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