Skip to content

v0.19.0

Choose a tag to compare

@mmcky mmcky released this 11 Nov 21:41
· 33 commits to main since this release
eb965b9

Added

  • restore-gh-pages and templates/restore.yml: puts a GitHub Pages site back as one of the repository's releases holds it, without a build, from the archive, checksum and manifest that publish-gh-pages attaches on a tag. The action downloads the release's archive and checksum with gh, checks the archive's SHA-256 before anything is extracted, refuses an archive that holds anything but files and directories, and gives the extracted site as build-dir, with the commit it was built from as commit. It reads only the repository's own releases, needs only contents: read, and finds the archive by its tag unless asset-name is given. The template, run by hand on the default branch with the release's tag, hands the site to publish-gh-pages to deploy, in publish.yml's pages concurrency group. The next publish replaces the restored site. (#27)

Changed

  • Container images: sphinx-exercise moves from 1.2.1 to 1.2.2 in both images, which the full image pins and the lean image takes as its floor. The patch release writes a captioned figure inside an exercise or solution as \begin{figure}[H], as Sphinx does inside its own admonitions, so a PDF build no longer stops there with Not in outer par mode. HTML output is unchanged. Both images were smoke-tested before :latest moved, and the lecture matrix then passed on all eight legs. (#312)

Fixed

  • ⚠️ BREAKING build-lectures: a jupyter build under -W --keep-going, the default extra-args, now fails on a warning, as the other builders do. It used to pass every warning. sphinx-tojupyter's JupyterBuilder.finish() calls exit() with 0 inside Sphinx's build, before Sphinx turns the warnings that --keep-going counted into exit status 1. So jb build exited 0 whatever the build warned about, a cell that raised included. The release gate's staged-failure self-test showed it: only the error-output check caught the raised cell. The build step now keeps a copy of jb build's stderr, Sphinx's warning stream. For the jupyter builder, when jb build exits 0 with both -W and --keep-going in extra-args, it fails the step on any warning in it, and lists each in a log group. The failure report then prints the failed notebooks' tracebacks, as for any failed build. -W alone already failed at the first warning, and without -W nothing changes. build-jupyter-cache gets the same through build-lectures@v0; it builds jupyter first, so that build is the one that reads and executes the pages. The error-output check now tells a cell that raised, after which no code cell ran, from one whose output raised while it was displayed, after which one did. It says which in its annotation and in a Cause column in the step summary, where it used to say "The kernel reported this cell as successful" of both. The new harness job build-jupyter-warning-guard shows a clean jupyter build passing, a cell that raises failing the build step, the same warnings passing without -W, and the check's wording. The lecture matrix found one warning, in three lecture repositories: a tojupyter_static_file_path entry naming a directory the book does not have, which warns tojupyter_static_path entry … does not exist. Their pull requests drop that entry, and no other QuantEcon caller's jupyter build logs a warning. To migrate: fix each warning the build step lists, such as by dropping that entry, or set extra-args without -W for the jupyter build while you do. (#300)