Read the three wave-C1 datasets from data-lectures (Track C) - #372
Merged
Conversation
Repoints subjective_beliefs_business_cycles.md and hansen_jagannathan_1991.md at QuantEcon/data-lectures, where the three files landed byte-identical in QuantEcon/data-lectures#92. Both reads are COLLAPSED rather than patched, which is the wave-B2' lesson. subjective_beliefs_business_cycles.md built its path from a shared `data_path` stem, so editing that line alone would have left both filenames appended to a `_static/lecture_specific/<lecture>/` segment that does not exist in the flat published tree. The two bbh files share that variable and therefore repoint together, in one edit. hansen_jagannathan_1991.md already read over a URL, so this is a URL-string edit rather than a path-to-URL conversion — but the old URL was split across three adjacent string literals, and the new one is a single line. That is deliberate: a whole-URL grep returned a confident ZERO against the wrapped form, which is how a sweep misses a live reference. It is now greppable in one piece. URL form is github.com/QuantEcon/data-lectures/raw/main/lectures/<file>, per the URL-forms table in data-lectures AGENTS.md: raw.githubusercontent.com is reserved for lecture-wasm, whose cells execute in the reader's browser and need a CORS-clean host. This repo is a CPython consumer, and wave B2' used the same form in lecture-python.myst. The wave plan QuantEcon/workspace-lectures#45 prescribes the wasm form for this repo, which is wrong; noted there. Proven not to change a figure, by running each lecture's own loading code against the old location and the new URL and comparing frames: bbh_macro_quarterly (260, 14) and bbh_michigan_monthly (507, 5) both `.equals()` True with identical columns and index; the hansen bundle's three tables — annual (95, 4), monthly (334, 3), quarterly (270, 4) — all `.equals()` True, and the raw JSON is byte-identical. The local copies are RETAINED. Deleting them here would 404 the already-published notebooks until someone tags a publish; the deletion is a follow-up PR after this one publishes. That ordering matters more than usual for the hansen bundle, which is fetched over the network at cell-execution time and so has no stale-serving grace period at all. The dead local-path fallback branch in _load_bundle() is left alone deliberately — it is unreachable once DATA_URL is a URL, but removing it is a behaviour-neutral cleanup that does not belong in a repoint whose whole claim is that nothing changed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for lustrous-melomakarona-3ee73e ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR repoints three wave-C1 lecture datasets to be fetched from QuantEcon/data-lectures, aligning Track C lectures with the centralized published data location while keeping the in-repo copies intact for now.
Changes:
- Update
subjective_beliefs_business_cycles.mdto read the two BBH CSV datasets fromQuantEcon/data-lecturesvia a shared URL stem. - Update
hansen_jagannathan_1991.mdto fetch the Hansen-Jagannathan JSON bundle fromQuantEcon/data-lecturesusing a single-line URL string.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| lectures/subjective_beliefs_business_cycles.md | Switch BBH CSV reads from a local _static/lecture_specific/... path to the centralized data-lectures raw URL base. |
| lectures/hansen_jagannathan_1991.md | Replace the prior wrapped URL with a single-line data-lectures raw URL for the JSON bundle. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
mmcky
added a commit
that referenced
this pull request
Aug 17, 2026
The lectures have read these from QuantEcon/data-lectures since #372, and publish-2026aug17 has since shipped that repoint, so the local copies are no longer reachable by anything. The publish gate was verified rather than assumed, and by basename rather than by URL. Before the publish, both published notebooks carried zero `data-lectures` references and one `_static/lecture_specific` each; after it, both carry `data-lectures` and zero `_static/lecture_specific`, and the generated lecture-python-advanced.notebooks mirror matches. That ordering is what makes this deletion safe, and it mattered most for hansen_jagannathan_1991_data.json, which is fetched over the network at cell-execution time: deleting it while a published notebook still named the old URL would have broken every notebook and Colab reader instantly, with no cache rebuild to ride out. An org-wide sweep re-derived the consumer set at deletion time rather than trusting the one taken when the wave was planned. All 278 QuantEcon repos enumerated, 277 with a default branch swept over the Trees API, authenticated so the 69 private repos are covered rather than silently 404ing. The three filenames appear in exactly two repos: data-lectures, which is their new home, and this one. Positive control fired (this repo's own copies were found); negative control returned zero. Both `_static/lecture_specific/` directories held nothing but the migrated files, so git removes them entirely. The published site keeps serving these paths until the next cache rebuild and publish — every repo here restores a cached `_build/html` and Sphinx never prunes assets removed from source. That is expected under the settle policy agreed for this migration, not a failure of this PR: the deletion is complete on `main`, and the site clears on the weekly cycle. Verify a deletion against the published URL, never against `main`. Co-authored-by: Claude Opus 5 (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.
Repoints the three wave-C1 datasets at
QuantEcon/data-lectures, where they landed byte-identical in QuantEcon/data-lectures#92.Both reads are collapsed, not patched
subjective_beliefs_business_cycles.mdbuilt its path from a shareddata_pathstem. Editing that line alone would have left both filenames appended to a_static/lecture_specific/<lecture>/segment that does not exist in the flat published tree — the wave-B2′ lesson. The two bbh files share the variable and so repoint together in one edit.hansen_jagannathan_1991.mdalready read over a URL, so this is a URL-string edit rather than a path→URL conversion. The old URL was split across three adjacent string literals; the new one is a single line, deliberately. A whole-URL grep returns a confident zero against the wrapped form, which is exactly how a sweep misses a live reference — this session hit that trap more than once. It is now greppable in one piece.URL form
github.com/QuantEcon/data-lectures/raw/main/lectures/<file>, per the URL-forms table in data-lecturesAGENTS.md.raw.githubusercontent.comis reserved forlecture-wasm, whose cells execute in the reader's browser and need a CORS-clean host; this repo is a CPython consumer, and wave B2′ used this form inlecture-python.myst.The wave plan QuantEcon/workspace-lectures#45 step 2 prescribes the wasm form for this repo. That is wrong, and is noted on the plan.
Proven not to change a figure
Not "the URL returns 200" — each lecture's own loading code was run against the old location and the new URL and the results compared:
.equals()bbh_macro_quarterly.csvbbh_michigan_monthly.csvannualmonthlyquarterlyThe hansen bundle's raw JSON is byte-identical between the two URLs.
A basename sweep with a firing positive control and a zero negative control finds each of the three names exactly once, at its repointed read, and no
_static/lecture_specific/…path reference to any of them remains.The local copies are retained
Deleting them here would 404 the already-published notebooks until someone tags a publish. The deletion is a follow-up PR after this one publishes.
That ordering matters more than usual for
hansen_jagannathan_1991_data.json: it is fetched over the network at cell-execution time, so it has no stale-serving grace period at all — deleting it breaks every notebook and Colab reader the instant the blob leavesmain, rather than after a cache rebuild.Deliberately not in this PR
_load_bundle()'s local-path fallback branch is now unreachable, sinceDATA_URLis always a URL. Removing it is behaviour-neutral, but it does not belong in a repoint whose entire claim is that nothing changed. Worth a follow-up, along with thefrom pathlib import Pathimport it is the only user of.🤖 Generated with Claude Code