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

Input of array of enum is not recognized by the cwltool command line input object feature

Open
#576 3 comments 0 reactions 1 assignee Claimed by @ThomasHickman View on GitHub
bug
Dominant language
Python
Stars
376
Forks
255
Avg merge
2d 7h
Merged PRs (30d)
12

Description

If an input is defined as an array of enum, cwltool is unable to make a command line argument from it:

```
inputs:
applications:
type:
- type: array
items:
type: enum
symbols:
- a
- b
inputBinding:
itemSeparator: ","
prefix: --applications
```

## Expected Behavior
`cwltool --debug https://raw.githubusercontent.com/esanzgar/webservice-cwl/master/docker_cwls/array_enum.cwl --application a --application b` should feed `--applications a,b` to the tool.

## Actual Behavior
```
cwltool --debug https://raw.githubusercontent.com/esanzgar/webservice-cwl/master/docker_cwls/array_enum.cwl --application a --application b

Can't make command line argument from [ordereddict([('type', 'array'), ('items', ordereddict([('type', 'enum'), ('symbols', [u'https://raw.githubusercontent.com/esanzgar/webservice-cwl/master/docker_cwls/array_enum.cwl#applications/a', u'https://raw.githubusercontent.com/esanzgar/webservice-cwl/master/docker_cwls/array_enum.cwl#applications/b']), ('name', u'applicationsbf7fee68-a1f1-410b-a430-39c74fc57643')]))])]
usage: https://raw.githubusercontent.com/esanzgar/webservice-cwl/master/docker_cwls/array_enum.cwl
[-h] [job_order]
https://raw.githubusercontent.com/esanzgar/webservice-cwl/master/docker_cwls/array_enum.cwl: error: unrecognized arguments: --application --application b
```

## Workflow Code
```
cwltool --debug https://raw.githubusercontent.com/esanzgar/webservice-cwl/master/docker_cwls/array_enum.cwl --application a --application b
```

## Your Environment
* cwltool version: 1.0.20170928192020

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.