Fix learning_approximation FONTPATH: _fonts/ → fonts/ (unbreaks the cache build) - #262
Open
mmcky wants to merge 1 commit into
Open
Fix learning_approximation FONTPATH: _fonts/ → fonts/ (unbreaks the cache build)#262mmcky wants to merge 1 commit into
mmcky wants to merge 1 commit into
Conversation
…cache build) The 2026-08-20 cache.yml run (32331172292) failed on Build HTML with FileNotFoundError: '_fonts/SourceHanSerifSC-SemiBold.otf' while executing learning_approximation.md's import cell. The engine's i18n-font-config rule hard-codes _fonts/; this edition keeps the font at lectures/fonts/, and every other font-loading lecture here (116 references across 36 lectures) uses fonts/. This was the one known seed gotcha the #261 gap-fill missed — the PR preview build tolerated the execution error as a warning, so it surfaced only when the strict cache build ran. One-line change; the asset exists at lectures/fonts/SourceHanSerifSC-SemiBold.otf. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for astonishing-narwhal-a8fc64 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
Updates the i18n Matplotlib font path in learning_approximation to match the repository’s established lectures/fonts/ layout, preventing cache/strict execution builds from failing due to a missing _fonts/ directory.
Changes:
- Repoint
FONTPATHfrom_fonts/SourceHanSerifSC-SemiBold.otftofonts/SourceHanSerifSC-SemiBold.otfin the lecture’s import cell.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One-line fix for the failure that blocked today's publish: the 2026-08-20
cache.ymlrun (32331172292) failed onBuild HTMLwithwhile executing
learning_approximation.md's import cell.Cause — a known seed gotcha, missed in #261
The engine's
i18n-font-configlocalisation rule hard-codes_fonts/; this edition keeps the font atlectures/fonts/. Every other font-loading lecture here usesfonts/— 116 references across 36 lectures, against this single_fonts/one. Repointing the path was the one documented seed-gotcha the #261 gap-fill missed: its verification checked the font block was present but not the path.Why it slipped past CI: #261's PR preview build tolerated the
CellExecutionErroras a mystnb warning and passed, so the defect surfaced only when the strict cache build executed the lecture. (My post-merge note on #261 claiming the build "executed all 17 code cells" was therefore too strong — the run completed, but this cell's failure was warned, not raised. The cache build is the real gate.)Verification
git grep '_fonts' -- lectures/after the change: zero occurrences.lectures/fonts/SourceHanSerifSC-SemiBold.otf.mobility.mduses on lecture-intro.zh-cn, whose cache build passed today with the lecture executing.Sequencing
On merge,
cache.ymlneeds a dispatch (the failed run left no fresh artifact), and once greenpublish-2026aug20can be tagged — intro.zh-cn's tag is already pushed and publishing. Recorded on zh-cn#210's successor trail via the work plan.