Skip to content

Replace .inp and .out for Node with .inputs and .outputs for CalculationNode and WorkflowNode#2569

Merged
sphuber merged 3 commits into
aiidateam:provenance_redesignfrom
giovannipizzi:fix_2230_tab_completed_methods
Mar 5, 2019
Merged

Replace .inp and .out for Node with .inputs and .outputs for CalculationNode and WorkflowNode#2569
sphuber merged 3 commits into
aiidateam:provenance_redesignfrom
giovannipizzi:fix_2230_tab_completed_methods

Conversation

@giovannipizzi
Copy link
Copy Markdown
Member

Now:

  • CalculationNode have a .inputs.<LABEL> property that returns
    a manager to navigate incoming INPUT_CALC nodes
  • CalculationNode have a .outputs.<LABEL> property that returns
    a manager to navigate outgoing CREATE nodes
  • WorkflowNode have a .inputs.<LABEL> property that returns
    a manager to navigate incoming INPUT_WORK nodes
  • WorkflowNode have a .outputs.<LABEL> property that returns
    a manager to navigate outgoing RETURN nodes
  • Node does not have anymore .inp and .out as these were
    referring to incoming and outgoing and were ambiguous

Moreover, Data.created_by and ProcessNode.called_by methods were
already implemented and have been renamed to Data.creator and
ProcessNode.caller.

Also tests added for all these methods, including the already existing
ones. This fixes #2230.

Moreover, LinkType has been added to the classes pre-loaded in
the shell (fixes #2560), and we now ensure that get_node_by_label
raises in case there is more than one matching node with the same label
(fixes #2558).

In the case there is more than one matching node with the same label.
This fixes aiidateam#2558
@giovannipizzi giovannipizzi requested a review from sphuber March 5, 2019 10:11
@giovannipizzi giovannipizzi force-pushed the fix_2230_tab_completed_methods branch from ce963e0 to 2102430 Compare March 5, 2019 10:38
This fixes aiidateam#2230. In particular, now:

- CalculationNode have a `.inputs.<LABEL>` property that returns
  a manager to navigate incoming INPUT_CALC nodes
- CalculationNode have a `.outputs.<LABEL>` property that returns
  a manager to navigate outgoing CREATE nodes
- WorkflowNode have a `.inputs.<LABEL>` property that returns
  a manager to navigate incoming INPUT_WORK nodes
- WorkflowNode have a `.outputs.<LABEL>` property that returns
  a manager to navigate outgoing RETURN nodes
- Node *does not have anymore* `.inp` and `.out` as these were
  referring to incoming and outgoing and were ambiguous

Moreover, `Data.created_by` and `ProcessNode.called_by` methods were
already implemented and have been renamed to `Data.creator` and
`ProcessNode.caller`.

Also tests added for all these methods, including the already existing
ones.
@giovannipizzi giovannipizzi force-pushed the fix_2230_tab_completed_methods branch from 2102430 to a93c5f6 Compare March 5, 2019 11:11
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-1.6%) to 68.773% when pulling a93c5f6 on giovannipizzi:fix_2230_tab_completed_methods into d39007d on aiidateam:provenance_redesign.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.09%) to 70.478% when pulling a93c5f6 on giovannipizzi:fix_2230_tab_completed_methods into d39007d on aiidateam:provenance_redesign.

Copy link
Copy Markdown
Contributor

@sphuber sphuber left a comment

Choose a reason for hiding this comment

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

Amazing!

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