-
Notifications
You must be signed in to change notification settings - Fork 167
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
JP-3728: Deprecate Step.__call__
#8761
JP-3728: Deprecate Step.__call__
#8761
Conversation
bdebb27
to
0c2a3bf
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8761 +/- ##
=======================================
Coverage 61.86% 61.86%
=======================================
Files 377 377
Lines 38911 38917 +6
=======================================
+ Hits 24071 24077 +6
Misses 14840 14840 ☔ View full report in Codecov by Sentry. |
0c2a3bf
to
911f369
Compare
Step.__call__
Step.__call__
baec011
to
53c4773
Compare
Requested many reviewers as this will be discussed at the branch meeting tomorrow. |
6af3c77
to
f83ad2f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a self-contained change, this looks good to me. Testing locally, the warning is emitted when __call__
is used, and not when .call or .run is directly used. I don't see it from substeps when running a pipeline.
I think more work is needed to address the differences between .call and .run, but that's outside the scope of the request in JP-3728. I don't see anything wrong with deprecating __call__
in the meantime.
The change log edit needs to be converted to a towncrier fragment, and I'd like to wait to see if anyone else has opinions, so I'll hold off on approval for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with Melanie that this change should do no harm and inform users about their use of a method we don't necessarily recommend. Just need the updates to changelog -> fragment, and I'll approve and merge.
f83ad2f
to
758fd97
Compare
Thanks @melanieclarke and @tapastro for taking a look. I updated the changelog to use towncrier. |
This PR adds a warning to
Step.__call__
uses to target end-users that might use this expecting the step to use reference files.Note that
Step.__call__
is used in pipelines so the warning will only appear ifStep.__call__
is used outside a pipeline (it's used on a step that doesn't have a "parent").If
Step.__call__
is removed, some decision will need to be made about what to do for pipeline uses ofStep.__call__
.Regression tests show only failures that exist on main:
https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/1694/
and do not show the new warning (so there is no use of
Step.__call__
(outside of a pipeline) in jwst.Resolves JP-3728
Closes #8748
This PR addresses ...
Checklist for PR authors (skip items if you don't have permissions or they are not applicable)
CHANGES.rst
within the relevant release sectionHow to run regression tests on a PR