-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement schema backwards compatibility (#272)
* Add unit test for older schema * Minor refactor of debug code for _get_yaml_content * Add new wcs unit test for backwards compatible schema conversion * Fix handling of obsgeovel and obsgeoloc in tag v1.0.0 * Add unit test for GCRS frame backwards compatibility... This was necessary since the obsgeovel and obsgeoloc fields were affected by the schema version change but are not used in Galactocentric frames, so were not previously being tested. * Add unit test for using tags that are not defined... ASDF should not fail to read a file, even if the file makes reference to schema tags that are not defined. In these cases, ASDF should simply provide a raw Python object that represents the deserialized object. * Add unit test for tag implementation newer than schema read... This is an important case that is was not being handled properly. If an exact version match was not found for a schema version, the "best match" was used. However, the tag implementation for this "best match" might not be compatible with the given schema version, which would result in an unhandled error. * Modify extension type hierarchy to diffentiate custom classes... This update allows extension types to be differentiated between those that ASDF provides as part of the library, and those that are user-defined. The ASDF types are automatically added to the list of built-in extensions used by the library, whereas user-defined types are not. * Extension classes now have `supported_version` field... Custom extension classes can now declare explicit support for various schema versions using the `supported_version` field. If this field is provided by an extension class, it will be used to determine whether that class can be used to convert a particular version of a schema to/from a custom class. If the field is not provided, or if a particular schema version is not listed, the extension class will simply return raw Python data structures representing the schema. * Add unit test for supported_versions for CustomType
- Loading branch information
Showing
10 changed files
with
515 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.