Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python 3.13 preparation for ramp fitting. #303

Merged
merged 5 commits into from
Oct 10, 2024

Conversation

kmacdonald-stsci
Copy link
Collaborator

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

  • update or add relevant tests
  • update relevant docstrings and / or docs/ page
  • Does this PR change any API used downstream? (if not, label with no-changelog-entry-needed)
    • write news fragment(s) in changes/: echo "changed something" > changes/<PR#>.<changetype>.rst (see below for change types)
    • run regression tests with this branch installed ("git+https://github.com/<fork>/stcal@<branch>")
news fragment change types...
  • changes/<PR#>.apichange.rst: change to public API
  • changes/<PR#>.bugfix.rst: fixes an issue
  • changes/<PR#>.general.rst: infrastructure or miscellaneous change

@kmacdonald-stsci kmacdonald-stsci requested a review from a team as a code owner October 9, 2024 14:51
@kmacdonald-stsci
Copy link
Collaborator Author

Here is the regression testing for this PR:

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

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@braingram braingram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I rebased #300 to include these changes and the python 3.13 run passes with the changes in this PR:
https://github.com/spacetelescope/stcal/actions/runs/11257779409/job/31302843924?pr=300

@kmacdonald-stsci
Copy link
Collaborator Author

Closing as a duplicate PR for #300

@braingram
Copy link
Collaborator

Sorry for any confusion. I rebased this into #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.

Copy link
Collaborator

@tapastro tapastro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@stscirij stscirij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me

@kmacdonald-stsci kmacdonald-stsci merged commit e651753 into spacetelescope:main Oct 10, 2024
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants