From c42be2cb3d99cad1b8369991928e13362d5bc223 Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Tue, 21 Jul 2026 09:43:02 +1000 Subject: [PATCH 1/2] Build strict: enable -W in ci.yml and publish.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Both builds carried `# TODO: Re-enable -W flag once all lectures are translated and warnings are resolved`. The precondition is already met: this edition has 26 of 26 lectures with a `_toc.yml` identical to source, so there are no untranslated lectures left to produce dangling cross-references. The case for strict is stronger than build hygiene. A translated edition carries the same code as its English source, so a warning here that does not appear upstream is evidence of a translation defect, not noise — which makes -W a translation-quality signal. It is also the last line of defence against a class of silent engine corruption. QuantEcon/action-translation#118 (a resync wrapped an entire 1,465-line document in a code fence and mis-derived its title from a Python tuple-unpacking line) and #119 (a `{raw} jupyter` directive argument stripped to `{raw}`) both reported success at run time, looked plausible in review, and surfaced weeks later only because a downstream repo built with -n -W. Without the flag this edition would merge that class of damage green. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/ci.yml | 3 +-- .github/workflows/publish.yml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15ecab9..5d6aa30 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,8 +42,7 @@ jobs: - name: Build HTML shell: bash -l {0} run: | - jb build lectures --path-output ./ -n --keep-going - # TODO: Re-enable -W flag once all lectures are translated and warnings are resolved + jb build lectures --path-output ./ -n -W --keep-going - name: Upload Execution Reports uses: actions/upload-artifact@v7 if: failure() diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2666901..b9d5026 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -56,8 +56,7 @@ jobs: - name: Build HTML shell: bash -l {0} run: | - jb build lectures --path-output ./ -n --keep-going - # TODO: Re-enable -W flag once all lectures are translated and warnings are resolved + jb build lectures --path-output ./ -n -W --keep-going # Serves at the default Pages URL (no cname): # https://quantecon.github.io/lecture-python-programming.fr/ - name: Deploy to GitHub Pages From 1db95bfbf3b8378e8ffa821737a700406eea5464 Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Tue, 21 Jul 2026 10:10:24 +1000 Subject: [PATCH 2/2] Add the missing _admonition/gpu.md shared include MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three lectures — autodiff, jax_intro and numpy_vs_numba_vs_jax — carry `{include} _admonition/gpu.md`, but the file was never seeded into this edition. Every other edition has it; this one did not: lecture-python-programming lectures/_admonition/gpu.md lecture-python-programming.fa lectures/_admonition/gpu.md lecture-python-programming.zh-cn lectures/_admonition/gpu.md lecture-python-programming.fr (absent) So those three lectures have been building with a broken include and publishing without the GPU admonition. The build reported success throughout, because this repo built without -W. Found by enabling -W in the same PR, which is the argument for the flag in one example: three CRITICAL "file not found" directive errors that had been live and invisible. This is the shared-asset class described in QuantEcon/action-translation#117 — sync moves lecture files, so an asset that lives outside that set is never carried across. Translated per the French glossary (Lecture -> Cours) and typeset with U+00A0 before the colon and inside the guillemets, matching the convention applyTypography() enforces for prose directives — admonition is on its PROSE_DIRECTIVES list, so the file is in scope for it. Co-Authored-By: Claude Opus 4.8 (1M context) --- lectures/_admonition/gpu.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lectures/_admonition/gpu.md diff --git a/lectures/_admonition/gpu.md b/lectures/_admonition/gpu.md new file mode 100644 index 0000000..fe1c5aa --- /dev/null +++ b/lectures/_admonition/gpu.md @@ -0,0 +1,12 @@ +```{admonition} GPU +:class: warning + +Ce cours a été construit sur une machine disposant d'un GPU — bien qu'il fonctionne également sans. + +[Google Colab](https://colab.research.google.com/) propose une offre gratuite avec des GPU +auxquels vous pouvez accéder comme suit : + +1. Cliquez sur l'icône « play » en haut à droite +2. Sélectionnez Colab +3. Réglez l'environnement d'exécution pour inclure un GPU +```