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

Rewrite code which tags complex objects #223

Merged
merged 5 commits into from
Oct 24, 2016
Merged

Rewrite code which tags complex objects #223

merged 5 commits into from
Oct 24, 2016

Commits on Jun 24, 2016

  1. Rewrite code which tags complex objects

    Part of the validation of an asdf tree against a schema is checking
    tags in the schema against tags embedded in the data. Function
    tagged.tag_objects has code supplies these tags, but orignally was
    only coded to handle dctionaries, lists, and strings. This proved a
    problem when checking the tags of times in the asdf tree, as times are
    none of these types. I previously wrote a function specifically to
    handle times, but his code had two problems. First, it created an
    extra dependency on the astropy time code and second, the fix was
    limited to time fields.
    
    After becoming more familiar with the code I saw that the
    functionality for handling more complex data objects was already in
    asdf, in yamlutil.custom_tree_to_tagged_tree. So I removed the code I
    had written to handle Time objects and replaced it with that
    function. That code takes a new argument, ctx, which is an asdf
    object, preferable the one associated with the asdf tree being
    validated. It is needed to access any extensions that might be used
    with the asdf tree. Since this is a new argument, the argument list to
    tagged.tag_object was modified to include it as an optional argument
    and code in asdf which invokes tagged.tag_object has been modified to
    pass it where it is available. If ctx is not passed, the code creates
    a new asdf object, which means that extensions cannot be used.
    bernie-simon committed Jun 24, 2016
    Configuration menu
    Copy the full SHA
    a2c3c08 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2016

  1. Configuration menu
    Copy the full SHA
    3afa841 View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2016

  1. Added test case for time tags

    I added the test case I wrote for time tagged data to the asdf test
    suite. The file is asdf/tests/test_tagged.py.
    bernie-simon committed Oct 24, 2016
    Configuration menu
    Copy the full SHA
    8357c54 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5fdcdd3 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3336fd5 View commit details
    Browse the repository at this point in the history