Repository navigation
Description
Five lecture repos hand-roll their Jupyter Book build steps in ci.yml. lecture-dp does not — it calls quantecon/actions/build-lectures. This issue tracks moving the rest across.
Why
The immediate motivation is #340. That issue found that a broken notebook could pass CI green in most repos, for two reasons: the execution step lacked -W, and its exit code came from a trailing cp rather than from jb build — because shell: bash -l {0} is a custom shell spec, so GitHub does not inject -eo pipefail.
The composite action is structurally immune to that second failure. Its build step captures the exit code explicitly and exits with it:
set +e
jb build "$SOURCE_DIR" --path-output "$OUTPUT_DIR" "${builder_args[@]}" $EXTRA_ARGS
BUILD_EXIT_CODE=$?
set -e
# ... set outputs ...
exit $BUILD_EXIT_CODEIt also moves PDF and notebook staging into separate steps that run before the build, so there is no trailing command to mask anything, and it defaults extra-args to -W --keep-going.
#340 is being closed with per-repo patches, which is the right immediate move — the gate was open and five one-to-two-line changes close it. But those patches each carry a comment explaining a bash gotcha that the action makes irrelevant, and they leave five copies of build logic to keep in sync. Migration is the durable answer.
Scope
| Repo | Current shape | First jb build |
|---|---|---|
lecture-python-intro |
native | Build PDF from LaTeX |
lecture-python-advanced.myst |
native | Build PDF from LaTeX |
lecture-python.myst |
native | Build Download Notebooks (sphinx-tojupyter) |
lecture-python-programming |
native | Build Download Notebooks (sphinx-tojupyter) |
lecture-jax |
native | Build Download Notebooks (sphinx-tojupyter) |
lecture-dp |
already migrated — [email protected] |
n/a |
The three zh-cn editions and lecture-datascience.myst are also native but already gate correctly; they should follow eventually for consistency, not urgency.
Known blockers
The v0.8.0 validation study already compared the composite against the native intro and programming pipelines and found two gaps. Both should be resolved before migrating those two repos, or the migration silently loses build strictness:
- build-lectures:
-n(nitpick) absent from default strictness; no extra-args passthrough via build-jupyter-cache actions#97 —build-lecturesdefaultsextra-argsto-W --keep-goingwithout-n, which the native intro and programming builds pass. Cross-reference warnings that fail a native build would pass silently on the composite. Compounding it,build-jupyter-cacheinvokesbuild-lectureswith a fixedwith:block and noextra-argspassthrough, so a consumer cannot get-ninto that HTML build at all. - build-lectures: no
_build/.doctreesclear (ipywidget mimetype rendering) actions#98 — the native intro and programming pipelines runrm -r _build/.doctreesbefore the final HTML build to fix ipywidget mimetype rendering. The composite has no equivalent.
Suggested sequence
- Resolve build-lectures:
-n(nitpick) absent from default strictness; no extra-args passthrough via build-jupyter-cache actions#97 and [project] change prime to\topfor transposes throughout #98. - Migrate one repo as a pilot and compare its built output against the native build — not just a green tick.
lecture-jaxis a reasonable candidate: smallest of the five at 33 lectures, and its firstjb buildis the tojupyter step, so it exercises the notebook-staging path. - Migrate the remaining four, and drop the per-repo
set -eo pipefailpatches from Notebook execution errors silently pass CI in three lecture repos — standardise-n -Won the sphinx-tojupyter build step #340 as each lands, since the action makes them redundant. - Consider the
zh-cneditions andlecture-datascience.mystafterwards.
Related
- Notebook execution errors silently pass CI in three lecture repos — standardise
-n -Won the sphinx-tojupyter build step #340 — the tactical gate fix this supersedes - Mono Repo vs. Centralised GitHub Actions vs. Hybrid #266 — mono repo vs centralised GitHub Actions; this is the centralised-actions direction in practice
Activity
mmcky commentedon Nov 12, 2026
build-lecturesnow runs Sphinx's nitpicky mode (-n) onhtmlbuilds by default. QuantEcon/actions v0.20.0 adds anitpickinput tobuild-lecturesandbuild-jupyter-cache,'true'by default, which passes-nto every builder. Thepdflatexandjupyterbuilders always had it, andhtmlis new.@v0has pointed to v0.20.0 since 2026-11-12. The decision is on QuantEcon/actions#97, the change is QuantEcon/actions#316, and the release notes have the details.What it means for this migration. A repository that moves its CI to
build-lecturesgets-non itshtmlbuild. Under the default-W --keep-going, a reference Sphinx cannot resolve then fails the build.lecture-python-introandlecture-python-programmingalready pass-nonhtmlin their own CI, so for them the default is what they run today. A repository that isn't ready can fix each reference the build lists, accept its target withnitpick_ignore_regexin_config.yml, or setnitpick: 'false'on eachbuild-lecturesandbuild-jupyter-cachestep while it does.What was checked before
v0moved. The lecture matrix ran on the change's branch, and-nadded no warning tolecture-python-intro,lecture-python-programming,lecture-python.mystorlecture-python-advanced.myst, on either image. It added none tolecture-dp'shtmlbuild either. The release gate, the canary andtest-lecture-theme-sphinxall passed at v0.20.0.Claude Code (on behalf of mmcky)
mmcky commentedon Nov 15, 2026
A correction to the QuantEcon/actions#98 line in the body. It says the native
lecture-python-introandlecture-python-programmingpipelines runrm -r _build/.doctreesbefore their finalhtmlbuild. Re-checked on 2026-11-15:lecture-python-introandlecture-python-advanced.mystclear the doctrees, andlecture-python-programmingdoes not. Itspublish.ymlalready runshtmllast, afterpdflatexandjupyter, on shared doctrees, and it has no executed widget, animation or interactive plotly output.So QuantEcon/actions#98 bears on
lecture-python-introonly. With QuantEcon/actions#97 shipped in v0.20.0, nothing in QuantEcon/actions now holds backlecture-python-programming's move to the full build chain. The details are on QuantEcon/actions#98.Claude Code (on behalf of mmcky), organiser session
docs(plan): of the rollout repos, #98 blocks only lecture-python-intr…
docs: a native pipeline's doctrees clear needs no counterpart (#98) (#…
mmcky commentedon Nov 15, 2026
Update, 2026-11-15: both items this issue asks QuantEcon/actions to resolve first are resolved.
-n(nitpick) absent from default strictness; no extra-args passthrough via build-jupyter-cache actions#97 shipped in v0.20.0.build-lecturespasses-nto every builder by default,htmlincluded (see the earlier comment here)._build/.doctreesclear (ipywidget mimetype rendering) actions#98 is closed as not planned. A repro showed that the nativerm -r _build/.doctreesbefore thehtmlbuild changes nothing on the current stack: myst-nb keeps every format of an output in the doctrees and picks one for each builder as it writes the page. The user manual's migration section now says to drop that step with nothing in its place.So nothing in QuantEcon/actions now holds back
lecture-python-intro,lecture-python-programmingorlecture-python-advanced.mystfrom moving to the full build chain. When each moves is the lecture repositories' call.@v0points to v0.20.1, which adds a note tobuild-jupyter-cache's failure issue.Two things the #98 repro found, for the lecture repositories:
inequality.mdrenders nothing on the website.nb_mime_priority_overridesis replaced, for every builder.Claude Code (on behalf of mmcky), organiser session