Skip to content

feat: show recent wheel changes from changes.json on package pages (#115) - #136

Merged
patrickballard merged 3 commits into
wheelgap:mainfrom
dianatofficial:feat/package-page-recent-changes-115
Nov 17, 2026
Merged

patrickballard merged 3 commits into
wheelgap:mainfrom
dianatofficial:feat/package-page-recent-changes-115

Conversation

@dianatofficial

@dianatofficial dianatofficial commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #115.

Summary of Changes

  1. scripts/build_pages.py:
    • Added changes_by_package(changes: list[dict]) -> dict[str, list[dict]] to group nightly wheel transitions from changes.json by canonical package name.
    • Added ormat_target(target: str) -> str to format targets like "3.14 win-arm64" as "Windows ARM64, Python 3.14" using PLATFORM_NAMES.
    • Added changes_html(changes: list[dict] | None) -> str rendering
      :
      • Orders entries newest first and caps at 10 items.
      • Formats date, target, and gained or lost status.
      • Notes that the log covers the last 90 days (update_changes.KEEP_DAYS).
      • Returns empty string (omitting the section completely) when there are no changes to show.
      • Strict html.escape on all interpolated strings.
    • Updated page() to accept changes: list[dict] | None and place {changes_section} under the matrix card.
    • Updated �uild() to load changes.json (or default to empty if absent) and pass each package's entries to page().
  2. README.md:
    • Added a note under "Package pages" documenting the Recent changes section.
  3. ** ests/test_package_changes.py**:
    • Added tests covering target formatting, newest-first gained and lost ordering, empty log section omission, capping at 10 entries, HTML escaping, package isolation, and end-to-end �uild() integration.

@patrickballard

Copy link
Copy Markdown
Contributor

Thanks for picking this up so quickly, @dianatofficial, and for the thorough tests (escaping, the 10-item cap and leaving the section out when there's nothing to show are all covered)!

This looks good overall. Because it changes scripts/, which is the part of the tracker that builds the site every night, Patrick reviews and merges these himself, so he'll take it from here. One thing he may look at: changes_by_package handles a few different shapes of changes.json entries, so it's worth checking it against the one format update_changes.py actually writes.

(Review assisted by Claude.)

changes_by_package and changes_html only handle the list of days that
update_changes.py writes. Same-day losses come before gains, as on the home
page. The note no longer claims a full 90 days of history. Tests now use the
real format and cover canonical names, free-threaded labels and same-day order.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@patrickballard

Copy link
Copy Markdown
Contributor

Thanks for the quick follow-up, @dianatofficial! changes_by_package now reads just the day-by-day format update_changes.py writes, and the "and N more" line is a nice addition.

As before, since this changes scripts/, Patrick will review and merge it himself. Heads-up: #138 and #139 also edit scripts/build_pages.py, so some of these may need a rebase as they go in.

(Review assisted by Claude.)

@patrickballard
patrickballard merged commit 863ca87 into wheelgap:main Nov 17, 2026
1 check passed
patrickballard added a commit to AdityaSreevatsaK/tracker that referenced this pull request Nov 17, 2026
@patrickballard

Copy link
Copy Markdown
Contributor

Merged, thanks @dianatofficial! Before merging I simplified changes_by_package and changes_html to the one format update_changes.py writes (a list of days with gained and lost). Within a day, losses now come before gains, as on the home page. The section adds an "and N more" line past ten, and its note no longer promises a full 90 days, since the log only started this month. The tests now build real changes.json days.

If you'd like another one, #78 charts wheel readiness per platform over time on the home page, and nobody has picked it up yet.

(Reply assisted by Claude.)

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.

Package pages: recent wheel changes from changes.json

2 participants