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

specifying float or int inputs on command line to cwltool doesn't work

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

Description

- [ ] fix it
- [ ] add a test

make-instructions.cwl
``` yaml
#!/usr/bin/env cwl-runner

cwlVersion: v1.0
class: CommandLineTool

inputs:
numbers:
type: int[]
inputBinding:
itemSeparator: "+"

baseCommand: [ echo ]

outputs:
response: stdout
```
```
(env) michael@dan:~/workshop$ cwltool make-instructions.cwl --numbers 1
/home/michael/workshop/env/bin/cwltool 1.0.20170309164828
Resolved 'make-instructions.cwl' to 'file:///home/michael/workshop/make-instructions.cwl'
invalid field `job_order`, expected one of: 'numbers'
Workflow error, try again with --debug for more information:
Invalid job input record:
the `numbers` field is not valid because
item is invalid because
`'1'` is not int
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with make-instructions.cwl and the documented cwltool command, then locate the command-line input conversion path for int[] and float inputs. Add the requested regression test alongside the existing tests; done means valid numeric command-line values are accepted and the test passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.