Skip to content
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

Improve coverage report #153

Merged
merged 2 commits into from
Oct 3, 2022

Conversation

mkniewallner
Copy link
Collaborator

PR Checklist

  • A description of the changes is added to the description of this PR.
  • If there is a related issue, make sure it is linked to this PR.
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

Description of changes

Coverage is currently set up to run statement coverage rather than branch one. Branch coverage is more granular, since it ensures that every possible branch of a function is measured.

This PR switches to branch coverage, and set a few more options:

  • source specifies the files to measure (without that, tests themselves are currently measures in the report, which doesn't make sense)
  • skip_empty removes empty files from the report

Additionally, let's take the occasion to bump pytest-cov to ^4.0.0 (changelog).

@codecov-commenter
Copy link

codecov-commenter commented Oct 2, 2022

Codecov Report

Merging #153 (f9d5d3b) into main (1b12183) will increase coverage by 1.6%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##            main    #153     +/-   ##
=======================================
+ Coverage   92.9%   94.5%   +1.6%     
=======================================
  Files         43      25     -18     
  Lines       1355     804    -551     
  Branches       0     126    +126     
=======================================
- Hits        1259     760    -499     
+ Misses        96      29     -67     
- Partials       0      15     +15     
Impacted Files Coverage Δ
deptry/compat.py 57.1% <0.0%> (-14.3%) ⬇️
deptry/utils.py 90.9% <0.0%> (-4.6%) ⬇️
deptry/issue_finders/transitive.py 92.0% <0.0%> (-4.0%) ⬇️
deptry/dependency_getter/requirements_txt.py 93.1% <0.0%> (-3.5%) ⬇️
deptry/issue_finders/obsolete.py 94.4% <0.0%> (-2.8%) ⬇️
deptry/dependency.py 91.2% <0.0%> (-1.8%) ⬇️
deptry/module.py 96.0% <0.0%> (-1.4%) ⬇️
deptry/import_parser.py 95.6% <0.0%> (-1.1%) ⬇️
tests/test_notebook_import_extractor.py
tests/dependency_getter/test_requirements_txt.py
... and 20 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@mkniewallner mkniewallner marked this pull request as ready for review October 2, 2022 19:50
@mkniewallner mkniewallner requested a review from fpgmaas October 2, 2022 19:51
@fpgmaas
Copy link
Owner

fpgmaas commented Oct 3, 2022

That looks good! I was not aware of the difference between statement and branch coverage. Learned something new again :)

@mkniewallner mkniewallner merged commit a1f0439 into fpgmaas:main Oct 3, 2022
@mkniewallner mkniewallner deleted the improve-coverage-report branch November 6, 2022 21:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants