Conformance tests for renaming output files with basename
bogdang989 opened this issue · comments
The CWL user guide suggests a feature of renaming output files by changing the basename property in outputEval:
outputs:
otu_table:
type: File
outputBinding:
glob: otu_table.txt
outputEval: ${self[0].basename=inputs.otu_table_name; return self;}
However this kind of behavior is not covered by conformance tests, there should be at least one test for this basic use case
Thanks @bogdang989 ! A PR to https://github.com/common-workflow-language/cwl-v1.2/ would be gladly accepted.
Should this be tested both within a workflow and within a commandlinetool?
also unless I am missing something, this is not valid CWL, since it refers to an input that doesn't exist... I can fix it obviously but perhaps this is not intended to be used as is for the user guide?
cwlVersion: v1.0 # or v1.1
class: CommandLineTool
requirements:
InlineJavascriptRequirement: {}
baseCommand: []
inputs: []
outputs:
otu_table:
type: File
outputBinding:
glob: otu_table.txt
outputEval: ${self[0].basename=inputs.otu_table_name; return self;}