-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Engine: Make process inputs in launchers positional (#6202)
So far the launcher functions, `run` and `submit`, had a signature where the process class was the only positional argument and the inputs for the process were defined through keyword arguments. Recently, however, some fixed arguments were added to `submit`, namely `wait` and `wait_interval`. A potential problem was missed in this change as these new keywords now "shadow" a similarly named input port for a process. If a `Process` defines an input port named `wait` or `wait_interval`, when passed through the keyword arguments, it will now be mistaken as the fixed argument for the `submit` function and won't be passed to the process inputs. The new functionality by `wait` and `wait_interval` is desirable and in the future additional arguments may need to be added. Therefore, rather than undoing the change, another solution is implemented. The `inputs` positional argument is added and the `wait` and `wait_interval` arguments are made keyword only. The process inputs should now be defined as a dictionary for the `inputs` argument and no longer through `**kwargs`. The `**kwargs` are still supported, as in certain situations it is more legible and forcing to define an intermediate input dictionary is unnecessary. With this approach, backwards-compatibility is maintained and users will be able to transition to passing inputs as a dictionary instead of keywords. In addition, if a user actually gets hit by `wait` shadowing the input port of a `Process`, they can now switch to specifying the inputs through `inputs` and their input won't be blocked.
- Loading branch information
Showing
6 changed files
with
90 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters