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

Possibility to bundle Groups #3589

Closed
espenfl opened this issue Nov 29, 2019 · 9 comments · Fixed by #3613
Closed

Possibility to bundle Groups #3589

espenfl opened this issue Nov 29, 2019 · 9 comments · Fixed by #3613
Milestone

Comments

@espenfl
Copy link
Contributor

espenfl commented Nov 29, 2019

Having the possibility to bundle Groups would be convenient.

@sphuber
Copy link
Contributor

sphuber commented Mar 31, 2020

Can you expand a bit more on what you mean exactly @espenfl ? Do you want to be able to put Group instances in a Group? Or something else?

@espenfl
Copy link
Contributor Author

espenfl commented Mar 31, 2020

@sphuber Yes, something like that, Group in Group. Would make it easier to bundle up different domains regardless of purpose (e.g. export or for instance easy tag'ing when visualizing).

@sphuber sphuber changed the title Posibility to bundle Groups Possibility to bundle Groups Mar 31, 2020
@sphuber
Copy link
Contributor

sphuber commented Mar 31, 2020

To have this really implemented on the database level will require a significant change in schema and migrations. However, @chrisjsewell has been working on a different approach, that should achieve more or less the same effect, that works on the "software" level. There is an open PR #3613 that should be merged soon. This allows you to use nesting in the group names themselves to create virtual hierarchies. For example, imagine you have two groups called structures/orthorhombic and structures/cubic that each contain some StructureData nodes, you could do the following:

group = GroupPath(`structures`)
group.nodes  # will get all nodes in both `structures/orthorhombic` and `structures/cubic` 
group_orthorhombic = group['orthorombic'].group  # will be Group('structures/orthorhombic')
structures_orthorhombic = group_orthorhombic.nodes

The actual syntax may differ a bit. Would this be acceptable for your use case?

@espenfl
Copy link
Contributor Author

espenfl commented Mar 31, 2020

Well, I think, given the complexity such a change would yield it might not be worth it at this point as long as we can for with points on the software level. How is this on export and then import?

@sphuber
Copy link
Contributor

sphuber commented Mar 31, 2020

Not sure what you mean with the last question. But the feature added by #3613 would not affect it, since nothing at all changes on the actual data in the database. It is just a tool that operates on top of the data to provide a virtual hierarchy. What I am interested in, is whether this was the functionality that you were looking for when you opened that issue. Because if the case, we can close this once the PR is merged.

@espenfl
Copy link
Contributor Author

espenfl commented Mar 31, 2020

What we ultimately would be interested in is that if you export a Group of Group, either virtual or actual, that the important can also utilize the grouping. Say reuse the data, or enrich it. But I guess this will not be realized with #3613.

@greschd
Copy link
Member

greschd commented Mar 31, 2020

#3613 is just a convention for how to name groups, and some tooling around it.

So, if you have groups myproject/structures and myproject/bands they would be accessible through the myproject GroupPath.

I think this should not be affected by exporting / importing the groups, as long as all the relevant groups are included in the export.

@sphuber
Copy link
Contributor

sphuber commented Mar 31, 2020

As long as the importer also has the version of AiiDA that provides this new functionality, the same group hierarchy will apply and can be used. So I think that this will in fact be solved by the PR. I will therefore let it close this issue once merged. If a more specific use case comes up that is not possible with it, feel free to describe it in more detail and reopen this issue.

@espenfl
Copy link
Contributor Author

espenfl commented Mar 31, 2020

@sphuber If that is indeed the case, then we need no more. It is a feature needed to increase user friendliness / mental order in the chaos and then we do not care that much what happens in the backend. So agreed, please close it upon merging the PR.

@sphuber sphuber added this to the v1.2.0 milestone Apr 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants