Skip to main content

docov

docov

Light-weight, recursive docstring coverage analysis for python modules.

Overview

docov provides light-weight docstring coverage analysis for python modules. It recursively collects symbols defined by the specified module and checks whether these symbols have docstrings and if they are longer than at least 20 symbols.

The docstring coverage is computed simply as the fraction of symbols which are deemed to have a sufficient docstring and the total number of symbols found.

The command-line utility will generate a badge indicating the docstring coverage and a report listing all symbols found in the module, which do not have sufficient docstrings.

In order to not distort the docstring coverage, symbols and modules (and their symbols) can be ignored in the analysis. This allows for some fine-tuning in really only considering the desired module's symbols. Builtin types are currently always ignored, meaning that e.g. methods of a string object in a module will not be assessed.

Installation

docov is available via PyPI:

$ pip install docov

Usage

Once installed, docov can be used from the command-line

$ docov <module-name>

which will produce a badge and a report on symbols, which were deemed to have insufficient docstring.

A short help text on available options can be found with

$ docov -h
usage: docov [-h] [-o DIR] [-p PREFIX] [-i SYMBOL [SYMBOL ...]] [-d DEPTH] [--no-badge] [--no-report] MODULE

Command line utility to analyze docstring coverage of python modules.
Works by recursively fetching the module's symbol's docstrings and 
checking that they consist of at least 20 characters.

Generates a SVG-badge and a report if not specified otherwise, stored in
DIR/[PREFIX_]docov.svg and DIR/[PREFIX_]docov.txt respectively.

positional arguments:
  MODULE                The module which is to be analyzed.

optional arguments:
  -h, --help            show this help message and exit
  -o DIR, --output DIR  Output directory.
  -p PREFIX, --prefix PREFIX
                        Output file prefix: PREFIX_docov.[txt,svg]
  -i SYMBOL [SYMBOL ...], --ignore SYMBOL [SYMBOL ...]
                        Ignore symbols. If the symbol names a module, all its types will be ignored in the recursion.
  -d DEPTH, --depth DEPTH
                        Analysis recursion depth.
  --no-badge            Suppress badge generation.
  --no-report           Suppress report generation.

Metadata

Release files for docov 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for docov 0.0.3
File Interpreter ABI Platform
docov-0.0.3-py3-none-any.whl Python 3 none any Details

Release files / docov-0.0.3-py3-none-any.whl

Download URL docov-0.0.3-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3053311286a4c556ad7b8fbf8d850b95a8c8405491548cae4315e82a56ae1477
BLAKE2b-256 checksum
How to use checksums
38c3dafd98f752e260751c155ed7c8c790b047dff6e66c1115f772d2b9db85ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.10

Security for docov 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page