Repository navigation
docs(sphinx): caption the root toctrees, point the edit button at main (#719, #969) - #972
Conversation
|
The red mark here is an infrastructure stall, not this diff. Root-caused rather
On the same run ( Filed as #974 with the fix — apt retries and timeouts, plus a step-level cap. I am not |
#719, #969) - ``docs/source/index.rst``: ``:caption:`` on all three toctrees, so furo renders the global sidebar as API Reference / Guides & Changelog / Contributing rather than one flat list. Measured: only a root-document toctree's caption reaches the sidebar, so the other 31 toctrees in the tree gain nothing from one. - ``docs/source/pcapkit/index.rst``: ``:caption: Subpackages``, the one nested case where the label is not a restatement of the page title. - ``docs/source/conf.py``: ``toc_object_entries`` stays ``False``, now with the measurement recorded against it. ``True`` takes the page-local drawer from 5 entries to 12,960 on ``const/reg``, 6 to 1,233 on ``protocols/internet/mh`` and 729 to 22,261 tree-wide, leaves 120 of the 188 pages untouched, and costs 109s -> 1,052s of build time; no depth cap rescues it (#719). - ``docs/source/conf.py``: ``source_branch`` ``master`` -> ``main``, so furo's "Edit this page" button stops targeting a branch that does not exist (#969). Full HTML build succeeds with 61 warnings, the same set as unmodified main. The ``tests/project`` toctree-parsing modules pass -- 91 tests, no failures.
259f439 to
cda32e1
Compare
|
NEEDS CHANGES at Reproduced independently, not just corroborated: Two claims in the comment were wrong, and a comment that enshrines a wrong claim is
Both corrected. Neither changes the decision to keep Still |
|
GOOD TO GO at Verified on my side: the diff between the two heads is one file, one hunk, Round 2 confirmed the corrected text against the numbers it had measured in round 1 Three figures stay unverified by either of us, stated rather than implied: the Not merge-ready yet: the red marks here are #974's |
make pylint,make mypy,make isort) — those targets coverpcapkit/,util/andexamples/generators/; no file in them changedmake testpasses, and a test case covers the change — ran thetests/projecttoctree-parsing modules only (91 tests, no failures); the full suite is not runnable heredocs/source/changelog/and regeneratedCHANGELOG.md, if the change is user-visible — N/A — centralised in docs(changelog): shared 1.5.0 changelog — long-lived, merges last (#610, #616, #617, #618, #620) #657What is the purpose of your pull request?
fix— corrects a defectfeat— adds a featureperf— changes performance, not behaviourrefactor— changes neither behaviour nor performancetest— tests onlydocs— documentation onlyci— workflows or build toolingchore— anything elseDescription of your pull request and other information
Closes #969, and takes items 1 and 2 of the #719 navigation ruling.
toc_object_entries: measured, and the recommendation is to leave itFalse. Two fullHTML builds,
TrueagainstFalse: the page-local drawer goes 5 → 12,960 entries onpcapkit/const/reg, 6 → 1,233 onprotocols/internet/mh(estimated at 308 — autodocmembers nest five levels deep), 43 → 513 on
const/mh, and 729 → 22,261 tree-wide,for 109s → 1,052s of build time. 120 of the 188 pages stay under 20 entries either way, so
Truedumps thousands onto precisely the pages already hardest to read. Capping the depthdoes not rescue it: the drawer's depth is a per-document
:tocdepth:field rather than aconf.pyoption, and the only depth still navigable onmhis 2 — which excludes everyobject entry, i.e. is what
Falsealready gives. The measurement is now recorded againstthe setting, so it is not re-opened blind.
Captions. Also measured first: only a root-document toctree's caption reaches furo's
global sidebar; a nested one renders on its own page only, and on a
:hidden:toctree itrenders nowhere. So
index.rst's three are captioned — API Reference / Guides & Changelog /Contributing — plus
pcapkit/index.rst(Subpackages, the one nested case that is not arestatement of its page title). The other 31 stay bare:
const/index.rstandvendor/index.rstalready carry a section heading above each toctree, and thesingle-toctree package pages would only restate their own title.
#969 is the one-liner —
source_branchmaster→main, so the "Edit this page" buttonstops targeting a branch that does not exist. Verified in the built HTML.
The full build succeeds with 61 warnings, the same set as unmodified
main.docs/source/contributing/is untouched — its caption belongs to #971's follow-up.