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] file arguments with multiple true require a wildcard but still end up being lists #706

Open
2 tasks done
rcannood opened this issue May 15, 2024 · 0 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@rcannood
Copy link
Member

What happened?

When defining a file argument with multiple: true and direction: output, viash 0.8.6 expects any values passed to that argument to contain a wildcard. E.g.

functionality:
  name: test
  arguments:
    - type: file
      name: --output
      direction: output
      multiple: true
      must_exist: false
  resources:
    - type: python_script
      text: |
        print(par)
$ viash run config.vsh.yaml -- --output foo.txt

[error] --output has to be a path containing a wildcard, e.g. output_*.txt. Use --help to get more information on the parameters.

However, one would then perhaps expect that par["output"] would be a string containing that wildcard, not a list of a string.

$ viash run config.vsh.yaml -- --output foo*.txt
{'output': ['foo*.txt']}

Especially given that viash now does not allow passing multiple values:

$ viash run config.vsh.yaml -- --output foo*.txt --output bar*.txt
[error] Bad arguments for option '--output': 'foo*.txt' & 'bar*.txt' - you should provide exactly one argument for this option.
Files and logs are stored at '/tmp/viash_test12865580121557640188'

Thus, we need to change viash such that it passes par to the script as {"output": "foo*.txt"}.

Steps to reproduce

/

Expected behavior

/

Relevant log output

/

Version

Viash 0.8.6

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 May 15, 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