viash ns

viash ns build

Build a namespace from many viash config files.

Usage:

viash ns build [-n nmspc] [-s src] [-t target] [-p docker] [--setup] [---push] [--parallel] [--flatten]

Argument Description Type
--config_mod, -c Modify a viash config at runtime using dynamic config modding. List[String]
--flatten, -f Flatten the target builds, handy for building one platform to a bin directory. Boolean
--parallel, -l Whether or not to run the process in parallel. Boolean
--platform, -p Acts as a regular expression to filter the platform ids specified in the found config files. If this is not provided, all platforms will be used. If no platforms are defined in a config, the native platform will be used. In addition, the path to a platform yaml file can also be specified. String
--push Whether or not to push the container to a Docker registry [Docker Platform only]. Boolean
--query, -q Filter which components get selected by component and namespace name. Can be a regex. Example: “^mynamespace/component1$”. String
--query_name Filter which components get selected by component name. Can be a regex. Example: “^component1”. String
--query_namespace, -n Filter which namespaces get selected by namespace name. Can be a regex. Example: “^mynamespace$”. String
--setup Which setup strategy for creating the container to use [Docker Platform only]. String
--src, -s A source directory containing viash config files, possibly structured in a hierarchical folder structure. Default: src/. String
--target, -t A target directory to build the executables into. Default: target/. String
--write_meta, -w Write out some meta information to RESOURCES_DIR/viash.yaml at the end. Boolean
--help, -h Show help message

viash ns test

Test a namespace containing many viash config files.

Usage:

viash ns test [-n nmspc] [-s src] [-p docker] [--parallel] [--tsv file.tsv] [--append]

Argument Description Type
--append, -a Append to tsv instead of overwrite Boolean
--config_mod, -c Modify a viash config at runtime using dynamic config modding. List[String]
--keep, -k Whether or not to keep temporary files. By default, files will be deleted if all goes well but remain when an error occurs. By specifying –keep true, the temporary files will always be retained, whereas –keep false will always delete them. The temporary directory can be overwritten by setting defining a VIASH_TEMP directory. String
--parallel, -l Whether or not to run the process in parallel. Boolean
--platform, -p Acts as a regular expression to filter the platform ids specified in the found config files. If this is not provided, all platforms will be used. If no platforms are defined in a config, the native platform will be used. In addition, the path to a platform yaml file can also be specified. String
--query, -q Filter which components get selected by component and namespace name. Can be a regex. Example: “^mynamespace/component1$”. String
--query_name Filter which components get selected by component name. Can be a regex. Example: “^component1”. String
--query_namespace, -n Filter which namespaces get selected by namespace name. Can be a regex. Example: “^mynamespace$”. String
--src, -s A source directory containing viash config files, possibly structured in a hierarchical folder structure. Default: src/. String
--tsv, -t Path to write a summary of the test results to. String
--help, -h Show help message

viash ns list

List a namespace containing many viash config files.

Usage:

viash ns list [-n nmspc] [-s src] [-p docker]

Argument Description Type
--config_mod, -c Modify a viash config at runtime using dynamic config modding. List[String]
--format, -f Which output format to use. String
--parallel, -l Whether or not to run the process in parallel. Boolean
--parse_argument_groups Whether or not to postprocess each component’s argument groups. Boolean
--platform, -p Acts as a regular expression to filter the platform ids specified in the found config files. If this is not provided, all platforms will be used. If no platforms are defined in a config, the native platform will be used. In addition, the path to a platform yaml file can also be specified. String
--query, -q Filter which components get selected by component and namespace name. Can be a regex. Example: “^mynamespace/component1$”. String
--query_name Filter which components get selected by component name. Can be a regex. Example: “^component1”. String
--query_namespace, -n Filter which namespaces get selected by namespace name. Can be a regex. Example: “^mynamespace$”. String
--src, -s A source directory containing viash config files, possibly structured in a hierarchical folder structure. Default: src/. String
--help, -h Show help message

viash ns exec

Execute a command for all found Viash components. The syntax of this command is inspired by find . -exec echo {} \;.

The following fields are automatically replaced:

  • {} | {path}: path to the config file
  • {abs-path}: absolute path to the config file
  • {dir}: path to the parent directory of the config file
  • {abs-dir}: absolute path to the directory of the config file
  • {main-script}: path to the main script (if any)
  • {abs-main-script}: absolute path to the main script (if any)
  • {functionality-name}: name of the component

A command suffixed by \; (or nothing) will execute one command for each of the Viash components, whereas a command suffixed by + will execute one command for all Viash components.

Usage:

viash ns exec 'echo {path} \\;'

viash ns exec 'chmod +x {main-script} +'

Argument Description Type
--cmd The command to execute for each viash config file in the namespace. This is a required argument. String
--config_mod, -c Modify a viash config at runtime using dynamic config modding. List[String]
--dry_run, -d Perform a dry run. Boolean
--parallel, -l Whether or not to run the process in parallel. Boolean
--platform, -p Acts as a regular expression to filter the platform ids specified in the found config files. If this is not provided, all platforms will be used. If no platforms are defined in a config, the native platform will be used. In addition, the path to a platform yaml file can also be specified. String
--query, -q Filter which components get selected by component and namespace name. Can be a regex. Example: “^mynamespace/component1$”. String
--query_name Filter which components get selected by component name. Can be a regex. Example: “^component1”. String
--query_namespace, -n Filter which namespaces get selected by namespace name. Can be a regex. Example: “^mynamespace$”. String
--src, -s A source directory containing viash config files, possibly structured in a hierarchical folder structure. Default: src/. String
--help, -h Show help message