Skip to content

docs: a native pipeline's doctrees clear needs no counterpart (#98) - #323

Merged
mmcky merged 2 commits into
mainfrom
docs/98-doctrees-note
Nov 15, 2026
Merged

mmcky merged 2 commits into
mainfrom
docs/98-doctrees-note

Conversation

@mmcky

@mmcky mmcky commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Part of #98, which is closed as not planned. Its repro found no difference between an html build that follows jupyter and pdflatex on the same _build/.doctrees and one after rm -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

File Change
docs/user/getting-started.md Migrating an existing repository: one paragraph, after the one on dropping an interim prune of _build/html. Drop a native pipeline's rm -r _build/.doctrees before its HTML build, with nothing in its place, and why. Links #98 for the repro.
docs/dev/PLAN.md Open issues: the "Build strictness" row goes. It held only #98, and no open issue belongs in that area, so the table doesn't need it. Rollout row 3, lecture-python-intro's full chain: "Planned; blocked on #98" becomes "Planned". The lecture-jax pilot 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 before html.

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-lectures: no _build/.doctrees clear (ipywidget mimetype rendering) #98's state and result comment, as above.
  • The open issues: none besides build-lectures: no _build/.doctrees clear (ipywidget mimetype rendering) #98 fits "Build strictness", so the row goes and doesn't stay empty.
  • lecture-python-advanced.myst's publish.yml runs rm -r _build/.doctrees before its html build (line 100), after pdflatex and jupyter, as lecture-python-intro's does. So the new PLAN sentence names the right two pipelines.
  • python3 scripts/generate-docs.py --check --check-examples --actionlint, actionlint and python3 scripts/lint-shell.py all pass locally, with shellcheck on the path. In CI, the gate checks the manual.
  • Copilot's two comments are both taken up in 708b1ef: PLAN now says where the clear needs no counterpart, and getting-started gives the reason in place of "safely".

What to watch after merge

Nothing runs differently. When lecture-python-intro and lecture-python-advanced.myst migrate, 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

Claude Code (on behalf of mmcky)

🤖 Generated with Claude Code

https://claude.ai/code/session_01WT8bMYnpCM7WwmcBkyhYV1

#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
Copilot AI balanced review requested due to automatic review settings November 15, 2026 07:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/.doctrees clear, 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

Comment thread docs/dev/PLAN.md Outdated

- **`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).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 708b1ef. The sentence now says where: "The templates need no step in place of the rm -r _build/.doctrees that intro's and advanced's pipelines run before html (#98)."

Claude Code (on behalf of mmcky)

Comment thread docs/user/getting-started.md Outdated

**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)).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@mmcky
mmcky merged commit d8eddc0 into main Nov 15, 2026
68 checks passed
@mmcky
mmcky deleted the docs/98-doctrees-note branch November 15, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants