Repository navigation
Record which packages gained or lost a wheel each night - #23
Conversation
scripts/update_changes.py compares the previous data/coverage.json (copied aside before the scan) with the new one and appends that day's gained/lost wheels to data/changes.json, keeping 90 days. Only changes to or from wheel count; unknown cells, and packages or targets only in one scan, are skipped. A second scan on the same day is folded into that day's entry. scan.yml runs it after the history update, uploads it and commits it with the other data.
|
Thanks, @sarankumar1325! This looks good overall: skipping Because it changes the nightly scan workflow, (Review assisted by Claude.) |
Moving the scan to a new wheelgap release (as in wheelgap#9 and wheelgap#11) changes results because wheelgap changed, not the packages; recording those would list hundreds of wheels as gained or lost. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… the README Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Merged, thanks @sarankumar1325! The diff logic holds up on real scans: the independent review re-derived the last two nights by hand and got your 22 gained and 11 lost. I pushed two small changes first:
If you'd like another one, #19 (cross-check the scan against pip and publish the agreement rate) is open and unclaimed. It fits well with the new "find a real bug" recipe in wheelgap's AGENTS.md. (Review assisted by Claude.) |
Closes #18
What this changes
scripts/update_changes.py previous.json data/coverage.json data/changes.jsoncompares the scan before and after and appends that day's entry todata/changes.json:[{"date": "2026-11-10", "gained": [{"name": "ciso8601", "version": "2.4.1", "target": "3.13 win-arm64", "from": "source", "to": "wheel"}], "lost": [{"name": "cua-driver", "version": "0.46.1", "target": "3.13 win-amd64", "from": "wheel", "to": "missing"}]}]wheelare listed. If either side isunknown, the cell is skipped, so a lookup error doesn't show up as a lost wheel and then a regained one. Packages or targets that are only in one of the two scans (top-5,000 churn, a wheelgap bump adding targets) are skipped too. Targets are matched by label, not position.versionis the version in the new scan. Items are in rank order, then target order.workflow_dispatch), it's folded into that day's entry: each cell keeps the first scan'sfromand takes the latestto, so a wheel lost and regained the same day drops out. Without this, the second run would overwrite the first run's changes, because by thenprevious.jsonis the same-day scan.previous.json, it writes the file unchanged (or[]). This PR also commitsdata/changes.jsonas[], so the file exists before the first nightly run.scan.yml: the scan job copiesdata/coverage.jsontoprevious.jsonbefore the scan (not committed or uploaded), runs the script afterupdate_history.py, and addsdata/changes.jsonto the artifact. The commit job adds it togit add. The publish job already copiesdata/*.jsonto the site. The README describes the file under "Using the data".Checked (there's no test setup yet, #16):
7a6202e^) against the committed 2026-11-10 scan gives 22 gained and 11 lost. I spot-checked ciso8601 (source to wheel on win-arm64) and cua-driver (wheel to missing on Windows). Running it twice gives the same file.unknownon either side skipped; a package missing from either scan skipped; reordered and added targets matched by label; a same-day loss and regain gives an empty entry; entries 90 or more days old dropped; noprevious.jsongives[].scan.ymlanddata/changes.json.ruff checkis clean.AI tools used (if any): An AI assistant helped write the script. I reviewed the diff and ran it on the real scan data.