-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add egde-merge-mode property in input
- Loading branch information
Showing
9 changed files
with
117 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
- step: | ||
name: step1 | ||
command: echo "i will buzz" | ||
image: alpine/alpine | ||
inputs: | ||
- name: dataset | ||
default: /step1 | ||
|
||
- step: | ||
name: step2 | ||
command: echo "i will buzz" | ||
image: alpine/alpine | ||
inputs: | ||
- name: dataset | ||
default: /step2 | ||
edge-merge-mode: replace | ||
|
||
- step: | ||
name: step3 | ||
command: echo "i will buzz" | ||
image: alpine/alpine | ||
inputs: | ||
- name: dataset | ||
default: /step3 | ||
edge-merge-mode: append | ||
|
||
- pipeline: | ||
name: check-edge-merge-mode | ||
nodes: | ||
- name: step1 | ||
type: execution | ||
step: step1 | ||
- name: step2 | ||
type: execution | ||
step: step2 | ||
- name: step3 | ||
type: execution | ||
step: step3 | ||
|
||
edges: | ||
- [step1.output.*, step2.input.dataset] | ||
- [step1.output.*, step3.input.dataset] |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
- step: | ||
name: buzz | ||
command: echo "i will buzz" | ||
image: alpine/alpine | ||
inputs: | ||
- name: dataset | ||
default: /data | ||
edge-merge-mode: boo-boo |
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from valohai_yaml.pipelines.conversion import PipelineConverter | ||
|
||
|
||
def test_input_override_mode(input_edge_merge_mode_config): | ||
config = input_edge_merge_mode_config | ||
pipeline = config.pipelines["check-edge-merge-mode"] | ||
assert len(pipeline.nodes) == 3 | ||
converted_pipeline = PipelineConverter(config=config, commit_identifier="latest").convert_pipeline(pipeline) | ||
step1 = converted_pipeline["nodes"][0] | ||
step2 = converted_pipeline["nodes"][1] | ||
step3 = converted_pipeline["nodes"][2] | ||
|
||
# override-mode not defined | ||
assert step1["template"]["inputs"]["dataset"] == [] | ||
|
||
# override-mode = replace | ||
assert step2["template"]["inputs"]["dataset"] == [] | ||
|
||
# override-mode = append | ||
assert step3["template"]["inputs"]["dataset"] == ["/step3"] |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
- step: | ||
name: buzz | ||
command: echo "i will buzz" | ||
image: alpine/alpine | ||
inputs: | ||
- name: dataset | ||
default: /data | ||
edge-merge-mode: replace |
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