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

Clarify which task elements and workflows are singular and which can be specified multiple times. #594

Closed
claymcleod opened this issue Dec 7, 2023 · 2 comments
Assignees
Labels
K-clarification (Kind) Clarifications regarding the WDL specification. Z-specification-change (Metadata) An issue or PR related to a specification change.
Milestone

Comments

@claymcleod
Copy link
Collaborator

claymcleod commented Dec 7, 2023

There a quite few workflow and task elements that the specification appears to imply can only occur once but that the grammar allows multiple occurrences.

For example, take a look at the task elements:

For what it's worth, every example I have seen appears to follow the above conventions.

Contrast that with the parser implementation, which I interpret as (paraphrasing): a task can contain one or more task elements. A task element is defined as a task_input section, a task_output section, a task_command section, a task_runtime section, a bound_decls section, a parameter_metasection, or a meta section. As such, it follows that these elements can be defined multiple times.

claymcleod added a commit to claymcleod/wdl that referenced this issue Dec 12, 2023
Previously, the number of sections within `task` and `workflow` blocks
was implied rather than explicit. This commit introduces clear, concise
language describing the number of sections allowed and whether each
section is required/optional. Furhter, some housekeeping items were
included to make the editted text more consistent.

Closes openwdl#594
claymcleod added a commit to claymcleod/wdl that referenced this issue Dec 12, 2023
Previously, the number of sections within `task` and `workflow` blocks
was implied rather than explicit. This commit introduces clear, concise
language describing the number of sections allowed and whether each
section is required/optional. Furhter, some housekeeping items were
included to make the editted text more consistent.

Closes openwdl#594
claymcleod added a commit to claymcleod/wdl that referenced this issue Dec 12, 2023
Previously, the number of sections within `task` and `workflow` blocks
was implied rather than explicit. This commit introduces clear, concise
language describing the number of sections allowed and whether each
section is required/optional. Furhter, some housekeeping items were
included to make the editted text more consistent.

Closes openwdl#594
claymcleod added a commit to claymcleod/wdl that referenced this issue Dec 12, 2023
Previously, the number of sections within `task` and `workflow` blocks
was implied rather than explicit. This commit introduces clear, concise
language describing the number of sections allowed and whether each
section is required/optional. Furhter, some housekeeping items were
included to make the editted text more consistent.

Closes openwdl#594
claymcleod added a commit to claymcleod/wdl that referenced this issue Dec 12, 2023
Previously, the number of sections within `task` and `workflow` blocks
was implied rather than explicit. This commit introduces clear, concise
language describing the number of sections allowed and whether each
section is required/optional. Furhter, some housekeeping items were
included to make the editted text more consistent.

Closes openwdl#594
@patmagee
Copy link
Member

@claymcleod this is a general limitation of the grammars/parsers. We did not want to enforce strict ordering of task/workflow elements which would be required to use the grammar to enforce a single occurrence

  • Only one input block is allowed in a workflow / task and it can happen anywhere in task.
  • Any number of private declarations are allowed, but you cannot have two of the same declarations
  • Only one command block is allowed
  • Only one outputs section is allowed per workflow/task
  • Only one runtime Sections is allowed
  • Only one meta/parmeter-meta is allowed per workflow/task

@jdidion
Copy link
Collaborator

jdidion commented Dec 15, 2023

Agree with Patrick - this is true at least for the ANTLR parser. But I support adding clarification to the spec.

@jdidion jdidion added this to the 1.1.2 milestone Feb 6, 2024
@jdidion jdidion added Z-specification-change (Metadata) An issue or PR related to a specification change. K-clarification (Kind) Clarifications regarding the WDL specification. labels Feb 6, 2024
@jdidion jdidion moved this to In Progress in WDL v1.1.2 Feb 7, 2024
@jdidion jdidion moved this from In Progress to In Review in WDL v1.1.2 Feb 10, 2024
claymcleod added a commit to claymcleod/wdl that referenced this issue Mar 23, 2024
Previously, the number of sections within `task` and `workflow` blocks
was implied rather than explicit. This commit introduces clear, concise
language describing the number of sections allowed and whether each
section is required/optional. Furhter, some housekeeping items were
included to make the editted text more consistent.

Closes openwdl#594
claymcleod added a commit to claymcleod/wdl that referenced this issue Mar 23, 2024
Previously, the number of sections within `task` and `workflow` blocks
was implied rather than explicit. This commit introduces clear, concise
language describing the number of sections allowed and whether each
section is required/optional. Furhter, some housekeeping items were
included to make the editted text more consistent.

Also included in this commit (these changes were squashed):

* revise: adds suggested ordering to elements

This is based on @geoffjentry's suggestions on openwdl#598.

* revise: adds `requirements` and `hints`, removes ordering
  recommendations

Closes openwdl#594
@jdidion jdidion moved this from In Review to Done in WDL v1.1.2 Apr 8, 2024
@jdidion jdidion closed this as completed May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
K-clarification (Kind) Clarifications regarding the WDL specification. Z-specification-change (Metadata) An issue or PR related to a specification change.
Projects
Status: Done
3 participants