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

`format` checking should be part of `--validate`

Open
#1,290 0 comments 0 reactions 0 assignees View on GitHub
bug gsoc help wanted
Dominant language
Python
Stars
376
Forks
255
Avg merge
2d 7h
Merged PRs (30d)
12

Description

In the example below, `cwltool --validate` should fail, as step `first`'s `that` output has a static format that does not match step `second`'s `other` input.

If `steps.first.run.outputs.that.format` was changed from `iana:text/plain` to `$(inputs.this.format)` then `--validate` should also fail as neither `iana:text/plain` nor `iana:text/rtf` match the required format `iana:text/xml`

- [ ] format checking of static formats
- [ ] format checking of pass through CWL expression formats

``` cwl
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: Workflow

inputs: []

steps:
first:
run:
class: CommandLineTool
inputs:
this:
type: File
format: [iana:text/plain, iana:text/rtf]
baseCommand: whoami
stdout: stdout.txt
outputs:
that:
type: File
format: iana:text/plain
outputBinding:
glob: stdout.txt
in:
this:
default:
class: File
contents: Foo
format: iana:text/plain

out: [ that ]
second:
run:
class: CommandLineTool
inputs:
other:
type: File
format: iana:text/xml
baseCommand: echo
arguments: [ $(inputs.other.format) ]
outputs:
result: stdout
in:
other: first/that
out: [ result ]

outputs:
result:
type: File
outputSource: second/result

$namespaces: { iana: https://www.iana.org/assignments/media-types/ }

```

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.