Skip to content

inflation_history: read longprices.xls and chapter_3.xlsx from data-lectures - #53

Merged
mmcky merged 3 commits into
mainfrom
repoint/inflation-history
Aug 6, 2026
Merged

inflation_history: read longprices.xls and chapter_3.xlsx from data-lectures#53
mmcky merged 3 commits into
mainfrom
repoint/inflation-history

Conversation

@mmcky

@mmcky mmcky commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Repoints inflation_history at the canonical data repository, deletes this repo's unused copies of longprices.xls and chapter_3.xlsx, and drops the last of this lecture's dependencies on lecture-python-intro's repository layout.

Paired with QuantEcon/lecture-python-intro#824 — neither may land alone.

Three references, in two different URL forms

Worth spelling out, because it is why a single find-and-replace would have missed one:

Line Reference Old form
76 read_excellongprices.xls raw.githubusercontent.com/…
350 read_excelchapter_3.xlsx raw.githubusercontent.com/…
220 {download} offering chapter_3.xlsx github.com/…/raw/…

All three pointed into lecture-python-intro, and all three break when it deletes those files in the paired PR.

The {download} is also invisible to the data-lectures audit, which classifies references by the code that reads them. A dead download link fails no build in either repo, so nothing would have reported it — see QuantEcon/data-lectures#42.

Two side benefits

The sibling dependency goes. This lecture no longer reads files out of another repository's working layout — an invisible constraint on that repo, and one nothing would have caught until a build broke.

raw.githubusercontent.com goes. That form returns pointer text rather than data for any file tracked in Git LFS, failing as a confusing parse error rather than a 404. The /raw/ form works regardless of storage (QuantEcon/data-lectures AGENTS.md, "URL forms").

No figure moves

Both files are byte-identical to what data-lectures serves — git blobs 1a2e141 and a3f100e — and the served URLs return sha256 matching the manifests, verified today.

About the deleted copies

Both were mirror-orphans: committed here but never read, because the lecture fetched intro's copies instead. Doubly dead once this lands, so they go now rather than waiting for the orphan sweep — the orphan count falls alongside the migration rather than accumulating into one large cleanup.

Part of the Track A migration. See QuantEcon/data-lectures#8.

…ectures

Repoints both spreadsheets at the canonical data repository, deletes this
repo's unused copies, and drops the last of this lecture's dependencies on
lecture-python-intro's repository layout.

THREE references move, in TWO different URL forms -- worth noting because it
is why a single find-and-replace would have missed one. The two read_excel
calls used raw.githubusercontent.com; the {download} directive at line 220
used github.com/.../raw/. Both pointed into intro's repo, and both would have
broken when intro deleted those files.

That {download} is also invisible to the data-lectures audit, which classifies
references by the code that reads them. A dead download link fails no build in
either repo, so nothing would have reported it. See
QuantEcon/data-lectures#42.

Dropping raw.githubusercontent.com is a side benefit: that form returns
pointer text rather than data for any file in Git LFS, failing as a confusing
parse error instead of a 404. The /raw/ form works either way
(QuantEcon/data-lectures AGENTS.md, "URL forms").

Bytes unchanged -- both files are byte-identical to what data-lectures serves
(git blobs 1a2e141 and a3f100e), matching the sha256 in their manifests.

The deleted copies were mirror-orphans: committed here but never read, because
the lecture fetched intro's copies instead. Doubly dead now, so they go in the
same PR rather than waiting for the orphan sweep.

Paired with the intro half; neither may land alone. See
QuantEcon/data-lectures PLAN.md, "Repoint rules".

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@netlify

netlify Bot commented Aug 6, 2026

Copy link
Copy Markdown

Deploy Preview for beautiful-dodol-cb9543 failed.

Name Link
🔨 Latest commit 1d42dc2
🔍 Latest deploy log https://app.netlify.com/projects/beautiful-dodol-cb9543/deploys/6a742a930888c10008506b9b

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

📖 Netlify Preview Ready!

Preview URL: https://pr-53--beautiful-dodol-cb9543.netlify.app (0af3957)

✨ Browse the preview at the URL above.

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

Repoints the inflation_history lecture’s spreadsheet sources to the canonical QuantEcon/data-lectures repository to avoid relying on lecture-python-intro’s repository layout and to use /raw/ URLs that work for Git LFS–tracked files.

Changes:

  • Update pd.read_excel / pd.ExcelFile URLs for longprices.xls and chapter_3.xlsx to https://github.com/QuantEcon/data-lectures/raw/main/lectures/....
  • Update the {download} link for chapter_3.xlsx to the new canonical location.

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

Comment thread lectures/inflation_history.md
Copilot caught a fourth reference this PR had missed: the narrative link
introducing the spreadsheet still pointed at this series own
lectures/datasets directory, which this PR empties. It would not have
404d -- the directory survives with other files -- it would have quietly
become wrong, which nothing would ever flag.

It now points at data-lectures CATALOG.md rather than a directory listing.
A reader following "hosted on github" gets the dataset registry: source,
licence, integrity status and which lectures consume each file. That is
strictly more useful than the folder it replaced, and the catalog is
generated from the manifests, so it cannot drift out of date.

Worth recording why the earlier sweep missed this. It searched for links
ENDING in a data-file extension, so a link to a DIRECTORY was invisible to
it -- a blind spot in the check for the audits blind spot. Re-sweeping
properly found two more of the same shape (inequality.md in both repos,
linking to the usa-gini builder notebook), which belong to a later wave.
Folded into QuantEcon/data-lectures#42.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

📖 Netlify Preview Ready!

Preview URL: https://pr-53--beautiful-dodol-cb9543.netlify.app (4245293)

✨ Browse the preview at the URL above.

Copilot noted the link text reads "hosted on github". Checking the corpus
rather than treating it as taste: across the Python lecture family the prose
convention is GitHub, with 12 uses in lecture-python-programming, 6 in
lecture-python.myst and 1 here, and zero lowercase anywhere else. This line is
the only lowercase instance in the family, and it appears twice because wasm
mirrors intro. So it is the outlier, not a preference.

Same review also flagged the link TARGET, which was already fixed in the
preceding commit -- the comment was written ten minutes before that push. Only
the capitalisation remained.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

📖 Netlify Preview Ready!

Preview URL: https://pr-53--beautiful-dodol-cb9543.netlify.app (1d42dc2)

✨ Browse the preview at the URL above.

@mmcky
mmcky merged commit d39d1fd into main Aug 6, 2026
1 of 5 checks passed
@mmcky
mmcky deleted the repoint/inflation-history branch August 6, 2026 06:39
mmcky added a commit to QuantEcon/data-lectures that referenced this pull request Aug 6, 2026
Held as a draft: must not merge before QuantEcon/lecture-python-intro#824 and
QuantEcon/lecture-wasm#53. Verified both ways -- against the lecture repos'
current main this fails with "marked repointed but consumers still read via
['own-repo', 'sibling']" for both files; against their repoint branches it
passes clean and orphans fall 34 -> 32 as wasm's two mirror copies go.

Set 2 of three. Unlike set 1 this batch had a reference the audit cannot see:
a {download} directive in each repo offering chapter_3.xlsx to readers,
pointing at the file being deleted. The lecture PRs move those too. The
general problem -- ten such prose references across the remaining migration,
none visible to the scan -- is #42.

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