-
Notifications
You must be signed in to change notification settings - Fork 725
Replace pip with uv for building users guide #11382
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: master
Are you sure you want to change the base?
Conversation
0a068fd to
0937ded
Compare
|
I will unsubsccribe from this for now but feel free to explicitly ping me when you need input. I encourage to first discuss the objective of this in ##11381 though. |
0b4fd70 to
667aa30
Compare
Build timesComparing the times for ways of building the docs.
|
667aa30 to
7e0cdfa
Compare
|
Rebasing on master should solve the ci issue |
3f25b11 to
8d29392
Compare
|
With the current setup, we cannot just We need to That done, we can |
87e8afe to
c558f87
Compare
- Add packaging dependency - Use uv with read the docs - Use only uv sync & uv run - Remove python|install|requirements - Remove UV_PROJECT_ENVIRONMENT - Custom rtd build for html - uv sync --project doc - Commit doc/requirements.txt - Use uvx skjold - Use uv export for requirements.txt - Use uv run sphinx-build - Install uv - Remove virtual environment - Add .venv to exclude_patterns - Move CVE suggestions to comment - Remove requirements.txt related - Change log entry - Inline $(SPHINXCMD) - Replace pip-tools with uv in readme - Show use of uv pip list --outdated
c558f87 to
47bf044
Compare
Fixes #11381. Use uv to build the users guide.
This is faster. I measured the users guide build taking
2.05 secversus7.44 sec (2.96 for requirements + 4.48)beforehand, see timings.Note
We currently need to invoke makefile pip recipes for both
users-guide-requirementsandusers-guidetargets to build the users guide but with uv used in the recipes we only need the later target.Aside from being faster, by using uv to build the user guide:
git clonecanmake users-guidewithout firstmake users-guide-requirements.make users-guiderecipe output is much shorter as it doesn't include the previous pip output (that can be seen in the previousmake users-guideoutput).I've removed
requirements.inand the relatedrequirements.txtuse in the github actions, read-the-docs build and security checks. I've left therequirements.txtmakefile target but use a different recipe for it:Note
uv's lockfile (uv.lock) is created with a universal resolution and is portable across platforms.
SOURCE: https://docs.astral.sh/uv/concepts/resolution/#platform-specific-resolution
I moved the CVE comments from
requirements.intopyproject.toml.The security checks remain but its recipe I've changed to use
uvx skjoldanduv pip list:uvx skjold -c pyproject.toml configshows the configuration forskjold, kept inpyproject.toml:uv pip list --format freezeis the equivalent of what we had inrequirements.txtminus the comments, a list of version equalities: