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

Add CalculationTools base and entry point aiida.tools.calculations #2331

Merged

Conversation

sphuber
Copy link
Contributor

@sphuber sphuber commented Dec 10, 2018

Fixes #2322

With the migration to the new provenance design, the type string of
calculation nodes, no longer refer to the actual sub class of the
JobCalculation that was run, but just the base CalcJobNode. The
actual class of the calculation process was stored in the process_type
if it could be mapped onto a known entry point.

However, this change means that when a user now loads a node of a
completed calculation node, let's say PwCalculation, the loaded node
will be an instance of CalcJobNode and not PwCalculation, which means
that any utility methods defined on the PwCalculation class are
inaccessible.

We can return this functionality through the concept of calculation
tools, which will get exposed through the CalcJobNode class and will
load a specifically registered entry point.

@coveralls
Copy link

coveralls commented Dec 10, 2018

Coverage Status

Coverage increased (+5.9%) to 67.91% when pulling 7a24206 on sphuber:fix_2322_calculation_tools into a64d5c1 on aiidateam:provenance_redesign.

With the migration to the new provenance design, the type string of
calculation nodes, no longer refer to the actual sub class of the
`JobCalculation` that was run, but just the base `CalcJobNode`. The
actual class of the calculation process was stored in the `process_type`
if it could be mapped onto a known entry point.

However, this change means that when a user now loads a node of a
completed calculation node, let's say `PwCalculation`, the loaded node
will be an instance of `CalcJobNode` and not `PwCalculation`, which means
that any utility methods defined on the `PwCalculation` class are
inaccessible.

We can return this functionality through the concept of calculation
tools, which will get exposed through the `CalcJobNode` class and will
load a specifically registered entry point.
@sphuber sphuber force-pushed the fix_2322_calculation_tools branch from a5362e6 to 7a24206 Compare December 10, 2018 08:50
@sphuber sphuber merged commit c9a1d7f into aiidateam:provenance_redesign Dec 10, 2018
@sphuber sphuber deleted the fix_2322_calculation_tools branch December 10, 2018 09:11
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.

3 participants