-
Notifications
You must be signed in to change notification settings - Fork 17
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
CI: Use uv installer instead of pip (take 2) #578
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #578 +/- ##
=======================================
Coverage 87.07% 87.07%
=======================================
Files 27 27
Lines 4649 4649
=======================================
Hits 4048 4048
Misses 601 601
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
.github/workflows/ci.yml
Outdated
# Ideally, these would be fixed, but vapory is largely unmaintained, | ||
# so here we simply keep the pip behaviour with the --compile flag. | ||
# See https://github.com/astral-sh/uv/issues/1928#issuecomment-1968857514 | ||
run: uv pip install --compile --system "aiidalab_widgets_base[dev,smiles,optimade] @ ." aiida-core==${{ matrix.aiida-core-version }} |
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.
Note: uv
currently does not allow the simpler syntax .[dev,smiles,optimade]
. But it will in the future.
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.
I guess beside this, all other stuff will be the same? It is not another package manage but simply an installer I assume? Which means the installed packages can be inspected by the normal pip command, correct?
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.
Yes, uv
is only an installer for now, for the most part you simply substitute pip ...
with uv pip ...
. There are difference in behaviour, as explained in uv
s README, and not everything is implemented yet, but it should be stable enough for the CI to use (and we pin the version).
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.
Note: uv currently does not allow the simpler syntax .[dev,smiles,optimade]. But it will in the future.
This simpler syntax is actually allowed for editable installs, so I switched to editable install.
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.
Looks all good, thanks! Nice stuff @danielhollas
uv is the new cool kid in the town of Python packaging, from the creators of ruff. It currently serves as a (much) faster drop-in replacement for pip.
For AWB, uv without cache runs in ~10s, compared to 1m10s for pip with cache. 🤯 So overall speedup around 30% for our workflows.