Repository navigation
docs: a native pipeline's doctrees clear needs no counterpart (#98) - #323
Conversation
#98's repro found no difference: an html build that follows jupyter and pdflatex on the same _build/.doctrees renders the same pages as one after rm -r _build/.doctrees. The migration section of getting-started says to drop the clear with nothing in its place, and links #98 for the evidence. PLAN drops #98 with it: the Build strictness row in Open issues, which held only #98; "blocked on #98" from lecture-python-intro's rollout row; the #98 clause from the lecture-jax pilot sentence; and, for the three CPU repositories, the lines on which of them clear the doctrees, which matter no longer, for one saying nothing here blocks any of them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WT8bMYnpCM7WwmcBkyhYV1
There was a problem hiding this comment.
Note
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.
🟡 Changes recommended
The change still has two unresolved documentation nits—ambiguous phrasing in PLAN.md and potentially overstated safety language in getting-started.md—that need clarification to align the guidance with the referenced repro context (#98).
2 open issues
What changed in this PR
Documentation-only update recording the outcome of #98 (no observed need to clear _build/.doctrees in the native pipeline sequence) and removing now-obsolete #98 references from the development plan.
Changes:
- Add migration guidance to drop the native pipeline’s pre-HTML
_build/.doctreesclear, citing #98. - Remove the #98-related open-issues row and update rollout/plan text to reflect it is no longer a blocker.
| File | Description |
|---|---|
| docs/user/getting-started.md | Adds migration guidance recommending removal of the pre-HTML _build/.doctrees clear in native pipelines, linking to #98 as evidence. |
| docs/dev/PLAN.md | Removes #98 from the open-issues plan table and updates rollout/status narrative to reflect it no longer blocks planned migrations. |
Review effort: Balanced
|
|
||
| - **`lecture-python.myst`** builds on RunsOn GPU runners (`runs-on: "runs-on=${{ github.run_id }}/family=g4dn.2xlarge/image=quantecon_ubuntu2404/disk=large"`), whose machine image carries the QuantEcon marker file, so `setup-environment` runs in container mode there. Its ML libraries (JAX, PyTorch, numpyro) come from the repository's own environment files, through `environment-update`. Its `collab.yml` runs in Google Colab's container and stays a standalone workflow. | ||
| - **`lecture-python-intro`, `lecture-python-programming` and `lecture-python-advanced.myst`** build on CPU in a container, as the templates do, with LaTeX for the PDF and Netlify previews. Beyond #98 for intro, they need nothing the templates lack. `lecture-python-programming` clears no doctrees and already builds `html` last, so #98 does not apply to it. `lecture-python-advanced.myst` clears them, but executes no widget or interactive output for the clear to matter to. | ||
| - **`lecture-python-intro`, `lecture-python-programming` and `lecture-python-advanced.myst`** build on CPU in a container, as the templates do, with LaTeX for the PDF and Netlify previews. They need nothing the templates lack, and nothing here blocks any of them: the `rm -r _build/.doctrees` that intro's and advanced's pipelines run before `html` needs no counterpart (#98). |
|
|
||
| **Drop any interim prune of the restored `_build/html`** as you replace each workflow, such as a `jb clean . --html` step after the cache restore. The templates restore only the execution cache, and `restore-jupyter-cache` removes the HTML from a restored build cache itself, so a page or file deleted from the source is not published again. | ||
|
|
||
| **Drop any `rm -r _build/.doctrees` before the HTML build** too, with nothing in its place: the builders share `_build/.doctrees` safely, and an `html` build that follows `jupyter` and `pdflatex` renders the same pages as one after a clear ([#98](https://github.com/QuantEcon/actions/issues/98)). |
There was a problem hiding this comment.
Taken up in 708b1ef, in part. "Safely" is gone. In its place is the reason the clear can go: myst-nb keeps every format of an output in _build/.doctrees and chooses one for each builder as it writes a page. That also shows how far the claim reaches. It rests on how myst-nb renders, so it holds for any content, not only the pages #98 built, and it would need checking again only if an extension started storing builder-specific output in the doctree. The repro is cited as the evidence: "#98 has the repro."
Claude Code (on behalf of mmcky)
Copilot's review of #323. getting-started said the builders share _build/.doctrees "safely", which reads as a promise for any stack. It now says why the clear can go: myst-nb keeps every format of an output in the doctrees and chooses one for each builder as it writes a page. #98 holds the repro. PLAN said the clear "needs no counterpart" without saying where; it now says the templates need no step in its place. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01WT8bMYnpCM7WwmcBkyhYV1

Part of #98, which is closed as not planned. Its repro found no difference between an
htmlbuild that followsjupyterandpdflatexon the same_build/.doctreesand one afterrm -r _build/.doctrees(the result). The reason is that myst-nb keeps every format of an output in the doctrees, and chooses one for each builder as it writes a page. This PR puts that in the migration guide, where a repository moving from a native pipeline that clears the doctrees will look for it, and takes #98 out of the plan. Docs only.Changes
docs/user/getting-started.md_build/html. Drop a native pipeline'srm -r _build/.doctreesbefore its HTML build, with nothing in its place, and why. Links #98 for the repro.docs/dev/PLAN.mdlecture-python-intro's full chain: "Planned; blocked on #98" becomes "Planned". Thelecture-jaxpilot sentence loses its #98 clause, and says what "the five" are: the native pipelines that QuantEcon/meta#348 migrates. For the three CPU repositories, "Beyond #98 for intro" and the two lines on which of them clear the doctrees go. That no longer matters. In their place: nothing here blocks any of them, and the templates need no step in place of the clear that intro's and advanced's pipelines run beforehtml.No CHANGELOG entry, because CONTRIBUTING asks for one only for a change to what an action does, and no action changes. Say if you want a Documentation entry anyway, like the one #246's getting-started note had in 0.17.0.
What I checked, and how
_build/.doctreesclear (ipywidget mimetype rendering) #98's state and result comment, as above._build/.doctreesclear (ipywidget mimetype rendering) #98 fits "Build strictness", so the row goes and doesn't stay empty.lecture-python-advanced.myst'spublish.ymlrunsrm -r _build/.doctreesbefore itshtmlbuild (line 100), afterpdflatexandjupyter, aslecture-python-intro's does. So the new PLAN sentence names the right two pipelines.python3 scripts/generate-docs.py --check --check-examples --actionlint,actionlintandpython3 scripts/lint-shell.pyall pass locally, with shellcheck on the path. In CI, the gate checks the manual.What to watch after merge
Nothing runs differently. When
lecture-python-introandlecture-python-advanced.mystmigrate, their pull requests should drop the clear, as the new paragraph says, and their previews should match the published sites, as step 3 of the guide already asks.Not in this PR
build-lectures' comment and the chapters go with that issue.clear-doctreesinput: build-lectures: no_build/.doctreesclear (ipywidget mimetype rendering) #98 is closed without one.Claude Code (on behalf of mmcky)
🤖 Generated with Claude Code
https://claude.ai/code/session_01WT8bMYnpCM7WwmcBkyhYV1