coverage-analyzer

Solid

Parse coverage.py XML reports (coverage.xml) into a human-readable coverage analysis: total line/branch percent, files with zero coverage, worst-10 ranking, delta vs a stored JSON baseline, and a PASS/FAIL verdict against an optional threshold. Stdlib-only Python script (xml.etree.ElementTree, json, argparse) that closes the loop after test-generator.

AI & Automation 5 stars 0 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 80/100

Stars 20%
26
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Coverage Analyzer — coverage.py XML → readable analysis Load this skill when you need to **turn a `coverage.xml` report into a human-readable coverage analysis**: overall line/branch percent, files with zero coverage, the 10 worst-covered files, a delta vs a previously stored baseline, and a PASS/FAIL verdict against a threshold for CI. The analyzer is **pure Python 3 stdlib** (`xml.etree.ElementTree`, `json`, `argparse`) — no dependencies, no network. It reads the exact XML format that [coverage.py](https://coverage.readthedocs.io/) emits via `coverage xml` (Cobertura-style DTD), so it works with any tool that produces that format (`pytest-cov --cov-report=xml`, `coverage run -m pytest && coverage xml`). --- ## The analyzer script `scripts/coverage_analyzer.py` — pure Python 3 stdlib (no dependencies). | Mode | Command | |---|---| | Basic analysis | `python3 coverage_analyzer.py --xml coverage.xml` | | Delta vs stored baseline | `python3 coverage_analyzer.py --xml coverage.xml --baseline baseline.json` | | Threshold gate (CI) | `python3 coverage_analyzer.py --xml coverage.xml --threshold 80` | | Store current totals as baseline | `python3 coverage_analyzer.py --xml coverage.xml --save-baseline baseline.json` | ### Output sections - **Total** — `line-rate` (and `branch-rate` when branches were actually measured; a `branch-rate="0"` with `branches-valid="0"` is treated as "not measured", not as 0%), file count, `files_with_zero_lines` (files with line-rate == 0...

Details

Author
bestdeejay-design
Repository
bestdeejay-design/agent-skills
Created
1 weeks ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category