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

ORM: add entry_point property to Node and Group #5437

Merged
merged 1 commit into from
May 19, 2022

Conversation

sphuber
Copy link
Contributor

@sphuber sphuber commented Mar 13, 2022

Fixes #4939

This property will return the entry point of a Node or Group instance
if one is associated with the class, otherwise None is returned.

@sphuber sphuber requested review from chrisjsewell and mbercx March 13, 2022 17:40
@sphuber sphuber force-pushed the feature/4939/node-group-entry-point branch from dc7a8ce to 8fa1ce6 Compare March 13, 2022 21:33
@chrisjsewell
Copy link
Member

Ughh, I'm trying to remove Node attributes, not add them 😅
Why not a classproperty?

@sphuber
Copy link
Contributor Author

sphuber commented Mar 15, 2022

Ughh, I'm trying to remove Node attributes, not add them

#4939 (comment)

I am only conforming to popular demand

Why not a classproperty?

Might as well yeah

@sphuber sphuber force-pushed the feature/4939/node-group-entry-point branch from 8fa1ce6 to a6210f2 Compare March 15, 2022 08:32
@sphuber
Copy link
Contributor Author

sphuber commented Apr 29, 2022

@chrisjsewell @mbercx are we still adding this? Perhaps also in a subnamespace under base? Or are we closing the feature request?

@mbercx
Copy link
Member

mbercx commented May 4, 2022

I think it makes sense to add it under the base name space? Still seems like a useful property to have easy access to.

@sphuber
Copy link
Contributor Author

sphuber commented May 4, 2022

I think it makes sense to add it under the base name space? Still seems like a useful property to have easy access to.

One problem with this approach. The NodeBase class returned by Node.base is a property and not an classproperty. This means you could only do Node().base.entry_point and Node.base.entry_point won't be possible. Maybe it is best to keep it top-level then.

@mbercx
Copy link
Member

mbercx commented May 5, 2022

Hmm, yeah, Node().base.entry_point ain't pretty. I think it's a sufficient reason to keep it top level, what do you think @chrisjsewell?

This property will return the entry point of a `Node` or `Group` instance
or class if one is associated with the class, otherwise `None` is returned.
@sphuber sphuber force-pushed the feature/4939/node-group-entry-point branch from a6210f2 to 44ca1c1 Compare May 19, 2022 10:50
Copy link
Member

@mbercx mbercx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@sphuber sphuber merged commit 115cb49 into aiidateam:main May 19, 2022
@sphuber sphuber deleted the feature/4939/node-group-entry-point branch May 19, 2022 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add entry_point attribute to Node and Group classes.
3 participants