long_run_growth: read mpd2020.xlsx from data-lectures, not from intro's repo - #52
Merged
Conversation
…'s repo Repoints the Maddison Project Database at the canonical data repository and deletes this repo's own unused copy. Two things change for the better. The lecture stops reading a file out of lecture-python-intro's repository layout, which was a dependency on that repo never moving its datasets/ directory -- exactly the coupling that made intro's own repoint unsafe to do alone. And the URL form moves off raw.githubusercontent.com, which returns pointer text rather than data if a file ever enters LFS, onto the /raw/ form that survives either storage choice (QuantEcon/data-lectures AGENTS.md, "URL forms"). The bytes are unchanged: the deleted copy, intro's copy and the served file are all git blob d5076da, and the URL returns sha256 f67af0f, matching the manifest in QuantEcon/data-lectures. So no figure moves. The copy deleted here was a mirror-orphan -- committed in this repo but never read, because the lecture fetched intro's copy by URL instead. It is doubly dead now that the lecture reads data-lectures, so it goes in the same PR rather than waiting for the orphan sweep. Paired with the intro half; neither the deletion there nor the URL here may land alone. See QuantEcon/data-lectures PLAN.md, "Repoint rules". Part of the Track A migration. See QuantEcon/data-lectures#8. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
❌ Deploy Preview for beautiful-dodol-cb9543 failed.
|
There was a problem hiding this comment.
Pull request overview
Updates the long_run_growth lecture to fetch mpd2020.xlsx from the canonical QuantEcon/data-lectures repository instead of lecture-python-intro, removing an implicit cross-repo layout dependency and aligning the lecture with the shared data source.
Changes:
- Repoints the Maddison dataset URL to
https://github.com/QuantEcon/data-lectures/raw/main/lectures/mpd2020.xlsx. - Keeps the lecture’s data-loading logic unchanged, reusing
data_urlfor both “Full data” and “Regional data” reads.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
📖 Netlify Preview Ready! Preview URL: https://pr-52--beautiful-dodol-cb9543.netlify.app (4e734f7) ✨ Browse the preview at the URL above. |
mmcky
added a commit
to QuantEcon/data-lectures
that referenced
this pull request
Aug 6, 2026
) * mpd2020.xlsx: record the repoint Flips the tracker once both consuming lectures read this repo, and records them in the manifest's consumers list so a future correction knows what to rebuild. Held as a draft deliberately. The strict audit has no green state for a dataset whose consumers have only partly moved, so this must not merge before QuantEcon/lecture-python-intro#823 and QuantEcon/lecture-wasm#52. Verified both ways: against the lecture repos' current main this fails with "marked repointed but consumers still read via ['own-repo', 'sibling']"; against their repoint branches it passes clean, and the orphan count falls 35 -> 34 as wasm's mirror copy goes. mpd2020 is the first dataset to exercise the two-repo rule end to end. intro's copy could not be deleted while wasm fetched that exact blob by URL, so the pair moved together and this flip trails both. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Make the consumers comment durable instead of point-in-time Copilot caught mpd2020's Consumers comment still reading "Empty until the Track A repoint lands ... lectures read this file from intro's own copy" while sitting directly above a populated consumers list naming both repos reading it from here. It flatly contradicted the data beneath it. The mistake is structural rather than a typo: the comment described the field's CURRENT VALUE, so it was guaranteed to go stale the moment its own PR landed. The identical comment was in all eight manifests from #38, so it would have gone stale again on repoint sets 2 and 3 and been flagged both times. All eight now describe what the field MEANS, which stays true in either state: every lecture that reads this file from this repo, empty not implying the file is unused since it may still be read from a lecture repo's own copy -- which is exactly what a repoint moves -- and populated in the repoint PR alongside the migration.yml flip. Comments only. Verified: every manifest still parses, consumers values are untouched (mpd2020 two, the other seven zero), CATALOG.md regenerates byte-identical, and the strict audit stays green. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
mmcky
added a commit
that referenced
this pull request
Aug 6, 2026
This site executes code cells in the reader's browser (Pyodide via pyodide_http), so every pandas URL read is subject to CORS on each redirect hop. The github.com/<org>/<repo>/raw/ form 302s with an empty access-control-allow-origin header and fails in the browser before the redirect is followed; raw.githubusercontent.com and (for LFS files) media.githubusercontent.com serve access-control-allow-origin: * and work. Flips the five affected reads: - long_run_growth.md, inflation_history.md: the data-lectures reads repointed in #52/#53 move to raw.githubusercontent.com - inequality.md, mle.md: the pre-existing SCF reads move to media.githubusercontent.com (the LFS host heavy_tails already uses) {download} links and prose links are plain navigations, so they keep the github.com form. All five new URLs verified fetching from this site's origin in headless Chromium with the exact expected byte counts. The regression and the repoint rule are tracked in QuantEcon/data-lectures#46. Co-authored-by: Claude Fable 5 <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
long_run_growthat the canonical data repository, and deletes this repo's own unused copy ofmpd2020.xlsx.Paired with QuantEcon/lecture-python-intro#823 — the two must land as a set, for the reason below.
The change
https://raw.githubusercontent.com/QuantEcon/lecture-python-intro/main/lectures/datasets/mpd2020.xlsxhttps://github.com/QuantEcon/data-lectures/raw/main/lectures/mpd2020.xlsxPlus
git rm lectures/datasets/mpd2020.xlsx. One line — the lecture assignsdata_urlonce and reuses it for both theFull dataandRegional datareads.Why this one is load-bearing for the pair
This lecture was reading a file out of another lecture repository's working layout.
lecture-python-intro#823deletes that file, so without this PR the wasm build 404s the moment it merges — silently, from this repo's point of view, since nothing here would have changed.That coupling is the whole reason the two PRs are a set: intro's copy could not be removed while a sibling repo fetched it by URL. Written up as "Repoint rules" in QuantEcon/data-lectures
PLAN.md.Two side benefits
The sibling dependency goes away. This lecture no longer depends on
lecture-python-introkeeping itslectures/datasets/directory where it is. That was an invisible constraint on the other repo's layout, and one that nothing would have caught until a build broke.The URL form gets safer.
raw.githubusercontent.comreturns pointer text rather than data for any file tracked in Git LFS — a failure that surfaces as a confusing parse error, not a 404. The/raw/form works regardless of how the file is stored. Both forms are documented in QuantEcon/data-lecturesAGENTS.md.No figure moves
The deleted copy, intro's copy and the file now served are all the same git blob (
d5076da), and the URL returnssha256 f67af0fd599fcebd9b92a0ad65472998f4548ea006e6b7c0018d4ade76e3bceb, matching the manifest atlectures/mpd2020.xlsx.yml.About the deleted file
It was a mirror-orphan: committed in this repo but never read, because the lecture fetched intro's copy by URL instead. Thirteen more like it remain here, and they are tracked for a sweep. This one is doubly dead once the lecture reads data-lectures, so it goes now rather than waiting — the orphan count falls alongside the migration instead of accumulating into one large cleanup.
Part of the Track A migration. See QuantEcon/data-lectures#8.