viash-io / viash

script + metadata = standalone component
https://viash.io
GNU General Public License v3.0
39 stars 2 forks source link

Unable to parse arguments that lack defaults in the config file #46

Closed tpadayachee closed 3 years ago

tpadayachee commented 3 years ago

Viash version: 0.3.0

If the code below in included in the config file of a component named 'de' and --de__species 'Mouse' is included in a Nextflow pipeline command, the parsed value of species is null instead of 'Mouse'.

   - name: "--species"
     type: string
     description: Should be either 'Mouse' or 'Human'.
     direction: input
     required: true

Changing the config file to include a default value for species (as shown below), solves the problem:

   - name: "--species"
     type: string
     description: Should be either 'Mouse' or 'Human'.
     default: "Human"
     direction: input
     required: true
tverbeiren commented 3 years ago

This is tackled in

and will be included in a new release.

Please note that with this commit, the following logic is followed:

If an argument is required: true, it can have

If an argument is required: false, it can have