-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug fixes for input Parameters and Artifacts in annotations (#811)
**Pull Request Checklist** - [x] Fixes #809, fixes #810 - [x] Tests added - [x] Documentation/examples added - [x] [Good commit messages](https://cbea.ms/git-commit/) and/or PR title **Description of PR** Currently, output parameters can be specified without a name within the function parameters, but input parameters cannot. This PR makes the runner use the function parameter name as the `name` of a `hera.workflows.Parameter`. Input Artifacts can be specified without a path in the annotation, which creates the correct yaml, seen in #792, but at runtime the runner would not know what path the artifact is supposed to load from. Fixed and tested. This PR also cleans up the tests directory structure, removing a lot of duplicated code for runner/annotation tests. The distinction between these is now made clear in docstrings for `test_runner.py` and `test_script_annotations.py` - the runner tests should run the actual script function code to emulate the Argo cluster, while the script annotation tests check that function definitions produce correct yaml and are valid Python when using the annotations. --------- Signed-off-by: Elliot Gunton <[email protected]>
- Loading branch information
1 parent
49ba997
commit b5a260f
Showing
29 changed files
with
602 additions
and
563 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1 @@ | ||
ARTIFACT_PATH = "/tmp/file" | ||
|
||
|
||
def my_function(a: int, b: str): | ||
return a + b | ||
|
||
|
||
def no_param_function(): | ||
return "Hello there!" |
Oops, something went wrong.