Skip to content

Conversation

@GlassOfWhiskey
Copy link
Collaborator

@GlassOfWhiskey GlassOfWhiskey commented Nov 10, 2025

This commit adds three conformance tests for the cwl.output.json feature:

  • The first test confirms that if the cwl.output.json file contains a field that has not been declared in the outputs section of a CWL CommandLineTool, that field is discarded (fix [Proposal] If cwl.output.json is created by the tool, outputs not listed in the CWL tool description must be removed #80)
  • The second test confirms that outputs from cwl.output.json are type-checked according to the type declared in the outputs section of the CommandLineTool
  • The third test confirms that if an output is not present in the cwl.output.json file but has been declared as required in the outputs section of a CWL CommandLineTool, the execution fails

This commit adds three conformance tests for the `cwl.output.json`
feature:
- The first test confirms that if the `cwl.output.json` file contains a
  field that has not been declared in the `output` object of a CWL
  `CommandLineTool`, that field is discarded (fix #80)
- The second test confirms that outputs from `cwl.output.json` are
  type-checked according to the type declared in the `output` object
  of the `CommandLineTool`
- The third test confirms that if an output is not present in the
  `cwl.output.json` file but has been declared as required in the
  `output` object of a CWL `CommandLineTool`, the execution fails
Copy link
Member

@mr-c mr-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I added some change requests

Comment on lines +162 to +165
section, but `outputBinding` is ignored. If an output name is present
in the "cwl.output.json" file, but has not been declared in the
`outputs` section, it must be ignored and not propagated to the next
steps.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
section, but `outputBinding` is ignored. If an output name is present
in the "cwl.output.json" file, but has not been declared in the
`outputs` section, it must be ignored and not propagated to the next
steps.
section, but `outputBinding` is ignored. Any output is present in the
"cwl.output.json" file but not declared in the `outputs` section must
be discarded from the output object.

Comment on lines +54 to +57
* If an output name is present in the "cwl.output.json" file, but has
not been declared in the `outputs` section, it must be ignored and
not propagated to the next steps. Previous versions of CWL exhibited
undefined behaviour for this occurrence.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* If an output name is present in the "cwl.output.json" file, but has
not been declared in the `outputs` section, it must be ignored and
not propagated to the next steps. Previous versions of CWL exhibited
undefined behaviour for this occurrence.
* [Output Binding](#Output_binding): Any output present in the
"cwl.output.json" file but not declared in the `outputs` section must
be discarded from the output object. Previous versions of CWL did not
define if undeclared outputs in "cwl.output.json" should be present
in the output object.

Comment on lines +3 to +17
requirements:
- class: ShellCommandRequirement
hints:
DockerRequirement:
dockerPull: docker.io/debian:stable-slim

inputs: []

baseCommand: sh

arguments:
- -c
- |
echo foo > foo && echo '{"foo": {"location": "foo", "class": "File"} }'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refactor this test to not use ShellCommandRequirement so that the conformance test doesn't have to be tagged shell_command and can keep its required tag.

Comment on lines +4 to +16
- class: ShellCommandRequirement
hints:
DockerRequirement:
dockerPull: docker.io/debian:stable-slim

inputs: []

baseCommand: sh

arguments:
- -c
- |
echo foo > foo && echo '{"foo": {"location": "foo", "class": "File"} }'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refactor this test to not use ShellCommandRequirement so that the conformance test doesn't have to be tagged shell_command and can keep its required tag.

Comment on lines +3 to +16
requirements:
- class: ShellCommandRequirement
hints:
DockerRequirement:
dockerPull: docker.io/debian:stable-slim

inputs: []

baseCommand: sh

arguments:
- -c
- |
echo foo > foo && echo '{"foo": {"location": "foo", "class": "File"} }'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please refactor this test to not use ShellCommandRequirement so that the conformance test doesn't have to be tagged shell_command and can keep its required tag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Proposal] If cwl.output.json is created by the tool, outputs not listed in the CWL tool description must be removed

3 participants