Skip to content

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

Merged
sphuber merged 1 commit into
aiidateam:provenance_redesignfrom
sphuber:fix_2322_calculation_tools
Dec 10, 2018
Merged

Add CalculationTools base and entry point aiida.tools.calculations#2331
sphuber merged 1 commit into
aiidateam:provenance_redesignfrom
sphuber:fix_2322_calculation_tools

Conversation

@sphuber
Copy link
Copy Markdown
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
Copy Markdown

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