coverage-badge


Namecoverage-badge JSON
Version 1.1.2 PyPI version JSON
download
home_pagehttps://github.com/dbrgn/coverage-badge
SummaryGenerate coverage badges for Coverage.py.
upload_time2024-08-02 23:34:08
maintainerNone
docs_urlNone
authorDanilo Bargen
requires_pythonNone
licenseMIT
keywords coverage badge shield
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            Coverage.py Badge
==================

.. |buildstatus| image:: https://github.com/dbrgn/coverage-badge/workflows/CI/badge.svg
    :alt: Build status
    :target: https://github.com/dbrgn/coverage-badge/actions?query=branch%3Amain
.. |downloads| image:: https://img.shields.io/pypi/dm/coverage-badge.svg
    :alt: PyPI Downloads
    :target: https://pypi.python.org/pypi/coverage-badge
.. |example| image:: https://cdn.rawgit.com/dbrgn/coverage-badge/main/example.svg
    :alt: Example coverage badge

|buildstatus| |downloads|

   ⚠️ coverage-badge is in maintenance mode. I might still do occasional updates
   and fixes from time to time, but there will be no added features. Most
   people using coverage-badge might want to use genbadge_ instead, which has
   more features (e.g. test badges, flake8 reports, etc).

A small script to generate coverage badges using Coverage.py.

Example of a generated badge: |example|

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.)

.. _shields.io: http://shields.io/
.. _genbadge: https://smarie.github.io/python-genbadge/

Installation
------------
Run:

.. code-block::
    
    pip install coverage-badge


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.

Different colors for cover ranges:

.. image:: https://cdn.rawgit.com/dbrgn/coverage-badge/main/media/15.svg
    :alt: 15%

.. image:: https://cdn.rawgit.com/dbrgn/coverage-badge/main/media/45.svg
    :alt: 45%

.. image:: https://cdn.rawgit.com/dbrgn/coverage-badge/main/media/65.svg
    :alt: 65%

.. image:: https://cdn.rawgit.com/dbrgn/coverage-badge/main/media/80.svg
    :alt: 80%

.. image:: https://cdn.rawgit.com/dbrgn/coverage-badge/main/media/93.svg
    :alt: 93%

.. image:: https://cdn.rawgit.com/dbrgn/coverage-badge/main/media/97.svg
    :alt: 97%

----

