spacetelescope / stdatamodels

https://stdatamodels.readthedocs.io
Other
5 stars 25 forks source link

deprecate deprecate_class #274

Closed braingram closed 7 months ago

braingram commented 7 months ago

This is unused by downstream jwst but is imported.

https://github.com/spacetelescope/jwst/pull/8325 removes the import

This PR removes the one internal use (replacing it with a call to warnings.warn without changing the warning filters as is done in deprecate_class).

Removing the use of deprecate_class also removes another use of warnings.simplefilter('default') which (similar to what is described in: https://github.com/spacetelescope/stdatamodels/pull/275) will help ferret out warnings in jwst. https://github.com/spacetelescope/stdatamodels/blob/6b62413268edace5295e82e62911875e65b99629/src/stdatamodels/jwst/library/basic_utils.py#L22

Checklist

codecov[bot] commented 7 months ago

Codecov Report

Attention: Patch coverage is 85.71429% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 64.70%. Comparing base (4d7c3a6) to head (4fdf861). Report is 7 commits behind head on main.

Files Patch % Lines
src/stdatamodels/jwst/library/basic_utils.py 50.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #274 +/- ## ========================================== - Coverage 64.84% 64.70% -0.14% ========================================== Files 103 104 +1 Lines 5694 5701 +7 ========================================== - Hits 3692 3689 -3 - Misses 2002 2012 +10 ```

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

braingram commented 7 months ago

Regression tests run with no errors https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/1258/ and no instances of the warning introduced in this PR were found in the log