Skip to content

Unable to validate workflow with CommandLineBinding #116

Closed

Description

@stefan-pdx

If you take a look at the bwa-mem-tool.cwl workflow definition in conformance tests, you'll notice the following:

  1. In the inputs section of the workflow document, there's an inputBinding property that describes position (ref).
  2. From what I can see, Binding does not have position as a field. (ref)
  3. However, CommandLineBinding does have position as a field. (ref)

How is this passing conformance tests?

It seems like that the InputParameter record should include CommandLineBinding as a type for the inputBinding field. For example:

- name: InputParameter
  type: record
  extends: Parameter
  docAfter: Parameter
  specialize: {Schema: InputSchema}
  fields:
    - name: id
      type: string
      jsonldPredicate: "@id"
      doc: "The unique identifier for this parameter object."
    - name: "inputBinding"
      type: [ "null", "Binding", "CommandLineBinding" ]

Alternatively, allow the Process record to have CommandInputParameter types in the inputs field.

Activity

  1. tetron commented on Aug 26, 2015

    @tetron
    Member

    CommandInputParameter extends InputSchema and specializes Binding to CommandLineBinding. CommandLineTool extends Process and specializes InputParameter to CommandInputParameter.

    That means the type of CommandLineTool.inputs is CommandInputParameter.

  2. stefan-pdx commented on Aug 27, 2015

    @stefan-pdx
    Author

    Ah -- thanks for the clarification. I was under the assumption that once the Avro schema was expanded then we would be able to validate a document (such as bwa-mem-tool.cwl) to that schema according to validation methods available in Avro libraries.

    Is schema_salad going to be providing guidelines for validating CWL documents?

    Thanks!


    Edit: Ah -- disregard my last message. I think this issue was local to my schema configuration.

  3. tetron commented on Aug 27, 2015

    @tetron
    Member

    Ah -- thanks for the clarification. I was under the assumption that once the Avro schema was expanded then we would be able to validate a document (such as bwa-mem-tool.cwl) to that schema according to validation methods available in Avro libraries.

    The CWL reference implementation uses a custom validator for a few reasons. The original motivation was actually just to get better error messages because the Avro validate() method just returns a boolean with no indication of why validation failed. Later I added an optional "strict" validation that fails on unrecognized fields (which is useful for spotting typos) and support for wildcard Any type that you noted in #117.

    So if we can find a workaround for the Any type, then it should be possible to use the standard Avro validation tools.

    Is schema_salad going to be providing guidelines for validating CWL documents?

    Yes. I'm going to embed the documentation into the salad metaschema to produce a specification document similar to the CWL specification document.

  4. mr-c commented on Oct 26, 2015

    @mr-c
    Member

    @slnovak Thank you for opening this issue. It looks like @tetron has responded to your question so I am going to close it. Feel free to reopen it, or to make a new issue as appropriate.

  5. added a commit that references this issue on Jul 20, 2017
  6. added a commit that references this issue on Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions