Skip to content

long_run_growth: read mpd2020.xlsx from data-lectures, not from intro's repo - #52

Merged
mmcky merged 1 commit into
mainfrom
repoint/long-run-growth
Aug 6, 2026
Merged

long_run_growth: read mpd2020.xlsx from data-lectures, not from intro's repo#52
mmcky merged 1 commit into
mainfrom
repoint/long-run-growth

Conversation

@mmcky

@mmcky mmcky commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Repoints long_run_growth at the canonical data repository, and deletes this repo's own unused copy of mpd2020.xlsx.

Paired with QuantEcon/lecture-python-intro#823 — the two must land as a set, for the reason below.

The change

Before https://raw.githubusercontent.com/QuantEcon/lecture-python-intro/main/lectures/datasets/mpd2020.xlsx
After https://github.com/QuantEcon/data-lectures/raw/main/lectures/mpd2020.xlsx

Plus git rm lectures/datasets/mpd2020.xlsx. One line — the lecture assigns data_url once and reuses it for both the Full data and Regional data reads.

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#823 deletes 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-intro keeping its lectures/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.com returns 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-lectures AGENTS.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 returns sha256 f67af0fd599fcebd9b92a0ad65472998f4548ea006e6b7c0018d4ade76e3bceb, matching the manifest at lectures/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.

…'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>
Copilot AI lite review requested due to automatic review settings August 6, 2026 05:37
@netlify

netlify Bot commented Aug 6, 2026

Copy link
Copy Markdown

Deploy Preview for beautiful-dodol-cb9543 failed.

Name Link
🔨 Latest commit 4e734f7
🔍 Latest deploy log https://app.netlify.com/projects/beautiful-dodol-cb9543/deploys/6a741da64373a50008e6a62b

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_url for both “Full data” and “Regional data” reads.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

📖 Netlify Preview Ready!

Preview URL: https://pr-52--beautiful-dodol-cb9543.netlify.app (4e734f7)

✨ Browse the preview at the URL above.

@mmcky
mmcky merged commit 6766bae into main Aug 6, 2026
2 of 6 checks passed
@mmcky
mmcky deleted the repoint/long-run-growth branch August 6, 2026 05:47
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants