Skip to content

Add all public repos to Status, aggregate downloads badge, fix moved repos - #1

Merged
johanbeytell1 merged 3 commits into
mainfrom
arena/d147a06a-github
Oct 8, 2026
Merged

johanbeytell1 merged 3 commits into
mainfrom
arena/d147a06a-github

Conversation

@johanbeytell1

Copy link
Copy Markdown
Member

What this does

1. Adds every remaining public repo to the ## Status badge list

The section listed 13 repos; the org has 19 public repos (excluding .github itself, which is this repo). Added the 6 that were missing, plus Alloy:

Repo Badges
qrforge full PyPI set — pepy, PyPI downloads/version/status, Actions, Snyk, Libraries.io, commit activity, last commit
Scriptify stars, Actions status, commit activity, last commit
Scikit-learn Model Updater stars, commit activity, last commit
Distributables, Material Library, PWLDS, CRSD stars, commit activity, last commit
Alloy stars, commit activity, last commit

Coverage is now complete: every public repo under Infinitode and johanbeytell1 appears in the section.

Two details worth flagging:

  • qrforge's workflow file is build_and_publish.yaml (.yaml), unlike every other package's build_and_publish.yml. Copying the existing pattern would have produced an Actions badge reading "no status".
  • scriptify on 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:

<!-- TOTAL-DOWNLOADS:START (generated by scripts/update-download-badges.py) -->
![Total Downloads](https://img.shields.io/badge/Total%20Downloads-updating...-5d17eb)
<!-- TOTAL-DOWNLOADS:END -->

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 in fetch_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

LocalShare and Alloy were transferred out of the org for Netlify's organization limitations. The existing LocalShare entry still pointed its badges at infinitode/localshare, which no longer resolves — those three badges were broken on the live profile. They now target johanbeytell1/localshare, with a short note explaining the move.

Testing

23 offline tests in scripts/test_update_download_badges.py, run as a workflow step:

python3 -m unittest discover -s scripts -p 'test_*.py'   # Ran 23 tests ... OK

Covering count extraction from pepy/jsDelivr payload shapes, the v2→legacy endpoint fallback, X-Api-Key being sent only to the keyed endpoint, partial-failure tolerance (one package failing must not abort the run), format_count boundaries, marker rewrite, idempotency, and main() end-to-end.

Also verified separately:

  • All 21 badge slugs in ## Status resolve via the GitHub API — zero unresolved.
  • All 11 Actions-workflow badge slugs match a real workflow file in their repo (including qrforge/build_and_publish.yaml and scriptify/build.yml).
  • All 10 PyPI-backed packages exist (qrforge v1.0.1, Production/Stable, Python 3.8–3.12).
  • Markdown structure: brackets/parens balanced, every entry well-formed.
  • The script run twice against a copy of the README: run 1 changed only the badge line; run 2 reported "Badge already up to date" and left the file byte-identical.

Not verified

pepy.tech, data.jsdelivr.com and img.shields.io are unreachable from the sandbox used to prepare this (all requests returned 000), 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 for total_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.

johanbeytell1 and others added 3 commits October 8, 2026 17:49
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>
@johanbeytell1
johanbeytell1 merged commit 80a8f62 into main Oct 8, 2026
1 check passed
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.

1 participant