PMCC-BioinformaticsCore / janis-core

Core python modules for Janis Pipeline workflow assistant
GNU General Public License v3.0
4 stars 9 forks source link

Re-enable test coverage #104

Open kinow opened 2 years ago

kinow commented 2 years ago

Hi,

I haven't looked at the git log to confirm, but looking at codecov it looks like even though we are running it in GH actions, the coverage command is not able to locate any coverage information.

The last reported coverage in Codecov for janis-core is from 3rd June 2021. This PR includes the configuration for pytest, pytest-cov, and coverage/codecov to produce the .coverage file locally. The build time might increase a little, since running the tests will include coverage by default. If that's a problem I can think of some ways to have it enabled only for GH Actions :+1:

Draft until CI runs and I can confirm it worked as expected on my branch and in codecov.

Bruno

codecov-commenter commented 2 years ago

Codecov Report

Merging #104 (d85a730) into master (ef1ba7b) will decrease coverage by 9.63%. The diff coverage is 24.13%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #104      +/-   ##
==========================================
- Coverage   67.36%   57.73%   -9.64%     
==========================================
  Files          79       48      -31     
  Lines       10789     7639    -3150     
  Branches        0     1594    +1594     
==========================================
- Hits         7268     4410    -2858     
+ Misses       3521     2848     -673     
- Partials        0      381     +381     
Impacted Files Coverage Δ
janis_core/tool/test_suite_runner.py 53.33% <0.00%> (-11.38%) :arrow_down:
janis_core/translations/translationbase.py 63.25% <ø> (-6.30%) :arrow_down:
janis_core/ingestion/fromwdl.py 14.82% <11.11%> (+14.82%) :arrow_up:
janis_core/types/common_data_types.py 57.11% <50.00%> (-3.87%) :arrow_down:
janis_core/__meta__.py 100.00% <100.00%> (ø)
janis_core/tool/test_classes.py 89.18% <100.00%> (-4.00%) :arrow_down:
janis_core/utils/__init__.py 46.83% <0.00%> (-18.99%) :arrow_down:
janis_core/utils/docparser_info.py 79.16% <0.00%> (-14.59%) :arrow_down:
janis_core/utils/validators.py 73.91% <0.00%> (-13.05%) :arrow_down:
janis_core/translations/cwl.py 66.09% <0.00%> (-11.17%) :arrow_down:
... and 59 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 714eab7...d85a730. Read the comment docs.

kinow commented 2 years ago

Oh, looks like it works! :point_up:

Previously, the coverage included the test code. I've removed those files from the coverage report, and was expecting a drop in coverage. Also, there might be some new code and/or tests added since the last run, so a decrease is probably OK.