-
Notifications
You must be signed in to change notification settings - Fork 192
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
Add query relationship considering the 'extended' provenance graph #4293
Comments
I think wanting to search for "logical" ancestors and descendants is a perfectly valid use case and should be supported. I started to work on this and a naive approach did not seem to complicated to implement. Simply adding a Before implementing the rest (and settling all the naming), there is one more fundamental question we should answer. Currently, the implementation will return all paths that match the query path when using |
I think there is already an ongoing discussion on that point, see #3755 As for myself, I usually put a |
Hey guys, I would like to revive this thread, since this I think this is an important feature. Example use case: query for all calculations that exited with a specific exit code and get their parent workchains so you can resubmit them.
@sphuber Would you mind opening a draft PR for this?
As mentioned by @greschd , this question was discussed in #3755 and it seems the original intention of the authors was to include the duplicates, although I agree with @sphuber in being pretty certain this is not what most users are looking for. As long as there is an easy workaround, I'm not too bothered about having the duplicates in a first implementation. Another suggestion to consider might be introducing separate flags to control uniqueness/extendedness rather than creating flags like
Would it make sense to add the support for ancestors already, with support for descendants to be added later? |
Can you use the Aiida Graph Explorer instead or is this one dead? |
Use case / problem
When creating queries with the
with_ancestors
orwith_descendants
keywords, only links in the "data provenance" (CREATE
,INPUT_CALC
) are considered when determining the ancestor / descendant relationship. I have encountered several cases where it would be convenient to consider the data + logical provenance. For example, finding all instances of a workchain that descend from a given structure.Possible solution
A possible solution would be adding new keywords (working name
with_extended_ancestors
,with_extended_descendants
) that take into account alsoINPUT_WORK
andCALL
links.The
RETURN
links can not be included, because they can create loops in the provenance graph - which would lead to infinite recursions.Describe alternatives you've considered
RETURN
links could also be included if there is some safeguard to exclude only the ones that actually do create a cycle (e.g. by node creation time). However, I think this could lead to confusing edge cases, and may not be worth the effort. Maybe we can specify in the documentation for the new feature thatRETURN
links may be included in the future, thus making it "technically not backwards-incompatible" if we do decide to add it.Additional context
Discussion in #3881.
The text was updated successfully, but these errors were encountered: