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

Docs makefile/RTD: Use uv if installed #120711

Merged
merged 4 commits into from
Jun 23, 2024
Merged

Docs makefile/RTD: Use uv if installed #120711

merged 4 commits into from
Jun 23, 2024

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented Jun 18, 2024

Like python/devguide#1320 and python/peps#3791.

Using uv to install dependencies is quicker than pip.

Locally, running make -C Doc clean-venv; time make -C Doc venv with no cache goes from 8.9s -> 2.4s:

  • pip: make -C Doc venv 4.81s user 1.52s system 71% cpu 8.896 total
  • uv: make -C Doc venv 0.91s user 1.00s system 81% cpu 2.345 total

And with a warm cache goes from 5.03s -> 0.08s:

  • pip: make -C Doc venv 3.47s user 0.82s system 85% cpu 5.033 total
  • uv: make -C Doc venv 0.02s user 0.07s system 109% cpu 0.080 total

On Read the Docs, it adds 2 seconds to install uv, and then cuts the docs build time from 199s -> 190s, about 7s reduction in all.

RTD+uv docs: https://docs.readthedocs.io/en/stable/build-customization.html#install-dependencies-with-uv


📚 Documentation preview 📚: https://cpython-previews--120711.org.readthedocs.build/

Copy link
Contributor

@willingc willingc left a comment

Choose a reason for hiding this comment

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

Awesome @hugovk. This pattern would be worth sharing more broadly with the science community.

🚢

@hugovk hugovk merged commit bc37ac7 into python:main Jun 23, 2024
39 checks passed
@hugovk hugovk deleted the uv branch June 23, 2024 19:23
@hugovk hugovk added needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes labels Jun 23, 2024
@miss-islington-app
Copy link

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @hugovk, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker bc37ac7b440b5e816f0b3915b830404290522603 3.12

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 23, 2024
(cherry picked from commit bc37ac7)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Jun 23, 2024

GH-120922 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jun 23, 2024
@bedevere-app
Copy link

bedevere-app bot commented Jun 23, 2024

GH-120923 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Jun 23, 2024
hugovk added a commit to hugovk/cpython that referenced this pull request Jun 23, 2024
(cherry picked from commit bc37ac7)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
hugovk added a commit that referenced this pull request Jun 23, 2024
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
mrahtz pushed a commit to mrahtz/cpython that referenced this pull request Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants