spacetelescope / stcal

https://stcal.readthedocs.io/en/latest/
Other
10 stars 32 forks source link

Python 3.13 preparation for ramp fitting. #303

Closed kmacdonald-stsci closed 3 weeks ago

kmacdonald-stsci commented 3 weeks ago

This PR prepares the ramp fitting C-extension for the upgrade to python 3.13. This version of python added an exception to the PyLong_AsLong function if the PyObject passed to it is NoneType. Now for two attributes of RampData that can be NoneType a check needs to be put in place guard against this exception. The other attributes of RampData that are expected to be integer type should never be NoneType, so should raise an exception if they are.

Tasks

news fragment change types... - ``changes/.apichange.rst``: change to public API - ``changes/.bugfix.rst``: fixes an issue - ``changes/.general.rst``: infrastructure or miscellaneous change
kmacdonald-stsci commented 3 weeks ago

Here is the regression testing for this PR:

https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/1778/

codecov[bot] commented 3 weeks ago

Codecov Report

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

Project coverage is 86.21%. Comparing base (60bd3b8) to head (ae6a7c8). Report is 2 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #303 +/- ## ======================================= Coverage 86.21% 86.21% ======================================= Files 47 47 Lines 8812 8812 ======================================= Hits 7597 7597 Misses 1215 1215 ```

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

kmacdonald-stsci commented 3 weeks ago

Closing as a duplicate PR for https://github.com/spacetelescope/stcal/pull/300

braingram commented 3 weeks ago

Sorry for any confusion. I rebased this into https://github.com/spacetelescope/stcal/pull/300 just to see if it fixed the issue. I think it makes sense to approve and merge this PR then rebase and open #300.