cwltool
cwltool copied to clipboard
If a workflow step input has a type of `[File, Directory]`, spurious warnings are emitted
If you define a CommandLineTool
which has an input of type [File, Directory]
, using this parameter in a wofkflow results in a spurious warning of:
Warning: invalid field `nameroot`, expected one of: 'class', 'location', 'path', 'basename', 'listing'
Warning: invalid field `nameext`, expected one of: 'class', 'location', 'path', 'basename', 'listing'
Expected Behavior
The warnings do not appear.
Actual Behavior
The warnings do appear.
Workflow Code
workflow.cwl
cwlVersion: v1.2
class: Workflow
inputs: []
steps:
- id: step1
in: []
run: cmd1.cwl
out: [directory]
- id: step2
in:
directory: step1/directory
run: cmd2.cwl
out: []
outputs: []
cmd1.cwl
cwlVersion: v1.2
class: CommandLineTool
id: cmd1
baseCommand:
- mkdir
- directory
inputs: []
outputs:
directory:
type: Directory
outputBinding:
glob: directory
cmd2.cwl
cwlVersion: v1.2
class: CommandLineTool
id: cmd2
baseCommand:
- ls
inputs:
directory:
type:
- Directory
- File
inputBinding:
position: 1
outputs: []
Full Traceback
$ cwltool --debug workflow.cwl
INFO /home/user/Documents/checkouts/cwltool/venv/bin/cwltool 3.1.20221115160822
INFO Resolved 'workflow.cwl' to 'file:///home/user/Documents/checkouts/cwltool/my/workflow.cwl'
DEBUG Parsed job order from command line: {
"id": "workflow.cwl"
}
DEBUG [workflow ] initialized from file:///home/user/Documents/checkouts/cwltool/my/workflow.cwl
INFO [workflow ] start
DEBUG [workflow ] inputs {}
DEBUG [workflow ] job step file:///home/user/Documents/checkouts/cwltool/my/workflow.cwl#step2 not ready
INFO [workflow ] starting step step1
DEBUG [step step1] job input {}
DEBUG [step step1] evaluated job input to {}
INFO [step step1] start
DEBUG [job step1] initializing from file:///home/user/Documents/checkouts/cwltool/my/cmd1.cwl#cmd1 as part of step step1
DEBUG [job step1] {}
DEBUG [job step1] path mappings is {}
DEBUG [job step1] command line bindings is [
{
"position": [
-1000000,
0
],
"datum": "mkdir"
},
{
"position": [
-1000000,
1
],
"datum": "directory"
}
]
DEBUG [job step1] initial work dir {}
INFO [job step1] /tmp/72ugel1k$ mkdir \
directory
DEBUG Could not collect memory usage, job ended before monitoring began.
INFO [job step1] completed success
DEBUG [job step1] outputs {
"directory": {
"location": "file:///tmp/72ugel1k/directory",
"basename": "directory",
"nameroot": "directory",
"nameext": "",
"class": "Directory"
}
}
DEBUG [step step1] produced output {
"file:///home/user/Documents/checkouts/cwltool/my/workflow.cwl#step1/directory": {
"location": "file:///tmp/72ugel1k/directory",
"basename": "directory",
"nameroot": "directory",
"nameext": "",
"class": "Directory"
}
}
INFO [step step1] completed success
DEBUG [job step1] Removing input staging directory /tmp/arn5kz29
DEBUG [job step1] Removing temporary directory /tmp/xpc1uscj
INFO [workflow ] starting step step2
DEBUG [step step2] job input {
"file:///home/user/Documents/checkouts/cwltool/my/workflow.cwl#step2/directory": {
"location": "file:///tmp/72ugel1k/directory",
"basename": "directory",
"nameroot": "directory",
"nameext": "",
"class": "Directory"
}
}
DEBUG [step step2] evaluated job input to {
"file:///home/user/Documents/checkouts/cwltool/my/workflow.cwl#step2/directory": {
"location": "file:///tmp/72ugel1k/directory",
"basename": "directory",
"nameroot": "directory",
"nameext": "",
"class": "Directory"
}
}
INFO [step step2] start
Warning: invalid field `nameroot`, expected one of: 'class', 'location', 'path', 'basename', 'listing'
Warning: invalid field `nameext`, expected one of: 'class', 'location', 'path', 'basename', 'listing'
DEBUG [job step2] initializing from file:///home/user/Documents/checkouts/cwltool/my/cmd2.cwl#cmd2 as part of step step2
DEBUG [job step2] {
"directory": {
"location": "file:///tmp/72ugel1k/directory",
"basename": "directory",
"nameroot": "directory",
"nameext": "",
"class": "Directory"
}
}
DEBUG [job step2] path mappings is {
"file:///tmp/72ugel1k/directory": [
"/tmp/72ugel1k/directory",
"/tmp/zmdmhchf/stgf8ab6da1-48e3-42b8-9d9b-988a3b5abfa1/directory",
"Directory",
true
]
}
DEBUG [job step2] command line bindings is [
{
"position": [
-1000000,
0
],
"datum": "ls"
},
{
"position": [
1,
"directory"
],
"datum": {
"location": "file:///tmp/72ugel1k/directory",
"basename": "directory",
"nameroot": "directory",
"nameext": "",
"class": "Directory",
"path": "/tmp/zmdmhchf/stgf8ab6da1-48e3-42b8-9d9b-988a3b5abfa1/directory",
"dirname": "/tmp/zmdmhchf/stgf8ab6da1-48e3-42b8-9d9b-988a3b5abfa1"
}
}
]
DEBUG [job step2] initial work dir {}
INFO [job step2] /tmp/357pyxc8$ ls \
/tmp/zmdmhchf/stgf8ab6da1-48e3-42b8-9d9b-988a3b5abfa1/directory
DEBUG Could not collect memory usage, job ended before monitoring began.
INFO [job step2] completed success
DEBUG [job step2] outputs {}
DEBUG [step step2] produced output {}
INFO [step step2] completed success
INFO [workflow ] completed success
DEBUG [workflow ] outputs {}
DEBUG [job step2] Removing input staging directory /tmp/zmdmhchf
DEBUG [job step2] Removing temporary directory /tmp/ht2_s5q8
DEBUG Removing intermediate output directory /tmp/357pyxc8
DEBUG Removing intermediate output directory /tmp/72ugel1k
DEBUG Removing intermediate output directory /tmp/5zhy_b_g
{}INFO Final process status is success
Your Environment
- cwltool version:
$ cwltool --version
/home/user/Documents/checkouts/cwltool/venv/bin/cwltool 3.1.20221115160822
(using the tip of main
)