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

[WIP] feat: use uv as a pip alternative #1088

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MoisesGSalas
Copy link
Contributor

@MoisesGSalas MoisesGSalas commented Jul 1, 2024

uv is a new package installer/resolver written in rust by the same people that wrote ruff.

This is a small test to assess the viability of using uv instead of pip. It presents it self as a drop in replacement for pip, and for the most part it is, I only had to apply a single change due to limitations in editable VCS packages.

Tests

Using --target=python-requirements:

uv

  1. An initial build without cache (--no-cache): 5m08s, 97s on pip install base.txt
  2. Second build without cache: 4m58s, 94s on pip install base.txt
  3. Break cache with a manual instructions (RUN touch /tmp/a) before installing base.txt: 2.36s, 1s on base.txt

pip

  1. An initial build without cache (--no-cache): 7m29s, 234s on pip install base.txt
  2. Second build without cache: , 7m15s, 223s on pip install base.txt
  3. Break cache with a manual instructions (RUN touch /tmp/a) before installing base.txt: 1m06s, 57s one base.txt.

@MoisesGSalas MoisesGSalas changed the title feat: use uv as a pip alternative [WIP] feat: use uv as a pip alternative Jul 1, 2024
@MoisesGSalas MoisesGSalas marked this pull request as draft July 1, 2024 14:05
@regisb
Copy link
Contributor

regisb commented Sep 23, 2024

Hey Moises, these figures are getting everyone excited :) Do you think you'll be able to take this PR out of draft state? Or do you need some review?

@MoisesGSalas
Copy link
Contributor Author

Hi @regisb, sorry for leaving this abandoned. I can work on this, but first I wanted to know people's opinion about the tool.

IMO the tool is pretty awesome and slots in almost perfectly, the same applies to the other tool developed by the same team ruff. But considering it still has not reached v1.0.0 I wonder if some people may be worried about that.

If the overall feeling is that it's worth a shot, I can clean up the PR and have it ready for review.

@regisb
Copy link
Contributor

regisb commented Sep 24, 2024

Yes, ruff is awesome, to the point that I'm considering migrating the entire code base from pylint/black to ruff. But let's talk about this another day. For now I'd be curious to see this PR brought to completion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants