Adds summary statistics to coverage report#5474
Merged
AA-Turner merged 13 commits intosphinx-doc:masterfrom Jul 28, 2023
jorgecarleitao:feature/add_coverage_statistics
Merged
Adds summary statistics to coverage report#5474AA-Turner merged 13 commits intosphinx-doc:masterfrom jorgecarleitao:feature/add_coverage_statistics
AA-Turner merged 13 commits intosphinx-doc:masterfrom
jorgecarleitao:feature/add_coverage_statistics
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.
|
Member
|
Probably need to bump the env version here so that old pickle files are ignored. A |
AA-Turner
reviewed
Jul 28, 2023
Member
|
Thank you @jorgecarleitao! A |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Subject: Adds a table with a summary of the coverage report:
Feature or Bugfix
Purpose
The current implementation of
ext.coverageoutputs 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
coverageis 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.