Add subruns information in DataKey
of superruns to track metadata
#866
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.
What is the problem / what does the code in this PR do
The subruns of a superrun is not checked when loading a saved superrun after redefining the superrun. You will find the example in the MWE.
Can you briefly describe how it works?
This PR does the following things:
DataKey
:subruns
, which is loaded from the metadata of superrun. Of course, if there is no metadata, an error will be raised.Context.get_datakey
for the context to get the decoratedDataKey
. Change all direct call ofstrax.DataKey
inContext
toContext.get_datakey
, includingContext.key_for
.subruns
to therun_id
inDataKey
, so if everything is the same exceptsubruns
, theDataKey.__repr__
will still change.The motivation that we do not include
subruns
inlineage
is that we would like to keep the lineage hash of samedata_type
of subruns and superrun the same, like0-records-j3nd2fjbiq
and_superrun_test_uzafu3c2wk-records-j3nd2fjbiq
.Can you give a minimal working example (or illustrate with a figure)?
The output will be
Please include the following if applicable:
Please make sure that all automated tests have passed before asking for a review (you can save the PR as a draft otherwise).