Sphinx extension to make a dynamic documentation coverage badge
Project description
DocsCov is a Sphinx extension that allows you to show a badge showing documentation coverage for C++ (or any other Doxygen supported) code.
Getting Started
First, install it by (requires python 3.6+):
pip install docscov
You need to use Doxygen to generate XML data about the source files. To do that, add the following to your Doxygen configuration: (not needed if you’re using tools like Breathe or Exhale, you should have this already)
GENERATE_XML = YES
This will generate XML data about source files. Now just add docscov to your Sphinx extensions and add the following to your conf.py:
docscov_config = {
"xml_dir": "<path to generated XML by Doxygen>"
}
It’ll places a JSON file inside built documentations, which can be used with Shields to make a dynamic badge, updated each time documentations are built.
Getting the badge
To get the badge do the following:
Get the URL to your generated documentations (with http:// or https://)
Replace the : with %3A in the URL
Replace all slashes (/) in the text you got by completing step 2
Replace <url> in the following text with the text you got by completing step 3, and the text you’ll get is the URL to your badge that can be placed in your README:
https://img.shields.io/endpoint?url=<url>%2F_static%2Fdocscov.json
Example: https://pypp.readthedocs.io/en/latest will be converted to this after following above: https://img.shields.io/endpoint?url=https%3A%2F%2Fpypp.readthedocs.io%2Fen%2Flatest%2F_static%2Fdocscov.json
Configurable options
You can configure DocsCov with the following options:
xml_dir:
Value type: str
Description: Path to Doxygen XML output
root_dir:
Value type: str
Description: Path to process relative directories.
Notes: Optional.
Default: '.'
badge_label:
Value type: str
Description: The label of badge.
Notes: Optional.
Default: 'docscov'
scope:
Value type: list
Description: Coverage scope. Possible values of elements:
public: Include public members of classes
protected: Include protected members of classes
private: Include private members of classes
all: All of above
Notes: Optional.
Default: ['all']
kind:
Value type: list
Description: Kind of definitions to include in coverage. Possible values of elements:
class
define
enum
enumvalue
file
friend
function
namespace
page
signal
slot
struct
typedef
union
variable
all: All of above
Notes: Optional.
Default: ['all']
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docscov-1.1.3.tar.gz.
File metadata
- Download URL: docscov-1.1.3.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f407486f039cd2cea59b12bf1aeaa004fccf6d8671c60b3cc8ab4919c97915e4
|
|
| MD5 |
529418ed91162ccd7f75666b470e4906
|
|
| BLAKE2b-256 |
a503c89bacef9f92b39517b94876e20d36060a1e08c046b8a22793e1b913f8d5
|
File details
Details for the file docscov-1.1.3-py3-none-any.whl.
File metadata
- Download URL: docscov-1.1.3-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a772180474a8f4b59acf7209c8299223629b2a9ade416be1220e11e8f6c27128
|
|
| MD5 |
bcf4ebaf5dd4956e2f15de5d9dbc8e30
|
|
| BLAKE2b-256 |
61a14149c39e174035073f568f51b96473de0876933a4d957a715e27d07d5696
|