chore: switch docs build to PyPI sphinx-pyrunblock instead of git+https - #221
Open
petercorke wants to merge 1 commit into
Open
petercorke wants to merge 1 commit into
petercorke wants to merge 1 commit into
Conversation
sphinx-pyrunblock is Peter's own package (published to PyPI, hard fork of the original WhyNotHugo/sphinx-autorun), reachable at the same content today via git+https://github.com/petercorke/sphinx-autorun.git (an old, pre-rename URL that still redirects). Installing the PyPI wheel directly is ~2-4x faster in CI (no git clone/VCS resolution) and makes pyproject.toml's declared dependency honest -- previously "sphinx-autorun" there would, in isolation, resolve to the unrelated upstream PyPI package of that name rather than Peter's fork. No functional change: both paths resolve to the same sphinx-pyrunblock 1.1.0 release. Verified with a real sphinx-build against a clean venv.
Open
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sphinx-pyrunblockis Peter's own package (a hard fork of the originalWhyNotHugo/sphinx-autorun, published properly to PyPI under this name). Today's CI installs it viapip install git+https://github.com/petercorke/sphinx-autorun.git-- an old, pre-rename URL that still works only because GitHub redirects renamed repos. This switches to installing the plain PyPI wheel instead.pyproject.toml'sdocsextra from"sphinx-autorun"to"sphinx-pyrunblock"(the old entry was misleading in isolation -- without the workflow's follow-up git install, it would resolve to the unrelated upstream PyPI package of the same name, not Peter's fork).pip install git+...line fromsphinx.yml, sincepip install .[dev,docs]already installs the right package.conf.py'sextensionslist fromsphinx_autoruntosphinx_pyrunblockto match.No functional change
Both the old git URL and the new PyPI package resolve to the identical
sphinx-pyrunblock==1.1.0release today -- confirmed with a fresh, uncachedpip install git+...and comparing installed package metadata. This is purely a speed/hygiene change.Why
The PyPI install is consistently 2-4x faster in a clean venv (no git clone/VCS metadata resolution):
git+https://...sphinx-autorun.gitsphinx-pyrunblock(PyPI)That's ~9-15s saved on every docs-build CI run (every push to
masterplus every PR).Test plan
pip install ".[dev,docs]", confirmedsphinx-pyrunblock==1.1.0resolves without the git install linesphinx-build -b htmlagainst the rebased branch (includes perf: defer Matplotlib import until something actually plots #198, Fix sphinx automation #162) -- succeeds, 15 warnings, consistent with pre-change baseline