spacetelescope / calcos

Calibration for HST/COS.
https://hst-docs.stsci.edu/cosdhb/chapter-3-cos-calibration
3 stars 27 forks source link

Clean up after the unit tests by removing the files created #221

Closed stscirij closed 1 year ago

codecov[bot] commented 1 year ago

Codecov Report

Base: 87.17% // Head: 87.63% // Increases project coverage by +0.46% :tada:

Coverage data is based on head (aa0b73e) compared to base (78cca9f). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #221 +/- ## ========================================== + Coverage 87.17% 87.63% +0.46% ========================================== Files 17 17 Lines 1333 1391 +58 ========================================== + Hits 1162 1219 +57 - Misses 171 172 +1 ``` | Flag | Coverage Δ | | |---|---|---| | unit | `87.63% <100.00%> (+0.46%)` | :arrow_up: | 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=spacetelescope#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/spacetelescope/calcos/pull/221?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope) | Coverage Δ | | |---|---|---| | [tests/test\_airglow.py](https://codecov.io/gh/spacetelescope/calcos/pull/221?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope#diff-dGVzdHMvdGVzdF9haXJnbG93LnB5) | `100.00% <100.00%> (ø)` | | | [tests/test\_average.py](https://codecov.io/gh/spacetelescope/calcos/pull/221?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope#diff-dGVzdHMvdGVzdF9hdmVyYWdlLnB5) | `95.45% <100.00%> (+0.71%)` | :arrow_up: | | [tests/test\_cosutil.py](https://codecov.io/gh/spacetelescope/calcos/pull/221?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope#diff-dGVzdHMvdGVzdF9jb3N1dGlsLnB5) | `99.85% <100.00%> (+<0.01%)` | :arrow_up: | | [tests/test\_extract.py](https://codecov.io/gh/spacetelescope/calcos/pull/221?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope#diff-dGVzdHMvdGVzdF9leHRyYWN0LnB5) | `97.56% <100.00%> (+0.26%)` | :arrow_up: | | [tests/test\_shiftfile.py](https://codecov.io/gh/spacetelescope/calcos/pull/221?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope#diff-dGVzdHMvdGVzdF9zaGlmdGZpbGUucHk=) | `97.56% <100.00%> (+0.59%)` | :arrow_up: | | [tests/generate\_tempfiles.py](https://codecov.io/gh/spacetelescope/calcos/pull/221?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope#diff-dGVzdHMvZ2VuZXJhdGVfdGVtcGZpbGVzLnB5) | `98.37% <0.00%> (-0.33%)` | :arrow_down: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

stscirij commented 1 year ago

This should fix the Jenkins errors that occur when a file cannot be found when running the unit tests

zacharyburnett commented 1 year ago

I would recommend using the tmp_path fixture from pytest; I made a PR to pull into this branch: https://github.com/stscirij/calcos/pull/4

stscirij commented 1 year ago

I would recommend using the tmp_path fixture from pytest; I made a PR to pull into this branch: stscirij#4

Thanks! - I tried this out and got an error, I think I'd rather stick to my perhaps less Pythonic but cleaner implementation