What’s new?
The first (major) release this year! The biggest changes are:
Nextflow VDSL3 is now the default Nextflow platform, whereas the legacy Nextflow platform has been deprecated.
Support for tracking memory and cpu requirements more elegantly.
Grouping arguments in groups more concisely.
The addition of a
viash ns execcommand, to be able to execute commands on Viash components more easily.
Full changelog
BREAKING CHANGES
NextflowPlatform:variant: vdsl3is now the default NextflowPlatform.variant: legacyhas been deprecated.Functionality: Fields.inputsand.outputshas been deprecated. Please use.argument_groupsinstead (#186). Before:functionality: inputs: - name: "--foo" outputs: - name: "--bar"Now:
functionality: argument_groups: - name: Inputs arguments: - name: "--foo" type: file - name: Outputs arguments: - name: "--bar" type: file direction: outputPassing strings to an argument group’s arguments has been deprecated. Please simply copy the argument itself into the argument group (#186). Before:
functionality: arguments: - name: "--foo" type: file - name: "--bar" type: file direction: output argument_groups: - name: Inputs arguments: [ foo ] - name: Outputs arguments: [ bar ]Now:
functionality: argument_groups: - name: Inputs arguments: - name: "--foo" type: file - name: Outputs arguments: - name: "--bar" type: file direction: output
NEW FUNCTIONALITY
Allow setting the number of processes and memory limit from within the Viash config, as well as a list of required commands. Example:
functionality: name: foo requirements: cpus: 10 memory: 10GB commands: [ bash, r, perl ]You can override the default requirements at runtime:
./foo ---cpus 4 ---memory 100PB(for NativePlatform or DockerPlatform)- By adding
process.cpus = 4andprocess.memory "100 PB"to a nextflow.config (for NextflowPlatform)
This results the following meta variables to be injected into a script:
meta_cpus(in Bash) ormeta["cpus"](in any other language): Number of processes the script is allowed to spawn.meta_memory_b(in Bash) ormeta["memory_b"](in any other language): Amount of memory the script is allowed to allocate, in bytes.meta_memory_kb(in Bash) ormeta["memory_kb"](in any other language): Same but in kilobytes, rounded up.meta_memory_mb(in Bash) ormeta["memory_mb"](in any other language): Same but in megabytes, rounded up.meta_memory_gb(in Bash) ormeta["memory_gb"](in any other language): Same but in gigabytes, rounded up.meta_memory_tb(in Bash) ormeta["memory_tb"](in any other language): Same but in terabytes, rounded up.meta_memory_pb(in Bash) ormeta["memory_pb"](in any other language): Same but in petabytes, rounded up.
viash ns exec: Added a command for executing arbitrary commands for all found Viash components. The syntax of this command is inspired byfind . -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.ConfigMod: Added adel(...)config mod to be able to delete a value from the yaml. Example:del(.functionality.version).
MAJOR CHANGES
Folder structure: Adjusted the folder structure to correctly reflect the the namespace change of viash fromcom.dataintuitive.viashtoio.viash.Functionality: Reworked theenabledfield from boolean to astatusfield which can have the following statusses:enabled,disabledanddeprecated. When parsing a config file which has thestatusfield set todeprecateda warning message is displayed on stderr. Backwards forenabledis provided whereenabled: true=>status: enabledandenabled: false=>status: false. Theenabledfield is marked deprecated.
MINOR CHANGES
Resources: Handle edge case when no resources are specified in thevsh.yamlconfig file and display a warning message.BashWrapper: Add a warning when an argument containing flags (e.g.--foo) is not recognized and will be handled as a positional argument as this is likely a mistake.Functionality: Add check to verify there are no double argument names or short names in the configvsh.yamldeclarations.BashWrapper: Add check to verify a parameter isn’t declared twice on the CLI, except in the casemultiple: trueis declared as then it’s a valid use case.BashWrapper: For int min/max checking: use native bash functionality so there is no dependency tobc. For double min/max checking: add fallback code to useawkin casebcis not present on the system (most likely to happen when running tests in a docker container).viash ns list/viash config view: Allow viewing the post-processed argument groups by passing the--parse_argument_groupsparameter.
TESTING
ConfigMod: Added unit tests for condition config mods.MainTestDockerSuite: Derive config alternatives from the basevsh.yamlinstead of adding the changes in separate files. This both reduces file clutter and prevents having to change several files when there are updates in the config format.GitTest: Added unit tests for Git helper (PR #216).
BUG FIXES
csharp_script,javascript_script,python_script,r_script,scala_script: Make meta fields formemoryandcpusoptional.NextflowVdsl3Platform: Don’t generate an error when--publish_diris not defined and-profile no_publishis used.Viash run: Viash now properly returns the exit code from the executed script.Git: Fix incorrect metadata when git repository is empty (PR #216).