Skip to main content

doc-cov

doc-cov is a tool for measuring docstring coverage of Python project.

  • Python versions >= 3.6

Quick start

  1. Install doc-cov from pip.
  2. Use doccov PROJECT_PATH
$ doccov tests/sample_project
function     3 /   5 60.00%

Options

Target object

doc-cov can measure docstring coverage of functions, classes and modules.

functions (default, -f)

$ doccov tests/sample_project -f
function     3 /   5 60.00%

classes -c

$ doccov tests/sample_project -c
class        2 /   2 100.00%

modules -m

$ doccov tests/sample_project -m
module       3 /   7 42.86%

Output

str (default, --output str)

$ doccov tests/sample_project -fmc --output str
class        2 /   2 100.00%
module       3 /   7 42.86%
function     3 /   5 60.00%

csv --output csv

$ doccov tests/sample_project -fmc --output csv
coverage,class,2,2,100.00%
coverage,module,3,7,42.86%
coverage,function,3,5,60.00%

Target

Print coverage of whole (default)

$ doccov tests/sample_project
function     3 /   5 60.00%

Print all coverage of modules --all

$ doccov tests/sample_project --all
=============================
module_fulldoc
-----------------------------
function     1 /   1 100.00%
=============================
package_A
-----------------------------
function     0 /   0 -
=============================
package_A.module_fulldoc
-----------------------------
function     1 /   1 100.00%
=============================
package_B
-----------------------------
function     0 /   0 -
=============================
package_B.module_shortdoc
-----------------------------
function     1 /   1 100.00%
=============================
package_B.package_B_1
-----------------------------
function     0 /   0 -
=============================
package_B.package_B_1.module_nodoc
-----------------------------
function     0 /   2 0.00%
=============================
coverage
-----------------------------
function     3 /   5 60.00%

Report to pull request

Add comment to github pull request.

$ doccov <project> -fmc --output csv > doccov.csv
$ GITHUB_TOKEN=XXXXX doccov-report doccov.csv

CircleCi
Add pull request comment using circle-ci environment.

Other
Required following environment

  • PROJECT_USERNAME
  • PROJECT_REPONAME
  • PR_NUMBER

Download files

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

Source Distribution

doc-cov-0.4.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

doc_cov-0.4.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file doc-cov-0.4.0.tar.gz.

File metadata

  • Download URL: doc-cov-0.4.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6

File hashes

Hashes for doc-cov-0.4.0.tar.gz
Algorithm Hash digest
SHA256 28990976f00f9855c56c35473e9b1e0d1d79e51254d62b5eb311a10dacae9950
MD5 6d361fc8a36c466f064dbf5ba7178483
BLAKE2b-256 b5953488ac6d1174a40a1ca20559ada6eb540ebe39491a3a931484f166d0a835

See more details on using hashes here.

File details

Details for the file doc_cov-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: doc_cov-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.18.4 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6

File hashes

Hashes for doc_cov-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 18bf921e09579f1f22f2b78c9b725c198a5baaad07ab0a88cddbeb0ea4815167
MD5 e209beda8478b52ca9cf26531e784fb2
BLAKE2b-256 232fd0a330f9fee31f829a31a0809b127acefa81f6523fdf7d4e826692e475c2

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 files

0.3.0

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

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