nanograv / enterprise

ENTERPRISE (Enhanced Numerical Toolbox Enabling a Robust PulsaR Inference SuitE) is a pulsar timing analysis code, aimed at noise analysis, gravitational-wave searches, and timing model analysis.
https://enterprise.readthedocs.io
MIT License
65 stars 67 forks source link

coverage output in xml #247

Closed ark0015 closed 3 years ago

ark0015 commented 3 years ago

This should output the coverage report in the correct format in addition to using the .coveragerc to exclude testing scripts, etc. from the coverage report.

vallis commented 3 years ago

So codecov is only reporting coverage, which is gathered by pytest. But where are we actually setting coverage requirements?

vallis commented 3 years ago

Also look at the "out-of-date" branch warning...

ark0015 commented 3 years ago

So codecov is only reporting coverage, which is gathered by pytest. But where are we actually setting coverage requirements?

I think that you can set the coverage to fail if it falls below some minimum (https://pytest-cov.readthedocs.io/en/latest/config.html with --cov-fail-under=MIN). Do we want a minimum amount of coverage? Was this what you were thinking?

There also might be another option with a codecov-yaml indicating coverage ranges, this seems like what we would want, correct? https://docs.codecov.io/docs/codecov-yaml

Also look at the "out-of-date" branch warning

I'm not sure where you are seeing this?

codecov[bot] commented 3 years ago

Codecov Report

Merging #247 (381d938) into master (3ece21b) will decrease coverage by 5.65%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #247      +/-   ##
==========================================
- Coverage   91.21%   85.56%   -5.66%     
==========================================
  Files          27       12      -15     
  Lines        4726     2723    -2003     
==========================================
- Hits         4311     2330    -1981     
+ Misses        415      393      -22     
Impacted Files Coverage Δ
tests/test_likelihood.py
tests/test_pulsar.py
tests/test_hierarchical_parameter.py
setup.py
tests/enterprise_test_data.py
tests/test_deterministic_signals.py
tests/test_vector_parameter.py
tests/test_gp_wideband.py
tests/test_white_signals.py
tests/test_gp_signals.py
... and 5 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 3ece21b...381d938. Read the comment docs.

vallis commented 3 years ago

Two things:

vallis commented 3 years ago

Actually it looks like you already set a requirement at 50%?

ark0015 commented 3 years ago

Actually it looks like you already set a requirement at 50%?

Yeah, I really thought I had it with that one... I'm not sure why. It might have to do with the default threshold? The target I think is the overall coverage and the threshold is the difference between the last one. I will try again with a larger threshold.

vallis commented 3 years ago

Seems to be working now. Interesting that the codecov status was updated as soon the 3.7 CI-Test finished... since all three Pythons are running coverage, I suspect that the first one to finish is the one to report. Not a big problem.