spacetelescope / romancal

Python library to process science observations from the Nancy Grace Roman Space Telescope
https://roman-pipeline.readthedocs.io/en/latest/
Other
31 stars 28 forks source link

remove clean_up_after_test #1245

Closed braingram closed 4 months ago

braingram commented 4 months ago

The clean_up_after_test fixture usage in the outlier detection tests deletes all asdf files in the working directory (even if they were not created by the tests). The tests that use this fixture also do not change the working directory. This can (and did result) result in deletion of user files (unrelated to the unit or regression tests) with no warnings.

This resulted in deletion of a large number of files (which were not generated by the tests and are now lost) when I ran the outlier detection tests.

This PR removes the fixture. It could later be replaced with a more specific cleanup.

Fixes: https://github.com/spacetelescope/romancal/issues/1244

Checklist

Regression tests run with no errors: https://plwishmaster.stsci.edu:8081/blue/organizations/jenkins/RT%2FRoman-Developers-Pull-Requests/detail/Roman-Developers-Pull-Requests/776/pipeline/245

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 78.93%. Comparing base (2a4a78d) to head (1aec135). Report is 195 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1245 +/- ## ======================================= Coverage 78.93% 78.93% ======================================= Files 117 117 Lines 8086 8086 ======================================= Hits 6383 6383 Misses 1703 1703 ``` | [Flag](https://app.codecov.io/gh/spacetelescope/romancal/pull/1245/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope) | Coverage Δ | | *Carryforward flag | |---|---|---|---| | [nightly](https://app.codecov.io/gh/spacetelescope/romancal/pull/1245/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope) | `62.78% <ø> (ø)` | | Carriedforward from [2a4a78d](https://app.codecov.io/gh/spacetelescope/romancal/commit/2a4a78d50dfead99c779e1caf7edbbcc8493d7f9?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=spacetelescope) | *This pull request uses carry forward flags. [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) to find out more.

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

braingram commented 4 months ago

@schlafly suggested running this PR to look for left over files. I ran pytest in the main directory with this PR and no files were left over after running the unit tests.