Skip to content

Improve the output of 'verdi calculation show'#1212

Merged
sphuber merged 1 commit into
aiidateam:workflowsfrom
sphuber:fix_910_verdi_calculation_show_call
Mar 2, 2018
Merged

Improve the output of 'verdi calculation show'#1212
sphuber merged 1 commit into
aiidateam:workflowsfrom
sphuber:fix_910_verdi_calculation_show_call

Conversation

@sphuber
Copy link
Copy Markdown
Contributor

@sphuber sphuber commented Mar 1, 2018

Fixes #910

With the addition of WorkCalculations came the new link types RETURN
and CALL, however, the output of 'verdi calculation show' was still
grouping all links in the categories OUTPUTS and INPUTS. Here we
properly divide the linked nodes in four different groups:

* Called by (Incoming `CALL` link, can only be one)
* Inputs (Incoming `INPUT` links)
* Outputs (Outgoing `CREATE/RETURN` links, take the unique set)
* Called (Outgoing `CALL links)

Also reformatted the output a bit by adding new lines between the
different groups to enhance readability

With the addition of WorkCalculations came the new link types RETURN
and CALL, however, the output of 'verdi calculation show' was still
grouping all links in the categories OUTPUTS and INPUTS. Here we
properly divide the linked nodes in four different groups:

	* Called by (Incoming CALL link, can only be one)
	* Inputs (Incoming INPUT links)
	* Outputs (Outgoing CREATE/RETURN links, take the unique set)
	* Called (Outgoing CALL links)

Also reformatted the output a bit by adding new lines between the
different groups to enhance readability
@sphuber sphuber requested review from giovannipizzi and nmounet March 1, 2018 22:14
Copy link
Copy Markdown
Member

@giovannipizzi giovannipizzi left a comment

Choose a reason for hiding this comment

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

In general, I think we should find a good/better API for getting incoming/outgoing links, as the same issue exists elsewhere in the code. This anyway already solves a big problem, thanks!

@sphuber
Copy link
Copy Markdown
Contributor Author

sphuber commented Mar 2, 2018

Agreed, this would be part of the bigger work that needs to be done to fix link-type based code

@sphuber sphuber merged commit b901241 into aiidateam:workflows Mar 2, 2018
@sphuber sphuber deleted the fix_910_verdi_calculation_show_call branch March 2, 2018 06:32
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.

2 participants