-
Notifications
You must be signed in to change notification settings - Fork 25
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
Retain id
and other top-level attributes in merge_property_trees
#364
Conversation
id
and other top-level attributes in merge_property_trees
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #364 +/- ##
==========================================
+ Coverage 67.52% 67.56% +0.03%
==========================================
Files 114 114
Lines 5916 5919 +3
==========================================
+ Hits 3995 3999 +4
+ Misses 1921 1920 -1 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
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.
Looks good, just two small comments
I'm going to wait to merge and okify this until tomorrow. |
Regtest started for okifying: https://github.com/spacetelescope/RegressionTests/actions/runs/11954122369 |
This PR updates
merge_property_trees
to retain the schemaid
(and other "top level" items/attributes). This fixes the issue wheremodel.schema["id"]
does not match the "id" of the schema (see #308).This PR also drops the use of OrderedDict fixing #40.
Finally the CI goblins revealed that shuffling order of tests can cause
test_defined_models_up_to_date
to fail:https://github.com/spacetelescope/stdatamodels/actions/runs/11901768169/job/33165405951
if executed after
test_model_with_nonstandard_primary_array
which defines a test model class that isn't prefixed with_
. This PR adds a_
prefix to the test class to avoid this intermittent issue.Fixes: https://jira.stsci.edu/browse/JP-2137
Closes #308
Closes #40
Regression tests: https://github.com/spacetelescope/RegressionTests/actions/runs/11914331392
produce 5 "failures" which look like improvements to me. The failures are in the niriss ami tests:
Since this PR retains the top level schema items this is keeping the title from the datamodel schema:
stdatamodels/src/stdatamodels/jwst/datamodels/schemas/amioi.schema.yaml
Line 5 in 2c39853
which in the truth file ends up being overwritten by the referenced oifits schema:
stdatamodels/src/stdatamodels/jwst/datamodels/schemas/oifits.schema.yaml
Line 5 in 2c39853
Keeping the datamodel schema title seems preferable.
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/<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