Skip to content

Commit 4c092ed

Browse files
mmckyclaude
andauthored
Build strict: enable -W in ci.yml and publish.yml (#14)
* Build strict: enable -W in ci.yml and publish.yml 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) <noreply@anthropic.com> * Add the missing _admonition/gpu.md shared include 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) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 40df73d commit 4c092ed

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,7 @@ jobs:
4242
- name: Build HTML
4343
shell: bash -l {0}
4444
run: |
45-
jb build lectures --path-output ./ -n --keep-going
46-
# TODO: Re-enable -W flag once all lectures are translated and warnings are resolved
45+
jb build lectures --path-output ./ -n -W --keep-going
4746
- name: Upload Execution Reports
4847
uses: actions/upload-artifact@v7
4948
if: failure()

.github/workflows/publish.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ jobs:
5656
- name: Build HTML
5757
shell: bash -l {0}
5858
run: |
59-
jb build lectures --path-output ./ -n --keep-going
60-
# TODO: Re-enable -W flag once all lectures are translated and warnings are resolved
59+
jb build lectures --path-output ./ -n -W --keep-going
6160
# Serves at the default Pages URL (no cname):
6261
# https://quantecon.github.io/lecture-python-programming.fr/
6362
- name: Deploy to GitHub Pages

lectures/_admonition/gpu.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
```{admonition} GPU
2+
:class: warning
3+
4+
Ce cours a été construit sur une machine disposant d'un GPU — bien qu'il fonctionne également sans.
5+
6+
[Google Colab](https://colab.research.google.com/) propose une offre gratuite avec des GPU
7+
auxquels vous pouvez accéder comme suit :
8+
9+
1. Cliquez sur l'icône « play » en haut à droite
10+
2. Sélectionnez Colab
11+
3. Réglez l'environnement d'exécution pour inclure un GPU
12+
```

0 commit comments

Comments
 (0)