-
-
Notifications
You must be signed in to change notification settings - Fork 635
Update readthedocs builds to use tox with tox-uv #2218
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
Conversation
webknjaz
left a comment
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.
No changelog needed. This is a set of minor infrastructure tweaks.
@sirosen I would argue that this is exactly what the contrib change note type is intended for. These are changes that may challenge the contributors' understanding of how RTD is set up, the role of uv in there et al. But if you feel differently, we can keep it out.
- I used
uvfor the installation on the RTD worker to see how much faster it might be. The reported runtime on this PR was 22s, vs 44s on the last success onmain. I'm generally happy usingtox+tox-uvbecause it's faster and easy to removeuvif it ever causes a problem.
Ack, although, there's some tweaks needed to make it integrated better.
- This failed the chronographer check, so I marked it with the default
bot:chronographer:skiplabel (newly defined). I think we can simply update our docs to list this and we'll be good. Or we can create a chronographer config -- but I'd rather stick with the defaults unless we have a strong need.
Due to historical reasons, I've kept this default in the bot (it's also more generic). However, a lot of projects have it as skip changelog or skip news. And it's best to integrate it with the existing label. Otherwise, we'll end up having to apply a tightly coupled pair of labels. This is going to be inconsistent whenever somebody else applies a label. Alternatively, we could migrate to the bot's label, getting rid of skip-changelog. Though, I know some people weren't happy with the naming in various projects.
Additionally, we still need the config to point to instructions on RTD from the checks page (https://github.com/jazzband/pip-tools/pull/2218/checks?check_run_id=47304029072).
| python: >- | ||
| 3.11 |
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.
This should be kept for reproducibility. Eventually, it should become the source of truth for all the docs building envs. Similar to what Hynek has here: https://github.com/hynek/stamina/blob/4832a081aacce48879fd770f9ace02efdf3aa10c/noxfile.py#L43-L47.
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'm not sure if I should make a change for this because of how the Python version flows through uv.
When uv installs tox+tox-uv, we have to specify a Python version to have control -- that's the 3.13 below.
tox-uv is then responsible for provisioning the environment under tox, so that's a uv invocation as well. I think that by default the current interpreter version is used, but I admit that I'm not 100% certain how that gets decided.
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.
Well, this change would need to be integrated in different places. But it's not in the scope of this PR so I'm marking the thread as resolved. This is something to tackle in the future.
| \t$ python3 -m http.server --directory \ | ||
| \N\{QUOTATION MARK\}\{docs_dir\}\N\{QUOTATION MARK\} 0\n\n" +\ | ||
| "=" * 120)' | ||
| {posargs:{envdir}/docs_out} |
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 see you didn't migrate the -t is_unversioned bit. This is fine for now as it's out of the scope, but would be good to do in a follow-up. It's particularly useful when setuptools-scm is used as the version string being dynamic prevents Sphinx from reusing cache and we can optimize it by setting it to something static in local dev envs.
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.
Perhaps, we could decouple reconfiguring docs/requirements.* from changing the RTD integration? docs/requirements.txt is already integrated into both places so fixing it being incomplete would be an atomic change by itself. And it'd unblock any other PRs that may be happening in parallel, while we polish the integration bits.
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.
Yeah, let me split it off. That's the part that I felt didn't need a changelog entry.
But I agree that some of the other bits may warrant a contrib note.
|
@sirosen does this need a rebase? |
|
I've been meaning to get back to some of the other work in pip-tools, but I forgot entirely about this particular PR. I think a rebase and some basic cleanup is something I can do here after my workday. I should re-title the PR as well, seeing as I split #2219 from this. |
|
I've come back to this to start trying to clean it up. I retitled, updated the initial doc to indicate that the PR was split up, and removed the skip-changelog labels. I think we should drop the htmlzip and pdf format docs, which is what's currently done here. They're much less used, and I want the toolchain all aligned so that what we can test locally matches RTD. But that probably needs a changelog note -- not sure why I didn't think so before. I'm about to start the rebase... 🤞 that goes smoothly |
c84a42c to
7835f0c
Compare
- Update to `uv` + `tox` + `tox-uv` as the toolchain installed on the RTD worker. This treats `uv` as a way to improve the speed of the CI process without relying on any tool-specific features. - Update tox config slightly to suit RTD usage - Drop the 'pdf' and 'htmlzip' outputs - Update RTD builds to use Python 3.13
- Don't `git fetch --unshallow` twice - Do the `git` steps in `commands_pre` Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <[email protected]>
f24e46f to
76d4a85
Compare
webknjaz
left a comment
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.
No changelog needed.This is a set of minor infrastructure tweaks.Pin the version of 'pip' in doc builds to 25.1uvviatox-uvfor speedNotes
uvfor the installation on the RTD worker to see how much faster it might be. The reported runtime on this PR was 22s, vs 44s on the last success onmain. I'm generally happy usingtox+tox-uvbecause it's faster and easy to removeuvif it ever causes a problem.bot:chronographer:skiplabel (newly defined). I think we can simply update our docs to list this and we'll be good. Or we can create a chronographer config -- but I'd rather stick with the defaults unless we have a strong need.Update: Split off doc dependency pinning
A chunk of this moved into #2219
The remainder, in this PR, is focused only on the RTD build config.
Contributor checklist
changelog.d/(seechangelog.d/README.mdfor instructions) or the PR text says "no changelog needed".Maintainer checklist
skip-changeloglabel.