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

add _model_to_exptype method to AbstractModelLibrary #201

Merged
merged 3 commits into from
Oct 23, 2024

Conversation

braingram
Copy link
Collaborator

@braingram braingram commented Oct 23, 2024

This PR adds a method _model_to_exptype to AbstractModelLibrary to allow jwst to control how exptype is determined when ModelLibrary is created from a list of models.

With spacetelescope/jwst#8918 this will address JP-3787.

jwst regtests: https://github.com/spacetelescope/RegressionTests/actions/runs/11487054306

Romancal regtests: https://github.com/spacetelescope/RegressionTests/actions/runs/11487038188
show 1 unrelated failure matching main: https://github.com/spacetelescope/RegressionTests/actions/runs/11470564200/job/31920046203

Fixes #200

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>/stpipe@<branch>")
news fragment change types...
  • changes/<PR#>.feature.rst: new feature
  • changes/<PR#>.bugfix.rst: fixes an issue
  • changes/<PR#>.doc.rst: documentation change
  • changes/<PR#>.removal.rst: deprecation or removal of public API
  • changes/<PR#>.misc.rst: infrastructure or miscellaneous change

Copy link

codecov bot commented Oct 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.62%. Comparing base (1e50496) to head (558c952).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #201      +/-   ##
==========================================
- Coverage   94.62%   94.62%   -0.01%     
==========================================
  Files          37       37              
  Lines        3126     3125       -1     
==========================================
- Hits         2958     2957       -1     
  Misses        168      168              

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

@braingram braingram changed the title add hook to override exptype add _model_to_exptype method to AbstractModelLibrary Oct 23, 2024
@braingram braingram marked this pull request as ready for review October 23, 2024 19:42
@braingram braingram requested a review from a team as a code owner October 23, 2024 19:42
@braingram braingram requested a review from emolter October 23, 2024 19:44
Copy link
Collaborator

@emolter emolter left a comment

Choose a reason for hiding this comment

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

Don't we also need to change the way exptype is set on this line? Other than that this looks good pending passing regtests

@braingram
Copy link
Collaborator Author

Don't we also need to change the way exptype is set on this line? Other than that this looks good pending passing regtests

Thanks for taking a look. That method is overridden in the jwst subclass and updated in spacetelescope/jwst#8918

@emolter
Copy link
Collaborator

emolter commented Oct 23, 2024

Don't we also need to change the way exptype is set on this line? Other than that this looks good pending passing regtests

Thanks for taking a look. That method is overridden in the jwst subclass and updated in spacetelescope/jwst#8918

Missed that, thanks, looks good

@braingram braingram merged commit 799be65 into spacetelescope:main Oct 23, 2024
18 checks passed
@braingram braingram deleted the model_to_exptype branch October 23, 2024 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ModelLibrary does not read exposure types from input models correctly
2 participants