-
Notifications
You must be signed in to change notification settings - Fork 56
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
Introduce lazy_tree
(super dictionaries)
#1733
Open
braingram
wants to merge
44
commits into
asdf-format:main
Choose a base branch
from
braingram:feature/lazy_tree
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
braingram
force-pushed
the
feature/lazy_tree
branch
from
January 16, 2024 21:36
020add3
to
570c758
Compare
eslavich
reviewed
Feb 11, 2024
braingram
force-pushed
the
feature/lazy_tree
branch
from
February 14, 2024 19:08
a5a6e86
to
6ed904d
Compare
braingram
force-pushed
the
feature/lazy_tree
branch
from
February 27, 2024 15:06
6ed904d
to
d5a8ad6
Compare
converted to draft until #1733 (comment) is addressed |
braingram
force-pushed
the
feature/lazy_tree
branch
from
May 10, 2024 19:17
d5a8ad6
to
0e3a944
Compare
braingram
force-pushed
the
feature/lazy_tree
branch
from
May 13, 2024 15:58
b14e530
to
e359dde
Compare
The following branch of |
remove edge case handling for generator producing converter not caught by inspect. Any generator producing converter should be marked as not lazy.
braingram
force-pushed
the
feature/lazy_tree
branch
from
May 14, 2024 16:10
6fffde9
to
686dd94
Compare
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 PR adds:
lazy_tree
option toAsdfConfig
lazy_tree
argument toasdf.open
(defaults toAsdfConfig.lazy_tree
)Converter.lazy
attribute used to indicate if a converter supports "lazy" objectsasdf.lazy_nodes
"lazy" container classes for list, dict, ordered dictBy default the "lazy" option is
False
.When
lazy_tree
isTrue
and an ASDF file is opened the tagged nodes in the tree are not immediately converted to custom objects. Instead, the containers in the tree (dicts, lists, OrderedDicts) are replaced withAsdfNode
subclasses that act like these containers and convert tagged values to custom objects when they are accessed (See #1705 for discussion of this feature). During conversion, if asdf encounters aConverter
that either defineslazy=False
or does not definelazy
the remainder of the branch will be converted to non-"lazy" objects and passed to theConverter
. If instead theConverter
defineslazy=True
the "lazy" object (ie aAsdfDictNode
for a dict) will be passed to theConverter
.Checklist: