Skip to content

Commit a77c7f0

Browse files
petercorketaughz
andauthored
chore: switch docs build to PyPI sphinx-pyrunblock instead of git+https (#221)
## Summary `sphinx-pyrunblock` is Peter's own package (a hard fork of the original `WhyNotHugo/sphinx-autorun`, published properly to PyPI under this name). Today's CI installs it via `pip 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. - Bumps `pyproject.toml`'s `docs` extra 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). - Drops the now-redundant `pip install git+...` line from `sphinx.yml`, since `pip install .[dev,docs]` already installs the right package. - Updates `conf.py`'s `extensions` list from `sphinx_autorun` to `sphinx_pyrunblock` to match. ## No functional change Both the old git URL and the new PyPI package resolve to the identical `sphinx-pyrunblock==1.1.0` release today -- confirmed with a fresh, uncached `pip 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): | Method | Run 1 | Run 2 | |---|---|---| | `git+https://...sphinx-autorun.git` | 20.5s | 10.6s | | `sphinx-pyrunblock` (PyPI) | 5.4s | 7.1s | That's ~9-15s saved on every docs-build CI run (every push to `master` plus every PR). ## Test plan - [x] Fresh isolated venv, `pip install ".[dev,docs]"`, confirmed `sphinx-pyrunblock==1.1.0` resolves without the git install line - [x] Real `sphinx-build -b html` against the rebased branch (includes #198, #162) -- succeeds, 15 warnings, consistent with pre-change baseline Co-authored-by: Tim Perkins <code@taughz.dev>
1 parent 3332e9c commit a77c7f0

3 files changed

Lines changed: 2 additions & 3 deletions

File tree

‎.github/workflows/sphinx.yml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
run: |
1717
python -m pip install --upgrade pip
1818
pip install .[dev,docs]
19-
pip install git+https://github.com/petercorke/sphinx-autorun.git
2019
pip install sympy
2120
sudo apt-get install graphviz
2221
- name: Build docs

‎docs/source/conf.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"sphinx.ext.inheritance_diagram",
4848
"matplotlib.sphinxext.plot_directive",
4949
"sphinx_autodoc_typehints",
50-
"sphinx_autorun",
50+
"sphinx_pyrunblock",
5151
"sphinx.ext.intersphinx",
5252
"sphinx_favicon",
5353
]

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ dev = [
6161
docs = [
6262
"sphinx",
6363
"sphinx-rtd-theme",
64-
"sphinx-autorun",
64+
"sphinx-pyrunblock",
6565
"sphinxcontrib-jsmath",
6666
"sphinx-favicon",
6767
"sphinx-autodoc-typehints",

0 commit comments

Comments
 (0)