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 expose inputs / outputs feature #1170

Merged
merged 17 commits into from
Feb 23, 2018

Conversation

greschd
Copy link
Member

@greschd greschd commented Feb 21, 2018

Fixes #660.

Adds the functions expose_inputs and expose_outputs to the ProcessSpec. Their options are:

  • namespace: expose to a specific PortNamespace, meaning that the ports will be created in that namespace
  • exclude: A list of keys which are not exposed
  • include: An explicit list of keys which are exposed

The information about which inputs / outputs were exposed is stored in the _exposed_inputs / _exposed_outputs attribute of the spec.

Adds exposed_inputs and exposed_outputs to the Process class. They build up the input / output dictionary corresponding to a specific workchain class (and instance in the case of outputs). Options:

  • namespace: The namespace where it is looking for exposed keys.
  • agglomerate: Defines whether parent namespaces are also searched.

Finally, it adds an out_many method, which can be used with a dict as returned by exposed_outputs to add many outputs simultaneously.

For additional details see the documentation included in this PR.

@greschd greschd requested a review from sphuber February 21, 2018 11:15
@greschd
Copy link
Member Author

greschd commented Feb 21, 2018

@sphuber
Copy link
Contributor

sphuber commented Feb 22, 2018

I merged the PR in plumpy. Please rebase on the latest workflows branch to update your branch and up the commit requirement for plumpy in requirements.txt. I will then check it out and run some tests. Thanks

@sphuber
Copy link
Contributor

sphuber commented Feb 23, 2018

I think I know why the failing test is occurring. I am putting in a PR now and after that is merged we can merge workflows here again and it should be working

Copy link
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.

I have given it a little go on my workchains and for a sub set of the functionality that I need it seems to work. Since the validation is done for the entire input dictionary upon launching, I cannot use agglomerate yet as I would like, but I am not sure if and how that would be possible. I am approving this because what this does make possible seems to be working.

@sphuber sphuber merged commit ba575c5 into aiidateam:workflows Feb 23, 2018
@greschd greschd deleted the feature_expose_inputs_outputs branch December 13, 2019 15:29
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