Closed emolter closed 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 66.55%. Comparing base (
fd6be8d
) to head (9bcaae1
). Report is 4 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR enables the JWST ModelContainer to no longer inherit from DataModel and to no longer require its own
save
method, as part of an effort to make ModelContainer's usage narrower and easier to understand.
I follow the changes motivated by the inheritance change. Since ModelContainer
is no longer a JwstDataModel
subclass it won't enter:
https://github.com/spacetelescope/stdatamodels/blob/852c8d71a57d3c0f9f2eb1d12a7b89d77461a38a/src/stdatamodels/jwst/datamodels/util.py#L103-L105
by switching list
to Sequence
here:
https://github.com/spacetelescope/stdatamodels/blob/852c8d71a57d3c0f9f2eb1d12a7b89d77461a38a/src/stdatamodels/jwst/datamodels/util.py#L156-L162
dm.open(container)
will do the same thing as before (call ModelContainer(container)
).
I don't following the no longer require its own save
bit. Is that just in reference to AbstractDataModel.save?
I don't following the no longer require its own save bit. Is that just in reference to AbstractDataModel.save?
Yes, and it hasn't got anything to do with stdatamodels specifically, as you correctly point out. I will remove it from the summary
regression tests passed. @braingram I don't have permissions to request additional reviewers nor merge in this repository, feel free to do either at your convenience
Helps to resolve JP-3721
Helps to close spacetelescope/jwst:8738
This PR enables the JWST ModelContainer to no longer inherit from DataModel as part of an effort to make ModelContainer's usage narrower and easier to understand.
Tasks
docs/
pageno-changelog-entry-needed
)changes/
:echo "changed something" > changes/<PR#>.<changetype>.rst
(see below for change types)jwst
regression tests with this branch installed ("git+https://github.com/<fork>/stdatamodels@<branch>"
)news fragment change types...
- ``changes/