Config
A Viash configuration is a YAML file which contains metadata to describe the behaviour and build target(s) of a component.
We commonly name this file config.vsh.yaml
in our examples, but you can name it however you choose.
Example:
functionality:
name: hello_world
arguments:
- type: string
name: --input
default: "world"
resources:
- type: bash_script
path: script.sh
text: echo Hello $par_input
platforms:
- type: docker
image: "bash:4.0"
__merge__
Type: File
Config inheritance by including YAML partials. This is useful for defining common APIs in separate files. __merge__
can be used in any level of the YAML. For example, not just in the config but also in the functionality or any of the platforms.
Example:
__merge__: ../api/common_interface.yaml
functionality
Type: Functionality
The functionality describes the behaviour of the script in terms of arguments and resources. By specifying a few restrictions (e.g. mandatory arguments) and adding some descriptions, Viash will automatically generate a stylish command-line interface for you.
platforms
Type: List of Platform
A list of platforms to generate target artifacts for.