Skip to content

Badge row: clones, downloads and fuzz added; pyversions, ruff and mypy dropped - #2

Merged
arpanghoshal merged 1 commit into
mainfrom
tooling/badge-row
Sep 11, 2026
Merged

Badge row: clones, downloads and fuzz added; pyversions, ruff and mypy dropped#2
arpanghoshal merged 1 commit into
mainfrom
tooling/badge-row

Conversation

@arpanghoshal

@arpanghoshal arpanghoshal commented Sep 11, 2026

Copy link
Copy Markdown
Member

What

The generator behind the README badge row (companion to CTRLRun/ctrlrun#137, which carries the paste), and a link-checker fix the new row needed.

Row: clones · pypi · downloads · docs · CI · CodeQL · fuzz · tests · CTRLRun verified · Scorecard · license

Changes

  • tools/docs_audit/render_badges.py: Clones (shields endpoint on the badges branch, linked to clones-history.json), Downloads (pypistats, per month) and Fuzz (the existing workflow) added; Python versions, Ruff and mypy --strict removed. The docstring records why, what each count measures, and that scripts/check.sh still enforces what the two static badges asserted. Stars stay out.
  • tools/docs_audit/links.py: blob/<ref>/<path> was resolved against the worktree for every ref, so the clones receipt on the orphan badges branch was reported broken. Refs no checkout holds are now skipped; a missing path on main still fails.
  • tests/test_docs_audit.py: the test for that, both halves.
  • generated/badges.readme.md: regenerated.

Checks

Full docs suite: 1575 passed. render_badges.py --check clean against the README in CTRLRun/ctrlrun#137. ruff format and check clean.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added Clones, Downloads, and Fuzz badges to the documentation badge row.
    • Added a link to clone history and displayed PyPI download statistics.
  • Updates

    • Reordered and resized documentation badges for a more focused presentation.
    • Removed the Python versions, Ruff, and mypy badges.
  • Bug Fixes

    • Documentation link auditing now skips links targeting the detached badges branch while continuing to report broken links on active branches.

…nd mypy dropped

render_badges.py is the source of the README's row; this is the list, the
render under generated/, and the docstring's reasons. Stars stay out. The two
adoption counts name what they measure and link to the data: downloads is
pypistats per month, an upper bound because mirrors and CI install too; clones
is summed from clones-history.json on the badges branch, which
ctrlrun/.github/workflows/traffic.yml writes daily from the traffic API, and
this repository's own CI is in that figure because actions/checkout is a
clone. fuzz is the workflow test_fuzzing already requires.

pypi/pyversions, ruff and mypy --strict are removed, and the docstring says
why and that scripts/check.sh still enforces what the two static ones
asserted.

links.py resolved blob/badges/... against the worktree and called the clones
receipt broken; a ref no checkout holds is now skipped, with a test that also
requires a missing path on main to stay broken.
@mintlify

mintlify Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
ctrlrun 🟢 Ready View Preview Sep 11, 2026, 2:57 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 9ed65980-b7e8-42c4-b105-b1d8a2633ae2

📥 Commits

Reviewing files that changed from the base of the PR and between b0ba5fc and 5693a65.

⛔ Files ignored due to path filters (1)
  • generated/badges.readme.md is excluded by !**/generated/**
📒 Files selected for processing (3)
  • tests/test_docs_audit.py
  • tools/docs_audit/links.py
  • tools/docs_audit/render_badges.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The badge row adds clone, download, and fuzz badges and removes several existing badges. The documentation link auditor now skips absolute GitHub links that target the detached badges ref. Tests cover detached and held refs.

Changes

Badge rendering and audit behavior

Layer / File(s) Summary
Update badge definitions
tools/docs_audit/render_badges.py
The badge documentation and row add Clones, Downloads, and Fuzz badges. The row removes Python versions, Ruff, and Checked with mypy --strict badges.
Skip detached badge references
tools/docs_audit/links.py, tests/test_docs_audit.py
The auditor captures the GitHub ref and skips links to the detached badges ref. Tests verify that badges links are skipped while a missing path on main remains broken.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant BadgeRenderer
  participant DocsAudit
  participant GitHubResolver
  BadgeRenderer->>DocsAudit: Emit badge links
  DocsAudit->>GitHubResolver: Resolve GitHub URL ref
  GitHubResolver-->>DocsAudit: Skip badges ref
  GitHubResolver-->>DocsAudit: Report missing main path
Loading

Merge Risk: ⚪ Minimal · up to 5693a

The badge updates and detached-reference handling are covered by the updated audit behavior and tests, with no unresolved merge risk identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main badge-row changes, including the badges added and removed. It is directly related to the pull request objectives.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tooling/badge-row

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@arpanghoshal
arpanghoshal merged commit a967fe8 into main Sep 11, 2026
2 of 3 checks passed
@arpanghoshal
arpanghoshal deleted the tooling/badge-row branch September 11, 2026 15:01
arpanghoshal added a commit to CTRLRun/ctrlrun that referenced this pull request Sep 11, 2026
…y dropped (#137)

The row generated in ctrlrun-docs, the test that pins it, and the workflow
behind the one number this repository produces itself.

clones has no public source: the traffic API needs push access and keeps
fourteen days. traffic.yml reads it daily with TRAFFIC_TOKEN, merges each day
into clones-history.json on the badges branch by date (assignment, not
addition, so a re-run cannot double-count), and writes clones-badge.json from
the sum. Absent the secret it warns and exits 0. actions/checkout is a git
clone, so this repository's own CI is in the figure, and the generator's
docstring says so.

downloads is pypistats per month, an upper bound. fuzz is the workflow
test_fuzzing already requires on every push.

Removed: pypi/pyversions, ruff and mypy --strict. scripts/check.sh still runs
all three and CI still has to call it; the test now requires their absence so
a row that grew back fails.

Review raised that traffic.yml and the badge job in ci.yml both publish to the
badges branch unserialized. Both now share the badges-branch concurrency
group, and traffic.yml retries by re-applying its days onto the newer head.

Generator and link-checker fix: CTRLRun/ctrlrun-docs#2.
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