Skip to content

feat: publish and display packages blocking the most top-500 installs (#93) - #144

Merged
patrickballard merged 4 commits into
wheelgap:mainfrom
dianatofficial:feat/top-install-blockers-93
Nov 17, 2026
Merged

patrickballard merged 4 commits into
wheelgap:mainfrom
dianatofficial:feat/top-install-blockers-93

Conversation

@dianatofficial

Copy link
Copy Markdown
Contributor

Resolves #93

Summary

Counts and publishes the packages that break the most top-500 dependency trees per platform, and surfaces them on the home page:

  • Publish Script (scripts/build_blockers.py):
    • Counts per target how many top-500 dependency trees each package blocks (source or missing as a blocker).
    • Skips not_checked trees and accurately records the number of checked trees (checked: N).
    • Ensures a tree with the same blocker multiple times (e.g., via different dependency paths) is counted only once for that package.
    • Outputs _site/data/blockers.json at publish time containing the top 50 blockers per target with counts and up to three example blocked packages.
    • Integrated into .github/workflows/scan.yml publish step.
  • Home Page Display (site/index.html, site/app.js, site/home.css, site/logic.js):
    • Added blockersForTarget validation helper in site/logic.js ensuring safe package names and numbers.
    • Added "Blocking the Most Installs" section in the home page sidebar displaying the active platform's top blockers:
      e.g. Blocking the most installs on win-arm64 (of 498 checked top-500 packages): cryptography (blocks 30 of 498: google-auth, google-api-core, ...).
    • Links each blocker and example package to its dedicated package page.
  • Documentation (README.md):
    • Documented data/blockers.json in the README's published data section.
  • Tests:
    • tests/test_blockers.py: unit tests for counting logic, deduplication within a single tree, skipping not_checked trees, capping at 50, and safe name validation.
    • tests/site/logic.test.js: unit tests for blockersForTarget validation.
    • tests/site/app.test.js: unit tests for renderBlockers rendering.

@patrickballard

Copy link
Copy Markdown
Contributor

Thanks @dianatofficial, this looks good overall: a "what blocks the most installs" list is a really useful view, and build_blockers.py comes with solid tests (schema check, counting each tree once, the CLI run).

Because it changes .github/workflows/scan.yml and adds a script under scripts/ (and is over 400 lines), Patrick will review and merge this one himself. One small thing for that review: in renderBlockers the href="p/${canonicalName(...)}/" values aren't passed through esc(), unlike the names next to them. Package names from the scan are safe in practice, but escaping them too would match the rest of the page.

(Review assisted by Claude.)

patrickballard and others added 3 commits November 17, 2026 11:48
…thon, refresh on platform change (wheelgap#93)

- A package no longer counts as blocking its own tree (the scanner lists the root
  as its own blocker): on win-arm64 that was 20 of 21 rows. This list is now the
  dependencies holding other top-500 packages back; most-wanted ranks the rest.
- Only targets with checked trees are written, a checked tree is a CHECKED status,
  names are canonicalised like the other scripts (PEP 503) and examples are the
  highest-ranked trees.
- The card falls back to the newest Python checked on the platform (installs are
  only scanned for some), says so, and says when a platform isn't checked at all.
- Clicking a platform card or changing the platform select re-renders it.
- Package names link to their pages; the step warns instead of stopping the deploy.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@patrickballard
patrickballard merged commit 77f1ba5 into wheelgap:main Nov 17, 2026
1 check passed
@patrickballard

Copy link
Copy Markdown
Contributor

Merged, thanks @dianatofficial! It's a really useful list. One change before merging: a package no longer counts as blocking its own tree. The scanner lists the root as its own blocker, so on win-arm64, 20 of 21 rows were just repeating most-wanted. The card now shows the dependencies holding other top-500 packages back. It also falls back to the newest Python that was checked, and it updates when you switch platforms.

If you'd like another, wheelgap/wheelgap#379 (--piwheels for Raspberry Pi gaps) is open.

(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.

Blocking the most installs: which packages break the most top-500 dependency trees, per platform

2 participants