spacetelescope / stdatamodels

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

deprecate cast_fits_array and cast_arrays #214

Closed braingram closed 9 months ago

braingram commented 11 months ago

Deprecate cast_arrays argument to from_fits_hdu and cast_fits_arrays argument to Datamodel.__init__.

These appear to be unused (outside of the test_ndarray_validation test). Deprecating (and eventually removing them) is work towards removing uses of FITS_rec.

Regression tests show 2 seemingly unrelated errors and no DeprecationWarning with the message introduced in this PR (so no code in the regression tests uses cast_arrays or cast_fits_arrays): https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/964/

The errors are:

[stable-deps] test_nirspec_missing_msa_fail – jwst.regtest.test_nirspec_exceptions3s
[stable-deps] test_nirspec_missing_msa_nofail – jwst.regtest.test_nirspec_exceptions

Both with similar failed asserts

AssertionError: assert 'Missing MSA meta (MSAMETFL) file' in 'INFO     stpipe.Spec2Pipeline:log_config.py:159 Spec2Pipeline instance created.\nINFO     stpipe.Spec2Pipeline.bkg_su...ng processing for this exposure.\nERROR    stpipe.Spec2Pipeline:log_config.py:159 No output product will be created.\n'

AssertionError: assert 'Missing MSA meta (MSAMETFL) file' in 'INFO     stpipe.Spec2Pipeline:log_config.py:159 Spec2Pipeline instance created.\nINFO     stpipe.Spec2Pipeline.bkg_su...line:log_config.py:159 Ending calwebb_spec2\nINFO     stpipe.Spec2Pipeline:log_config.py:159 Step Spec2Pipeline done\n'

Checklist

codecov[bot] commented 11 months ago

Codecov Report

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

Comparison is base (12a4c3a) 64.71% compared to head (c79e976) 64.75%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #214 +/- ## ========================================== + Coverage 64.71% 64.75% +0.03% ========================================== Files 102 102 Lines 5668 5674 +6 ========================================== + Hits 3668 3674 +6 Misses 2000 2000 ```

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

braingram commented 9 months ago

Thanks for reviewing all of these PRs!