-
Notifications
You must be signed in to change notification settings - Fork 59
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
improve schema info collection combiner handling #1875
Conversation
f9eda46
to
f1b5a8f
Compare
Specutils error comes from a bug in gwcs with astropy 7 that is fixed in the development version but not yet released. The weldx failure is from weldx pinning asdf to <4. One thing to consider with this PR is that the changes will (correctly) cause |
f1b5a8f
to
2ad9546
Compare
2ad9546
to
afa9cbd
Compare
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.
Mainly asking for more helpful code documentation.
return None | ||
|
||
|
||
def _get_schema_key(schema, key): |
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 think it would be helpful to add explanations of what distinguishes _get_schema_key
from _get_subschema_for_property
. In both cases key is an argument, in the first the key presumably is expected to be one of the properties, and in the second, key
is not a property. Examples of the different usage contexts to distinguish the two might be useful.
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.
Good idea! How does e39d1e1 look?
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.
LGTM
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.
LGTM
return None | ||
|
||
|
||
def _get_schema_key(schema, key): |
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.
LGTM
Description
schema_info
currently fails to find both subschemas and attributes of subschemas for schemas that use certain "combiners" (likeallOf
) and/or references.This PR updates
schema_info
to support more schema configurations (including$ref
andallOf
usage).Requires spacetelescope/rad#525 as the rad schemas contain invalid extraEDIT: rad PR was merged see comment below about compatibility (tldr; we'll want to set the asdf min in rad to >4.0.x when the changes in this PR are released)$ref
items.Tasks
pre-commit
on your machinepytest
on your machineno-changelog-entry-needed
)changes/
:echo "changed something" > changes/<PR#>.<changetype>.rst
(see below for change types)docs/
pagenews fragment change types...
changes/<PR#>.feature.rst
: new featurechanges/<PR#>.bugfix.rst
: bug fixchanges/<PR#>.doc.rst
: documentation changechanges/<PR#>.removal.rst
: deprecation or removal of public APIchanges/<PR#>.general.rst
: infrastructure or miscellaneous change