Add the generated data-audit dashboard (gh-pages): audit + migration tracker#21
Merged
Conversation
scripts/build_audit.py scans the 8 synced Python-family lecture repos on origin/main (clone + grep — never gh search code, which cannot find URLs), classifies every data reference into the hosting-pattern taxonomy, and renders a 3-page static dashboard (overview / migration tracker / full audit) via scripts/render_audit.py. Three sources of truth, reconciled on every build: - lectures/*.yml manifests — the migrated datasets - migration.yml (new) — the migration lifecycle + PR provenance, kept separate from the manifests so it can be archived when the migration programme completes without touching the permanent dataset records - scripts/audit_annotations.yml (new) — curated judgment (descriptions, provenance classes, live-API pedagogy) for not-yet-migrated references The strict scan fails on an unannotated data reference or a migration.yml status that disagrees with what the lectures actually read, so the dashboard cannot silently rot — the failure mode that killed the hand-built 2026-07-15 audit artifact within two days. Part of #20; taxonomy and design system carried over from that artifact. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
.github/workflows/audit-dashboard.yml builds the dashboard from shallow clones of the 8 lecture repos and deploys the default Pages site: dashboard at /, the published lectures/ tree at /lectures/, audit.json alongside for reuse. Triggers: push to main, weekly cron, manual dispatch; on PRs touching the audit inputs it runs the strict build as a guardrail without deploying. Serving lectures/ on Pages pre-stages PLAN Phase 4: when the data.quantecon.org DNS question is resolved, only the custom domain changes. Checkout uses lfs: true so LFS-tracked files publish as bytes, never pointers. Part of #20. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
README gains the audit-dashboard section; AGENTS.md gains the keep-it-truthful rules (migration.yml updated in the same PR as a landing/repoint; annotations for new references; never commit site/ or audit.json) and the expanded repo map; PLAN.md checks off the Pages deploy (default domain — custom domain stays open), adds the Phase 5 workflow entry, and marks pilot P2 complete (#17, QuantEcon/lecture-python-programming#578, QuantEcon/lecture-python.myst#973). Part of #20. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR adds a generated, CI-built data-audit dashboard (with a migration tracker) for the QuantEcon Python-family lecture repos, and deploys it via GitHub Pages alongside the published lectures/ dataset tree. It introduces a strict “truthfulness” contract across lectures/*.yml manifests, migration.yml, and scripts/audit_annotations.yml, and updates project docs/plans to reflect the new automation.
Changes:
- Add
scripts/build_audit.py(scan + strict reconciliation) andscripts/render_audit.py(HTML renderer) plus curatedscripts/audit_annotations.yml. - Introduce
migration.ymlas a lifecycle/provenance tracker separate from manifests, and document the strict drift checks inAGENTS.md/README.md. - Add a GitHub Actions Pages workflow to rebuild and deploy the dashboard and
lectures/tree onmain/schedule/dispatch (and run as a PR guardrail).
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
scripts/render_audit.py |
New HTML renderer for the dashboard pages (overview, migration tracker, full audit). |
scripts/build_audit.py |
New scanner/reconciler producing audit.json and invoking the renderer; supports strict drift detection. |
scripts/audit_annotations.yml |
New curated annotations for non-manifested datasets + live-API pedagogy notes + orphan classifications. |
scripts/README.md |
Documents which scripts are builders vs generators/metadata inputs. |
README.md |
Documents the audit dashboard purpose and how to run the strict build. |
PLAN.md |
Marks Pages deploy and audit-dashboard automation as completed items. |
migration.yml |
New migration lifecycle/provenance tracker for migrated datasets and pending waves. |
AGENTS.md |
Adds repository rule: keep dashboard inputs consistent; don’t commit generated outputs. |
.gitignore |
Ignores generated site/ and audit.json. |
.github/workflows/audit-dashboard.yml |
New Pages workflow to build (strict) and deploy dashboard + lectures/ tree. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- render_audit.py: add the external-web pattern to PATTERN_META so a non-GitHub data URL would surface in the hosting-pattern table and distribution chart instead of being silently omitted (no current ref triggers it; the failure mode was the point) - build_audit.py: validate migration.yml status values in the scan-stage consistency check (an unknown status fails --strict with a clear message); render_audit.py's stepper raises a named error as backstop - build_audit.py: flag any .ipynb under lectures/ outside _static/ as an unscanned_notebooks problem. Every lecture source today is MyST .md and the only notebooks are builder/figure helpers (deliberately not consumers); if a notebook-format lecture ever appears, the build now refuses to miss it silently 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.
Delivers #20 — the one-time, hand-built dataset audit becomes a generated, self-updating dashboard deployed to this repo's GitHub Pages site, extended into a first-class migration tracker showing exactly which data has moved here, via which PRs, and what's queued.
What's in the box
scripts/build_audit.py— two stages, kept separate so the data is reusable.scangreps each of the 8 synced Python-family repos onorigin/main(clone + grep;gh search codecannot find URLs), resolves string-built URLs (f-strings, continuation lines,var + 'file'concatenation), reads only executed{code-cell}blocks (skippingskip-executioncells), classifies every reference into the hosting-pattern taxonomy, and emitsaudit.json.renderwrites the 3-page site.Three pages (design system evolved from the 2026-07-15 artifact — same theme-aware palette and pills, plus nav, a migration meter with dataviz-validated series colors, and per-dataset lifecycle steppers):
Three sources of truth, reconciled on every build. Manifests (
lectures/*.yml) own the migrated datasets;migration.yml(new) owns lifecycle + PR provenance — deliberately separate from the manifests so it can be archived when the migration programme completes;scripts/audit_annotations.yml(new) owns curated judgment for not-yet-migrated references. The strict build fails on an unannotated reference or amigration.ymlstatus the scan contradicts — the dashboard cannot rot into the stale snapshot it replaces.Pages workflow (
.github/workflows/audit-dashboard.yml): push to main / weekly / manual dispatch; serves the dashboard at/and the publishedlectures/tree at/lectures/(checkoutlfs: true), pre-staging Phase 4 so only the custom domain changes when the DNS question resolves. On PRs touching audit inputs it runs the strict build as a guardrail without deploying.Fresh numbers (2026-07-17, vs the 2026-07-15 hand audit)
us_adult_heights.csv,japan_population_by_age.xlsx), +graph.txtpromoted from "shadowed" to load-bearing (lecture-wasm fetches intro's copy by URL), −test_table.csv (an exercise prose link, now annotated as such rather than a code read)Notes for review
quantecon.github.io/data-lectures/domain (configure-pageswithenablement: true);data.quantecon.orgremains gated on the Phase 4 DNS investigation (Phase 4 cutover: swap interim raw URLs → data.quantecon.org/lectures #15 stays open)site/andaudit.jsonare generated and gitignored; CI builds them fresh🤖 Generated with Claude Code