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.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distributions

coverage_badge-0.1.2-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

coverage_badge-0.1.2-py2-none-any.whl (6.2 kB view details)

Uploaded Python 2

File details

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

File metadata

File hashes

Hashes for coverage-badge-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f079aea2a406ccd011390eee0e3d2cc3f058f4161e7f74c86e89a9b148f04d16
MD5 7753bd1315151ec21a348930d9c16978
BLAKE2b-256 f39cfceb82bf743e4ebf38dd0a0a1c8e3f7099ecb9758c94a8ec9084b9763ea5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for coverage_badge-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 73fc4b01276010f01e5a0689cd30f167ed5c52cb4a8f0dc8f2201e50ee8c9019
MD5 5951fad79fb2b24fbc2e6f9039612a3c
BLAKE2b-256 a4df2380ca7b126df1c08ec8cb0f7d074f7dbdd6475d82b34c67c94014b2fcde

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for coverage_badge-0.1.2-py2-none-any.whl
Algorithm Hash digest
SHA256 bb0d795584a98025e8a2b33f1b02bfcc1f35c9f4486c52c921a815bfc8209167
MD5 d8aa90b572f37b3d25a6f2542927d3c2
BLAKE2b-256 fe6f9bc00d68a7e27b13003a36623511683e3973078c0e9f870d330bfc52e4e0

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