echo 'viash_version: "0.6.0"' > _viash.yaml
viash --version
viash 0.6.0 (c) 2020 Data Intuitive
A _viash.yaml
file in the root of the project repository is called a Viash project config. It allows defining project-wide settings such as the location of the Viash components and which Viash version to use.
viash_version: 0.7.1
source: src
target: target
config_mods: |
.functionality.version := 'dev'
.platforms[.type == 'docker'].target_registry := 'ghcr.io'
.platforms[.type == 'docker'].target_organization := 'viash-io/viash_project_template'
.platforms[.type == 'docker'].target_image_source := 'https://github.com/viash-io/viash_project_template'
.platforms[.type == 'nextflow'].directives.tag := '$id'
Pinning the version of Viash used in your project is essential to ensure reproducibility thereof across multiple systems. In doing so, all Viash commands will be run using that version of Viash.
Example:
Overrides the --src
parameter of any viash ns
command. This is useful in case the directory containing the Viash component source code is in a directory different from src/
.
Overrides the --target
parameter of any viash ns
command. This is useful in case the artifacts generated by Viash should be stored in a directory different from target/
.
Viash allows for rewriting component configuration files using config mods. Config mods allow making changes to the config mods on the fly.
The template project contains these default config mods:
config_mods: |
.functionality.version := 'dev'
.platforms[.type == 'docker'].target_registry := 'ghcr.io'
.platforms[.type == 'docker'].target_organization := 'viash-io/viash_project_template'
.platforms[.type == 'docker'].target_image_source := 'https://github.com/viash-io/viash_project_template'
.platforms[.type == 'nextflow'].directives.tag := '$id'
This has the following effects:
Set the version of any components to 'dev'
.
Fills the registry, organisation and image sources fields of the Docker platform.
Adds a default directive to the Nextflow platform.