-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Speed up nox docs sessions #13118
Speed up nox docs sessions #13118
Conversation
On my 8 core system, a clean cold build takes 5-6 seconds instead of 10-11 seconds. Nothing major, but it's a welcomed QoL improvement. FYI, this flag doesn't work on Windows.
To confirm - the flag doesn’t error on Windows, it just gives no benefit? |
I'll take a look on the weekend. I really do need to set up a Windows dev environment. I keep pushing it off 🙂 |
Sorry, I assumed you knew, I was just asking for clarification of your statement. I just ran a docs build command with |
From the Sphinx docs "Windows is not supported". Which I assume from the experiment above means "This option is ignored on Windows". It would be nice if they were clearer about that 🙁 |
Can confirm it seems to be ignored on Windows (I finally got a barebones Python setup on my Windows install). |
At some point, session.install("pip") in the docs and docs-live nox sessions was changed to install pip in editable mode, presumably to enable reruns w/o dependency installation (-R flag) to pick up changes for our pip sphinx extension. This doesn't do anything though as pip is reinstalled normally as it's declared in docs/requirements.txt. I think it's a fair compromise that if you want to pick up changes in pip's source that show up in the documentation, you should not be using the -R nox flag.
Hmm, pip is installed twice in every docs session as it's directly installed via I've also removed the redundant and effectively useless editable installs of pip. |
Merging as it's a small contributor QoL win, trivially low risk, and I haven't heard any objections in the past week. |
On my 8 core system, a clean cold build takes 5-6 seconds with
--jobs auto
instead of 10-11 seconds. Nothing major, but it's a welcomed QoL improvement. FYI, this flag doesn't work on Windows.In addition, I've removed the direct editable installation of pip in the nox sessions as it's going to be reinstalled again (normally) via
docs/requirements.txt
. Looking at the history, at some point,session.install("pip")
in thedocs
anddocs-live
sessions was changed to install pip in editable mode, presumably to enable reruns w/o dependency installation (-R
nox flag) to pick up changes for our pip sphinx extension. This doesn't do anything though nowadays for the aforementioned reason.