Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format checking should be part of --validate #1290

Open
2 tasks
mr-c opened this issue May 21, 2020 · 0 comments
Open
2 tasks

format checking should be part of --validate #1290

mr-c opened this issue May 21, 2020 · 0 comments

Comments

@mr-c
Copy link
Member

mr-c commented May 21, 2020

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
#!/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/ }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant