-
Notifications
You must be signed in to change notification settings - Fork 26
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
remove uses of deprecated asdf.resolver #128
remove uses of deprecated asdf.resolver #128
Conversation
JWST regression tests run against this branch passed without errors: https://plwishmaster.stsci.edu:8081/job/RT/job/JWST/2243 JWST CI failure I believe is due to: #129 |
2600217
to
454956c
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #128 +/- ##
==========================================
- Coverage 65.17% 65.17% -0.01%
==========================================
Files 101 101
Lines 5445 5438 -7
==========================================
- Hits 3549 3544 -5
+ Misses 1896 1894 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@tapastro @stscieisenhamer mentioned you may have run the schema_editor for the past few builds. Would you have time to look over the changes in this PR? Let me know if you have any questions. |
a42e1f2
to
58c232c
Compare
Sorry it took me a while to get back to you, @braingram! I don't know if there is good test coverage of the schema_editor, but I can try running it off this branch if you think this change may have affected functionality. To be honest, while I have used the code multiple times, the lines you've modified look completely unfamiliar and I'm not sure what would change on the face of it. EDIT: I needed to read the whole post... I see the link to the test now. I'll review that and see if it covers the general usage. |
The new JWST CI failure is due to a version conflict (jwst requires stdatamodels <1.2, this repo is currently >=1.2 so the stpipe entry points fail to load with a EDIT: given that the issue appears to be stpipe and the CI job runs with a pip installed stpipe this job is not expected to pass until a version of stpipe is released that has the fix mentioned above. |
@@ -394,8 +393,6 @@ def resolve_references(self, url): | |||
""" | |||
Resolve urls in the schema | |||
""" | |||
resolver = get_default_resolver() | |||
|
|||
def resolve_refs(node, json_id): |
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.
I wonder if we can drop this whole method and replace with the asdf resolve_references=True
flag? the try/catch that was added here seems like a kludge for some long ago schema URI problem that may not exist anymore.
If not, it's worth comparing this to the asdf implementation and updating the code here where it's fallen behind. It looks like a copy of an older version of the resolve_refs
callback in asdf.schema.
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.
It's possible this isn't needed but given the lack of test coverage and that it sounds like this is a tool that's manually run I'm less inclined to make changes unless they're absolutely necessary. Perhaps @tapastro has some thoughts on this.
8336173
to
f6328df
Compare
f6328df
to
f4cb3a5
Compare
asdf.resolver will be deprecated in 2.15: asdf-format/asdf#1362
A few uses were found in stdatamodels
stdatamodels/src/stdatamodels/fits_support.py
Lines 362 to 366 in 740477c
stdatamodels/src/stdatamodels/jwst/datamodels/multiexposure.py
Lines 89 to 98 in 740477c
stdatamodels/src/stdatamodels/jwst/datamodels/schema_editor.py
Lines 397 to 415 in 740477c
1 and 2 are unnecessary and this PR removes these uses.
schema_editor duplicates some of the code internal to asdf see asdf.schema._load_schema_cached. The uses of resolver appear unnecessary as the call to
generic_io.resolve_uri
andschema.load_schema
appear sufficient to resolve the schema references (as tested with the jwst regression test: https://github.com/spacetelescope/jwst/blob/master/jwst/regtest/test_schema_editor.py).A complete run of the jwst regression tests with these changes will be needed.EDIT: jwst regression tests passed here: #128 (comment)Resolves JP-nnnn
Resolves RCAL-nnnn
Closes #
This PR addresses ...
Checklist
CHANGES.rst
(either inBug Fixes
orChanges to API
)