-
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.
tests: add tests for optional artifact IO
- Loading branch information
1 parent
b47140a
commit ba21e11
Showing
4 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
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,36 @@ | ||
type: Function | ||
name: split-grid | ||
description: Split the daylight sensor grid into multiple smaller files for parallel | ||
simulation | ||
inputs: | ||
- name: grid-name | ||
type: FunctionStringInput | ||
default: grid | ||
description: Name of the grid | ||
- name: sensor-count | ||
type: FunctionIntegerInput | ||
default: 250 | ||
description: Number of sensors per split grid | ||
- name: input-grid-folder | ||
type: FunctionFolderInput | ||
description: The folder containing the grids to split # this is important for copying the files. | ||
path: asset/grid | ||
required: true | ||
- name: bsdf-folder | ||
type: FunctionFolderInput | ||
description: An optional input that should only be copied if available. | ||
path: asset/xml | ||
required: False | ||
|
||
command: | | ||
honeybee radiance grid split "asset/grid/{{inputs.grid-name}}.pts" | ||
"{{inputs.sensor-count}}" --folder "output/temp/" | ||
--log-file "output/temp/{{inputs.grid-name}}_grids.txt" | ||
outputs: | ||
- name: grid-list | ||
type: FunctionArrayOutput | ||
path: "output/temp/{{inputs.grid-name}}_grids.txt" | ||
- name: output-grids-folder | ||
type: FunctionFolderOutput | ||
path: output/temp/ |
33 changes: 33 additions & 0 deletions
33
tests/assets/functions/valid/function_optional_output.yaml
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,33 @@ | ||
type: Function | ||
name: split-grid | ||
description: Split the daylight sensor grid into multiple smaller files for parallel | ||
simulation | ||
inputs: | ||
- name: grid-name | ||
type: FunctionStringInput | ||
default: grid | ||
description: Name of the grid | ||
- name: sensor-count | ||
type: FunctionIntegerInput | ||
default: 250 | ||
description: Number of sensors per split grid | ||
- name: input-grid-folder | ||
type: FunctionFolderInput | ||
description: The folder containing the grids to split # this is important for copying the files. | ||
path: asset/grid | ||
required: true | ||
command: | | ||
honeybee radiance grid split "asset/grid/{{inputs.grid-name}}.pts" | ||
"{{inputs.sensor-count}}" --folder "output/temp/" | ||
--log-file "output/temp/{{inputs.grid-name}}_grids.txt" | ||
outputs: | ||
- name: grid-list | ||
type: FunctionArrayOutput | ||
path: "output/temp/{{inputs.grid-name}}_grids.txt" | ||
- name: output-grids-folder | ||
type: FunctionFolderOutput | ||
path: output/temp/ | ||
- name: optional-output | ||
type: FunctionFolderOutput | ||
path: output/temp/optional | ||
required: False |
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,46 @@ | ||
type: Recipe | ||
|
||
metadata: | ||
type: MetaData | ||
name: minimal-recipe | ||
tag: 0.2.1 | ||
|
||
dependencies: | ||
- type: Dependency | ||
kind: plugin | ||
name: honeybee-radiance | ||
tag: 1.2.3 | ||
source: https://example.com/test-repo | ||
|
||
flow: | ||
- name: main | ||
type: DAG | ||
inputs: | ||
- name: folder-path | ||
type: DAGStringInput | ||
default: something | ||
- name: input-file-optional | ||
type: DAGFileInput | ||
required: False | ||
tasks: | ||
- name: minimal-task | ||
type: DAGTask | ||
template: honeybee-radiance/10000-lux-sky | ||
arguments: | ||
- name: foo | ||
type: TaskArgument | ||
from: | ||
type: ValueReference | ||
value: test-value | ||
- name: bar | ||
type: TaskArgument | ||
from: | ||
type: ValueReference | ||
value: test-value | ||
outputs: | ||
- name: optional-output | ||
type: DAGFolderOutput | ||
from: | ||
type: FolderReference | ||
path: path/to/file | ||
required: False |