Skip to content

Align ci.yml build safety with the English source repo (-n -W on the notebook build, execution-report artifacts) #184

Description

@mmcky

Split out of #183 so that PR stays scoped to content fixes. This is the per-repo instance of QuantEcon/meta#340.

The gap

Comparing this repo's ci.yml against the English source repo lecture-python.myst:

Step lecture-python.myst this repo
Clear stale Sphinx environment (rm -rf _build/.doctrees) present absent (commented out with a BUG note)
Build Download Notebooks (sphinx-tojupyter) -n -W --keep-going no flags
Build PDF from LaTeX -W --keep-going commented out entirely
Build HTML -n -W --keep-going same — already aligned
Upload Execution Reports (Download Notebooks) present absent
Upload Execution Reports (LaTeX) present absent

The HTML build is already aligned. The problem is the sphinx-tojupyter execution step, which runs with no flags — so a notebook whose cells raise still exits zero and the job goes green. That is how the two execution breaks in #182 (likelihood_bayes, kalman_2) reached main with passing CI.

The missing execution-report uploads compound it: when that step does fail here, there is no traceback artifact to download. #182's diagnosis had to be reconstructed from the weekly Build Cache workflow's artifact instead of from CI directly.

Proposed change

Add -n -W --keep-going to the sphinx-tojupyter build step, add the two execution-reports artifact uploads with if: failure(), and add the "Clear stale Sphinx environment" step. Match the source repo's step-for-step shape so the two stay easy to diff.

Sequencing — this is expected to go red

Land after #183. Turning on -n -W will surface every remaining latent failure in the edition at once, and there are very likely more than the four in #182: the Build Cache run that produced #182 is content-addressed, so it re-executed only the lectures the resync wave changed and reused old-environment cache for roughly 15 unchanged lectures, which have never been executed under anaconda 2026.07.

So the useful sequence is: merge #183, then open the CI PR and let it fail, then work the resulting list. A clean full re-execution with the cache cleared would give the same information ahead of time if we would rather know first. Note #179 (the anaconda 2026.07 bump) is still labelled blocked behind this.

One open question, not a defect

The PDF/LaTeX build is disabled here. Please confirm whether that is deliberate before anyone "aligns" it — CJK under LaTeX is hard, and more so since #22 dropped text.usetex. It looks like a considered choice rather than an oversight, and this issue does not propose changing it.

Related

The same sphinx-tojupyter gap exists in lecture-intro.zh-cn and in the lecture-python-intro source repo; lecture-python-programming is fully aligned. QuantEcon/meta#340 tracks the fleet-level fix. This matters more than usual now that these editions are moving into an automatic sync relationship — an engine defect that corrupts a lecture (see the ak_aiyagari case in #183) should be caught by the edition's own CI, not by a weekly cache job.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions