juftin / hatch-pip-compile

hatch plugin to use pip-compile (or uv) to manage project dependencies and lockfiles
http://juftin.com/hatch-pip-compile/
MIT License
74 stars 3 forks source link

✨ uv #73

Closed juftin closed 6 months ago

juftin commented 6 months ago

This PR includes new (non-default) support for uv as a dependency resolver and installer. Now we have a few options:

Closes #72

uv is a drop in replacement for pip-compile with a much faster resolver written in rust. If you'd like to use uv instead of pip-compile / pip you can do so with these options:

codecov[bot] commented 6 months ago

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (4badcf9) 95.56% compared to head (ce35c4c) 95.81%. Report is 1 commits behind head on main.

Files Patch % Lines
hatch_pip_compile/resolver.py 90.47% 3 Missing and 1 partial :warning:
tests/conftest.py 90.90% 1 Missing and 1 partial :warning:
hatch_pip_compile/lock.py 94.44% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #73 +/- ## ========================================== + Coverage 95.56% 95.81% +0.24% ========================================== Files 16 18 +2 Lines 857 956 +99 Branches 139 160 +21 ========================================== + Hits 819 916 +97 - Misses 24 25 +1 - Partials 14 15 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

juftin commented 6 months ago

With a warm cache on this project switching from pip-compile to uv goes from 26.3s to 5.8s for hatch-pip-compile --all. There are probably more savings to be had if I can use uv as an installer here and also use its --python option

juftin commented 6 months ago

:tada: This PR is included in version 1.11.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: