coverage

The code coverage tool for Python

https://github.com/nedbat/coveragepy

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    6 of 192 committers (3.1%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.5%) to scientific vocabulary

Keywords from Contributors

closember unit-testing static-analysis code-quality pep8 static-code-analysis flexible alignment fuzzing autopep8
Last synced: 10 months ago · JSON representation

Repository

The code coverage tool for Python

Basic Info
Statistics
  • Stars: 3,233
  • Watchers: 36
  • Forks: 456
  • Open Issues: 250
  • Releases: 299
Created about 8 years ago · Last pushed 10 months ago
Metadata Files
Readme Changelog Funding License Code of conduct Citation Security

README.rst

.. Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
.. For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt

===========
Coverage.py
===========

Code coverage measurement for Python.

.. image:: https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg
    :target: https://vshymanskyy.github.io/StandWithUkraine
    :alt: Stand with Ukraine

-------------

|  |kit| |license| |versions|
|  |test-status| |quality-status| |docs| |metacov|
|  |tidelift| |sponsor| |stars| |mastodon-coveragepy| |mastodon-nedbat|
   |bluesky-nedbat|

Coverage.py measures code coverage, typically during test execution. It uses
the code analysis tools and tracing hooks provided in the Python standard
library to determine which lines are executable, and which have been executed.

Coverage.py runs on these versions of Python:

.. PYVERSIONS

* Python 3.9 through 3.14 rc2, including free-threading.
* PyPy3 versions 3.9, 3.10, and 3.11.

Documentation is on `Read the Docs`_.  Code repository and issue tracker are on
`GitHub`_.

.. _Read the Docs: https://coverage.readthedocs.io/
.. _GitHub: https://github.com/nedbat/coveragepy

**New in 7.x:**
``[run] patch`` setting;
``--save-signal`` option;
``[run] core`` setting;
``[run] source_dirs`` setting;
``Coverage.branch_stats()``;
multi-line exclusion patterns;
function/class reporting;
experimental support for sys.monitoring;
dropped support for Python 3.7 and 3.8;
added ``Coverage.collect()`` context manager;
improved data combining;
``[run] exclude_also`` setting;
``report --format=``;
type annotations.

**New in 6.x:**
dropped support for Python 2.7, 3.5, and 3.6;
write data on SIGTERM;
added support for 3.10 match/case statements.


For Enterprise
--------------

.. |tideliftlogo| image:: https://nedbatchelder.com/pix/Tidelift_Logo_small.png
   :alt: Tidelift
   :target: https://tidelift.com/subscription/pkg/pypi-coverage?utm_source=pypi-coverage&utm_medium=referral&utm_campaign=readme

.. list-table::
   :widths: 10 100

   * - |tideliftlogo|
     - `Available as part of the Tidelift Subscription. `_
       Coverage and thousands of other packages are working with
       Tidelift to deliver one enterprise subscription that covers all of the open
       source you use.  If you want the flexibility of open source and the confidence
       of commercial-grade software, this is for you.
       `Learn more. `_


Getting Started
---------------

Looking to run ``coverage`` on your test suite? See the `Quick Start section`_
of the docs.

.. _Quick Start section: https://coverage.readthedocs.io/#quick-start


Change history
--------------

The complete history of changes is on the `change history page`_.

.. _change history page: https://coverage.readthedocs.io/en/latest/changes.html


Code of Conduct
---------------

Everyone participating in the coverage.py project is expected to treat other
people with respect and to follow the guidelines articulated in the `Python
Community Code of Conduct`_.

.. _Python Community Code of Conduct: https://www.python.org/psf/codeofconduct/


Contributing
------------

Found a bug? Want to help improve the code or documentation? See the
`Contributing section`_ of the docs.

.. _Contributing section: https://coverage.readthedocs.io/en/latest/contributing.html


Security
--------

To report a security vulnerability, please use the `Tidelift security
contact`_.  Tidelift will coordinate the fix and disclosure.

.. _Tidelift security contact: https://tidelift.com/security


License
-------

Licensed under the `Apache 2.0 License`_.  For details, see `NOTICE.txt`_.

.. _Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0
.. _NOTICE.txt: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt


.. |test-status| image:: https://github.com/nedbat/coveragepy/actions/workflows/testsuite.yml/badge.svg?branch=master&event=push
    :target: https://github.com/nedbat/coveragepy/actions/workflows/testsuite.yml
    :alt: Test suite status
