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

Allow exposing the inputs of a process function #5896

Closed
sphuber opened this issue Feb 17, 2023 · 1 comment · Fixed by #5919
Closed

Allow exposing the inputs of a process function #5896

sphuber opened this issue Feb 17, 2023 · 1 comment · Fixed by #5919

Comments

@sphuber
Copy link
Contributor

sphuber commented Feb 17, 2023

The exposing functionality of a the WorkChain class is very useful to allow writing workflows that wrap subprocesses such as other WorkChains and CalcJobs. However, this behavior is not yet supported for process functions and so we have to resort to manually copying the input specifications. Since process functions have an associated Process implementation that is generated dynamically, we could try to fetch its ProcessSpec and allow exposing its inputs.

@sphuber
Copy link
Contributor Author

sphuber commented Mar 3, 2023

Note that this functionality is in fact already supported. However, its usefulness is limited by the fact that the exposed spec only inherits the port names (from the function arguments) but there is no additional information on valid type or help string message. #5900 implements a change where at least the valid type of the port can be inferred from the type hint of the function argument, if present. In similar fashion, the help message may be parsed from the function's docstring. A PR for this is in progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant