Fix get_crds_parameters
for ModelContainer
#846
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Part of the purpose for
ModelContainer.get_crds_parameters
is so thatstpipe
can detect that aModelContainer
fits the description of aDataModel
and thatstpipe
can then perform its actions on theModelContainer
object. It does this by checking theModelContainer
against: https://github.com/spacetelescope/stpipe/blob/6f84b52ffcce764a94806a35f5aefd28f3e8f8eb/src/stpipe/datamodel.py#L4-L68However, this check only checks for the existence of these features: https://github.com/spacetelescope/stpipe/blob/6f84b52ffcce764a94806a35f5aefd28f3e8f8eb/src/stpipe/datamodel.py#L25-L29 not that they follow the template defined in
stpipe
in general.Currently,
ModelContainer.get_crds_parameters
is defined as a property not a method which means it cannot be executed as a function. This is contrary to https://github.com/spacetelescope/stpipe/blob/6f84b52ffcce764a94806a35f5aefd28f3e8f8eb/src/stpipe/datamodel.py#L39-L45 defining it as a method.This PR drops turning
get_crds_parameters
into a property.Checklist
CHANGES.rst
under the corresponding subsection