Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] To require, or not to require #729

Open
2 tasks done
rcannood opened this issue Jun 26, 2024 · 0 comments
Open
2 tasks done

[BUG] To require, or not to require #729

rcannood opened this issue Jun 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@rcannood
Copy link
Member

What happened?

There is a discrepancy between the behaviour of an executable vs. a nextflow module. More specifically, when a Viash component has an argument that is required but also already has a default value. When running the component without providing a value for the argument, should the component produce an error?

  • Executables currently throw an error stating that the argument is required
  • Nextflow modules just use the default value

Steps to reproduce

Contents of config.vsh.yaml:

name: test
arguments:
  - type: string
    name: --string
    default: foo
    required: true
resources:
  - type: python_script
    text: print(par)
runners:
  - type: executable
  - type: nextflow
viash ns build --parallel

Executables return an error:

target/executable/test/test
[error] --string is a required argument. Use --help to get more information on the parameters.

Nextflow modules do not:

nextflow run target/nextflow/test/main.nf
N E X T F L O W  ~  version 23.10.0
Launching `target/nextflow/test/main.nf` [maniac_davinci] DSL2 - revision: 48a6cf6211
executor >  local (2)
[c0/62cf8e] process > test:processWf:test_process (run)                  [100%] 1 of 1 ✔
[e6/7bdcea] process > test:publishStatesSimpleWf:publishStatesProc (run) [100%] 1 of 1 ✔

Expected behavior

That is to be decided. I think I would be favour of the current Nextflow module behaviour, and changing the behaviour of the executable.

Relevant log output

No response

Version

Viash v0.9.0-RC4

Possible solution

No response

Confirmation

  • I have searched the existing issues to make sure this is not a duplicate.
  • I have provided clear and concise information about the bug.

Additional context

No response

@rcannood rcannood added the bug Something isn't working label Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant