common-workflow-language / common-workflow-language/cwltool

unable to parse type: long as input through cli

Open
#385 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
376
Forks
255
Avg merge
2d 7h
Merged PRs (30d)
12

Description

If I input type `long` through a json file, cwltool can parse the long, but if I use the cli to pass the parameter, I get an error.

emit_long.cwl
```
#!/usr/bin/env cwl-runner

cwlVersion: v1.0

class: CommandLineTool

inputs:
- id: input
type: long
inputBinding:
position: 0

outputs:
- id: output
type: string
outputBinding:
glob: output
loadContents: true
outputEval: $(self[0].contents)

stdout: output

baseCommand: [printf]
```

emit_long.json
```
{
"input": 2147483648
}
```

```
cwltool emit_long.cwl emit_long.json
/home/jeremiah/.virtualenvs/cwl/bin/cwltool 1.0.20170510165748
Resolved 'emit_long.cwl' to 'file:///home/jeremiah/emit_long.cwl'
[job emit_long.cwl] /tmp/tmpJNLfZB$ printf \
2147483648 > /tmp/tmpJNLfZB/output
[job emit_long.cwl] completed success
{
"output": "2147483648"
}
Final process status is success
```

```
cwltool emit_long.cwl --input 2147483648
/home/jeremiah/.virtualenvs/cwl/bin/cwltool 1.0.20170510165748
Resolved 'emit_long.cwl' to 'file:///home/jeremiah/emit_long.cwl'
usage: emit_long.cwl [-h] [job_order]
emit_long.cwl: error: unrecognized arguments: --input
```

```
cwltool --version
/home/jeremiah/.virtualenvs/cwl/bin/cwltool 1.0.20170510165748
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.