-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add summary statistics to the coverage report (#5474)
The current implementation of ``sphinx.ext.coverage`` outputs which methods,classes, and functions are documented. This commit adds a short summary of this report in terms of ``documented objects / total number of objects``, both per module and total. The purpose of this is to support a currently not mainstream but relevant use-case: a coverage report on the number of objects that are documented. By having the statistics on the report or on the stdout, a regex expression can capture the coverage percentage (e.g. ``re.search(r'TOTAL.*?([0-9.]{4,6}\%)', d).group(1)``) and use it e.g. in another report, a status badge, etc. Two options were added to the configuration to allow a table to be printed in the report and/or to stdout. Co-authored-by: Adam Turner <[email protected]>
- Loading branch information
1 parent
7cce00a
commit 99f9209
Showing
5 changed files
with
143 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters