Skip to content

Annotate the new upstream data refs — turn the audit build green again - #28

Merged
mmcky merged 2 commits into
mainfrom
audit/annotate-upstream-drift
Aug 3, 2026
Merged

Annotate the new upstream data refs — turn the audit build green again#28
mmcky merged 2 commits into
mainfrom
audit/annotate-upstream-drift

Conversation

@mmcky

@mmcky mmcky commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

The audit-dashboard build has been red since the 2026-07-27 schedule, so every data-lectures PR since has failed CI on drift it did not cause — most recently #27, whose failure prompted this.

Not broken code — drift

build_audit.py clones the live main of all 8 lecture repos at run time, and --strict exits 1 when any problem bucket is non-empty. A reference with neither a manifest nor an annotation is a problem. That coupling is deliberate (new data reads should surface loudly rather than rot), but it means an upstream lecture landing a data read turns this repo red on unrelated PRs, and nothing acts on the failing weekly schedule.

Three upstream additions accumulated seven such references:

landed source refs
Jul 26 QuantEcon/lecture-python.myst#1001 NEWQDATA.csv, plus API uses in phillips_drifts_volatilities, phillips_lost_conquest, phillips_two_stories
Jul 30 QuantEcon/lecture-python-programming#408 polars — a Polars rewrite of pandas' FRED and yfinance sections
Aug 1 QuantEcon/lecture-python.myst#1020 sargent_surico

The first four are exactly the Jul 27 schedule failure (19 live-API lectures); the last three accumulated on top by Aug 3 (21).

What this does

Adds the six api: entries and one datasets: entry. Series lists are read off the lecture sources, not inferred. The API uses are incidental except polars, which mirrors pandas' lesson framing — there the fetch itself is the teaching point.

NEWQDATA.csv is recorded verbatim: the lecture cites it as Cogley and Sargent's quarterly dataset and commits no builder beside it. Its note flags it as a migration candidate — it is read from lecture-python.myst main by raw URL, and the lecture already documents every transformation and rebuilds the post-2000Q4 continuation from FRED, so the provenance work is largely done upstream.

Second commit: a stale annotation

us_adult_heights.csv kept its datasets: entry when #27 migrated it, against the rule stated in this file's own header (migrated datasets are owned by their manifest; the other six manifest-backed datasets follow it). Not cosmetic — class and title already came from the manifest, but flags and note are annotation-only, so the dashboard was rendering "NHANES-derived, extraction not scripted" for a dataset whose manifest records builder_status: committed, the exact claim #27 disproved by reproducing the file byte for byte.

Verification

Run against fresh clones of all 8 repos: build_audit.py scan --strict goes from exit 1 with 7 warnings to exit 0 with none, before and after the second commit. This PR touches scripts/audit_annotations.yml, which is in the workflow's paths: filter, so CI re-checks it here.

Worth a follow-up, not in scope here

deploy is needs: build, so the Pages deploy has been skipped since Jul 17 and the published dashboard is stale. Merging this should let the next push to main deploy again. Separately, the weekly schedule is the intended drift alarm but fails into nobody's inbox — worth a notification, or a non-strict schedule that opens an issue instead.

🤖 Generated with Claude Code

mmcky and others added 2 commits August 3, 2026 15:59
The audit-dashboard build has been red since the 2026-07-27 schedule. It
is not broken code: build_audit.py scans the live main of the 8 lecture
repos, and --strict exits 1 when any reference has neither a manifest nor
an annotation. Three upstream additions landed refs this file had never
seen, so every data-lectures PR since has failed on drift it did not
cause (most recently #27).

The gap, and where each ref came from:

  NEWQDATA.csv, and phillips_drifts_volatilities / phillips_lost_conquest
  / phillips_two_stories — added by QuantEcon/lecture-python.myst#1001
  (Jul 26), the first four warnings on the Jul 27 schedule

  polars — added by QuantEcon/lecture-python-programming#408 (Jul 30),
  a Polars rewrite of pandas' FRED and yfinance sections

  sargent_surico — added by QuantEcon/lecture-python.myst#1020 (Aug 1)

Series lists are read off the lecture sources rather than inferred. The
six API entries are annotated incidental except polars, which mirrors
pandas' lesson framing — the fetch itself is the teaching point there.

NEWQDATA.csv is recorded verbatim: the lecture cites it as Cogley and
Sargent's quarterly dataset and commits no builder beside it. The note
flags it as a migration candidate — it is read from lecture-python.myst
main by raw URL, and the lecture already documents every transformation
and rebuilds the post-2000Q4 continuation from FRED.

Verified against clones of all 8 repos: `build_audit.py scan --strict`
goes from exit 1 with 7 warnings to exit 0 with none.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file's header states the rule: migrated datasets do not get
`datasets:` entries, because the manifest is their source of truth. The
other six manifest-backed datasets follow it; us_adult_heights.csv was
left behind when #27 migrated it out of lecture-python-intro.

Not cosmetic. `class` and `title` already came from the manifest, but
`flags` and `note` are annotation-only, so the dashboard was rendering
"NHANES-derived, extraction not scripted" for a dataset whose manifest
records builder_status: committed with the builder in scripts/ — the
exact claim #27 disproved by reproducing the file byte for byte.

Strict scan stays green: the manifest already supplies class
`constructed` and the real title.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 3, 2026 06:00

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

Restores a green audit-dashboard CI by updating the curated audit annotations to reflect newly landed upstream lecture data references and removing a stale dataset annotation now superseded by a manifest.

Changes:

  • Add a datasets: annotation for NEWQDATA.csv (unmanifested upstream file) so strict audit no longer flags it as unclassified drift.
  • Add api: annotations for newly introduced live-API usages (Polars sections in lecture-python-programming and multiple lecture-python.myst lectures).
  • Remove the us_adult_heights.csv entry from datasets: since it is now manifest-backed in lectures/us_adult_heights.csv.yml and should not be annotated here.

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

@mmcky
mmcky merged commit 66af8bf into main Aug 3, 2026
4 checks passed
@mmcky
mmcky deleted the audit/annotate-upstream-drift branch August 3, 2026 06:04
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