Repository navigation
test(containers): exercise the real theme and FreeFont path in the smoke fixture (#108) - #171
Conversation
…oke fixture (#108) The v0.11.0 fixture (#125) executes and can fail, but it still sidestepped two things the images exist to provide: - `html_theme: sphinx_book_theme` never imported quantecon-book-theme, which both images ship and every lecture site builds with. - `latex_elements.fontpkg: ""` sent the PDF build down the TeX-defaults path. Sphinx's default xelatex fontpkg asks fontspec for the FreeFont faces with Extension=.otf; Ubuntu ships .ttf, and both Dockerfiles symlink .otf names for exactly that. With the override, a regression in those symlinks stayed green. The fixture now uses quantecon_book_theme and Sphinx's default fontpkg, with comments saying why, so nobody re-adds the override to get a build green. containers/quantecon/tests/test-container.sh is deleted: in no workflow, full image hardcoded, `set -e` only, superseded by smoke-test.sh in a real container job. The image README's "Running Tests" section pointed at it; it now describes smoke-test.sh and how to dispatch Test Container on a branch, and the "Older…" entry is gone. run-local-tests.sh passes `-W --keep-going` to both builds, as smoke-test.sh does, so a warning that fails CI also fails locally, and its preflight checks quantecon_book_theme imports. Merging touches containers/**, so build-containers.yml rebuilds and pushes both :latest images. The fixture is not copied into either image, so a cache-hit rebuild changes nothing but the digest. Refs #108, #110 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DwQrz9VbFrbAD7uh2LTgzh
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The change is a self-consistent, well-documented test/docs update with no code-logic issues, correct theme naming, aligned flags across scripts, and no dangling references to the deleted script.
Review effort: Balanced
Findings: None
What changed in this PR
This PR completes the remaining residuals of issue #108. The v0.11.0 smoke fixture (#125) could execute and fail, but it still sidestepped two behaviors the container images exist to provide: the quantecon-book-theme install and the FreeFont .otf-symlink path used by Sphinx's default xelatex fontpkg. It also removes dead test code and realigns the local test script and docs with the CI smoke test.
Changes:
- Fixture
_config.ymlnow useshtml_theme: quantecon_book_themeand drops thelatex_elements.fontpkg: ""override, so a broken theme install or a symlink regression can actually fail the test; explanatory comments prevent re-adding the override. - Deletes the unused
containers/quantecon/tests/test-container.sh, repoints the image README atsmoke-test.sh/ the Test Container workflow, and alignsrun-local-tests.sh(-W --keep-goingon both builds, plus aquantecon_book_themepreflight import). - Adds an
[Unreleased] → ChangedCHANGELOG entry.
| File | Description |
|---|---|
containers/quantecon/tests/minimal-jupyter-book/_config.yml |
Switches theme to quantecon_book_theme and removes the fontpkg override so theme/font regressions can fail the build. |
containers/quantecon/tests/run-local-tests.sh |
Adds quantecon_book_theme to the preflight import check and -W --keep-going to both HTML and PDF builds to match CI. |
containers/quantecon/tests/test-container.sh |
Deleted dead script (ran in no workflow, hardcoded the full image, set -e only). |
containers/quantecon/README.md |
Rewrites "Running Tests"/"Test Files" to describe smoke-test.sh and the Test Container workflow, and lists quantecon-book-theme as a local prerequisite. |
CHANGELOG.md |
Documents the fixture, script deletion, and local-script alignment under [Unreleased] → Changed. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…with the shipped code (#106, #109, #99) (#175) * docs: sweep to the 2026.06 baseline and measured image sizes (#106) Both images ship anaconda=2026.06 (containers/quantecon/environment.yml:11; the lean image carries the matching pin set), but seven sites still said 2025.12. They now say 2026.06. Image sizes were a mix of round "~8GB / ~3GB" figures, a "~60% smaller" claim, and an older measured pair. Every size site now carries the pair the fixed size job (#172) produced on 2026-09-23, run 35856865426 (Docker 28.0.4, overlay2, ubuntu-latest), and says which metric it is: - quantecon (full): 3.33 GB compressed (what a cold pull downloads), 8.60 GB on disk - quantecon-build (lean): 2.93 GB compressed, 7.33 GB on disk The lean image is about 12% smaller to pull and 15% smaller on disk, so the "faster CI pulls" / "fast image pulls" wording becomes "a modestly smaller pull", and the lean README's unmeasured pull-time and package-count rows go. "Minimal TexLive" was false. The two Dockerfiles' apt lists differ in exactly two packages: the lean image drops texlive-luatex and adds graphviz; texlive-latex-extra and texlive-fonts-extra are in both. The docs now say so, and name what actually distinguishes the lean image: no anaconda metapackage, an explicit package list pinned to the 2026.06 baseline. The full image's "Complete TexLive installation" is corrected to match. CHANGELOG history and PLAN.md:68's narration of the old date-pin keep their 2025.12 mentions on purpose. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DwQrz9VbFrbAD7uh2LTgzh * docs: reconcile READMEs, guides and templates with the shipped code (#109, #99) The docs half of #109, with #99 folded in. The code items (the build-jupyter-cache latex-requirements-file passthrough, the cname warning and the template pin-drift check) ride with #107's PR. Examples that failed for adopters: - permissions: the preview-netlify and preview-cloudflare "Complete Workflow Example" blocks declared none, and the root README and QUICK-REFERENCE container quick starts declared contents/packages only. Both preview actions list, create and update PR comments through github.rest.issues.* with github.token, so each block now grants contents: read and pull-requests: write. - actions/checkout: the remaining 29 @v4 and 2 @v5 references across 13 docs move to @v7, matching the templates (#168) and this repo's workflows. with: fetch-depth lines are kept. Documented behaviour that does not exist: - QUICK-REFERENCE: the "Preview with Custom URL" recipe passed an alias input preview-netlify does not accept (the alias is fixed at pr-N); it becomes a short "Preview URL" note. The setup-environment key row now carries the environment-name and python-version segments and the cached path. The sample log block's "LaTeX cache hit" line (no LaTeX caching exists) and its other invented lines are replaced by strings the actions actually print. The "Pages 404?" snippet recommended contents: write, which as a permissions block would also drop pages and id-token; it now lists pages: write and id-token: write, with contents: write only for create-release-assets (#99). - MIGRATION-GUIDE: the collab.yml snippet passed build-html and cache-workflow, which build-lectures never accepted; it now restores the cache with restore-jupyter-cache and builds with builder/source-dir. The copied commit message no longer claims LaTeX caching, and the build-jupyter-cache key carries its update-hash segment here and in ARCHITECTURE (#99). - build-lectures README: "use setup-latex" pointed at a removed action; the inputs table gains the missing failure-artifact-name row. - README and ARCHITECTURE said restore-jupyter-cache "never saves"; it is read-only by default with an optional PR-scoped save-cache. - setup-environment README: the cache key and path now match action.yml. Templates and the custom domain: - The Actions Pages deploy ignores a CNAME file, so the cname input has no effect. templates/publish.yml, templates/README.md, MIGRATION-GUIDE and QUICK-REFERENCE now point at Settings -> Pages instead of offering cname. - templates/publish.yml's release-asset block now says it needs a tag trigger (the file runs on pushes to main and manual dispatch) and contents: write (the job grants contents: read). - New templates/latex-requirements.txt: the TeX packages the two images share, in the whole-line-comment format setup-environment parses. The cache.yml standard-runner comment and templates/README point at it, since a standard-runner pdflatex build fails without the file. - cache.yml and templates/README describe the _build artifact as failure-only, which it has been since v0.8.0. Smaller items: the lean image README's last @main example moves to @v0; the full image README's theme version reads 0.21.0, the environment.yml pin. README's Contributing section now points at CONTRIBUTING.md, which tests by branch and moves v0; CONTRIBUTING gains the staged-release procedure decided on #110 (decision 4), its known limits and the rollback. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DwQrz9VbFrbAD7uh2LTgzh * docs: bring PLAN.md, CONTRIBUTING and the CHANGELOG up to date (#106, #109) PLAN.md: - The consumers table said five lecture repos were pinned to v0.8.0 or v0.9.0. Dependabot bumped all six exact call sites to v0.11.1 between 2026-08-12 and 2026-08-24 (#110's 2026-09-23 revalidation; the pins are confirmed by code search). The rows, the "Corrected" note and the lecture-jax rollout row now say so; the section keeps its structure. - The August triage table already had rows for the issues #106 lists, except #135. Each row is refreshed to its state on 2026-09-23 (all are open; the open PRs #144, #170, #171 and #172 and the in-progress #105 and #107 work are named), and #135 gets a row. No rows are duplicated. - Item 10's "propagate corrected container-size figures" half is marked done by this sweep; the trim itself stays open as its own PR (decision 1 on #110). - The "Last updated" line records this pass. CONTRIBUTING.md: the doc-update matrix gains a PLAN.md row, so a backlog item or consumer ref that moves updates the plan rather than waiting for the next audit. CHANGELOG.md: one [Unreleased] Documentation entry for the sweep. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DwQrz9VbFrbAD7uh2LTgzh * docs: address review of the #106/#109 docs sweep - templates/latex-requirements.txt: describe the file format so it holds under both the current parse (grep -v '^#') and #173's, where '#' starts a comment anywhere. Drop the claim that an inline '#' reaches apt-get. - templates/publish.yml: the release-asset note lists a third change, the tag pattern under the github-pages environment's deployment branches and tags, which otherwise reject a tag-triggered run. - CONTRIBUTING.md: the staged-release limits say that steps 2-3 run neither publish-gh-pages (the canary's publish.yml fires only on a publish* tag) nor setup-environment at the candidate ref, replacing the narrower release-asset bullet. - PLAN.md: #172 is marked open with the run the sizes come from; #144 needs a rebase before review. - CHANGELOG.md: the 2026.06 baseline is the full image's metapackage and the lean image's pin set, not something both images ship. - containers/README.md: the lean image carries the pinned science stack, so "Jupyter Book build tools only" loses "only". Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DwQrz9VbFrbAD7uh2LTgzh * docs: address the second review round of the #106/#109 sweep - Four more job examples call preview-netlify without a permissions block (MIGRATION-GUIDE's preview job, QUICK-REFERENCE's standard CI workflow, both ARCHITECTURE workflows). Each now grants contents: read and pull-requests: write (plus packages: read where it pulls the image), so the CHANGELOG line saying preview examples grant pull-requests: write is true of every one. - README's publish-gh-pages feature line no longer lists custom-domain support first; custom domains are set in Settings -> Pages. - MIGRATION-GUIDE's sample commit message says "conda environment caching": there is no separate pip cache. - PLAN.md's #105 and #107 rows cite the now-open #174 (draft) and #173. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DwQrz9VbFrbAD7uh2LTgzh * docs(templates): list make in the example latex-requirements.txt Copilot review on #175. The header says the file lists the TeX packages and build tools both images install, but omitted make, which both Dockerfiles install under "Build tools". It is needed, not incidental: jupyter-book 1.0.4.post1's pdflatex builder runs `make all-pdf` in the LaTeX output directory (jupyter_book/cli/main.py). Hosted Ubuntu runners ship make already, so on them this is a no-op install; on a minimal runner it is the difference between a PDF and a failed build. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DwQrz9VbFrbAD7uh2LTgzh * docs(plan): #170 has merged Refresh the #105 disposition row now that the README warning is on main. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DwQrz9VbFrbAD7uh2LTgzh * docs(containers): theme version is now 0.22.0 #162 moved both images to quantecon-book-theme 0.22.0 (full pins ==0.22.0, lean >=0.22.0) after this sweep set the full image's README to 0.21.0. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DwQrz9VbFrbAD7uh2LTgzh * docs: add the .fr consumer row and refresh the current-release lines (#106, #109) lecture-python-programming.fr exact-pins preview-netlify and publish-gh-pages (with create-release-assets) at v0.11.1, moved there from v0.8.0 by Dependabot on 2026-09-23, so it joins the consumers table and the exact-pin count becomes eight call sites across six repos. README.md and copilot-instructions.md said the current release was v0.8.0; it is v0.11.1. Co-Authored-By: Claude Fable 5.1 <[email protected]> * docs(plan): carry the .fr row into the consumer counts d1b8fb1 added lecture-python-programming.fr (two exact @v0.11.1 call sites, including publish-gh-pages). Two counts elsewhere in PLAN.md still predated it: the Last-updated line said all six exact pins, and the lecture-progress note had publish-gh-pages at 7/7 with five exact. They now read eight pins across six repos, and 8/8 with six exact. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DwQrz9VbFrbAD7uh2LTgzh * docs: lean image is 7.32 GB on disk after the #162 rebuild The first size report on main (run 35930060129, after #162 rebuilt both images with quantecon-book-theme 0.22.0) reads full 3.33 GB compressed / 8.60 GB on disk, unchanged, and lean 2.93 GB / 7.32 GB: the lean on-disk figure dropped by about 5 MB, enough to move the second decimal. The eleven sites that quoted 7.33 now say 7.32, and PLAN.md's #106 row cites that main run instead of the earlier branch dispatch. The ~15% (on disk) and ~12% (compressed) gaps still hold. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DwQrz9VbFrbAD7uh2LTgzh --------- Co-authored-by: Claude <[email protected]> Co-authored-by: Matt McKay <[email protected]>
Closes the remaining #108 residuals. The v0.11.0 fixture (#125) executes and can fail, but it still sidestepped two things the images exist to provide.
Changes
minimal-jupyter-book/_config.ymlnow useshtml_theme: quantecon_book_themeinstead ofsphinx_book_theme. Both images ship quantecon-book-theme and every lecture site builds with it; before this, a broken install of it stayed green.latex_elements.fontpkg: ""override is removed. It sent the PDF build down the TeX-defaults path. Sphinx's default xelatexfontpkgasks fontspec for the FreeFont faces withExtension=.otf. Ubuntu ships them as.ttf, which is why both Dockerfiles symlink.otfnames (containers/quantecon/Dockerfile:54-61,containers/quantecon-build/Dockerfile:54-59). With the override in place, a regression in those symlinks could not fail the test. The config now carries comments saying why, so nobody re-adds the override to get a build green.containers/quantecon/tests/test-container.shis deleted. It ran in no workflow, hardcoded the full image, usedset -eonly, and has been superseded bysmoke-test.shrunning in a realcontainer:job. The image README's "Running Tests" section now describessmoke-test.shand how to dispatch Test Container on a branch; the "Older…" entry is gone.run-local-tests.shpasses-W --keep-goingto both builds, assmoke-test.sh:55/:84do, so a warning that fails CI also fails locally. Its preflight now also checks thatquantecon_book_themeimports, and the README lists it as a prerequisite.[Unreleased]→ Changed.Validation
test-container.ymlhas nopull_requesttrigger, so I dispatched it on this branch. It tests this fixture against the published:latestimages: run 35856212850, all four jobs green.quantecon_book_themeunder-W --keep-going, executing every cell.pdflatexbuilder with the default FreeFontfontpkg(Output written on test-book.pdf (7 pages)).--self-teststill goes red on the staged raising cell, and for the right reason (✅ self-test: the staged raising cell failed the build).The dispatch was on e10ca7b, the current head.
Merge note
This touches
containers/**, sobuild-containers.ymlwill rebuild and push both:latestimages on merge (build-containers.yml:3-8), and Test Container and the lecture matrix follow viaworkflow_run. The fixture is not copied into either image; onlyenvironment.ymlis. A cache-hit rebuild therefore changes nothing but the digest, unlessubuntu:24.04or the conda solve has moved since the last build, which the Monday 02:00 UTC cron would pick up anyway.Checklist in #108: fixture
fontpkg, fixture theme, dispatch on the branch, deletetest-container.sh, repoint the README, alignrun-local-tests.sh. Tracking: #110.🤖 Generated with Claude Code
https://claude.ai/code/session_01DwQrz9VbFrbAD7uh2LTgzh
Generated by Claude Code