Skip to content

build(docs): Build the Sphinx documentation with Python (#962) - #2615

Merged
zackees merged 2 commits into
masterfrom
infra/962-gen-005-sphinx-make-python
Oct 27, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/962-gen-005-sphinx-make-python

Conversation

@zackees

@zackees zackees commented Oct 27, 2026

Copy link
Copy Markdown
Member

Ports docs/sphinx/make.bat (36 lines) to docs/sphinx/make.py (#962, GEN-005).

This is a focused CI/configuration fix: local RED evidence below, then the RED and GREEN commits pushed together (coordination.md §4 exception). No remote RED run is required.

What moves

make.bat is the Windows counterpart of docs/sphinx/Makefile and the batch wrapper around sphinx-build. It has no caller in the tree — git grep -F "sphinx/make" -- . ':!docs/ci-evidence' finds only the ci.toml exception itself — so nothing else changes when it moves, and there is no interpreter constraint to satisfy at a call site.

The batch file's one line is kept token for token:

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
  • SPHINXBUILD still selects the tool (sphinx-build by default);
  • %1 is the target and still defaults to help when none is given;
  • SOURCEDIR/BUILDDIR are ./_build, and the command runs with the working directory set to the docs directory, so both resolve as before;
  • SPHINXOPTS is appended as tokens;
  • a tool that is not installed prints the same install hint and exits 1.

The Unix Makefile beside it is not a GEN-005 exception (GEN-005 matches the shell/batch/PowerShell scripts) and stays.

Red → green

  • RED 76bdd2d62: new ci/test_sphinx_make.py drives the module by path — the sphinx-build argv token for token (including the SPHINXOPTS tail), the help default when no target is given, and (through a stub sphinx-build on PATH recording its argv and cwd) that main() runs -M <target> . _build from the docs directory; plus the wiring (the batch file gone, its GEN-005 exception gone). On the unfixed tree: 6 tests → 2 errors (FileNotFoundError: .../make.py) + 4 failures.
  • GREEN 6ec1a6379: the port, make.bat deleted, the ci.toml GEN-005 exception removed.

Local checks (green)

  • uv run ci/test_sphinx_make.py — 6 OK
  • uv run ci/test_ci_toml.py — 19 OK
  • uv run ci/test_uv_run.py — 5 OK (TOOL-003)
  • uvx ruff check clean on both new files
  • ci-lint precheck (pin a1917ce): 563 approved exceptions, one fewer than master, and no docs/sphinx/make.bat entry under GEN-005.

Refs #962.

…h file (#962)

The Sphinx docs build is moving off docs/sphinx/make.bat. This RED drives the
new module directly: it builds the same sphinx-build argv (-M <target> .
_build plus SPHINXOPTS), defaults the target to help when none is given, and
pins the wiring (the batch file gone, its GEN-005 exception gone). On the
unfixed tree the module does not exist, so the two module cases error and the
rest fail.
Ported docs/sphinx/make.bat to docs/sphinx/make.py (#962, GEN-005). The
batch file's one line is kept token for token -- `sphinx-build -M <target> .
_build` plus `SPHINXOPTS`, with SPHINXBUILD still selecting the tool and the
target defaulting to `help` -- and it runs with the working directory set to
the docs directory, so `SOURCEDIR=.` and `BUILDDIR=_build` resolve as before.
A tool that is not installed prints the same install hint and exits 1.

The batch file has no caller in the tree, so nothing else changes: make.bat is
deleted and its ci.toml GEN-005 exception removed. The Unix Makefile beside it
is not a GEN-005 exception and stays.
@zackees

zackees commented Oct 27, 2026

Copy link
Copy Markdown
Member Author

Handed off to the coordinator.

  • Branch infra/962-gen-005-sphinx-make-python, RED 76bdd2d62 / GREEN 6ec1a6379, based on origin/master 3f91af760.
  • Auto-merge enabled on the current head.
  • Local focused checks green: ci/test_sphinx_make.py 6 OK, ci.test_ci_toml 19 OK, ci/test_uv_run 5 OK (TOOL-003), uvx ruff check clean; ci-lint precheck (pin a1917ce) reports 563 approved exceptions — one fewer than master — and no docs/sphinx/make.bat under GEN-005.
  • ./lint is red on this host for environment reasons only, not for this change: the lint lane's ci/test_local_gate_probe.py shells a scratch soldr cargo test and the host's soldr is 0.9.35 while the repo pins 0.9.42, and ci/test_gate_dylint.py fails because this agent shell exports CARGO_TARGET_DIR=''. Neither touches docs/sphinx/ or ci/test_sphinx_make.py. HEAD is therefore not stamped with the local gate; PR CI is the gate.

@zackees
zackees added this pull request to the merge queue Oct 27, 2026
Merged via the queue into master with commit a10d634 Oct 27, 2026
32 checks passed
@zackees
zackees deleted the infra/962-gen-005-sphinx-make-python branch October 27, 2026 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant