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

Update RTD config to use 'uv' for faster builds #1101

Closed
wants to merge 4 commits into from

Conversation

sirosen
Copy link
Member

@sirosen sirosen commented Nov 5, 2024

This PR is an initial exploration of ways in which we can safely drop uv into our existing process without any requisite changes to the local dev experience.
RTD is chosen because

  • it is simple
  • it is well isolated from the rest of our work
  • we should be able to measure build times (impact) trivially

Using build.commands, we completely override the build process for RTD. Per their documentation (linked in a comment), this is the way to convert a doc build to use uv.

The install is done using the uv pip interface, which has a few advantages:

  • it can be treated as a plug-in replacement for pip ...
  • it supports -r options (so we don't need to change how we're locking dependencies here)
  • it ensures that we don't see any surprising new semantics from the uv lockfile (which could be hard to troubleshoot locally)

Because we're now using build.commands, there's no point in keeping jobs.pre_build as separate config. Simply inline the relevant command into our overridden process.


📚 Documentation preview 📚: https://globus-sdk-python--1101.org.readthedocs.build/en/1101/

@sirosen sirosen added the no-news-is-good-news This change does not require a news file label Nov 5, 2024
Using `build.commands`, we completely override the build process for
RTD. Per their documentation (linked in a comment), this is the
way to convert a doc build to use `uv`.

The install is done using the `uv pip` interface, which has a few
advantages:
- it can be treated as a plug-in replacement for `pip ...`
- it supports `-r` options (so we don't need to change how we're
  locking dependencies here)
- it ensures that we don't see any surprising new semantics from the
  uv lockfile (which could be hard to troubleshoot locally)

Because we're now using `build.commands`, there's no point in keeping
`jobs.pre_build` as separate config. Simply inline the relevant
command into our overridden process.
Running this before the other commands is incorrect. It requires
`scriv`, which therefore requires that doc requirements are installed.
@sirosen
Copy link
Member Author

sirosen commented Nov 5, 2024

I think this PR shows an interesting historical record but is not worth pursuing.

One RTD build time before this PR: 1m19s
One RTD build time at the HEAD of this PR: 1m4s

You can see how much I had to munge things to get it to work. I think uv is not a big win for us here.

@sirosen sirosen closed this Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-news-is-good-news This change does not require a news file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant