-
Notifications
You must be signed in to change notification settings - Fork 26
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
standardize setattr use in skip #195
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #195 +/- ##
===========================================
+ Coverage 80.80% 95.22% +14.42%
===========================================
Files 37 37
Lines 2849 3165 +316
===========================================
+ Hits 2302 3014 +712
+ Misses 547 151 -396 ☔ View full report in Codecov by Sentry. |
7a5ac2a
to
919e5a2
Compare
919e5a2
to
a3ff55e
Compare
@schlafly I can't request you as a reviewer but when available would you give this a look (or suggest an alternate roman reviewer)? This PR should fix steps not being marked as "SKIPPED" when skipped view setting the |
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.
Thanks Brett, looks good. Remind me---I thought we did have some regtests that skipped tests (e.g., for the all saturated test), and I thought you had stumbled on this issue in the process of testing some unrelated code in romancal? So I had expected some steps to be newly marked SKIPPED. But perhaps these have all been coded around.
So far I've only been able to find one test in romancal that passes import jwst.datamodels
from jwst.step import RampFitStep
ims = [jwst.datamodels.ImageModel()] * 2
step = RampFitStep()
step.skip = True
result = step.run(ims[0])
print(result.meta.cal_step.ramp_fit)
ims = [jwst.datamodels.ImageModel()] * 2
result = step.run(ims)
print(result[0].meta.cal_step.ramp_fit) This prints out (in addition to all the pipeline logging stuff):
When passed a model stpipe marks it as skipped when the step is skipped. When passed a list of models, stpipe doesn't mark any models as skipped. This is the same when run with main or with this PR. For the fully saturated tests (which trigger this part of the exposure pipeline) the skipping of steps is done within the pipeline (not via stpipe) which also sets the step status. Those uses aren't impacted by this PR. |
Ugh. Thanks. I agree with you that this PR looks good and should proceed. |
1b2a259
to
a2a8d46
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.
lgtm
Closes spacetelescope/roman_datamodels#343
jwst regtests all pass: https://github.com/spacetelescope/RegressionTests/actions/runs/11804014366
romancal regtests all pass: https://github.com/spacetelescope/RegressionTests/actions/runs/11803229018
(it may be worthwhile to add a regression or unit test in romancal for the feature fixed in this PR in a follow-up romancal PR)
This PR standardizes how stpipe sets
meta.cal_step.<class_alias>
when a step is skipped. On main the behavior for a single roman datamodel (not a ModelLibrary) does not log the skip. Running the following on main:results in printing "INCOMPLETE" indicating that even though the saturation step was skipped stpipe failed to log this to the resulting datamodel.
With this PR the above example results in printing "SKIPPED".
Tasks
docs/
pageno-changelog-entry-needed
)changes/
:echo "changed something" > changes/<PR#>.<changetype>.rst
(see below for change types)"git+https://github.com/<fork>/stpipe@<branch>"
)jwst
regression testromancal
regression testnews fragment change types...
changes/<PR#>.feature.rst
: new featurechanges/<PR#>.bugfix.rst
: fixes an issuechanges/<PR#>.doc.rst
: documentation changechanges/<PR#>.removal.rst
: deprecation or removal of public APIchanges/<PR#>.misc.rst
: infrastructure or miscellaneous change