New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds summary statistics to coverage report #5474
Adds summary statistics to coverage report #5474
Conversation
Temporary while decision is made to go forward, on which tests must be written.
Codecov Report
@@ Coverage Diff @@
## master #5474 +/- ##
==========================================
- Coverage 83.07% 82.95% -0.12%
==========================================
Files 289 291 +2
Lines 38820 38886 +66
Branches 5840 5854 +14
==========================================
+ Hits 32250 32259 +9
- Misses 5207 5255 +48
- Partials 1363 1372 +9
Continue to review full report at Codecov.
|
Probably need to bump the env version here so that old pickle files are ignored. A |
Thank you @jorgecarleitao! A |
Subject: Adds a table with a summary of the coverage report:
Feature or Bugfix
Purpose
The current implementation of
ext.coverage
outputs which methods/classes/functions are documented. This PR adds a short summary of this report in terms ofdocumented 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 (
re.search(r'TOTAL.*?([0-9.]{4,6}\%)', d).group(1)
in Python regex) and use it e.g. as another CI report, in a Badge, etc.The current version of this PR does not do anything by default to not break backward compatibility. Two options were added to the configuration to allow a table to be outputted to the report and/or to stdout.
There are still steps missing:
however, I have the following questions before proceeding:
My hypothesis is that the answer is affirmative for all 3 cases: the most common usage of
coverage
is to know how the coverage of docs is and a nice table as output seems a good output for the command. However, I am not sure about backward compatibility.