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

[feat] Add multiple argument process through the requires #11

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

zeddo123
Copy link
Member

This PR adds the possibility for a process to require the result of previous steps what are not directly before it.

let's say that a process (step 2) not only requires the result of the previous step but also the initial input to the workflow. With this PR, we can inject the needed results through the requires default argument when adding a step with the add method.

In this case the second step of the workflow requires the initial input of the workflow:

wf = Workflow('name').add(some_processing).add(lambda x y: x + y, requires='0')

The requires field expects the step numbers to be comma separated as such:

  • 0,2 requires the result of step 0 (initial value) and step 2

@zeddo123 zeddo123 added the enhancement New feature or request label Feb 16, 2024
@zeddo123 zeddo123 self-assigned this Feb 16, 2024
@zeddo123 zeddo123 merged commit af28c51 into master Feb 16, 2024
4 checks passed
@zeddo123 zeddo123 deleted the requires_flags branch February 16, 2024 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant