common-workflow-language / common-workflow-language/cwl-v1.3
envValue does not accept int
- Dominant language
- Common Workflow Language
- Stars
- 6
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Trying to inject an integer into the environment from an input value yields the following:
```
'envValue expression must evaluate to a str. Got '6' for expression '$(inputs.threads)'.
```
any minimal .cwl that has includes the following would produce the same error:
```
requirements:
- class: EnvVarRequirement
envDef:
THREADS: $(inputs.threads)
inputs:
threads:
doc: |-
The number of parallel iterations.
type: string
default: 4
```
As it is "threads" it should not accept anything other than an integer. I can think of a JS workaround converting it to a string but why exactly can't this be other flat atomic values?
I confirmed that it is indeed only accepting string inputs here:
https://www.commonwl.org/v1.0/CommandLineTool.html#EnvVarRequirement
cwltool version: 3.1.20211107152837
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the minimal CWL example in the issue and the EnvVarRequirement section of the linked Common Workflow Language v1.0 specification. Reproduce the behavior with cwltool version 3.1.20211107152837, then determine whether the specification should permit integer or other atomic values in environment definitions. Done means the expected type behavior is decided and reflected consistently in the specification and its validation or test coverage.
Written by the indexing model from the issue text.
Assessment
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100