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

Fix the extras_keys/extras_items methods of Node #2821

Closed
giovannipizzi opened this issue May 1, 2019 · 0 comments · Fixed by #3090
Closed

Fix the extras_keys/extras_items methods of Node #2821

giovannipizzi opened this issue May 1, 2019 · 0 comments · Fixed by #3090
Assignees
Milestone

Comments

@giovannipizzi
Copy link
Member

This line
https://github.com/aiidateam/aiida_core/blob/16f105ecd820eb04358ac67c4c954cd0db93ad36/aiida/orm/nodes/node.py#L623
and this line
https://github.com/aiidateam/aiida_core/blob/16f105ecd820eb04358ac67c4c954cd0db93ad36/aiida/orm/nodes/node.py#L615
are wrong.
First, extras is a property and should not be called.
In any case, we shouldn't go via extras but via the methods to get only the keys, for instance. See, as a reference, the implementation for attributes:
https://github.com/aiidateam/aiida_core/blob/16f105ecd820eb04358ac67c4c954cd0db93ad36/aiida/orm/nodes/node.py#L496

This also means this is not tested, so tests should be added for these methods (and maybe we might want to check on coverage.io/coveralls which other methods are currently untested).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants