Closed braingram closed 8 months ago
Attention: 2 lines
in your changes are missing coverage. Please review.
Comparison is base (
44a5691
) 64.82% compared to head (1ed3b38
) 64.84%.
Files | Patch % | Lines |
---|---|---|
src/stdatamodels/jwst/datamodels/schema_editor.py | 0.00% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks for the review!
This PR removes uses of the optional
json_id
argument for callbacks passed toasdf.treeutil.walk_and_modify
.In
fits_support
this argument was unused and removal has no effect.In
schema_editor
it is likely better to not use this argument (it's use might lead to bugs like in https://github.com/asdf-format/asdf/pull/1716).For some extra context,
json_id
contains the string value under the key "id" of the most closely nested dictionary for the contained object processed in the callback. This is useful for draft 4 jsonschema so any reference fragments can be resolved using the uri stored in the "id" (see this schema for an example id). Keyword files do not follow draft 4 and do not contain an "id" with a uri. Within the schema_editor code, the top level keyword files are combined: https://github.com/spacetelescope/stdatamodels/blob/44a5691d56e001f5f1a9c54167481fb73be14813/src/stdatamodels/jwst/datamodels/schema_editor.py#L231-L242 before calling 'resolve_references' to resolve references to other keyword files: https://github.com/spacetelescope/stdatamodels/blob/44a5691d56e001f5f1a9c54167481fb73be14813/src/stdatamodels/jwst/datamodels/schema_editor.py#L244 using the directory as the 'uri' for resolving these references: https://github.com/spacetelescope/stdatamodels/blob/44a5691d56e001f5f1a9c54167481fb73be14813/src/stdatamodels/jwst/datamodels/schema_editor.py#L393-L399 so that references can be found relative to the directory containing the keyword json files. The presence of an "id" key would break this resolution if it did not contain the directory that contains the keyword json files.Locally the
test_schema_editor
jwst regression tests pass. Regression test run: https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/1117/ shows only unrelated errors (due to new emicorr reference file and engdb failure, both of which are occurring on jwst main and the random "missing_msa_fail/nofail").Checklist
CHANGES.rst
(either inBug Fixes
orChanges to API
)