Skip to content
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

WIP: Schema backwards compatibility #272

Merged
merged 30 commits into from
Jul 25, 2017

Commits on Jul 11, 2017

  1. Configuration menu
    Copy the full SHA
    277ef1c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    55845f9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c5e9e37 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    49a37d6 View commit details
    Browse the repository at this point in the history
  5. First pass at backwards compatibilty for tag class...

    This is not meant to be the last word for backwards compatibility. In
    fact, it's really only the first word. There's a lot more work to be
    done and more thought to be given to the mechanisms that are required to
    support this kind of behavior. Also, this particular case isn't even all
    that critical--it just serves as a potentially useful example.
    drdavella committed Jul 11, 2017
    Configuration menu
    Copy the full SHA
    8246d69 View commit details
    Browse the repository at this point in the history

Commits on Jul 12, 2017

  1. Configuration menu
    Copy the full SHA
    ed491b5 View commit details
    Browse the repository at this point in the history
  2. 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.
    drdavella committed Jul 12, 2017
    Configuration menu
    Copy the full SHA
    604ed9a View commit details
    Browse the repository at this point in the history
  3. 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.
    drdavella committed Jul 12, 2017
    Configuration menu
    Copy the full SHA
    3d6c272 View commit details
    Browse the repository at this point in the history
  4. Add unit test for tag implementation newer than schema read...

    This is an important case that is not currently handled properly.
    Currently if an exact version match is not found for a schema version,
    the "best match" is used. However, the tag implementation for this "best
    match" may not be compatible with the given schema version, which will
    result in an unhandled error. This needs to be handled properly.
    drdavella committed Jul 12, 2017
    Configuration menu
    Copy the full SHA
    611ca8d View commit details
    Browse the repository at this point in the history
  5. Restore previous logic for warning for schema version mismatch...

    This will allow us to isolate the error that is caused when an
    incompatible tag class is used to implement a mismatched schema
    version and reflects the correct behavior in the long run.
    drdavella committed Jul 12, 2017
    Configuration menu
    Copy the full SHA
    a2e370a View commit details
    Browse the repository at this point in the history

Commits on Jul 13, 2017

  1. Custom tag class in unit test shouldn't inherit AsdfType...

    All classes that inherit AsdfType are automatically added to the
    internal list of built-in types. In this case, adding a type that was
    defined within a unit test to the list of built-ins caused problems for
    the schema validation tests. This commit is really just a work-around
    for now. In the long term, there should be another class that can be
    inherited by both built-in and user-defined types.
    drdavella committed Jul 13, 2017
    Configuration menu
    Copy the full SHA
    2d2632e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    44d0261 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5d85aef View commit details
    Browse the repository at this point in the history
  4. WIP: moved version compat logic into yamlutils...

    This seems like the most logical place to make a decision about whether
    to write a custom data structure or possible or just return a raw Python
    object. Added a new method to AsdfTypes `version_is_supported` to
    determine if a particular tag version can be handled by the class. It's
    mostly just a stub for now but logic will be fleshed out soon.
    drdavella committed Jul 13, 2017
    Configuration menu
    Copy the full SHA
    cadb129 View commit details
    Browse the repository at this point in the history
  5. 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.
    drdavella committed Jul 13, 2017
    Configuration menu
    Copy the full SHA
    8ae634a View commit details
    Browse the repository at this point in the history
  6. 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.
    drdavella committed Jul 13, 2017
    Configuration menu
    Copy the full SHA
    242c41c View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e269f41 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    bb39b80 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    cbc3b76 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    2d49117 View commit details
    Browse the repository at this point in the history

Commits on Jul 14, 2017

  1. Prototype of way to have multiple versions in one tag class...

    This update allows a single extension class to support multiple versions
    of the same schema tag. There might be a better way to do it in the long
    run, but this way appears to work, at least for built-in classes. It
    would require a different mechanism to be used for user-defined classes,
    which is problematic.
    drdavella committed Jul 14, 2017
    Configuration menu
    Copy the full SHA
    ab4aac3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d0b49ee View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6c91c4a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ba62a14 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e1d90f3 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    60cd2f5 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    37b1037 View commit details
    Browse the repository at this point in the history

Commits on Jul 17, 2017

  1. Refactor to handle versioned tag classes in ExtensionList creation...

    In order to correctly implement multiple supported versions of tag
    classes for all extensions and not just ASDF built-ins, the logic for
    adding versioned extension classes was moved from the AsdfType metaclass
    constructor to the constructor for AsdfExtensionList. This allows both
    AsdfType and UserType sibling version classes to be properly handled.
    The sibling version classes themselves are now created within the
    ExtensionType constructor and are stored as property of the main version
    class.
    drdavella committed Jul 17, 2017
    Configuration menu
    Copy the full SHA
    a3a7ad4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2b90d9e View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2017

  1. Rename UserType->CustomType

    drdavella committed Jul 25, 2017
    Configuration menu
    Copy the full SHA
    a813f6c View commit details
    Browse the repository at this point in the history