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

munge spaces when generating CLI interface #515

Open
AleksandrSl opened this issue Aug 9, 2017 · 2 comments
Open

munge spaces when generating CLI interface #515

AleksandrSl opened this issue Aug 9, 2017 · 2 comments

Comments

@AleksandrSl
Copy link

Expected Behavior

Validation shouldn't be passed

Actual Behavior

Validation is passed

Workflow Code

cwlVersion: v1.0
class: CommandLineTool

baseCommand: [echo]

inputs:
  some string:
     type: string
     inputBinding:
       position: 1

outputs: []

Tool usage looks like this and it says that --some string is an argument name

usage: test.cwl [-h] --some string SOME STRING [job_order]
test.cwl: error: argument --some string is required

But of course this doesn't work this way:

cwltool test.cwl --some string abcdef
------
[Errno 2] No such file or directory: '/mnt/projects/ASIL/pipelines/torrent-cwl-pipeline/abcdef'

But surprisingly works this way:

cwltool test.cwl --some string
--------
[job test.cwl] /tmp/tmpzbyAR6$ echo \
    string
string
[job test.cwl] completed success
{}
Final process status is success

Maybe some general constraints on id's value, are needed. Now its value is just a string as in doc or format, however there spaces are possible, and in id I think it's reasonable to avoid them

Your Environment

  • cwltool version: 1.0.20170803160545
@mr-c
Copy link
Member

mr-c commented Aug 9, 2017

Hello @AleksandrSl and thank you for your issue.

FYI, cwltool test.cwl --some\ string test does work. For generating the dynamic command line interface we could replace a space with an underscore.

Briefly skimming the CWL specification this is not an invalid name, though it is a confusing one. We could choose to deprecate or ban spaces in identifiers in a future release of the CWL standard if people want that.

@AleksandrSl
Copy link
Author

@mr-c Thanks for the answer!

@mr-c mr-c changed the title Invalid file passes validation munge spaces when generating CLI interface Aug 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants