-
-
Notifications
You must be signed in to change notification settings - Fork 54
Add support for ASDF serialisation and deserialisation #776
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
Conversation
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.
Thanks for pushing this forward. Overall I think it looks great. I left a few comments:
- 1 possible bug in the collection converter (which might instead be a schema bug where
aligned_axesshould be required) - a few comments about schema required items vs values filled in by converter
I mostly did not review the test changes.
ndcube/asdf/resources/schemas/quantitytablecoordinate-1.0.0.yaml
Outdated
Show resolved
Hide resolved
ndcube/asdf/resources/schemas/skycoordtablecoordinate-1.0.0.yaml
Outdated
Show resolved
Hide resolved
DanRyanIrish
left a comment
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.
More review to follow
DanRyanIrish
left a comment
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 didn't see any problems that jumped out. So as long as the tests pass, and those more qualified to review this also approve, I'm happy to see this merged
| types = ["ndcube.wcs.wrappers.compound_wcs.CompoundLowLevelWCS"] | ||
|
|
||
| def from_yaml_tree(self, node, tag, ctx): | ||
| from ndcube.wcs.wrappers import CompoundLowLevelWCS |
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.
Why are imports inside from_yaml... methods through PR?
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.
Because these files are imported at import asdf time so by moving them into these methods these imports are only triggered when actually reading a file, i.e. if you read a non-ndcube asdf these imports are never run.
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.
Co-authored-by: DanRyanIrish <ryand5@tcd.ie>
This PR adds support for saving and loading the vast majority of
ndcubeobjects to/from ASDF files.Thanks to @ViciousEagle03 who did the majority of this work.
This PR is now ready for review, to save every possible ndcube object there's still two PRs to asdf-astropy which need to be merged, some tests are skipped here for that. However, this is now ready for review.
MultipleTableCoordinateSlicedLowLevelWCSsupport all the wrappers: Fix two WCS bugs astropy/asdf-astropy#276