FIX: add missing prob_dist data assets (unbreaks prob_dist on main) - #269
Merged
Merged
Conversation
The resync of `prob_dist.md` in #256 brought across upstream's local data-loading code, but not the two companion data files it reads: lectures/_static/lecture_specific/prob_dist/us_adult_heights.csv lectures/_static/lecture_specific/prob_dist/japan_population_by_age.xlsx The lecture therefore fails to execute on main with FileNotFoundError: '_static/lecture_specific/prob_dist/us_adult_heights.csv' Both files are copied byte-identical from the English source. A sweep of every `_static/` asset path referenced across the edition's lectures found these two as the only missing assets. This is an instance of the shared/companion asset gap tracked in QuantEcon/action-translation#117 — the resync syncs a lecture's body but not the non-markdown files that body newly depends on. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot wasn't able to review any files in this pull request.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
✅ Deploy Preview for playful-platypus-17d3bb ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This was referenced Jul 20, 2026
mmcky
added a commit
that referenced
this pull request
Jul 20, 2026
…#270) Ports QuantEcon/lecture-python.zh-cn#185 to this edition, closing the QuantEcon/meta#340 gap here. ci.yml - `-n -W --keep-going` on the sphinx-tojupyter build. It previously ran with no flags, so a notebook whose cells raised still exited zero. - `set -eo pipefail` in that same block. The flag alone is insufficient: `shell: bash -l {0}` is a custom shell spec, so GitHub injects no `-eo pipefail`, and the trailing mkdir/cp become the step's exit code. `--keep-going` makes it worse, guaranteeing the .ipynb files exist for `cp` to succeed on. Found by Copilot review on zh-cn#185. - Upload Execution Reports (Download Notebooks), so a failure in that step leaves a traceback artifact. - Clear stale Sphinx environment before the builds. - HTML artifact renamed execution-reports -> execution-reports-html. Required, not cosmetic: upload-artifact runs with `overwrite: false`, so a second upload under the same name would collide when both steps fail in one run. cache.yml - `-W --keep-going` -> `-n -W --keep-going`, so the weekly cold build is strict on missing references as well as warnings, matching lecture-python.zh-cn. ci-cn.yml is deliberately unchanged: it has no sphinx-tojupyter step and its HTML build is a single command, so its exit code is already the build's. That is why it — and not ci.yml — caught the prob_dist break in #269. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
prob_distis currently broken on the live site, and this unbreaks it.What's wrong
The resync of
prob_dist.mdin #256 brought across upstream's local data-loading code, but not the two companion data files that code reads. The whole directory is absent from this edition:lectures/_static/lecture_specific/prob_dist/us_adult_heights.csvlectures/_static/lecture_specific/prob_dist/japan_population_by_age.xlsxSo the lecture fails to execute on
mainwith:The CSV is read first, so it fails there — the
.xlsxwould fail immediately after. Both are added here.Why it went unnoticed
mainhas had no cold build since 2026-07-16, which predates the resync merges. The break surfaced on #268's CI, an unrelatedtranslation-syncPR that simply happened to be the next thing to trigger a build.The edition's
ci.ymlalso lacks-n -Won its sphinx-tojupyter step, so notebook execution errors do not fail that step — the same gap tracked fleet-wide in QuantEcon/meta#340. See the note at the bottom.The fix
Both files copied byte-identical from the English source
lecture-python-intro(sha256 verified against upstream). No other change.I swept every
_static/asset path referenced across all of this edition's lectures and compared thelecture_specific/directory listing against upstream — these two are the only missing assets, andprob_distis the only missing directory. So this is complete, not a first instance.Root cause
This is the shared/companion asset gap tracked in QuantEcon/action-translation#117. That issue was filed for
quant-econ.bib, but this widens it usefully: the real class is any non-markdown file a resynced body newly depends on, including per-lecture data files, not just shared assets. Worth reflecting in the issue's scope.Related
Unblocks #268, whose CI is currently red for this reason and not for anything in its own diff.
Two follow-ups worth considering separately, neither in this PR:
The
-n -Walignment on this repo'sci.yml— the equivalent was just done forlecture-python.zh-cnin QuantEcon/lecture-python.zh-cn#185, and note the finding recorded there: adding the flag alone is insufficient, becauseshell: bash -l {0}gets no-eand the trailingmkdir/cpmask the build's exit code.set -eo pipefailis needed alongside it.And a cold Build Cache dispatch on
mainafter this merges, to confirm nothing else is broken — that is what surfaced the equivalent problems in the other edition.🤖 Generated with Claude Code