Skip to main content

PR-first code coverage report generator with modern UI

Project description

Covisible

PR-first code coverage report generator with modern UI

Covisible generates beautiful, interactive coverage reports focused on what matters: your PR changes.

Features

  • PR-first view — Shows coverage for new/modified lines, not the entire repo
  • Diff-based analysis — Integrates with git diff to highlight what changed
  • Modern UI — Dark/light theme, interactive charts, instant search
  • Smart summary — "−1.3% coverage, 3 new uncovered lines" instead of "83.42%"
  • 1-click drill-down — PR → file → function → line
  • Baseline comparison — Compare current coverage with previous runs

Installation

pip install covisible

Or install from source:

git clone https://github.com/LaGrunge/covisible
cd covisible
pip install -e ".[dev]"

Usage

Covisible is a command group. The main command is report; diff, files, and summary are console-only helpers. Coverage input is auto-detected: .json (and *.gcov.json) is parsed as gcov JSON, everything else as LCOV .info.

Generate a report (PR coverage)

covisible report \
  --current coverage.info \
  --baseline baseline.info \
  --git-diff HEAD~1..HEAD \
  --output report/ \
  --format both

Without --git-diff/--diff-file you get a whole-project report; with one of them the report focuses on new/modified lines.

Generate gcov JSON coverage

# After running tests with coverage enabled
find . -name "*.gcno" -exec gcov --json-format {} \;
# Or use gcov on specific files
gcov --json-format --stdout myfile.cpp > coverage.json

report options

Option Description
-c, --current Current coverage file (gcov JSON or lcov.info) — required
-b, --baseline Baseline coverage for comparison (optional)
--git-diff Git diff range (e.g., main..HEAD)
--diff-file Path to unified diff file
-o, --output Output directory for HTML report (default: coverage-report/)
--format Output format: html, json, or both (default: html)
--repo Path to git repository (for --git-diff / title)
--title Report title (default: Covisible: <project>)
--blame / --no-blame Include git blame analysis for uncovered code
--exclude GLOB Glob of files to exclude (repeatable, e.g. --exclude '*_test.cpp')
--ignore-config Path to an ignore config (YAML/JSON) with exclude/include/line_markers

Other commands

# CodeCov-style coverage diff (console), optional markdown brief for CI comments
covisible diff coverage_new.info -b coverage_old.info --markdown brief.md

# List files by coverage
covisible files coverage.info --sort uncovered --limit 20

# One-file summary
covisible summary coverage.info

Excluding files and lines

Pass --exclude one or more times, or point --ignore-config at a YAML/JSON file:

# covisible-ignore.yaml
ignore:
  exclude:
    - "*_test.cpp"
    - "third_party/*"
  line_markers:
    - "// LCOV_EXCL_LINE"
    - "# pragma: no cover"

Excluded files are dropped from the report; lines matched by a marker (or a LCOV_EXCL_START/STOP block) are removed from their file's coverage.

Development

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Lint
ruff check src tests
mypy src

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

covisible-0.1.0.tar.gz (338.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

covisible-0.1.0-py3-none-any.whl (340.7 kB view details)

Uploaded Python 3

File details

Details for the file covisible-0.1.0.tar.gz.

File metadata

  • Download URL: covisible-0.1.0.tar.gz
  • Upload date:
  • Size: 338.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for covisible-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bb25d909f5d1fc1c99f56d9bd76f990cfe0af9047c4734fd96ec34e05afa3115
MD5 1fafcb816f9cea6955978adade7e6c64
BLAKE2b-256 31d99b0ba024be0a8acc00f8f4926fe01195af58c0d9c113e844f0ff45e7b704

See more details on using hashes here.

File details

Details for the file covisible-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: covisible-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 340.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for covisible-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 22c363f09d8fb4bb0f0b0cc58036be3f66a3d5aa4262944e120168f31779bc1b
MD5 1999a1f8f6dfba7a28e87b4216aaea18
BLAKE2b-256 2851129f8cfc528982a04f8337733777eec95934f5a23a121c485bfee0a7bc15

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page