Skip to main content

Generate coverage badges for Coverage.py.

Project description

Build status PyPI Downloads

A small script to generate coverage badges using Coverage.py. Example of a generated badge:

Example coverage badge

The badge template has been taken from shields.io, therefore it should look mostly good. (The spec is a bit stricter on the margins, but I can’t easily do text width calculations in Python so the margins might not always be 4px.)

Usage

First, run Coverage.py to generate the necessary coverage data. Then you can either return the badge SVG to stdout:

$ coverage-badge

…or write it to a file:

$ coverage-badge -o coverage.svg

It’s important that you run coverage-badge from the directory where the .coverage data file is located.

The full usage text:

usage: __main__.py [-h] [-o FILEPATH] [-q] [-v]

Generate coverage badges for Coverage.py.

optional arguments:
  -h, --help   show this help message and exit
  -o FILEPATH  Save the file to the specified path.
  -q           Don't output any non-error messages.
  -v           Show version.

License

MIT License, see LICENSE.txt file..

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

coverage-badge-0.1.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distributions

coverage_badge-0.1.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

coverage_badge-0.1.1-py2-none-any.whl (6.1 kB view details)

Uploaded Python 2

File details

Details for the file coverage-badge-0.1.1.tar.gz.

File metadata

File hashes

Hashes for coverage-badge-0.1.1.tar.gz
Algorithm Hash digest
SHA256 283a3c05197a930afc57e4e4424adb262206120d91aa4420843186e29b7f5bd5
MD5 72a559e23feaceaf6346adfb659b9f6a
BLAKE2b-256 f2cf29f3934625ed9f8845d9deac7d1f99fde725d8ae6135a03e69a51619cc19

See more details on using hashes here.

File details

Details for the file coverage_badge-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for coverage_badge-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 be51406041316cc11a732c861f9e1b51dce51b8d83b5a4b5b324edae068d67d7
MD5 db127b8a193737b4f9f8b0df4020578f
BLAKE2b-256 a51761a8ae4b118172fffe81e3fedb0ec88e8d4fc2f531a08559f9ec994ed428

See more details on using hashes here.

File details

Details for the file coverage_badge-0.1.1-py2-none-any.whl.

File metadata

File hashes

Hashes for coverage_badge-0.1.1-py2-none-any.whl
Algorithm Hash digest
SHA256 e78b95d6030abb0f6427f2e1840f40378a481ba4f36b1dcbad62c543625dfed4
MD5 97d890594029d52fd02bdb8e9a06990a
BLAKE2b-256 a98184ff5210c5de9f61f0c60867aeb99eac657ebee3de5af871c3ed82eda422

See more details on using hashes here.

Supported by

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