.. |quality-status| image:: https://github.com/nedbat/coveragepy/actions/workflows/quality.yml/badge.svg?branch=master&event=push
    :target: https://github.com/nedbat/coveragepy/actions/workflows/quality.yml
    :alt: Quality check status
.. |docs| image:: https://readthedocs.org/projects/coverage/badge/?version=latest&style=flat
    :target: https://coverage.readthedocs.io/
    :alt: Documentation
.. |kit| image:: https://img.shields.io/pypi/v/coverage
    :target: https://pypi.org/project/coverage/
    :alt: PyPI status
.. |versions| image:: https://img.shields.io/pypi/pyversions/coverage.svg?logo=python&logoColor=FBE072
    :target: https://pypi.org/project/coverage/
    :alt: Python versions supported
.. |license| image:: https://img.shields.io/pypi/l/coverage.svg
    :target: https://pypi.org/project/coverage/
    :alt: License
.. |metacov| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/nedbat/8c6980f77988a327348f9b02bbaf67f5/raw/metacov.json
    :target: https://nedbat.github.io/coverage-reports/latest.html
    :alt: Coverage reports
.. |tidelift| image:: https://tidelift.com/badges/package/pypi/coverage
    :target: https://tidelift.com/subscription/pkg/pypi-coverage?utm_source=pypi-coverage&utm_medium=referral&utm_campaign=readme
    :alt: Tidelift
.. |stars| image:: https://img.shields.io/github/stars/nedbat/coveragepy.svg?logo=github&style=flat
    :target: https://github.com/nedbat/coveragepy/stargazers
    :alt: GitHub stars
.. |mastodon-nedbat| image:: https://img.shields.io/badge/dynamic/json?style=flat&labelColor=450657&logo=mastodon&logoColor=ffffff&label=@nedbat&query=followers_count&url=https%3A%2F%2Fhachyderm.io%2Fapi%2Fv1%2Faccounts%2Flookup%3Facct=nedbat
    :target: https://hachyderm.io/@nedbat
    :alt: nedbat on Mastodon
.. |mastodon-coveragepy| image:: https://img.shields.io/badge/dynamic/json?style=flat&labelColor=450657&logo=mastodon&logoColor=ffffff&label=@coveragepy&query=followers_count&url=https%3A%2F%2Fhachyderm.io%2Fapi%2Fv1%2Faccounts%2Flookup%3Facct=coveragepy
    :target: https://hachyderm.io/@coveragepy
    :alt: coveragepy on Mastodon
.. |bluesky-nedbat| image:: https://img.shields.io/badge/dynamic/json?style=flat&color=96a3b0&labelColor=3686f7&logo=icloud&logoColor=white&label=@nedbat&url=https%3A%2F%2Fpublic.api.bsky.app%2Fxrpc%2Fapp.bsky.actor.getProfile%3Factor=nedbat.com&query=followersCount
    :target: https://bsky.app/profile/nedbat.com
    :alt: nedbat on Bluesky
.. |sponsor| image:: https://img.shields.io/badge/%E2%9D%A4-Sponsor%20me-brightgreen?style=flat&logo=GitHub
    :target: https://github.com/sponsors/nedbat
    :alt: Sponsor me on GitHub

Owner

  • Name: Ned Batchelder
  • Login: nedbat
  • Kind: user
  • Location: Boston

Committers

Last synced: 11 months ago

All Time
  • Total Commits: 6,808
  • Total Committers: 192
  • Avg Commits per committer: 35.458
  • Development Distribution Score (DDS): 0.071
Past Year
  • Commits: 450
  • Committers: 23
  • Avg Commits per committer: 19.565
  • Development Distribution Score (DDS): 0.131
Top Committers
Name Email Commits
Ned Batchelder n****d@n****m 6,323
dependabot[bot] 4****] 71
Stephan Richter s****r@g****m 21
loic@dachary.org l****c@d****g 17
Daniel Hahler g****t@t****e 15
devdanzin 7****n 15
Hugo van Kemenade h****k 13
Ionel Cristian Maries c****t@i****o 12
garar n****e@n****e 10
David Stanek d****k@d****m 10
Ben Finney b****n@b****u 9
Brett Cannon b****t@p****g 8
Jon Dufresne j****e@g****m 8
Buck Golemon b****k@y****m 6
Andrew Hoos a****s@g****m 6
Marc Abramowitz m****c@m****m 5
Ned Batchelder n****d@g****n 5
Danny Allen d****n@p****k 5
Dan Wandschneider d****r@s****m 5
Michał Górny m****y@g****g 4
Olivier Grisel o****l@e****g 4
Steve s****6@g****m 4
holger krekel h****r@m****u 4
Matthew Boehm b****w@g****m 4
Christine Lytwynec c****c@g****m 4
Ben Finney b****n@b****u 4
Chris Rose c****s@a****m 4
rozza@x103086.gcapmedia.com r****a@x****m 4
pankajp p****6@g****m 3
Ville Skyttä v****a@i****i 3
and 162 more...

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 412
  • Total pull requests: 306
  • Average time to close issues: over 1 year
  • Average time to close pull requests: 3 months
  • Total issue authors: 274
  • Total pull request authors: 77
  • Average comments per issue: 4.76
  • Average comments per pull request: 2.14
  • Merged pull requests: 186
  • Bot issues: 1
  • Bot pull requests: 130
