common-workflow-language / common-workflow-language

Repository for the CWL standards. Use https://cwl.discourse.group/ for support 😊

Home Page:https://www.commonwl.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

commented

Should this be tested both within a workflow and within a commandlinetool?

commented

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;}