Skip to content

ci: generate the coverage badge with genbadge - #358

Merged
F1uctus merged 2 commits into
mainfrom
chore/replace-coverage-badge
Jul 29, 2026
Merged

ci: generate the coverage badge with genbadge#358
F1uctus merged 2 commits into
mainfrom
chore/replace-coverage-badge

Conversation

@F1uctus

@F1uctus F1uctus commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Unblocks #347 (setuptools 80.10.1 → 83.0.0), which currently fails the Coverage job with ModuleNotFoundError: No module named 'pkg_resources'.

Why it cannot just be pinned around. setuptools removed the bundled pkg_resources in 82.0.0, and coverage_badge/__main__.py imports it at module scope (pkg_resources.resource_string for its SVG template). The open advisory on this repo, GHSA-h35f-9h28-mq5c, is first patched in 83.0.0 — so no setuptools version is both patched and compatible with coverage-badge.

Why not wait for upstream. coverage-badge's last release is 1.1.2 (August 2024); dbrgn/coverage-badge#33 ("pkg_resources removed from Setuptools in v82.0.0") and #35 are both open and untouched.

genbadge reads the same coverage.xml, writes the same shields-style SVG, and was last released 2025-11-24. The badge label goes from coverage 85% to coverage: 84.67% — that is the only user-visible change.

Verified locally with setuptools 83.0.0 actually installed: badge generation, the coverage-plot step, ty check ttc, and all 69 tests pass.

Once this lands, #347 becomes redundant — the lock here already carries setuptools 83.0.0.

https://claude.ai/code/session_01CqqB29TdAZ183MjNnpkTFD

@semanticdiff-com

semanticdiff-com Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  assets/coverage-map.svg  100% smaller
  assets/coverage.svg  78% smaller
  .github/workflows/coverage.yml  0% smaller
  pyproject.toml Unsupported file format
  uv.lock Unsupported file format

@github-actions

Copy link
Copy Markdown
Contributor

Coverage Report

Coverage Map

setuptools 82.0.0 removed the bundled `pkg_resources`, and coverage-badge
imports it at module scope, so the "Generate Coverage Badge" step dies
with ModuleNotFoundError as soon as setuptools is bumped past 81. That is
what fails dependabot's setuptools 83.0.0 PR (#347), which we want:
GHSA-h35f-9h28-mq5c is only fixed in 83.0.0, so there is no version of
setuptools that is both patched and compatible with coverage-badge.

coverage-badge cannot be waited on — its last release is 1.1.2 from
August 2024 and the upstream reports (dbrgn/coverage-badge#33, #35) are
open and untouched. genbadge reads the same coverage.xml, emits the same
shields-style SVG, and was last released in November 2025.

Verified locally with setuptools 83.0.0 installed: badge generation,
coverage-plot, `ty check ttc` and all 69 tests pass.
@F1uctus
F1uctus force-pushed the chore/replace-coverage-badge branch from f49a5b1 to e33f532 Compare July 29, 2026 16:25
@F1uctus
F1uctus merged commit 82784e4 into main Jul 29, 2026
@F1uctus
F1uctus deleted the chore/replace-coverage-badge branch July 29, 2026 16:35
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