Skip to content

update_lectures.py syncs from intro's stale wasm branch and would revert the data-lectures repoints #69

Description

@mmcky

update_lectures.py is the documented way to refresh this repo's lectures, and running it today would undo the last two months of work. Filing this so the hazard is on record next to the fix, rather than only in a PR body (#68, where it was found during the Track X orphan sweep).

What the script does

It downloads lecture-python-intro's wasm branch as a zip (LECTURE_INTRO_URL, line 14), copytrees that branch's whole lectures/ directory over this repo's lectures/ with dirs_exist_ok=True (line 89), then rewrites !pip%pip and the exercise/solution directives in every .md. README's "To update" section still points people at it and says "Do not edit lectures directly in this repository."

Why running it now would be destructive — measured 2026-09-01

Fact Measured
intro wasm branch, last commit c870cca, 2025-04-23 ("Reduce the array size in wasm", #586)
Relative to intro main 125 commits behind, 19 ahead
lectures/datasets/ files it carries 11 — including all ten migrated datasets (mpd2020.xlsx, longprices.xls, chapter_3.xlsx, the five french_rev files, fig_3.ods) and the two World Bank orphans deleted here in #68
References to QuantEcon/data-lectures in that branch's lectures 0
References to QuantEcon/data-lectures in this repo's lectures/ today 18 (the repoints in #52, #53, #55, #61 and the %%file embed in #63)
.md files that differ between the branch and this repo 40 of 50

So a re-run would (1) reintroduce every dataset copy this repo has deleted since July, (2) overwrite every repointed lecture with a version that reads intro's committed blobs by URL — blobs that no longer exist on intro's main, so the in-browser fetches would 404 — and (3) revert the CORS-safe raw.githubusercontent.com URL forms the wasm runtime needs (the trap recorded in QuantEcon/data-lectures#46 and PLAN.md's repoint rule 5). Nothing in CI would catch it: the static pages still build, and the breakage only appears when a reader executes a data cell in the browser.

It is dormant rather than broken today — this repo's datasets/ directory holds none of the branch's eleven files, which shows nobody has run it since the migration — but dormant scripts get run.

Options

  1. Retire it. The lectures here have been edited directly by PR since July (five repoint PRs plus Delete committed dataset orphans (Track X) #68), which is already the working model; the README's "do not edit directly" line is the thing that is out of date. Delete the script and rewrite that README section to describe how wasm-specific adaptations (URL form, %pip, directive shapes) are maintained.
  2. Re-source it from intro main and make it merge-aware. Point LECTURE_INTRO_URL at main, exclude lectures/datasets/ from the copy, and stop overwriting files that carry wasm-only edits — in practice a per-file diff/three-way merge, because the URL-form differences are deliberate and must survive. This is real work, and it also needs the wasm branch in intro either deleted or clearly marked historical so nobody re-points at it.
  3. Minimum safe change now, whichever of the above is chosen later: add a guard at the top of update_lectures.py that refuses to run (sys.exit with a pointer to this issue), and strike the README instruction. Ten lines, removes the hazard today.

I would do 3 immediately and lean to 1 — the direct-PR model has worked for every change since July and a one-way overwrite can never coexist with the wasm-specific URL contract. Either way the intro wasm branch should be retired or renamed once nothing depends on it (its branch head is covered by the accept-and-record ruling for stale refs; nothing reads through it).

Context: the orphan sweep that found this is QuantEcon/workspace-lectures#57; the deletion ledger recording what this repo removed is _audits/2026-09-01-datasets-deletions.md in QuantEcon/workspace-lectures.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions