Repository navigation
Add all public repos to Status, aggregate downloads badge, fix moved repos - #1
Merged
Merged
Conversation
Adds every remaining public Infinitode repo to the ## Status badge list: - qrforge: full PyPI package badge set (pepy, PyPI downloads/version/status, Actions workflow, Snyk, Libraries.io, commit activity, last commit). Note the workflow file is build_and_publish.yaml (.yaml), unlike the other packages' build_and_publish.yml. - Scriptify: repo badges plus its build.yml Actions status badge. - Scikit-learn Model Updater, Distributables, Material Library, PWLDS, CRSD: repo badges (stars, commit activity, last commit). Scriptify deliberately gets no PyPI badges: the 'scriptify' project on PyPI is an unrelated package by a different author. Also adds qrforge to the 'Our projects' showcase. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Downloads badge - New TOTAL-DOWNLOADS badge under the visitor counter, showing all-time PyPI + jsDelivr downloads across every package. - scripts/update-download-badges.py tallies pepy totals for the 10 PyPI packages and jsDelivr hits for BlurJS, then rewrites the badge block between HTML markers. Network access is isolated in fetch_json() so the parsing/summing/rewriting logic is unit-testable offline. - scripts/test_update_download_badges.py: 23 offline tests (count extraction, endpoint fallback, API-key handling, partial-failure tolerance, format boundaries, marker rewrite, idempotency, end-to-end). - New daily workflow (04:17 UTC + manual dispatch) runs the tests, updates the badge and commits with [skip ci]. Optional PEPY_API_KEY secret uses the pepy v2 endpoint; without it the keyless legacy endpoint is used. Moved repos - LocalShare and Alloy now live under @johanbeytell1 (Netlify org limitations), so their badges are repointed there instead of the dead infinitode/* URLs, with a note explaining the move. - Alloy added to the Status section. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Adds a pull_request trigger so the 23 offline tests run as PR checks. The tally and commit steps stay gated to non-PR events, since the badge should only be rewritten on main. Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.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.
What this does
1. Adds every remaining public repo to the
## Statusbadge listThe section listed 13 repos; the org has 19 public repos (excluding
.githubitself, which is this repo). Added the 6 that were missing, plus Alloy:Coverage is now complete: every public repo under
Infinitodeandjohanbeytell1appears in the section.Two details worth flagging:
build_and_publish.yaml(.yaml), unlike every other package'sbuild_and_publish.yml. Copying the existing pattern would have produced an Actions badge reading "no status".scriptifyon PyPI is an unrelated package by a different author ("turns functions into command line scripts"). Scriptify therefore gets GitHub badges only — no PyPI/pepy/Snyk badges.2. Adds an aggregate all-time downloads badge
New badge under the visitor counter, showing combined all-time PyPI + jsDelivr downloads:
No badge service aggregates across sources, so the tally is computed by a scheduled Action:
scripts/update-download-badges.py— sums pepy all-time totals for the 10 PyPI packages and jsDelivr hits for BlurJS, then rewrites the badge block between the markers. Network access is isolated infetch_json()so the rest of the logic is testable offline..github/workflows/update-download-badges.yml— daily at 04:17 UTC plus manual dispatch. Runs the tests, updates the badge, commits with[skip ci].Note
The badge reads
updating...until the workflow's first run, which happens automatically on merge. Use Run workflow to trigger it immediately.Tip
Optionally add a repo secret
PEPY_API_KEY(free key from pepy.tech → account → API key) to use the pepy v2 endpoint. Without it the job falls back to the keyless legacy endpoint.3. Repoints the repos that moved to @johanbeytell1
LocalShareandAlloywere transferred out of the org for Netlify's organization limitations. The existing LocalShare entry still pointed its badges atinfinitode/localshare, which no longer resolves — those three badges were broken on the live profile. They now targetjohanbeytell1/localshare, with a short note explaining the move.Testing
23 offline tests in
scripts/test_update_download_badges.py, run as a workflow step:Covering count extraction from pepy/jsDelivr payload shapes, the v2→legacy endpoint fallback,
X-Api-Keybeing sent only to the keyed endpoint, partial-failure tolerance (one package failing must not abort the run),format_countboundaries, marker rewrite, idempotency, andmain()end-to-end.Also verified separately:
## Statusresolve via the GitHub API — zero unresolved.qrforge/build_and_publish.yamlandscriptify/build.yml).Not verified
pepy.tech,data.jsdelivr.comandimg.shields.ioare unreachable from the sandbox used to prepare this (all requests returned000), so the exact JSON shape those APIs return today is unconfirmed. The script hedges by trying two endpoint variants per source and searching the payload fortotal_downloads/totalHits/downloads/hits, and the job logs a per-source breakdown — the first run confirms it. If a source fails, the badge still updates from the remainder and the job exits non-zero.