The full usage text::

    usage: __main__.py [-h] [-o FILEPATH] [-p] [-f] [-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.
      -p           Plain color mode. Standard green badge.
      -f           Force overwrite image, use with -o key.
      -q           Don't output any non-error messages.
      -v           Show version.

License
-------

MIT License, see `LICENSE.txt` file..

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dbrgn/coverage-badge",
    "name": "coverage-badge",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "coverage badge shield",
    "author": "Danilo Bargen",
    "author_email": "mail@dbrgn.ch",
    "download_url": "https://files.pythonhosted.org/packages/be/8f/e92b0a010c76b0da82709838b3f3ae9aec638d0c44dbfb1186a5751f5d2e/coverage_badge-1.1.2.tar.gz",
    "platform": null,
    "description": "Coverage.py Badge\n==================\n\n.. |buildstatus| image:: https://github.com/dbrgn/coverage-badge/workflows/CI/badge.svg\n    :alt: Build status\n    :target: https://github.com/dbrgn/coverage-badge/actions?query=branch%3Amain\n.. |downloads| image:: https://img.shields.io/pypi/dm/coverage-badge.svg\n    :alt: PyPI Downloads\n    :target: https://pypi.python.org/pypi/coverage-badge\n.. |example| image:: https://cdn.rawgit.com/dbrgn/coverage-badge/main/example.svg\n    :alt: Example coverage badge\n\n|buildstatus| |downloads|\n\n   \u26a0\ufe0f coverage-badge is in maintenance mode. I might still do occasional updates\n   and fixes from time to time, but there will be no added features. Most\n   people using coverage-badge might want to use genbadge_ instead, which has\n   more features (e.g. test badges, flake8 reports, etc).\n\nA small script to generate coverage badges using Coverage.py.\n\nExample of a generated badge: |example|\n\nThe badge template has been taken from shields.io_, therefore it should look\nmostly good. (The spec is a bit stricter on the margins, but I can't easily do\ntext width calculations in Python so the margins might not always be 4px.)\n\n.. _shields.io: http://shields.io/\n.. _genbadge: https://smarie.github.io/python-genbadge/\n\nInstallation\n------------\nRun:\n\n.. code-block::\n    \n    pip install coverage-badge\n\n\nUsage\n-----\n\nFirst, run Coverage.py to generate the necessary coverage data. Then you can\neither return the badge SVG to stdout::\n\n    $ coverage-badge\n\n...or write it to a file::\n\n    $ coverage-badge -o coverage.svg\n\nIt's important that you run ``coverage-badge`` from the directory where the\n``.coverage`` data file is located.\n\nDifferent colors for cover ranges:\n\n.. image:: https://cdn.rawgit.com/dbrgn/coverage-badge/main/media/15.svg\n    :alt: 15%\n\n.. image:: https://cdn.rawgit.com/dbrgn/coverage-badge/main/media/45.svg\n    :alt: 45%\n\n.. image:: https://cdn.rawgit.com/dbrgn/coverage-badge/main/media/65.svg\n    :alt: 65%\n\n.. image:: https://cdn.rawgit.com/dbrgn/coverage-badge/main/media/80.svg\n    :alt: 80%\n\n.. image:: https://cdn.rawgit.com/dbrgn/coverage-badge/main/media/93.svg\n    :alt: 93%\n\n.. image:: https://cdn.rawgit.com/dbrgn/coverage-badge/main/media/97.svg\n    :alt: 97%\n\n----\n\nThe full usage text::\n\n    usage: __main__.py [-h] [-o FILEPATH] [-p] [-f] [-q] [-v]\n\n    Generate coverage badges for Coverage.py.\n\n    optional arguments:\n      -h, --help   show this help message and exit\n      -o FILEPATH  Save the file to the specified path.\n      -p           Plain color mode. Standard green badge.\n      -f           Force overwrite image, use with -o key.\n      -q           Don't output any non-error messages.\n      -v           Show version.\n\nLicense\n-------\n\nMIT License, see `LICENSE.txt` file..\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Generate coverage badges for Coverage.py.",
    "version": "1.1.2",
    "project_urls": {
        "Homepage": "https://github.com/dbrgn/coverage-badge"
    },
    "split_keywords": [
        "coverage",
        "badge",
        "shield"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "903d5642a1a06191b2e1e0f87a2e824e6d3eb7c32c589a68ed4d1dcbd3324d63",
                "md5": "0203217ed9ea72b1d0c9b45d7c982dd2",
                "sha256": "d8413ce51c91043a1692b943616b450868cbeeb0ea6a0c54a32f8318c9c96ff7"
            },
            "downloads": -1,
            "filename": "coverage_badge-1.1.2-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0203217ed9ea72b1d0c9b45d7c982dd2",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 6493,
            "upload_time": "2024-08-02T23:34:07",
            "upload_time_iso_8601": "2024-08-02T23:34:07.063444Z",
            "url": "https://files.pythonhosted.org/packages/90/3d/5642a1a06191b2e1e0f87a2e824e6d3eb7c32c589a68ed4d1dcbd3324d63/coverage_badge-1.1.2-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "be8fe92b0a010c76b0da82709838b3f3ae9aec638d0c44dbfb1186a5751f5d2e",
                "md5": "bd44ca36f09f7105e829f58d13296f1d",
                "sha256": "fe7ed58a3b72dad85a553b64a99e963dea3847dcd0b8ddd2b38a00333618642c"
            },
            "downloads": -1,
            "filename": "coverage_badge-1.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "bd44ca36f09f7105e829f58d13296f1d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6335,
            "upload_time": "2024-08-02T23:34:08",
            "upload_time_iso_8601": "2024-08-02T23:34:08.580014Z",
            "url": "https://files.pythonhosted.org/packages/be/8f/e92b0a010c76b0da82709838b3f3ae9aec638d0c44dbfb1186a5751f5d2e/coverage_badge-1.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-02 23:34:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dbrgn",
    "github_project": "coverage-badge",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "lcname": "coverage-badge"
}
        
Elapsed time: 9.42063s