AtChem / AtChem2

Atmospheric chemistry box-model for the MCM
MIT License
59 stars 22 forks source link

Test code coverage #502

Closed rs028 closed 10 months ago

rs028 commented 10 months ago

This is simply to test that code coverage works as intended. (First need to merge PR #501).

codecov[bot] commented 10 months ago

Codecov Report

Merging #502 (21c51da) into master (87e02fd) will decrease coverage by 66.67%. The diff coverage is n/a.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/AtChem/AtChem2/pull/502/graphs/tree.svg?width=650&height=150&src=pr&token=4p5Cr68G8w&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AtChem)](https://app.codecov.io/gh/AtChem/AtChem2/pull/502?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AtChem) ```diff @@ Coverage Diff @@ ## master #502 +/- ## ========================================== - Coverage 66.66% 0.00% -66.67% ========================================== Files 17 11 -6 Lines 2049 1619 -430 Branches 0 158 +158 ========================================== - Hits 1366 0 -1366 - Misses 683 1619 +936 ``` | [Flag](https://app.codecov.io/gh/AtChem/AtChem2/pull/502/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AtChem) | Coverage Δ | | |---|---|---| | [build](https://app.codecov.io/gh/AtChem/AtChem2/pull/502/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AtChem) | `?` | | | [tests](https://app.codecov.io/gh/AtChem/AtChem2/pull/502/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AtChem) | `?` | | | [unittests](https://app.codecov.io/gh/AtChem/AtChem2/pull/502/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AtChem) | `?` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AtChem#carryforward-flags-in-the-pull-request-comment) to find out more. [see 17 files with indirect coverage changes](https://app.codecov.io/gh/AtChem/AtChem2/pull/502/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AtChem) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/AtChem/AtChem2/pull/502?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AtChem). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AtChem) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/AtChem/AtChem2/pull/502?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AtChem). Last update [87e02fd...21c51da](https://app.codecov.io/gh/AtChem/AtChem2/pull/502?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AtChem). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AtChem).
codecov[bot] commented 10 months ago

Codecov Report

Patch and project coverage have no change.

Comparison is base (e62c2c1) 52.00% compared to head (65ec392) 52.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #502 +/- ## ======================================= Coverage 52.00% 52.00% ======================================= Files 17 17 Lines 2096 2096 Branches 166 166 ======================================= Hits 1090 1090 Misses 934 934 Partials 72 72 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

rs028 commented 10 months ago

After resetting Codecov, with one unit test the reported coverage is 3.16%, with 100% coverage in the tests/unit_tests/ directory and 1.12% in the src/ directory (correctly identifies the argparse.f90 as affected by the tests).

rs028 commented 10 months ago

Adding one model test increases coverage to 39.38% with 100% coverage in the tests/unit_tests/ directory and 38.22% in the src/ directory.

rs028 commented 10 months ago

With another unit test, total coverage increases to 41.40%. In particular, coverage of src/atmosphereFunctions.f90 goes from 29.63% to 61.54%.

rs028 commented 10 months ago

Adding all unit tests increases total coverage to 50.93%, and with the known solutions model tests to 51.31%

rs028 commented 10 months ago

@spco @JamesAllsopp I think this is working (see my notes above). Total coverage is now 52%, which is lower than it was, but I think this reflects the fact that it is now calculated properly. Any comments before I merge? (can one of you approve the PR, when you have a minute? thanks).

@JamesAllsopp Can you check you are happy with the acknowledgements in the Credits.tex file?