Support circular references in ASDF-serialized models#10189
Merged
nden merged 4 commits intoastropy:masterfrom Apr 24, 2020
Merged
Support circular references in ASDF-serialized models#10189nden merged 4 commits intoastropy:masterfrom
nden merged 4 commits intoastropy:masterfrom
Conversation
Member
|
note to reviewer: check the travis status on the second to last commit |
Contributor
Author
|
The last batch of failed checks were due to the GitHub outage, which seems to have been resolved. Is it possible to re-run them? |
Member
|
Restarted CI |
nden
reviewed
Apr 23, 2020
Contributor
nden
left a comment
There was a problem hiding this comment.
Looks good. I left a couple minor comments.
CHANGES.rst
Outdated
| - Added serialization of parameter constraints fixed and bounds. [#10082] | ||
|
|
||
| - Fix ASDF serialization of circular model inverses, and remove explicit calls | ||
| to ``asdf.yamlutil`` functions that because unnecssary in asdf 2.6.0. [#10189] |
Contributor
There was a problem hiding this comment.
because they are unnecessary ?
Contributor
Author
There was a problem hiding this comment.
Oops, thanks, I intended to write "that became unnecessary" but went off the rails.
| new_mapping.append(i) | ||
| transform = transform & ConstantType.from_tree( | ||
| {'value': int(entry.value)}, ctx) | ||
| transform = transform & Const1D(int(entry.value)) |
Contributor
There was a problem hiding this comment.
Casting to int is not necessary here. I'm guessing this was the idea for the old Const model but in modeling all parameters are turned into floats.
nden
approved these changes
Apr 24, 2020
This was referenced Apr 24, 2020
pllim
added a commit
to pllim/astropy
that referenced
this pull request
May 2, 2020
pllim
added a commit
to pllim/astropy
that referenced
this pull request
May 4, 2020
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request updates the minimum asdf version to 2.6.0, and uses a new asdf feature (generators returned from
ExtensionType.from_tree_taggedmethods) to enable handling of models with circular user inverses.I'm also removing explicit calls to
asdf.yamlutil.custom_tree_to_tagged_treeandasdf.yamlutil.custom_tree_to_tagged_treeas those are no longer necessary.