Past Year
  • Issues: 108
  • Pull requests: 136
  • Average time to close issues: 6 days
  • Average time to close pull requests: 3 days
  • Issue authors: 84
  • Pull request authors: 25
  • Average comments per issue: 2.16
  • Average comments per pull request: 1.67
  • Merged pull requests: 84
  • Bot issues: 1
  • Bot pull requests: 79
Top Authors
Issue Authors
  • nedbat (63)
  • gaborbernat (7)
  • zackw (7)
  • ssbarnea (6)
  • AkashKumar7902 (6)
  • mgorny (5)
  • oerp-odoo (4)
  • webknjaz (3)
  • freakboy3742 (3)
  • graingert (3)
  • luoyue2087 (3)
  • neutrinoceros (3)
  • WeiMengXS (3)
  • xqt (3)
  • altendky (3)
Pull Request Authors
  • dependabot[bot] (129)
  • devdanzin (22)
  • hugovk (13)
  • alex (7)
  • zackw (6)
  • graingert (5)
  • nickdrozd (4)
  • kumaraditya303 (4)
  • mgorny (4)
  • AA-Turner (4)
  • LiuYinCarl (4)
  • webknjaz (4)
  • blueyed (3)
  • nedbat (3)
  • marcgibbons (3)
Top Labels
Issue Labels
bug (273) enhancement (105) fixed (27) question (25) needs triage (25) support (24) html (13) exotic (12) not a bug (11) docs (8) branch (8) xml (7) cant reproduce (6) duplicate (6) wontfix (6) not our bug (6) cpython (5) good first (5) exclude (3) install (3) annotate (3) subprocess (3) api (3) build (3) report (2) concurrency (2) run (2) multiprocessing (2) performance (2) opinions needed (2)
Pull Request Labels
dependencies (129) github_actions (37) bug (1) fixed (1)

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 129,052,643 last-month
  • Total docker downloads: 3,488,325,382
  • Total dependent packages: 5,881
    (may contain duplicates)
  • Total dependent repositories: 142,523
    (may contain duplicates)
  • Total versions: 205
  • Total maintainers: 2
pypi.org: coverage

Code coverage measurement for Python

  • Versions: 171
  • Dependent Packages: 5,864
  • Dependent Repositories: 142,083
  • Downloads: 129,052,643 Last month
  • Docker Downloads: 3,488,325,382
Rankings
Dependent packages count: 0.0%
Dependent repos count: 0.0%
Downloads: 0.0%
Docker downloads count: 0.0%
Average: 0.9%
Stargazers count: 2.0%
Forks count: 3.5%
Maintainers (1)
Funding
  • https://tidelift.com/subscription/pkg/pypi-coverage?utm_source=pypi-coverage&utm_medium=referral&utm_campaign=pypi
Last synced: 10 months ago
spack.io: py-coverage

Testing coverage checker for python

  • Versions: 12
  • Dependent Packages: 15
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Average: 3.5%
Dependent packages count: 4.4%
Stargazers count: 4.6%
Forks count: 5.0%
Maintainers (1)
Last synced: 10 months ago
anaconda.org: coverage

Coverage.py is a tool for measuring code coverage of Python programs. It monitors your program, noting which parts of the code have been executed, then analyzes the source to identify code that could have been executed but was not. Coverage measurement is typically used to gauge the effectiveness of tests. It can show which parts of your code are being exercised by tests, and which are not.

  • Versions: 22
  • Dependent Packages: 2
  • Dependent Repositories: 440
Rankings
Dependent repos count: 8.0%
Average: 15.6%
Stargazers count: 16.3%
Forks count: 17.7%
Dependent packages count: 20.5%
Last synced: 10 months ago