1 /** 2 * CWL v1.0 parser generated with schema-salad-tool 3 * 4 * This module was generated using schema-salad code generator. 5 * 6 * The embedded document is subject to the license of the original schema. 7 * 8 * License: Apache-2.0 9 * Date: 2024-09-26 10 */ 11 module cwl.v1_0; 12 13 import salad.meta.impl : genBody_; 14 import salad.meta.parser : import_ = importFromURI; 15 import salad.meta.uda : defaultValue, documentRoot, id, idMap, link, LinkResolver, secondaryFilesDSL, typeDSL; 16 import salad.primitives : EnumSchemaBase, MapSchemaBase, RecordSchemaBase, UnionSchemaBase; 17 import salad.type : None, Union; 18 19 /// parser information 20 enum parserInfo = "CWL v1.0 parser generated with schema-salad-tool"; 21 22 // Modified until the following pull request is merged 23 // See_Also: https://github.com/common-workflow-language/schema_salad/pull/861 24 enum saladVersion = "v1.3"; 25 26 mixin template genBody() 27 { 28 mixin genBody_!saladVersion; 29 } 30 31 /** 32 * Names of salad data types (based on Avro schema declarations). 33 * 34 * Refer to the [Avro schema declaration documentation](https://avro.apache.org/docs/current/spec.html#schemas) for 35 * detailed information. 36 * 37 * null: no value 38 * boolean: a binary value 39 * int: 32-bit signed integer 40 * long: 64-bit signed integer 41 * float: single precision (32-bit) IEEE 754 floating-point number 42 * double: double precision (64-bit) IEEE 754 floating-point number 43 * string: Unicode character sequence 44 */ 45 class PrimitiveType : EnumSchemaBase 46 { 47 /// 48 enum Symbol 49 { 50 s0 = "null", /// 51 s1 = "boolean", /// 52 s2 = "int", /// 53 s3 = "long", /// 54 s4 = "float", /// 55 s5 = "double", /// 56 s6 = "string", /// 57 } 58 59 Symbol value; 60 61 mixin genBody; 62 } 63 64 /// 65 public import salad.primitives : Any; 66 67 /** 68 * A field of a record. 69 */ 70 class RecordField : RecordSchemaBase 71 { 72 /** 73 * A documentation string for this object, or an array of strings which should be concatenated. 74 */ 75 Union!(None, string, string[]) doc_; 76 /** 77 * The name of the field 78 */ 79 @id string name_; 80 /** 81 * The field type. If it is an array, it indicates 82 * that the field type is a union type of its elements. 83 * Its elements may be duplicated. 84 */ 85 @typeDSL Union!(PrimitiveType, RecordSchema, EnumSchema, ArraySchema, MapSchema, UnionSchema, string, Union!(PrimitiveType, RecordSchema, EnumSchema, ArraySchema, MapSchema, UnionSchema, string)[]) type_; 86 87 mixin genBody; 88 } 89 90 /// 91 class RecordSchema : RecordSchemaBase 92 { 93 /** 94 * Defines the fields of the record. 95 */ 96 @idMap("name", "type") Union!(None, RecordField[]) fields_; 97 /** 98 * Must be `record` 99 */ 100 static immutable type_ = "record"; 101 102 mixin genBody; 103 } 104 105 /** 106 * Define an enumerated type. 107 */ 108 class EnumSchema : RecordSchemaBase 109 { 110 /// 111 @id Union!(None, string) name_; 112 /** 113 * Defines the set of valid symbols. 114 */ 115 @link(LinkResolver.id) string[] symbols_; 116 /** 117 * Must be `enum` 118 */ 119 static immutable type_ = "enum"; 120 121 mixin genBody; 122 } 123 124 /// 125 class ArraySchema : RecordSchemaBase 126 { 127 /** 128 * Defines the type of the array elements. 129 */ 130 Union!(PrimitiveType, RecordSchema, EnumSchema, ArraySchema, MapSchema, UnionSchema, string, Union!(PrimitiveType, RecordSchema, EnumSchema, ArraySchema, MapSchema, UnionSchema, string)[]) items_; 131 /** 132 * Must be `array` 133 */ 134 static immutable type_ = "array"; 135 136 mixin genBody; 137 } 138 139 /// 140 class MapSchema : RecordSchemaBase 141 { 142 /** 143 * Must be `map` 144 */ 145 static immutable type_ = "map"; 146 /** 147 * Defines the type of the map elements. 148 */ 149 Union!(PrimitiveType, RecordSchema, EnumSchema, ArraySchema, MapSchema, UnionSchema, string, Union!(PrimitiveType, RecordSchema, EnumSchema, ArraySchema, MapSchema, UnionSchema, string)[]) values_; 150 151 mixin genBody; 152 } 153 154 /// 155 class UnionSchema : RecordSchemaBase 156 { 157 /** 158 * Defines the type of the union elements. 159 */ 160 Union!(PrimitiveType, RecordSchema, EnumSchema, ArraySchema, MapSchema, UnionSchema, string, Union!(PrimitiveType, RecordSchema, EnumSchema, ArraySchema, MapSchema, UnionSchema, string)[]) names_; 161 /** 162 * Must be `union` 163 */ 164 static immutable type_ = "union"; 165 166 mixin genBody; 167 } 168 169 /** 170 * Extends primitive types with the concept of a file and directory as a builtin type. 171 * File: A File object 172 * Directory: A Directory object 173 */ 174 class CWLType : EnumSchemaBase 175 { 176 /// 177 enum Symbol 178 { 179 s0 = "null", /// 180 s1 = "boolean", /// 181 s2 = "int", /// 182 s3 = "long", /// 183 s4 = "float", /// 184 s5 = "double", /// 185 s6 = "string", /// 186 s7 = "File", /// 187 s8 = "Directory", /// 188 } 189 190 Symbol value; 191 192 mixin genBody; 193 } 194 195 /// 196 class CWLArraySchema : RecordSchemaBase 197 { 198 /** 199 * Defines the type of the array elements. 200 */ 201 Union!(PrimitiveType, CWLRecordSchema, EnumSchema, CWLArraySchema, string, Union!(PrimitiveType, CWLRecordSchema, EnumSchema, CWLArraySchema, string)[]) items_; 202 /** 203 * Must be `array` 204 */ 205 static immutable type_ = "array"; 206 207 mixin genBody; 208 } 209 210 /// 211 class CWLRecordField : RecordSchemaBase 212 { 213 /** 214 * A documentation string for this object, or an array of strings which should be concatenated. 215 */ 216 Union!(None, string, string[]) doc_; 217 /** 218 * The name of the field 219 */ 220 @id string name_; 221 /** 222 * The field type 223 */ 224 @typeDSL Union!(PrimitiveType, CWLRecordSchema, EnumSchema, CWLArraySchema, string, Union!(PrimitiveType, CWLRecordSchema, EnumSchema, CWLArraySchema, string)[]) type_; 225 226 mixin genBody; 227 } 228 229 /// 230 class CWLRecordSchema : RecordSchemaBase 231 { 232 /** 233 * Defines the fields of the record. 234 */ 235 @idMap("name", "type") Union!(None, CWLRecordField[]) fields_; 236 /** 237 * Must be `record` 238 */ 239 static immutable type_ = "record"; 240 241 mixin genBody; 242 } 243 244 /** 245 * Represents a file (or group of files when `secondaryFiles` is provided) that 246 * will be accessible by tools using standard POSIX file system call API such as 247 * open(2) and read(2). 248 * 249 * Files are represented as objects with `class` of `File`. File objects have 250 * a number of properties that provide metadata about the file. 251 * 252 * The `location` property of a File is a URI that uniquely identifies the 253 * file. Implementations must support the file:// URI scheme and may support 254 * other schemes such as http://. The value of `location` may also be a 255 * relative reference, in which case it must be resolved relative to the URI 256 * of the document it appears in. Alternately to `location`, implementations 257 * must also accept the `path` property on File, which must be a filesystem 258 * path available on the same host as the CWL runner (for inputs) or the 259 * runtime environment of a command line tool execution (for command line tool 260 * outputs). 261 * 262 * If no `location` or `path` is specified, a file object must specify 263 * `contents` with the UTF-8 text content of the file. This is a "file 264 * literal". File literals do not correspond to external resources, but are 265 * created on disk with `contents` with when needed for a executing a tool. 266 * Where appropriate, expressions can return file literals to define new files 267 * on a runtime. The maximum size of `contents` is 64 kilobytes. 268 * 269 * The `basename` property defines the filename on disk where the file is 270 * staged. This may differ from the resource name. If not provided, 271 * `basename` must be computed from the last path part of `location` and made 272 * available to expressions. 273 * 274 * The `secondaryFiles` property is a list of File or Directory objects that 275 * must be staged in the same directory as the primary file. It is an error 276 * for file names to be duplicated in `secondaryFiles`. 277 * 278 * The `size` property is the size in bytes of the File. It must be computed 279 * from the resource and made available to expressions. The `checksum` field 280 * contains a cryptographic hash of the file content for use it verifying file 281 * contents. Implementations may, at user option, enable or disable 282 * computation of the `checksum` field for performance or other reasons. 283 * However, the ability to compute output checksums is required to pass the 284 * CWL conformance test suite. 285 * 286 * When executing a CommandLineTool, the files and secondary files may be 287 * staged to an arbitrary directory, but must use the value of `basename` for 288 * the filename. The `path` property must be file path in the context of the 289 * tool execution runtime (local to the compute node, or within the executing 290 * container). All computed properties should be available to expressions. 291 * File literals also must be staged and `path` must be set. 292 * 293 * When collecting CommandLineTool outputs, `glob` matching returns file paths 294 * (with the `path` property) and the derived properties. This can all be 295 * modified by `outputEval`. Alternately, if the file `cwl.output.json` is 296 * present in the output, `outputBinding` is ignored. 297 * 298 * File objects in the output must provide either a `location` URI or a `path` 299 * property in the context of the tool execution runtime (local to the compute 300 * node, or within the executing container). 301 * 302 * When evaluating an ExpressionTool, file objects must be referenced via 303 * `location` (the expression tool does not have access to files on disk so 304 * `path` is meaningless) or as file literals. It is legal to return a file 305 * object with an existing `location` but a different `basename`. The 306 * `loadContents` field of ExpressionTool inputs behaves the same as on 307 * CommandLineTool inputs, however it is not meaningful on the outputs. 308 * 309 * An ExpressionTool may forward file references from input to output by using 310 * the same value for `location`. 311 */ 312 class File : RecordSchemaBase 313 { 314 /** 315 * Must be `File` to indicate this object describes a file. 316 */ 317 static immutable class_ = "File"; 318 /** 319 * An IRI that identifies the file resource. This may be a relative 320 * reference, in which case it must be resolved using the base IRI of the 321 * document. The location may refer to a local or remote resource; the 322 * implementation must use the IRI to retrieve file content. If an 323 * implementation is unable to retrieve the file content stored at a 324 * remote resource (due to unsupported protocol, access denied, or other 325 * issue) it must signal an error. 326 * 327 * If the `location` field is not provided, the `contents` field must be 328 * provided. The implementation must assign a unique identifier for 329 * the `location` field. 330 * 331 * If the `path` field is provided but the `location` field is not, an 332 * implementation may assign the value of the `path` field to `location`, 333 * then follow the rules above. 334 */ 335 @link() Union!(None, string) location_; 336 /** 337 * The local host path where the File is available when a CommandLineTool is 338 * executed. This field must be set by the implementation. The final 339 * path component must match the value of `basename`. This field 340 * must not be used in any other context. The command line tool being 341 * executed must be able to to access the file at `path` using the POSIX 342 * `open(2)` syscall. 343 * 344 * As a special case, if the `path` field is provided but the `location` 345 * field is not, an implementation may assign the value of the `path` 346 * field to `location`, and remove the `path` field. 347 * 348 * If the `path` contains [POSIX shell metacharacters](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02) 349 * (`|`,`&`, `;`, `<`, `>`, `$(LPAREN)`,`$(RPAREN)`, `$`,`` ` ``, `\`, `"`, `'`, 350 * `<space>`, `<tab>`, and `<newline>`) or characters 351 * [not allowed](http://www.iana.org/assignments/idna-tables-6.3.0/idna-tables-6.3.0.xhtml) 352 * for [Internationalized Domain Names for Applications](https://tools.ietf.org/html/rfc6452) 353 * then implementations may terminate the process with a 354 * `permanentFailure`. 355 */ 356 @link() Union!(None, string) path_; 357 /** 358 * The base name of the file, that is, the name of the file without any 359 * leading directory path. The base name must not contain a slash `/`. 360 * 361 * If not provided, the implementation must set this field based on the 362 * `location` field by taking the final path component after parsing 363 * `location` as an IRI. If `basename` is provided, it is not required to 364 * match the value from `location`. 365 * 366 * When this file is made available to a CommandLineTool, it must be named 367 * with `basename`, i.e. the final component of the `path` field must match 368 * `basename`. 369 */ 370 Union!(None, string) basename_; 371 /** 372 * The name of the directory containing file, that is, the path leading up 373 * to the final slash in the path such that `dirname + '/' + basename == 374 * path`. 375 * 376 * The implementation must set this field based on the value of `path` 377 * prior to evaluating parameter references or expressions in a 378 * CommandLineTool document. This field must not be used in any other 379 * context. 380 */ 381 Union!(None, string) dirname_; 382 /** 383 * The basename root such that `nameroot + nameext == basename`, and 384 * `nameext` is empty or begins with a period and contains at most one 385 * period. For the purposess of path splitting leading periods on the 386 * basename are ignored; a basename of `.cshrc` will have a nameroot of 387 * `.cshrc`. 388 * 389 * The implementation must set this field automatically based on the value 390 * of `basename` prior to evaluating parameter references or expressions. 391 */ 392 Union!(None, string) nameroot_; 393 /** 394 * The basename extension such that `nameroot + nameext == basename`, and 395 * `nameext` is empty or begins with a period and contains at most one 396 * period. Leading periods on the basename are ignored; a basename of 397 * `.cshrc` will have an empty `nameext`. 398 * 399 * The implementation must set this field automatically based on the value 400 * of `basename` prior to evaluating parameter references or expressions. 401 */ 402 Union!(None, string) nameext_; 403 /** 404 * Optional hash code for validating file integrity. Currently must be in the form 405 * "sha1$ + hexadecimal string" using the SHA-1 algorithm. 406 */ 407 Union!(None, string) checksum_; 408 /** 409 * Optional file size 410 */ 411 Union!(None, int, long) size_; 412 /** 413 * A list of additional files or directories that are associated with the 414 * primary file and must be transferred alongside the primary file. 415 * Examples include indexes of the primary file, or external references 416 * which must be included when loading primary document. A file object 417 * listed in `secondaryFiles` may itself include `secondaryFiles` for 418 * which the same rules apply. 419 */ 420 Union!(None, Union!(File, Directory)[]) secondaryFiles_; 421 /** 422 * The format of the file: this must be an IRI of a concept node that 423 * represents the file format, preferrably defined within an ontology. 424 * If no ontology is available, file formats may be tested by exact match. 425 * 426 * Reasoning about format compatability must be done by checking that an 427 * input file format is the same, `owl:equivalentClass` or 428 * `rdfs:subClassOf` the format required by the input parameter. 429 * `owl:equivalentClass` is transitive with `rdfs:subClassOf`, e.g. if 430 * `<B> owl:equivalentClass <C>` and `<B> owl:subclassOf <A>` then infer 431 * `<C> owl:subclassOf <A>`. 432 * 433 * File format ontologies may be provided in the "$schemas" metadata at the 434 * root of the document. If no ontologies are specified in `$schemas`, the 435 * runtime may perform exact file format matches. 436 */ 437 @link(LinkResolver.id) Union!(None, string) format_; 438 /** 439 * File contents literal. Maximum of 64 KiB. 440 * 441 * If neither `location` nor `path` is provided, `contents` must be 442 * non-null. The implementation must assign a unique identifier for the 443 * `location` field. When the file is staged as input to CommandLineTool, 444 * the value of `contents` must be written to a file. 445 * 446 * If `loadContents` of `inputBinding` or `outputBinding` is true and 447 * `location` is valid, the implementation must read up to the first 64 448 * KiB of text from the file and place it in the "contents" field. 449 */ 450 Union!(None, string) contents_; 451 452 mixin genBody; 453 } 454 455 /** 456 * Represents a directory to present to a command line tool. 457 * 458 * Directories are represented as objects with `class` of `Directory`. Directory objects have 459 * a number of properties that provide metadata about the directory. 460 * 461 * The `location` property of a Directory is a URI that uniquely identifies 462 * the directory. Implementations must support the file:// URI scheme and may 463 * support other schemes such as http://. Alternately to `location`, 464 * implementations must also accept the `path` property on Directory, which 465 * must be a filesystem path available on the same host as the CWL runner (for 466 * inputs) or the runtime environment of a command line tool execution (for 467 * command line tool outputs). 468 * 469 * A Directory object may have a `listing` field. This is a list of File and 470 * Directory objects that are contained in the Directory. For each entry in 471 * `listing`, the `basename` property defines the name of the File or 472 * Subdirectory when staged to disk. If `listing` is not provided, the 473 * implementation must have some way of fetching the Directory listing at 474 * runtime based on the `location` field. 475 * 476 * If a Directory does not have `location`, it is a Directory literal. A 477 * Directory literal must provide `listing`. Directory literals must be 478 * created on disk at runtime as needed. 479 * 480 * The resources in a Directory literal do not need to have any implied 481 * relationship in their `location`. For example, a Directory listing may 482 * contain two files located on different hosts. It is the responsibility of 483 * the runtime to ensure that those files are staged to disk appropriately. 484 * Secondary files associated with files in `listing` must also be staged to 485 * the same Directory. 486 * 487 * When executing a CommandLineTool, Directories must be recursively staged 488 * first and have local values of `path` assigend. 489 * 490 * Directory objects in CommandLineTool output must provide either a 491 * `location` URI or a `path` property in the context of the tool execution 492 * runtime (local to the compute node, or within the executing container). 493 * 494 * An ExpressionTool may forward file references from input to output by using 495 * the same value for `location`. 496 * 497 * Name conflicts (the same `basename` appearing multiple times in `listing` 498 * or in any entry in `secondaryFiles` in the listing) is a fatal error. 499 */ 500 class Directory : RecordSchemaBase 501 { 502 /** 503 * Must be `Directory` to indicate this object describes a Directory. 504 */ 505 static immutable class_ = "Directory"; 506 /** 507 * An IRI that identifies the directory resource. This may be a relative 508 * reference, in which case it must be resolved using the base IRI of the 509 * document. The location may refer to a local or remote resource. If 510 * the `listing` field is not set, the implementation must use the 511 * location IRI to retrieve directory listing. If an implementation is 512 * unable to retrieve the directory listing stored at a remote resource (due to 513 * unsupported protocol, access denied, or other issue) it must signal an 514 * error. 515 * 516 * If the `location` field is not provided, the `listing` field must be 517 * provided. The implementation must assign a unique identifier for 518 * the `location` field. 519 * 520 * If the `path` field is provided but the `location` field is not, an 521 * implementation may assign the value of the `path` field to `location`, 522 * then follow the rules above. 523 */ 524 @link() Union!(None, string) location_; 525 /** 526 * The local path where the Directory is made available prior to executing a 527 * CommandLineTool. This must be set by the implementation. This field 528 * must not be used in any other context. The command line tool being 529 * executed must be able to to access the directory at `path` using the POSIX 530 * `opendir(2)` syscall. 531 * 532 * If the `path` contains [POSIX shell metacharacters](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02) 533 * (`|`,`&`, `;`, `<`, `>`, `$(LPAREN)`,`$(RPAREN)`, `$`,`` ` ``, `\`, `"`, `'`, 534 * `<space>`, `<tab>`, and `<newline>`) or characters 535 * [not allowed](http://www.iana.org/assignments/idna-tables-6.3.0/idna-tables-6.3.0.xhtml) 536 * for [Internationalized Domain Names for Applications](https://tools.ietf.org/html/rfc6452) 537 * then implementations may terminate the process with a 538 * `permanentFailure`. 539 */ 540 @link() Union!(None, string) path_; 541 /** 542 * The base name of the directory, that is, the name of the file without any 543 * leading directory path. The base name must not contain a slash `/`. 544 * 545 * If not provided, the implementation must set this field based on the 546 * `location` field by taking the final path component after parsing 547 * `location` as an IRI. If `basename` is provided, it is not required to 548 * match the value from `location`. 549 * 550 * When this file is made available to a CommandLineTool, it must be named 551 * with `basename`, i.e. the final component of the `path` field must match 552 * `basename`. 553 */ 554 Union!(None, string) basename_; 555 /** 556 * List of files or subdirectories contained in this directory. The name 557 * of each file or subdirectory is determined by the `basename` field of 558 * each `File` or `Directory` object. It is an error if a `File` shares a 559 * `basename` with any other entry in `listing`. If two or more 560 * `Directory` object share the same `basename`, this must be treated as 561 * equivalent to a single subdirectory with the listings recursively 562 * merged. 563 */ 564 Union!(None, Union!(File, Directory)[]) listing_; 565 566 mixin genBody; 567 } 568 569 /** 570 * Generic type representing a valid CWL object. It is used to represent 571 * `default` values passed to CWL `InputParameter` and `WorkflowStepInput` 572 * record fields. 573 */ 574 class CWLObjectType : UnionSchemaBase 575 { 576 Union!(bool, int, long, float, double, string, File, Directory, Union!(None, CWLObjectType)[], CWLObjectType[string]) payload; 577 578 mixin genBody; 579 } 580 581 /** 582 * Type representing a valid CWL input file as a `map<string, CWLObjectType>`. 583 */ 584 class CWLInputFile : MapSchemaBase 585 { 586 CWLObjectType[string] payload; 587 588 mixin genBody; 589 } 590 591 /** 592 * Version symbols for published CWL document versions. 593 */ 594 class CWLVersion : EnumSchemaBase 595 { 596 /// 597 enum Symbol 598 { 599 s0 = "draft-2", /// 600 s1 = "draft-3.dev1", /// 601 s2 = "draft-3.dev2", /// 602 s3 = "draft-3.dev3", /// 603 s4 = "draft-3.dev4", /// 604 s5 = "draft-3.dev5", /// 605 s6 = "draft-3", /// 606 s7 = "draft-4.dev1", /// 607 s8 = "draft-4.dev2", /// 608 s9 = "draft-4.dev3", /// 609 s10 = "v1.0.dev4", /// 610 s11 = "v1.0", /// 611 } 612 613 Symbol value; 614 615 mixin genBody; 616 } 617 618 /// 619 public import salad.primitives : Expression; 620 621 /// 622 class InputRecordField : RecordSchemaBase 623 { 624 /** 625 * A documentation string for this object, or an array of strings which should be concatenated. 626 */ 627 Union!(None, string, string[]) doc_; 628 /** 629 * The name of the field 630 */ 631 @id string name_; 632 /** 633 * The field type 634 */ 635 @typeDSL Union!(CWLType, InputRecordSchema, InputEnumSchema, InputArraySchema, string, Union!(CWLType, InputRecordSchema, InputEnumSchema, InputArraySchema, string)[]) type_; 636 /// 637 Union!(None, CommandLineBinding) inputBinding_; 638 /** 639 * A short, human-readable label of this process object. 640 */ 641 Union!(None, string) label_; 642 643 mixin genBody; 644 } 645 646 /// 647 class InputRecordSchema : RecordSchemaBase 648 { 649 /** 650 * Defines the fields of the record. 651 */ 652 @idMap("name", "type") Union!(None, InputRecordField[]) fields_; 653 /** 654 * Must be `record` 655 */ 656 static immutable type_ = "record"; 657 /** 658 * A short, human-readable label of this object. 659 */ 660 Union!(None, string) label_; 661 /// 662 @id Union!(None, string) name_; 663 664 mixin genBody; 665 } 666 667 /// 668 class InputEnumSchema : RecordSchemaBase 669 { 670 /// 671 @id Union!(None, string) name_; 672 /** 673 * Defines the set of valid symbols. 674 */ 675 @link(LinkResolver.id) string[] symbols_; 676 /** 677 * Must be `enum` 678 */ 679 static immutable type_ = "enum"; 680 /** 681 * A short, human-readable label of this object. 682 */ 683 Union!(None, string) label_; 684 /// 685 Union!(None, CommandLineBinding) inputBinding_; 686 687 mixin genBody; 688 } 689 690 /// 691 class InputArraySchema : RecordSchemaBase 692 { 693 /** 694 * Defines the type of the array elements. 695 */ 696 Union!(CWLType, InputRecordSchema, InputEnumSchema, InputArraySchema, string, Union!(CWLType, InputRecordSchema, InputEnumSchema, InputArraySchema, string)[]) items_; 697 /** 698 * Must be `array` 699 */ 700 static immutable type_ = "array"; 701 /** 702 * A short, human-readable label of this object. 703 */ 704 Union!(None, string) label_; 705 /// 706 Union!(None, CommandLineBinding) inputBinding_; 707 708 mixin genBody; 709 } 710 711 /// 712 class OutputRecordField : RecordSchemaBase 713 { 714 /** 715 * A documentation string for this object, or an array of strings which should be concatenated. 716 */ 717 Union!(None, string, string[]) doc_; 718 /** 719 * The name of the field 720 */ 721 @id string name_; 722 /** 723 * The field type 724 */ 725 @typeDSL Union!(CWLType, OutputRecordSchema, OutputEnumSchema, OutputArraySchema, string, Union!(CWLType, OutputRecordSchema, OutputEnumSchema, OutputArraySchema, string)[]) type_; 726 /// 727 Union!(None, CommandOutputBinding) outputBinding_; 728 729 mixin genBody; 730 } 731 732 /// 733 class OutputRecordSchema : RecordSchemaBase 734 { 735 /** 736 * Defines the fields of the record. 737 */ 738 @idMap("name", "type") Union!(None, OutputRecordField[]) fields_; 739 /** 740 * Must be `record` 741 */ 742 static immutable type_ = "record"; 743 /** 744 * A short, human-readable label of this object. 745 */ 746 Union!(None, string) label_; 747 748 mixin genBody; 749 } 750 751 /// 752 class OutputEnumSchema : RecordSchemaBase 753 { 754 /// 755 @id Union!(None, string) name_; 756 /** 757 * Defines the set of valid symbols. 758 */ 759 @link(LinkResolver.id) string[] symbols_; 760 /** 761 * Must be `enum` 762 */ 763 static immutable type_ = "enum"; 764 /** 765 * A short, human-readable label of this object. 766 */ 767 Union!(None, string) label_; 768 /// 769 Union!(None, CommandOutputBinding) outputBinding_; 770 771 mixin genBody; 772 } 773 774 /// 775 class OutputArraySchema : RecordSchemaBase 776 { 777 /** 778 * Defines the type of the array elements. 779 */ 780 Union!(CWLType, OutputRecordSchema, OutputEnumSchema, OutputArraySchema, string, Union!(CWLType, OutputRecordSchema, OutputEnumSchema, OutputArraySchema, string)[]) items_; 781 /** 782 * Must be `array` 783 */ 784 static immutable type_ = "array"; 785 /** 786 * A short, human-readable label of this object. 787 */ 788 Union!(None, string) label_; 789 /// 790 Union!(None, CommandOutputBinding) outputBinding_; 791 792 mixin genBody; 793 } 794 795 /// 796 class InputParameter : RecordSchemaBase 797 { 798 /** 799 * A short, human-readable label of this object. 800 */ 801 Union!(None, string) label_; 802 /** 803 * Only valid when `type: File` or is an array of `items: File`. 804 * 805 * Provides a pattern or expression specifying files or directories that 806 * must be included alongside the primary file. All listed secondary 807 * files must be present. An implementation may fail workflow execution 808 * if an expected secondary file does not exist. 809 * 810 * If the value is an expression, the value of `self` in the expression 811 * must be the primary input or output File object to which this binding 812 * applies. The `basename`, `nameroot` and `nameext` fields must be 813 * present in `self`. For `CommandLineTool` outputs the `path` field must 814 * also be present. The expression must return a filename string relative 815 * to the path to the primary File, a File or Directory object with either 816 * `path` or `location` and `basename` fields set, or an array consisting 817 * of strings or File or Directory objects. It is legal to reference an 818 * unchanged File or Directory object taken from input as a secondaryFile. 819 * 820 * To work on non-filename-preserving storage systems, portable tool 821 * descriptions should avoid constructing new values from `location`, but 822 * should construct relative references using `basename` or `nameroot` 823 * instead. 824 * 825 * If a value in `secondaryFiles` is a string that is not an expression, 826 * it specifies that the following pattern should be applied to the path 827 * of the primary file to yield a filename relative to the primary File: 828 * 829 * 1. If string begins with one or more caret `^` characters, for each 830 * caret, remove the last file extension from the path (the last 831 * period `.` and all following characters). If there are no file 832 * extensions, the path is unchanged. 833 * 2. Append the remainder of the string to the end of the file path. 834 */ 835 Union!(None, string, Expression, Union!(string, Expression)[]) secondaryFiles_; 836 /** 837 * Only valid when `type: File` or is an array of `items: File`. 838 * 839 * A value of `true` indicates that the file is read or written 840 * sequentially without seeking. An implementation may use this flag to 841 * indicate whether it is valid to stream file contents using a named 842 * pipe. Default: `false`. 843 */ 844 @defaultValue(q"<false>") bool streamable_; 845 /** 846 * A documentation string for this type, or an array of strings which should be concatenated. 847 */ 848 Union!(None, string, string[]) doc_; 849 /** 850 * The unique identifier for this parameter object. 851 */ 852 @id string id_; 853 /** 854 * Only valid when `type: File` or is an array of `items: File`. 855 * 856 * This must be one or more IRIs of concept nodes 857 * that represents file formats which are allowed as input to this 858 * parameter, preferrably defined within an ontology. If no ontology is 859 * available, file formats may be tested by exact match. 860 */ 861 @link(LinkResolver.id) Union!(None, string, string[], Expression) format_; 862 /** 863 * Describes how to handle the inputs of a process and convert them 864 * into a concrete form for execution, such as command line parameters. 865 */ 866 Union!(None, CommandLineBinding) inputBinding_; 867 /** 868 * The default value to use for this parameter if the parameter is missing 869 * from the input object, or if the value of the parameter in the input 870 * object is `null`. Default values are applied before evaluating expressions 871 * (e.g. dependent `valueFrom` fields). 872 */ 873 Union!(None, CWLObjectType) default_; 874 /** 875 * Specify valid types of data that may be assigned to this parameter. 876 */ 877 @typeDSL Union!(None, CWLType, InputRecordSchema, InputEnumSchema, InputArraySchema, string, Union!(CWLType, InputRecordSchema, InputEnumSchema, InputArraySchema, string)[]) type_; 878 879 mixin genBody; 880 } 881 882 /// 883 class OutputParameter : RecordSchemaBase 884 { 885 /** 886 * A short, human-readable label of this object. 887 */ 888 Union!(None, string) label_; 889 /** 890 * Only valid when `type: File` or is an array of `items: File`. 891 * 892 * Provides a pattern or expression specifying files or directories that 893 * must be included alongside the primary file. All listed secondary 894 * files must be present. An implementation may fail workflow execution 895 * if an expected secondary file does not exist. 896 * 897 * If the value is an expression, the value of `self` in the expression 898 * must be the primary input or output File object to which this binding 899 * applies. The `basename`, `nameroot` and `nameext` fields must be 900 * present in `self`. For `CommandLineTool` outputs the `path` field must 901 * also be present. The expression must return a filename string relative 902 * to the path to the primary File, a File or Directory object with either 903 * `path` or `location` and `basename` fields set, or an array consisting 904 * of strings or File or Directory objects. It is legal to reference an 905 * unchanged File or Directory object taken from input as a secondaryFile. 906 * 907 * To work on non-filename-preserving storage systems, portable tool 908 * descriptions should avoid constructing new values from `location`, but 909 * should construct relative references using `basename` or `nameroot` 910 * instead. 911 * 912 * If a value in `secondaryFiles` is a string that is not an expression, 913 * it specifies that the following pattern should be applied to the path 914 * of the primary file to yield a filename relative to the primary File: 915 * 916 * 1. If string begins with one or more caret `^` characters, for each 917 * caret, remove the last file extension from the path (the last 918 * period `.` and all following characters). If there are no file 919 * extensions, the path is unchanged. 920 * 2. Append the remainder of the string to the end of the file path. 921 */ 922 Union!(None, string, Expression, Union!(string, Expression)[]) secondaryFiles_; 923 /** 924 * Only valid when `type: File` or is an array of `items: File`. 925 * 926 * A value of `true` indicates that the file is read or written 927 * sequentially without seeking. An implementation may use this flag to 928 * indicate whether it is valid to stream file contents using a named 929 * pipe. Default: `false`. 930 */ 931 @defaultValue(q"<false>") bool streamable_; 932 /** 933 * A documentation string for this type, or an array of strings which should be concatenated. 934 */ 935 Union!(None, string, string[]) doc_; 936 /** 937 * The unique identifier for this parameter object. 938 */ 939 @id string id_; 940 /** 941 * Describes how to handle the outputs of a process. 942 */ 943 Union!(None, CommandOutputBinding) outputBinding_; 944 /** 945 * Only valid when `type: File` or is an array of `items: File`. 946 * 947 * This is the file format that will be assigned to 948 * the output parameter. 949 */ 950 @link(LinkResolver.id) Union!(None, string, Expression) format_; 951 952 mixin genBody; 953 } 954 955 /** 956 * Indicates that the workflow platform must support inline Javascript expressions. 957 * If this requirement is not present, the workflow platform must not perform expression 958 * interpolatation. 959 */ 960 class InlineJavascriptRequirement : RecordSchemaBase 961 { 962 /** 963 * Always 'InlineJavascriptRequirement' 964 */ 965 static immutable class_ = "InlineJavascriptRequirement"; 966 /** 967 * Additional code fragments that will also be inserted 968 * before executing the expression code. Allows for function definitions that may 969 * be called from CWL expressions. 970 */ 971 Union!(None, string[]) expressionLib_; 972 973 mixin genBody; 974 } 975 976 /** 977 * This field consists of an array of type definitions which must be used when 978 * interpreting the `inputs` and `outputs` fields. When a `type` field 979 * contain a IRI, the implementation must check if the type is defined in 980 * `schemaDefs` and use that definition. If the type is not found in 981 * `schemaDefs`, it is an error. The entries in `schemaDefs` must be 982 * processed in the order listed such that later schema definitions may refer 983 * to earlier schema definitions. 984 */ 985 class SchemaDefRequirement : RecordSchemaBase 986 { 987 /** 988 * Always 'SchemaDefRequirement' 989 */ 990 static immutable class_ = "SchemaDefRequirement"; 991 /** 992 * The list of type definitions. 993 */ 994 Union!(InputRecordSchema, InputEnumSchema, InputArraySchema)[] types_; 995 996 mixin genBody; 997 } 998 999 /** 1000 * Define an environment variable that will be set in the runtime environment 1001 * by the workflow platform when executing the command line tool. May be the 1002 * result of executing an expression, such as getting a parameter from input. 1003 */ 1004 class EnvironmentDef : RecordSchemaBase 1005 { 1006 /** 1007 * The environment variable name 1008 */ 1009 string envName_; 1010 /** 1011 * The environment variable value 1012 */ 1013 Union!(string, Expression) envValue_; 1014 1015 mixin genBody; 1016 } 1017 1018 /** 1019 * 1020 * When listed under `inputBinding` in the input schema, the term 1021 * "value" refers to the the corresponding value in the input object. For 1022 * binding objects listed in `CommandLineTool.arguments`, the term "value" 1023 * refers to the effective value after evaluating `valueFrom`. 1024 * 1025 * The binding behavior when building the command line depends on the data 1026 * type of the value. If there is a mismatch between the type described by 1027 * the input schema and the effective value, such as resulting from an 1028 * expression evaluation, an implementation must use the data type of the 1029 * effective value. 1030 * 1031 * - **string**: Add `prefix` and the string to the command line. 1032 * 1033 * - **number**: Add `prefix` and decimal representation to command line. 1034 * 1035 * - **boolean**: If true, add `prefix` to the command line. If false, add 1036 * nothing. 1037 * 1038 * - **File**: Add `prefix` and the value of 1039 * [`File.path`](#File) to the command line. 1040 * 1041 * - **Directory**: Add `prefix` and the value of 1042 * [`Directory.path`](#Directory) to the command line. 1043 * 1044 * - **array**: If `itemSeparator` is specified, add `prefix` and the join 1045 * the array into a single string with `itemSeparator` separating the 1046 * items. Otherwise first add `prefix`, then recursively process 1047 * individual elements. 1048 * If the array is empty, it does not add anything to command line. 1049 * 1050 * - **object**: Add `prefix` only, and recursively add object fields for 1051 * which `inputBinding` is specified. 1052 * 1053 * - **null**: Add nothing. 1054 */ 1055 class CommandLineBinding : RecordSchemaBase 1056 { 1057 /** 1058 * Only valid when `type: File` or is an array of `items: File`. 1059 * 1060 * Read up to the first 64 KiB of text from the file and place it in the 1061 * "contents" field of the file object for use by expressions. 1062 */ 1063 Union!(None, bool) loadContents_; 1064 /** 1065 * The sorting key. Default position is 0. 1066 */ 1067 @defaultValue(q"<0>") int position_; 1068 /** 1069 * Command line prefix to add before the value. 1070 */ 1071 Union!(None, string) prefix_; 1072 /** 1073 * If true (default), then the prefix and value must be added as separate 1074 * command line arguments; if false, prefix and value must be concatenated 1075 * into a single command line argument. 1076 */ 1077 @defaultValue(q"<true>") bool separate_; 1078 /** 1079 * Join the array elements into a single string with the elements 1080 * separated by by `itemSeparator`. 1081 */ 1082 Union!(None, string) itemSeparator_; 1083 /** 1084 * If `valueFrom` is a constant string value, use this as the value and 1085 * apply the binding rules above. 1086 * 1087 * If `valueFrom` is an expression, evaluate the expression to yield the 1088 * actual value to use to build the command line and apply the binding 1089 * rules above. If the inputBinding is associated with an input 1090 * parameter, the value of `self` in the expression will be the value of 1091 * the input parameter. Input parameter defaults (as specified by the 1092 * `InputParameter.default` field) must be applied before evaluating the 1093 * expression. 1094 * 1095 * When a binding is part of the `CommandLineTool.arguments` field, 1096 * the `valueFrom` field is required. 1097 */ 1098 Union!(None, string, Expression) valueFrom_; 1099 /** 1100 * If `ShellCommandRequirement` is in the requirements for the current command, 1101 * this controls whether the value is quoted on the command line (default is true). 1102 * Use `shellQuote: false` to inject metacharacters for operations such as pipes. 1103 * 1104 * If `shellQuote` is true or not provided, the implementation must not 1105 * permit interpretation of any shell metacharacters or directives. 1106 */ 1107 @defaultValue(q"<true>") bool shellQuote_; 1108 1109 mixin genBody; 1110 } 1111 1112 /** 1113 * Describes how to generate an output parameter based on the files produced 1114 * by a CommandLineTool. 1115 * 1116 * The output parameter value is generated by applying these operations in the 1117 * following order: 1118 * 1119 * - glob 1120 * - loadContents 1121 * - outputEval 1122 * - secondaryFiles 1123 */ 1124 class CommandOutputBinding : RecordSchemaBase 1125 { 1126 /** 1127 * Find files relative to the output directory, using POSIX glob(3) 1128 * pathname matching. If an array is provided, find files that match any 1129 * pattern in the array. If an expression is provided, the expression must 1130 * return a string or an array of strings, which will then be evaluated as 1131 * one or more glob patterns. Must only match and return files which 1132 * actually exist. 1133 */ 1134 Union!(None, string, Expression, string[]) glob_; 1135 /** 1136 * For each file matched in `glob`, read up to 1137 * the first 64 KiB of text from the file and place it in the `contents` 1138 * field of the file object for manipulation by `outputEval`. 1139 */ 1140 Union!(None, bool) loadContents_; 1141 /** 1142 * Evaluate an expression to generate the output value. If `glob` was 1143 * specified, the value of `self` must be an array containing file objects 1144 * that were matched. If no files were matched, `self` must be a zero 1145 * length array; if a single file was matched, the value of `self` is an 1146 * array of a single element. Additionally, if `loadContents` is `true`, 1147 * the File objects must include up to the first 64 KiB of file contents 1148 * in the `contents` field. 1149 */ 1150 Union!(None, string, Expression) outputEval_; 1151 1152 mixin genBody; 1153 } 1154 1155 /// 1156 class CommandInputRecordField : RecordSchemaBase 1157 { 1158 /** 1159 * A documentation string for this object, or an array of strings which should be concatenated. 1160 */ 1161 Union!(None, string, string[]) doc_; 1162 /** 1163 * The name of the field 1164 */ 1165 @id string name_; 1166 /** 1167 * The field type 1168 */ 1169 @typeDSL Union!(CWLType, CommandInputRecordSchema, CommandInputEnumSchema, CommandInputArraySchema, string, Union!(CWLType, CommandInputRecordSchema, CommandInputEnumSchema, CommandInputArraySchema, string)[]) type_; 1170 /// 1171 Union!(None, CommandLineBinding) inputBinding_; 1172 /** 1173 * A short, human-readable label of this process object. 1174 */ 1175 Union!(None, string) label_; 1176 1177 mixin genBody; 1178 } 1179 1180 /// 1181 class CommandInputRecordSchema : RecordSchemaBase 1182 { 1183 /** 1184 * Defines the fields of the record. 1185 */ 1186 @idMap("name", "type") Union!(None, CommandInputRecordField[]) fields_; 1187 /** 1188 * Must be `record` 1189 */ 1190 static immutable type_ = "record"; 1191 /** 1192 * A short, human-readable label of this object. 1193 */ 1194 Union!(None, string) label_; 1195 /// 1196 @id Union!(None, string) name_; 1197 1198 mixin genBody; 1199 } 1200 1201 /// 1202 class CommandInputEnumSchema : RecordSchemaBase 1203 { 1204 /// 1205 @id Union!(None, string) name_; 1206 /** 1207 * Defines the set of valid symbols. 1208 */ 1209 @link(LinkResolver.id) string[] symbols_; 1210 /** 1211 * Must be `enum` 1212 */ 1213 static immutable type_ = "enum"; 1214 /** 1215 * A short, human-readable label of this object. 1216 */ 1217 Union!(None, string) label_; 1218 /// 1219 Union!(None, CommandLineBinding) inputBinding_; 1220 1221 mixin genBody; 1222 } 1223 1224 /// 1225 class CommandInputArraySchema : RecordSchemaBase 1226 { 1227 /** 1228 * Defines the type of the array elements. 1229 */ 1230 Union!(CWLType, CommandInputRecordSchema, CommandInputEnumSchema, CommandInputArraySchema, string, Union!(CWLType, CommandInputRecordSchema, CommandInputEnumSchema, CommandInputArraySchema, string)[]) items_; 1231 /** 1232 * Must be `array` 1233 */ 1234 static immutable type_ = "array"; 1235 /** 1236 * A short, human-readable label of this object. 1237 */ 1238 Union!(None, string) label_; 1239 /// 1240 Union!(None, CommandLineBinding) inputBinding_; 1241 1242 mixin genBody; 1243 } 1244 1245 /// 1246 class CommandOutputRecordField : RecordSchemaBase 1247 { 1248 /** 1249 * A documentation string for this object, or an array of strings which should be concatenated. 1250 */ 1251 Union!(None, string, string[]) doc_; 1252 /** 1253 * The name of the field 1254 */ 1255 @id string name_; 1256 /** 1257 * The field type 1258 */ 1259 @typeDSL Union!(CWLType, CommandOutputRecordSchema, CommandOutputEnumSchema, CommandOutputArraySchema, string, Union!(CWLType, CommandOutputRecordSchema, CommandOutputEnumSchema, CommandOutputArraySchema, string)[]) type_; 1260 /// 1261 Union!(None, CommandOutputBinding) outputBinding_; 1262 1263 mixin genBody; 1264 } 1265 1266 /// 1267 class CommandOutputRecordSchema : RecordSchemaBase 1268 { 1269 /** 1270 * Defines the fields of the record. 1271 */ 1272 @idMap("name", "type") Union!(None, CommandOutputRecordField[]) fields_; 1273 /** 1274 * Must be `record` 1275 */ 1276 static immutable type_ = "record"; 1277 /** 1278 * A short, human-readable label of this object. 1279 */ 1280 Union!(None, string) label_; 1281 /// 1282 @id Union!(None, string) name_; 1283 1284 mixin genBody; 1285 } 1286 1287 /// 1288 class CommandOutputEnumSchema : RecordSchemaBase 1289 { 1290 /// 1291 @id Union!(None, string) name_; 1292 /** 1293 * Defines the set of valid symbols. 1294 */ 1295 @link(LinkResolver.id) string[] symbols_; 1296 /** 1297 * Must be `enum` 1298 */ 1299 static immutable type_ = "enum"; 1300 /** 1301 * A short, human-readable label of this object. 1302 */ 1303 Union!(None, string) label_; 1304 /// 1305 Union!(None, CommandOutputBinding) outputBinding_; 1306 1307 mixin genBody; 1308 } 1309 1310 /// 1311 class CommandOutputArraySchema : RecordSchemaBase 1312 { 1313 /** 1314 * Defines the type of the array elements. 1315 */ 1316 Union!(CWLType, CommandOutputRecordSchema, CommandOutputEnumSchema, CommandOutputArraySchema, string, Union!(CWLType, CommandOutputRecordSchema, CommandOutputEnumSchema, CommandOutputArraySchema, string)[]) items_; 1317 /** 1318 * Must be `array` 1319 */ 1320 static immutable type_ = "array"; 1321 /** 1322 * A short, human-readable label of this object. 1323 */ 1324 Union!(None, string) label_; 1325 /// 1326 Union!(None, CommandOutputBinding) outputBinding_; 1327 1328 mixin genBody; 1329 } 1330 1331 /** 1332 * An input parameter for a CommandLineTool. 1333 */ 1334 class CommandInputParameter : RecordSchemaBase 1335 { 1336 /** 1337 * A short, human-readable label of this object. 1338 */ 1339 Union!(None, string) label_; 1340 /** 1341 * Only valid when `type: File` or is an array of `items: File`. 1342 * 1343 * Provides a pattern or expression specifying files or directories that 1344 * must be included alongside the primary file. All listed secondary 1345 * files must be present. An implementation may fail workflow execution 1346 * if an expected secondary file does not exist. 1347 * 1348 * If the value is an expression, the value of `self` in the expression 1349 * must be the primary input or output File object to which this binding 1350 * applies. The `basename`, `nameroot` and `nameext` fields must be 1351 * present in `self`. For `CommandLineTool` outputs the `path` field must 1352 * also be present. The expression must return a filename string relative 1353 * to the path to the primary File, a File or Directory object with either 1354 * `path` or `location` and `basename` fields set, or an array consisting 1355 * of strings or File or Directory objects. It is legal to reference an 1356 * unchanged File or Directory object taken from input as a secondaryFile. 1357 * 1358 * To work on non-filename-preserving storage systems, portable tool 1359 * descriptions should avoid constructing new values from `location`, but 1360 * should construct relative references using `basename` or `nameroot` 1361 * instead. 1362 * 1363 * If a value in `secondaryFiles` is a string that is not an expression, 1364 * it specifies that the following pattern should be applied to the path 1365 * of the primary file to yield a filename relative to the primary File: 1366 * 1367 * 1. If string begins with one or more caret `^` characters, for each 1368 * caret, remove the last file extension from the path (the last 1369 * period `.` and all following characters). If there are no file 1370 * extensions, the path is unchanged. 1371 * 2. Append the remainder of the string to the end of the file path. 1372 */ 1373 Union!(None, string, Expression, Union!(string, Expression)[]) secondaryFiles_; 1374 /** 1375 * Only valid when `type: File` or is an array of `items: File`. 1376 * 1377 * A value of `true` indicates that the file is read or written 1378 * sequentially without seeking. An implementation may use this flag to 1379 * indicate whether it is valid to stream file contents using a named 1380 * pipe. Default: `false`. 1381 */ 1382 @defaultValue(q"<false>") bool streamable_; 1383 /** 1384 * A documentation string for this type, or an array of strings which should be concatenated. 1385 */ 1386 Union!(None, string, string[]) doc_; 1387 /** 1388 * The unique identifier for this parameter object. 1389 */ 1390 @id string id_; 1391 /** 1392 * Only valid when `type: File` or is an array of `items: File`. 1393 * 1394 * This must be one or more IRIs of concept nodes 1395 * that represents file formats which are allowed as input to this 1396 * parameter, preferrably defined within an ontology. If no ontology is 1397 * available, file formats may be tested by exact match. 1398 */ 1399 @link(LinkResolver.id) Union!(None, string, string[], Expression) format_; 1400 /** 1401 * Describes how to handle the inputs of a process and convert them 1402 * into a concrete form for execution, such as command line parameters. 1403 */ 1404 Union!(None, CommandLineBinding) inputBinding_; 1405 /** 1406 * The default value to use for this parameter if the parameter is missing 1407 * from the input object, or if the value of the parameter in the input 1408 * object is `null`. Default values are applied before evaluating expressions 1409 * (e.g. dependent `valueFrom` fields). 1410 */ 1411 Union!(None, CWLObjectType) default_; 1412 /** 1413 * Specify valid types of data that may be assigned to this parameter. 1414 */ 1415 @typeDSL Union!(None, CWLType, CommandInputRecordSchema, CommandInputEnumSchema, CommandInputArraySchema, string, Union!(CWLType, CommandInputRecordSchema, CommandInputEnumSchema, CommandInputArraySchema, string)[]) type_; 1416 1417 mixin genBody; 1418 } 1419 1420 /** 1421 * An output parameter for a CommandLineTool. 1422 */ 1423 class CommandOutputParameter : RecordSchemaBase 1424 { 1425 /** 1426 * A short, human-readable label of this object. 1427 */ 1428 Union!(None, string) label_; 1429 /** 1430 * Only valid when `type: File` or is an array of `items: File`. 1431 * 1432 * Provides a pattern or expression specifying files or directories that 1433 * must be included alongside the primary file. All listed secondary 1434 * files must be present. An implementation may fail workflow execution 1435 * if an expected secondary file does not exist. 1436 * 1437 * If the value is an expression, the value of `self` in the expression 1438 * must be the primary input or output File object to which this binding 1439 * applies. The `basename`, `nameroot` and `nameext` fields must be 1440 * present in `self`. For `CommandLineTool` outputs the `path` field must 1441 * also be present. The expression must return a filename string relative 1442 * to the path to the primary File, a File or Directory object with either 1443 * `path` or `location` and `basename` fields set, or an array consisting 1444 * of strings or File or Directory objects. It is legal to reference an 1445 * unchanged File or Directory object taken from input as a secondaryFile. 1446 * 1447 * To work on non-filename-preserving storage systems, portable tool 1448 * descriptions should avoid constructing new values from `location`, but 1449 * should construct relative references using `basename` or `nameroot` 1450 * instead. 1451 * 1452 * If a value in `secondaryFiles` is a string that is not an expression, 1453 * it specifies that the following pattern should be applied to the path 1454 * of the primary file to yield a filename relative to the primary File: 1455 * 1456 * 1. If string begins with one or more caret `^` characters, for each 1457 * caret, remove the last file extension from the path (the last 1458 * period `.` and all following characters). If there are no file 1459 * extensions, the path is unchanged. 1460 * 2. Append the remainder of the string to the end of the file path. 1461 */ 1462 Union!(None, string, Expression, Union!(string, Expression)[]) secondaryFiles_; 1463 /** 1464 * Only valid when `type: File` or is an array of `items: File`. 1465 * 1466 * A value of `true` indicates that the file is read or written 1467 * sequentially without seeking. An implementation may use this flag to 1468 * indicate whether it is valid to stream file contents using a named 1469 * pipe. Default: `false`. 1470 */ 1471 @defaultValue(q"<false>") bool streamable_; 1472 /** 1473 * A documentation string for this type, or an array of strings which should be concatenated. 1474 */ 1475 Union!(None, string, string[]) doc_; 1476 /** 1477 * The unique identifier for this parameter object. 1478 */ 1479 @id string id_; 1480 /** 1481 * Describes how to handle the outputs of a process. 1482 */ 1483 Union!(None, CommandOutputBinding) outputBinding_; 1484 /** 1485 * Only valid when `type: File` or is an array of `items: File`. 1486 * 1487 * This is the file format that will be assigned to 1488 * the output parameter. 1489 */ 1490 @link(LinkResolver.id) Union!(None, string, Expression) format_; 1491 /** 1492 * Specify valid types of data that may be assigned to this parameter. 1493 */ 1494 @typeDSL Union!(None, CWLType, stdout, stderr, CommandOutputRecordSchema, CommandOutputEnumSchema, CommandOutputArraySchema, string, Union!(CWLType, CommandOutputRecordSchema, CommandOutputEnumSchema, CommandOutputArraySchema, string)[]) type_; 1495 1496 mixin genBody; 1497 } 1498 1499 /** 1500 * Only valid as a `type` for a `CommandLineTool` output with no 1501 * `outputBinding` set. 1502 * 1503 * The following 1504 * ``` 1505 * outputs: 1506 * an_output_name: 1507 * type: stdout 1508 * 1509 * stdout: a_stdout_file 1510 * ``` 1511 * is equivalent to 1512 * ``` 1513 * outputs: 1514 * an_output_name: 1515 * type: File 1516 * streamable: true 1517 * outputBinding: 1518 * glob: a_stdout_file 1519 * 1520 * stdout: a_stdout_file 1521 * ``` 1522 * 1523 * If there is no `stdout` name provided, a random filename will be created. 1524 * For example, the following 1525 * ``` 1526 * outputs: 1527 * an_output_name: 1528 * type: stdout 1529 * ``` 1530 * is equivalent to 1531 * ``` 1532 * outputs: 1533 * an_output_name: 1534 * type: File 1535 * streamable: true 1536 * outputBinding: 1537 * glob: random_stdout_filenameABCDEFG 1538 * 1539 * stdout: random_stdout_filenameABCDEFG 1540 * ``` 1541 */ 1542 class stdout : EnumSchemaBase 1543 { 1544 /// 1545 enum Symbol 1546 { 1547 s0 = "stdout", /// 1548 } 1549 1550 Symbol value; 1551 1552 mixin genBody; 1553 } 1554 1555 /** 1556 * Only valid as a `type` for a `CommandLineTool` output with no 1557 * `outputBinding` set. 1558 * 1559 * The following 1560 * ``` 1561 * outputs: 1562 * an_output_name: 1563 * type: stderr 1564 * 1565 * stderr: a_stderr_file 1566 * ``` 1567 * is equivalent to 1568 * ``` 1569 * outputs: 1570 * an_output_name: 1571 * type: File 1572 * streamable: true 1573 * outputBinding: 1574 * glob: a_stderr_file 1575 * 1576 * stderr: a_stderr_file 1577 * ``` 1578 * 1579 * If there is no `stderr` name provided, a random filename will be created. 1580 * For example, the following 1581 * ``` 1582 * outputs: 1583 * an_output_name: 1584 * type: stderr 1585 * ``` 1586 * is equivalent to 1587 * ``` 1588 * outputs: 1589 * an_output_name: 1590 * type: File 1591 * streamable: true 1592 * outputBinding: 1593 * glob: random_stderr_filenameABCDEFG 1594 * 1595 * stderr: random_stderr_filenameABCDEFG 1596 * ``` 1597 */ 1598 class stderr : EnumSchemaBase 1599 { 1600 /// 1601 enum Symbol 1602 { 1603 s0 = "stderr", /// 1604 } 1605 1606 Symbol value; 1607 1608 mixin genBody; 1609 } 1610 1611 /** 1612 * This defines the schema of the CWL Command Line Tool Description document. 1613 */ 1614 @documentRoot class CommandLineTool : RecordSchemaBase 1615 { 1616 /** 1617 * The unique identifier for this process object. 1618 */ 1619 @id Union!(None, string) id_; 1620 /** 1621 * Defines the input parameters of the process. The process is ready to 1622 * run when all required input parameters are associated with concrete 1623 * values. Input parameters include a schema for each parameter which is 1624 * used to validate the input object. It may also be used to build a user 1625 * interface for constructing the input object. 1626 * 1627 * When accepting an input object, all input parameters must have a value. 1628 * If an input parameter is missing from the input object, it must be 1629 * assigned a value of `null` (or the value of `default` for that 1630 * parameter, if provided) for the purposes of validation and evaluation 1631 * of expressions. 1632 */ 1633 @idMap("id", "type") CommandInputParameter[] inputs_; 1634 /** 1635 * Defines the parameters representing the output of the process. May be 1636 * used to generate and/or validate the output object. 1637 */ 1638 @idMap("id", "type") CommandOutputParameter[] outputs_; 1639 /** 1640 * Declares requirements that apply to either the runtime environment or the 1641 * workflow engine that must be met in order to execute this process. If 1642 * an implementation cannot satisfy all requirements, or a requirement is 1643 * listed which is not recognized by the implementation, it is a fatal 1644 * error and the implementation must not attempt to run the process, 1645 * unless overridden at user option. 1646 */ 1647 @idMap("class") Union!(None, Union!(InlineJavascriptRequirement, SchemaDefRequirement, DockerRequirement, SoftwareRequirement, InitialWorkDirRequirement, EnvVarRequirement, ShellCommandRequirement, ResourceRequirement, SubworkflowFeatureRequirement, ScatterFeatureRequirement, MultipleInputFeatureRequirement, StepInputExpressionRequirement, Any)[]) requirements_; 1648 /** 1649 * Declares hints applying to either the runtime environment or the 1650 * workflow engine that may be helpful in executing this process. It is 1651 * not an error if an implementation cannot satisfy all hints, however 1652 * the implementation may report a warning. 1653 */ 1654 @idMap("class") Union!(None, Union!(InlineJavascriptRequirement, SchemaDefRequirement, DockerRequirement, SoftwareRequirement, InitialWorkDirRequirement, EnvVarRequirement, ShellCommandRequirement, ResourceRequirement, SubworkflowFeatureRequirement, ScatterFeatureRequirement, MultipleInputFeatureRequirement, StepInputExpressionRequirement, Any)[]) hints_; 1655 /** 1656 * A short, human-readable label of this process object. 1657 */ 1658 Union!(None, string) label_; 1659 /** 1660 * A long, human-readable description of this process object. 1661 */ 1662 Union!(None, string) doc_; 1663 /** 1664 * CWL document version. Always required at the document root. Not 1665 * required for a Process embedded inside another Process. 1666 */ 1667 Union!(None, CWLVersion) cwlVersion_; 1668 /// 1669 static immutable class_ = "CommandLineTool"; 1670 /** 1671 * Specifies the program to execute. If an array, the first element of 1672 * the array is the command to execute, and subsequent elements are 1673 * mandatory command line arguments. The elements in `baseCommand` must 1674 * appear before any command line bindings from `inputBinding` or 1675 * `arguments`. 1676 * 1677 * If `baseCommand` is not provided or is an empty array, the first 1678 * element of the command line produced after processing `inputBinding` or 1679 * `arguments` must be used as the program to execute. 1680 * 1681 * If the program includes a path separator character it must 1682 * be an absolute path, otherwise it is an error. If the program does not 1683 * include a path separator, search the `$PATH` variable in the runtime 1684 * environment of the workflow runner find the absolute path of the 1685 * executable. 1686 */ 1687 Union!(None, string, string[]) baseCommand_; 1688 /** 1689 * Command line bindings which are not directly associated with input parameters. 1690 */ 1691 Union!(None, Union!(string, Expression, CommandLineBinding)[]) arguments_; 1692 /** 1693 * A path to a file whose contents must be piped into the command's 1694 * standard input stream. 1695 */ 1696 Union!(None, string, Expression) stdin_; 1697 /** 1698 * Capture the command's standard error stream to a file written to 1699 * the designated output directory. 1700 * 1701 * If `stderr` is a string, it specifies the file name to use. 1702 * 1703 * If `stderr` is an expression, the expression is evaluated and must 1704 * return a string with the file name to use to capture stderr. If the 1705 * return value is not a string, or the resulting path contains illegal 1706 * characters (such as the path separator `/`) it is an error. 1707 */ 1708 Union!(None, string, Expression) stderr_; 1709 /** 1710 * Capture the command's standard output stream to a file written to 1711 * the designated output directory. 1712 * 1713 * If `stdout` is a string, it specifies the file name to use. 1714 * 1715 * If `stdout` is an expression, the expression is evaluated and must 1716 * return a string with the file name to use to capture stdout. If the 1717 * return value is not a string, or the resulting path contains illegal 1718 * characters (such as the path separator `/`) it is an error. 1719 */ 1720 Union!(None, string, Expression) stdout_; 1721 /** 1722 * Exit codes that indicate the process completed successfully. 1723 */ 1724 Union!(None, int[]) successCodes_; 1725 /** 1726 * Exit codes that indicate the process failed due to a possibly 1727 * temporary condition, where executing the process with the same 1728 * runtime environment and inputs may produce different results. 1729 */ 1730 Union!(None, int[]) temporaryFailCodes_; 1731 /** 1732 * Exit codes that indicate the process failed due to a permanent logic error, where executing the process with the same runtime environment and same inputs is expected to always fail. 1733 */ 1734 Union!(None, int[]) permanentFailCodes_; 1735 1736 mixin genBody; 1737 } 1738 1739 /** 1740 * Indicates that a workflow component should be run in a 1741 * [Docker](http://docker.com) container, and specifies how to fetch or build 1742 * the image. 1743 * 1744 * If a CommandLineTool lists `DockerRequirement` under 1745 * `hints` (or `requirements`), it may (or must) be run in the specified Docker 1746 * container. 1747 * 1748 * The platform must first acquire or install the correct Docker image as 1749 * specified by `dockerPull`, `dockerImport`, `dockerLoad` or `dockerFile`. 1750 * 1751 * The platform must execute the tool in the container using `docker run` with 1752 * the appropriate Docker image and tool command line. 1753 * 1754 * The workflow platform may provide input files and the designated output 1755 * directory through the use of volume bind mounts. The platform should rewrite 1756 * file paths in the input object to correspond to the Docker bind mounted 1757 * locations. That is, the platform should rewrite values in the parameter context 1758 * such as `runtime.outdir`, `runtime.tmpdir` and others to be valid paths 1759 * within the container. 1760 * 1761 * When running a tool contained in Docker, the workflow platform must not 1762 * assume anything about the contents of the Docker container, such as the 1763 * presence or absence of specific software, except to assume that the 1764 * generated command line represents a valid command within the runtime 1765 * environment of the container. 1766 * 1767 * ## Interaction with other requirements 1768 * 1769 * If [EnvVarRequirement](#EnvVarRequirement) is specified alongside a 1770 * DockerRequirement, the environment variables must be provided to Docker 1771 * using `--env` or `--env-file` and interact with the container's preexisting 1772 * environment as defined by Docker. 1773 */ 1774 class DockerRequirement : RecordSchemaBase 1775 { 1776 /** 1777 * Always 'DockerRequirement' 1778 */ 1779 static immutable class_ = "DockerRequirement"; 1780 /** 1781 * Specify a Docker image to retrieve using `docker pull`. 1782 */ 1783 Union!(None, string) dockerPull_; 1784 /** 1785 * Specify a HTTP URL from which to download a Docker image using `docker load`. 1786 */ 1787 Union!(None, string) dockerLoad_; 1788 /** 1789 * Supply the contents of a Dockerfile which will be built using `docker build`. 1790 */ 1791 Union!(None, string) dockerFile_; 1792 /** 1793 * Provide HTTP URL to download and gunzip a Docker images using `docker import. 1794 */ 1795 Union!(None, string) dockerImport_; 1796 /** 1797 * The image id that will be used for `docker run`. May be a 1798 * human-readable image name or the image identifier hash. May be skipped 1799 * if `dockerPull` is specified, in which case the `dockerPull` image id 1800 * must be used. 1801 */ 1802 Union!(None, string) dockerImageId_; 1803 /** 1804 * Set the designated output directory to a specific location inside the 1805 * Docker container. 1806 */ 1807 Union!(None, string) dockerOutputDirectory_; 1808 1809 mixin genBody; 1810 } 1811 1812 /** 1813 * A list of software packages that should be configured in the environment of 1814 * the defined process. 1815 */ 1816 class SoftwareRequirement : RecordSchemaBase 1817 { 1818 /** 1819 * Always 'SoftwareRequirement' 1820 */ 1821 static immutable class_ = "SoftwareRequirement"; 1822 /** 1823 * The list of software to be configured. 1824 */ 1825 @idMap("package", "specs") SoftwarePackage[] packages_; 1826 1827 mixin genBody; 1828 } 1829 1830 /// 1831 class SoftwarePackage : RecordSchemaBase 1832 { 1833 /** 1834 * The name of the software to be made available. If the name is 1835 * common, inconsistent, or otherwise ambiguous it should be combined with 1836 * one or more identifiers in the `specs` field. 1837 */ 1838 string package_; 1839 /** 1840 * The (optional) versions of the software that are known to be 1841 * compatible. 1842 */ 1843 Union!(None, string[]) version_; 1844 /** 1845 * One or more [IRI](https://en.wikipedia.org/wiki/Internationalized_Resource_Identifier)s 1846 * identifying resources for installing or enabling the software named in 1847 * the `package` field. Implementations may provide resolvers which map 1848 * these software identifer IRIs to some configuration action; or they can 1849 * use only the name from the `package` field on a best effort basis. 1850 * 1851 * For example, the IRI https://packages.debian.org/bowtie could 1852 * be resolved with `apt-get install bowtie`. The IRI 1853 * https://anaconda.org/bioconda/bowtie could be resolved with `conda 1854 * install -c bioconda bowtie`. 1855 * 1856 * IRIs can also be system independent and used to map to a specific 1857 * software installation or selection mechanism. 1858 * Using [RRID](https://www.identifiers.org/rrid/) as an example: 1859 * https://identifiers.org/rrid/RRID:SCR_005476 1860 * could be fulfilled using the above mentioned Debian or bioconda 1861 * package, a local installation managed by [Environement Modules](http://modules.sourceforge.net/), 1862 * or any other mechanism the platform chooses. IRIs can also be from 1863 * identifer sources that are discipline specific yet still system 1864 * independent. As an example, the equivalent [ELIXIR Tools and Data 1865 * Service Registry](https://bio.tools) IRI to the previous RRID example is 1866 * https://bio.tools/tool/bowtie2/version/2.2.8. 1867 * If supported by a given registry, implementations are encouraged to 1868 * query these system independent sofware identifier IRIs directly for 1869 * links to packaging systems. 1870 * 1871 * A site specific IRI can be listed as well. For example, an academic 1872 * computing cluster using Environement Modules could list the IRI 1873 * `https://hpc.example.edu/modules/bowtie-tbb/1.22` to indicate that 1874 * `module load bowtie-tbb/1.1.2` should be executed to make available 1875 * `bowtie` version 1.1.2 compiled with the TBB library prior to running 1876 * the accompanying Workflow or CommandLineTool. Note that the example IRI 1877 * is specific to a particular institution and computing environment as 1878 * the Environment Modules system does not have a common namespace or 1879 * standardized naming convention. 1880 * 1881 * This last example is the least portable and should only be used if 1882 * mechanisms based off of the `package` field or more generic IRIs are 1883 * unavailable or unsuitable. While harmless to other sites, site specific 1884 * software IRIs should be left out of shared CWL descriptions to avoid 1885 * clutter. 1886 */ 1887 @link() Union!(None, string[]) specs_; 1888 1889 mixin genBody; 1890 } 1891 1892 /** 1893 * Define a file or subdirectory that must be placed in the designated output 1894 * directory prior to executing the command line tool. May be the result of 1895 * executing an expression, such as building a configuration file from a 1896 * template. 1897 */ 1898 class Dirent : RecordSchemaBase 1899 { 1900 /** 1901 * The name of the file or subdirectory to create in the output directory. 1902 * If `entry` is a File or Directory, the `entryname` field overrides the value 1903 * of `basename` of the File or Directory object. Optional. 1904 */ 1905 Union!(None, string, Expression) entryname_; 1906 /** 1907 * If the value is a string literal or an expression which evaluates to a 1908 * string, a new file must be created with the string as the file contents. 1909 * 1910 * If the value is an expression that evaluates to a `File` object, this 1911 * indicates the referenced file should be added to the designated output 1912 * directory prior to executing the tool. 1913 * 1914 * If the value is an expression that evaluates to a `Dirent` object, this 1915 * indicates that the File or Directory in `entry` should be added to the 1916 * designated output directory with the name in `entryname`. 1917 * 1918 * If `writable` is false, the file may be made available using a bind 1919 * mount or file system link to avoid unnecessary copying of the input 1920 * file. 1921 */ 1922 Union!(string, Expression) entry_; 1923 /** 1924 * If true, the file or directory must be writable by the tool. Changes 1925 * to the file or directory must be isolated and not visible by any other 1926 * CommandLineTool process. This may be implemented by making a copy of 1927 * the original file or directory. Default false (files and directories 1928 * read-only by default). 1929 * 1930 * A directory marked as `writable: true` implies that all files and 1931 * subdirectories are recursively writable as well. 1932 */ 1933 @defaultValue(q"<false>") bool writable_; 1934 1935 mixin genBody; 1936 } 1937 1938 /** 1939 * Define a list of files and subdirectories that must be created by the workflow platform in the designated output directory prior to executing the command line tool. 1940 */ 1941 class InitialWorkDirRequirement : RecordSchemaBase 1942 { 1943 /** 1944 * InitialWorkDirRequirement 1945 */ 1946 static immutable class_ = "InitialWorkDirRequirement"; 1947 /** 1948 * The list of files or subdirectories that must be placed in the 1949 * designated output directory prior to executing the command line tool. 1950 * 1951 * May be an expression. If so, the expression return value must validate 1952 * as `{type: array, items: [File, Directory]}`. 1953 * 1954 * Files or Directories which are listed in the input parameters and 1955 * appear in the `InitialWorkDirRequirement` listing must have their 1956 * `path` set to their staged location in the designated output directory. 1957 * If the same File or Directory appears more than once in the 1958 * `InitialWorkDirRequirement` listing, the implementation must choose 1959 * exactly one value for `path`; how this value is chosen is undefined. 1960 */ 1961 Union!(Union!(File, Directory, Dirent, string, Expression)[], string, Expression) listing_; 1962 1963 mixin genBody; 1964 } 1965 1966 /** 1967 * Define a list of environment variables which will be set in the 1968 * execution environment of the tool. See `EnvironmentDef` for details. 1969 */ 1970 class EnvVarRequirement : RecordSchemaBase 1971 { 1972 /** 1973 * Always 'EnvVarRequirement' 1974 */ 1975 static immutable class_ = "EnvVarRequirement"; 1976 /** 1977 * The list of environment variables. 1978 */ 1979 @idMap("envName", "envValue") EnvironmentDef[] envDef_; 1980 1981 mixin genBody; 1982 } 1983 1984 /** 1985 * Modify the behavior of CommandLineTool to generate a single string 1986 * containing a shell command line. Each item in the argument list must be 1987 * joined into a string separated by single spaces and quoted to prevent 1988 * intepretation by the shell, unless `CommandLineBinding` for that argument 1989 * contains `shellQuote: false`. If `shellQuote: false` is specified, the 1990 * argument is joined into the command string without quoting, which allows 1991 * the use of shell metacharacters such as `|` for pipes. 1992 */ 1993 class ShellCommandRequirement : RecordSchemaBase 1994 { 1995 /** 1996 * Always 'ShellCommandRequirement' 1997 */ 1998 static immutable class_ = "ShellCommandRequirement"; 1999 2000 mixin genBody; 2001 } 2002 2003 /** 2004 * Specify basic hardware resource requirements. 2005 * 2006 * "min" is the minimum amount of a resource that must be reserved to schedule 2007 * a job. If "min" cannot be satisfied, the job should not be run. 2008 * 2009 * "max" is the maximum amount of a resource that the job shall be permitted 2010 * to use. If a node has sufficient resources, multiple jobs may be scheduled 2011 * on a single node provided each job's "max" resource requirements are 2012 * met. If a job attempts to exceed its "max" resource allocation, an 2013 * implementation may deny additional resources, which may result in job 2014 * failure. 2015 * 2016 * If "min" is specified but "max" is not, then "max" == "min" 2017 * If "max" is specified by "min" is not, then "min" == "max". 2018 * 2019 * It is an error if max < min. 2020 * 2021 * It is an error if the value of any of these fields is negative. 2022 * 2023 * If neither "min" nor "max" is specified for a resource, an implementation may provide a default. 2024 */ 2025 class ResourceRequirement : RecordSchemaBase 2026 { 2027 /** 2028 * Always 'ResourceRequirement' 2029 */ 2030 static immutable class_ = "ResourceRequirement"; 2031 /** 2032 * Minimum reserved number of CPU cores 2033 */ 2034 Union!(None, int, long, string, Expression) coresMin_; 2035 /** 2036 * Maximum reserved number of CPU cores 2037 */ 2038 Union!(None, int, string, Expression) coresMax_; 2039 /** 2040 * Minimum reserved RAM in mebibytes (2**20) 2041 */ 2042 Union!(None, int, long, string, Expression) ramMin_; 2043 /** 2044 * Maximum reserved RAM in mebibytes (2**20) 2045 */ 2046 Union!(None, int, long, string, Expression) ramMax_; 2047 /** 2048 * Minimum reserved filesystem based storage for the designated temporary directory, in mebibytes (2**20) 2049 */ 2050 Union!(None, long, string, Expression) tmpdirMin_; 2051 /** 2052 * Maximum reserved filesystem based storage for the designated temporary directory, in mebibytes (2**20) 2053 */ 2054 Union!(None, int, long, string, Expression) tmpdirMax_; 2055 /** 2056 * Minimum reserved filesystem based storage for the designated output directory, in mebibytes (2**20) 2057 */ 2058 Union!(None, int, long, string, Expression) outdirMin_; 2059 /** 2060 * Maximum reserved filesystem based storage for the designated output directory, in mebibytes (2**20) 2061 */ 2062 Union!(None, int, long, string, Expression) outdirMax_; 2063 2064 mixin genBody; 2065 } 2066 2067 /// 2068 class ExpressionToolOutputParameter : RecordSchemaBase 2069 { 2070 /** 2071 * A short, human-readable label of this object. 2072 */ 2073 Union!(None, string) label_; 2074 /** 2075 * Only valid when `type: File` or is an array of `items: File`. 2076 * 2077 * Provides a pattern or expression specifying files or directories that 2078 * must be included alongside the primary file. All listed secondary 2079 * files must be present. An implementation may fail workflow execution 2080 * if an expected secondary file does not exist. 2081 * 2082 * If the value is an expression, the value of `self` in the expression 2083 * must be the primary input or output File object to which this binding 2084 * applies. The `basename`, `nameroot` and `nameext` fields must be 2085 * present in `self`. For `CommandLineTool` outputs the `path` field must 2086 * also be present. The expression must return a filename string relative 2087 * to the path to the primary File, a File or Directory object with either 2088 * `path` or `location` and `basename` fields set, or an array consisting 2089 * of strings or File or Directory objects. It is legal to reference an 2090 * unchanged File or Directory object taken from input as a secondaryFile. 2091 * 2092 * To work on non-filename-preserving storage systems, portable tool 2093 * descriptions should avoid constructing new values from `location`, but 2094 * should construct relative references using `basename` or `nameroot` 2095 * instead. 2096 * 2097 * If a value in `secondaryFiles` is a string that is not an expression, 2098 * it specifies that the following pattern should be applied to the path 2099 * of the primary file to yield a filename relative to the primary File: 2100 * 2101 * 1. If string begins with one or more caret `^` characters, for each 2102 * caret, remove the last file extension from the path (the last 2103 * period `.` and all following characters). If there are no file 2104 * extensions, the path is unchanged. 2105 * 2. Append the remainder of the string to the end of the file path. 2106 */ 2107 Union!(None, string, Expression, Union!(string, Expression)[]) secondaryFiles_; 2108 /** 2109 * Only valid when `type: File` or is an array of `items: File`. 2110 * 2111 * A value of `true` indicates that the file is read or written 2112 * sequentially without seeking. An implementation may use this flag to 2113 * indicate whether it is valid to stream file contents using a named 2114 * pipe. Default: `false`. 2115 */ 2116 @defaultValue(q"<false>") bool streamable_; 2117 /** 2118 * A documentation string for this type, or an array of strings which should be concatenated. 2119 */ 2120 Union!(None, string, string[]) doc_; 2121 /** 2122 * The unique identifier for this parameter object. 2123 */ 2124 @id string id_; 2125 /** 2126 * Describes how to handle the outputs of a process. 2127 */ 2128 Union!(None, CommandOutputBinding) outputBinding_; 2129 /** 2130 * Only valid when `type: File` or is an array of `items: File`. 2131 * 2132 * This is the file format that will be assigned to 2133 * the output parameter. 2134 */ 2135 @link(LinkResolver.id) Union!(None, string, Expression) format_; 2136 /** 2137 * Specify valid types of data that may be assigned to this parameter. 2138 */ 2139 @typeDSL Union!(None, CWLType, OutputRecordSchema, OutputEnumSchema, OutputArraySchema, string, Union!(CWLType, OutputRecordSchema, OutputEnumSchema, OutputArraySchema, string)[]) type_; 2140 2141 mixin genBody; 2142 } 2143 2144 /** 2145 * Execute an expression as a Workflow step. 2146 */ 2147 @documentRoot class ExpressionTool : RecordSchemaBase 2148 { 2149 /** 2150 * The unique identifier for this process object. 2151 */ 2152 @id Union!(None, string) id_; 2153 /** 2154 * Defines the input parameters of the process. The process is ready to 2155 * run when all required input parameters are associated with concrete 2156 * values. Input parameters include a schema for each parameter which is 2157 * used to validate the input object. It may also be used to build a user 2158 * interface for constructing the input object. 2159 * 2160 * When accepting an input object, all input parameters must have a value. 2161 * If an input parameter is missing from the input object, it must be 2162 * assigned a value of `null` (or the value of `default` for that 2163 * parameter, if provided) for the purposes of validation and evaluation 2164 * of expressions. 2165 */ 2166 @idMap("id", "type") InputParameter[] inputs_; 2167 /** 2168 * Defines the parameters representing the output of the process. May be 2169 * used to generate and/or validate the output object. 2170 */ 2171 @idMap("id", "type") ExpressionToolOutputParameter[] outputs_; 2172 /** 2173 * Declares requirements that apply to either the runtime environment or the 2174 * workflow engine that must be met in order to execute this process. If 2175 * an implementation cannot satisfy all requirements, or a requirement is 2176 * listed which is not recognized by the implementation, it is a fatal 2177 * error and the implementation must not attempt to run the process, 2178 * unless overridden at user option. 2179 */ 2180 @idMap("class") Union!(None, Union!(InlineJavascriptRequirement, SchemaDefRequirement, DockerRequirement, SoftwareRequirement, InitialWorkDirRequirement, EnvVarRequirement, ShellCommandRequirement, ResourceRequirement, SubworkflowFeatureRequirement, ScatterFeatureRequirement, MultipleInputFeatureRequirement, StepInputExpressionRequirement, Any)[]) requirements_; 2181 /** 2182 * Declares hints applying to either the runtime environment or the 2183 * workflow engine that may be helpful in executing this process. It is 2184 * not an error if an implementation cannot satisfy all hints, however 2185 * the implementation may report a warning. 2186 */ 2187 @idMap("class") Union!(None, Union!(InlineJavascriptRequirement, SchemaDefRequirement, DockerRequirement, SoftwareRequirement, InitialWorkDirRequirement, EnvVarRequirement, ShellCommandRequirement, ResourceRequirement, SubworkflowFeatureRequirement, ScatterFeatureRequirement, MultipleInputFeatureRequirement, StepInputExpressionRequirement, Any)[]) hints_; 2188 /** 2189 * A short, human-readable label of this process object. 2190 */ 2191 Union!(None, string) label_; 2192 /** 2193 * A long, human-readable description of this process object. 2194 */ 2195 Union!(None, string) doc_; 2196 /** 2197 * CWL document version. Always required at the document root. Not 2198 * required for a Process embedded inside another Process. 2199 */ 2200 Union!(None, CWLVersion) cwlVersion_; 2201 /// 2202 static immutable class_ = "ExpressionTool"; 2203 /** 2204 * The expression to execute. The expression must return a JSON object which 2205 * matches the output parameters of the ExpressionTool. 2206 */ 2207 Union!(string, Expression) expression_; 2208 2209 mixin genBody; 2210 } 2211 2212 /** 2213 * The input link merge method, described in [WorkflowStepInput](#WorkflowStepInput). 2214 */ 2215 class LinkMergeMethod : EnumSchemaBase 2216 { 2217 /// 2218 enum Symbol 2219 { 2220 s0 = "merge_nested", /// 2221 s1 = "merge_flattened", /// 2222 } 2223 2224 Symbol value; 2225 2226 mixin genBody; 2227 } 2228 2229 /** 2230 * Describe an output parameter of a workflow. The parameter must be 2231 * connected to one or more parameters defined in the workflow that will 2232 * provide the value of the output parameter. 2233 */ 2234 class WorkflowOutputParameter : RecordSchemaBase 2235 { 2236 /** 2237 * A short, human-readable label of this object. 2238 */ 2239 Union!(None, string) label_; 2240 /** 2241 * Only valid when `type: File` or is an array of `items: File`. 2242 * 2243 * Provides a pattern or expression specifying files or directories that 2244 * must be included alongside the primary file. All listed secondary 2245 * files must be present. An implementation may fail workflow execution 2246 * if an expected secondary file does not exist. 2247 * 2248 * If the value is an expression, the value of `self` in the expression 2249 * must be the primary input or output File object to which this binding 2250 * applies. The `basename`, `nameroot` and `nameext` fields must be 2251 * present in `self`. For `CommandLineTool` outputs the `path` field must 2252 * also be present. The expression must return a filename string relative 2253 * to the path to the primary File, a File or Directory object with either 2254 * `path` or `location` and `basename` fields set, or an array consisting 2255 * of strings or File or Directory objects. It is legal to reference an 2256 * unchanged File or Directory object taken from input as a secondaryFile. 2257 * 2258 * To work on non-filename-preserving storage systems, portable tool 2259 * descriptions should avoid constructing new values from `location`, but 2260 * should construct relative references using `basename` or `nameroot` 2261 * instead. 2262 * 2263 * If a value in `secondaryFiles` is a string that is not an expression, 2264 * it specifies that the following pattern should be applied to the path 2265 * of the primary file to yield a filename relative to the primary File: 2266 * 2267 * 1. If string begins with one or more caret `^` characters, for each 2268 * caret, remove the last file extension from the path (the last 2269 * period `.` and all following characters). If there are no file 2270 * extensions, the path is unchanged. 2271 * 2. Append the remainder of the string to the end of the file path. 2272 */ 2273 Union!(None, string, Expression, Union!(string, Expression)[]) secondaryFiles_; 2274 /** 2275 * Only valid when `type: File` or is an array of `items: File`. 2276 * 2277 * A value of `true` indicates that the file is read or written 2278 * sequentially without seeking. An implementation may use this flag to 2279 * indicate whether it is valid to stream file contents using a named 2280 * pipe. Default: `false`. 2281 */ 2282 @defaultValue(q"<false>") bool streamable_; 2283 /** 2284 * A documentation string for this type, or an array of strings which should be concatenated. 2285 */ 2286 Union!(None, string, string[]) doc_; 2287 /** 2288 * The unique identifier for this parameter object. 2289 */ 2290 @id string id_; 2291 /** 2292 * Describes how to handle the outputs of a process. 2293 */ 2294 Union!(None, CommandOutputBinding) outputBinding_; 2295 /** 2296 * Only valid when `type: File` or is an array of `items: File`. 2297 * 2298 * This is the file format that will be assigned to 2299 * the output parameter. 2300 */ 2301 @link(LinkResolver.id) Union!(None, string, Expression) format_; 2302 /** 2303 * Specifies one or more workflow parameters that supply the value of to 2304 * the output parameter. 2305 */ 2306 @link() Union!(None, string, string[]) outputSource_; 2307 /** 2308 * The method to use to merge multiple sources into a single array. 2309 * If not specified, the default method is "merge_nested". 2310 */ 2311 Union!(None, LinkMergeMethod) linkMerge_; 2312 /** 2313 * Specify valid types of data that may be assigned to this parameter. 2314 */ 2315 @typeDSL Union!(None, CWLType, OutputRecordSchema, OutputEnumSchema, OutputArraySchema, string, Union!(CWLType, OutputRecordSchema, OutputEnumSchema, OutputArraySchema, string)[]) type_; 2316 2317 mixin genBody; 2318 } 2319 2320 /** 2321 * The input of a workflow step connects an upstream parameter (from the 2322 * workflow inputs, or the outputs of other workflows steps) with the input 2323 * parameters of the underlying step. 2324 * 2325 * ## Input object 2326 * 2327 * A WorkflowStepInput object must contain an `id` field in the form 2328 * `#fieldname` or `#prefix/fieldname`. When the `id` field contains a slash 2329 * `/` the field name consists of the characters following the final slash 2330 * (the prefix portion may contain one or more slashes to indicate scope). 2331 * This defines a field of the workflow step input object with the value of 2332 * the `source` parameter(s). 2333 * 2334 * ## Merging 2335 * 2336 * To merge multiple inbound data links, 2337 * [MultipleInputFeatureRequirement](#MultipleInputFeatureRequirement) must be specified 2338 * in the workflow or workflow step requirements. 2339 * 2340 * If the sink parameter is an array, or named in a [workflow 2341 * scatter](#WorkflowStep) operation, there may be multiple inbound data links 2342 * listed in the `source` field. The values from the input links are merged 2343 * depending on the method specified in the `linkMerge` field. If not 2344 * specified, the default method is "merge_nested". 2345 * 2346 * * **merge_nested** 2347 * 2348 * The input must be an array consisting of exactly one entry for each 2349 * input link. If "merge_nested" is specified with a single link, the value 2350 * from the link must be wrapped in a single-item list. 2351 * 2352 * * **merge_flattened** 2353 * 2354 * 1. The source and sink parameters must be compatible types, or the source 2355 * type must be compatible with single element from the "items" type of 2356 * the destination array parameter. 2357 * 2. Source parameters which are arrays are concatenated. 2358 * Source parameters which are single element types are appended as 2359 * single elements. 2360 */ 2361 class WorkflowStepInput : RecordSchemaBase 2362 { 2363 /** 2364 * Specifies one or more workflow parameters that will provide input to 2365 * the underlying step parameter. 2366 */ 2367 @link() Union!(None, string, string[]) source_; 2368 /** 2369 * The method to use to merge multiple inbound links into a single array. 2370 * If not specified, the default method is "merge_nested". 2371 */ 2372 Union!(None, LinkMergeMethod) linkMerge_; 2373 /** 2374 * A unique identifier for this workflow input parameter. 2375 */ 2376 @id string id_; 2377 /** 2378 * The default value for this parameter to use if either there is no 2379 * `source` field, or the value produced by the `source` is `null`. The 2380 * default must be applied prior to scattering or evaluating `valueFrom`. 2381 */ 2382 Union!(None, CWLObjectType) default_; 2383 /** 2384 * To use valueFrom, [StepInputExpressionRequirement](#StepInputExpressionRequirement) must 2385 * be specified in the workflow or workflow step requirements. 2386 * 2387 * If `valueFrom` is a constant string value, use this as the value for 2388 * this input parameter. 2389 * 2390 * If `valueFrom` is a parameter reference or expression, it must be 2391 * evaluated to yield the actual value to be assiged to the input field. 2392 * 2393 * The `self` value in the parameter reference or expression must be 2394 * 1. `null` if there is no `source` field 2395 * 2. the value of the parameter(s) specified in the `source` field when this 2396 * workflow input parameter **is not** specified in this workflow step's `scatter` field. 2397 * 3. an element of the parameter specified in the `source` field when this workflow input 2398 * parameter **is** specified in this workflow step's `scatter` field. 2399 * 2400 * The value of `inputs` in the parameter reference or expression must be 2401 * the input object to the workflow step after assigning the `source` 2402 * values, applying `default`, and then scattering. The order of 2403 * evaluating `valueFrom` among step input parameters is undefined and the 2404 * result of evaluating `valueFrom` on a parameter must not be visible to 2405 * evaluation of `valueFrom` on other parameters. 2406 */ 2407 Union!(None, string, Expression) valueFrom_; 2408 2409 mixin genBody; 2410 } 2411 2412 /** 2413 * Associate an output parameter of the underlying process with a workflow 2414 * parameter. The workflow parameter (given in the `id` field) be may be used 2415 * as a `source` to connect with input parameters of other workflow steps, or 2416 * with an output parameter of the process. 2417 */ 2418 class WorkflowStepOutput : RecordSchemaBase 2419 { 2420 /** 2421 * A unique identifier for this workflow output parameter. This is the 2422 * identifier to use in the `source` field of `WorkflowStepInput` to 2423 * connect the output value to downstream parameters. 2424 */ 2425 @id string id_; 2426 2427 mixin genBody; 2428 } 2429 2430 /** 2431 * The scatter method, as described in [workflow step scatter](#WorkflowStep). 2432 */ 2433 class ScatterMethod : EnumSchemaBase 2434 { 2435 /// 2436 enum Symbol 2437 { 2438 s0 = "dotproduct", /// 2439 s1 = "nested_crossproduct", /// 2440 s2 = "flat_crossproduct", /// 2441 } 2442 2443 Symbol value; 2444 2445 mixin genBody; 2446 } 2447 2448 /** 2449 * A workflow step is an executable element of a workflow. It specifies the 2450 * underlying process implementation (such as `CommandLineTool` or another 2451 * `Workflow`) in the `run` field and connects the input and output parameters 2452 * of the underlying process to workflow parameters. 2453 * 2454 * # Scatter/gather 2455 * 2456 * To use scatter/gather, 2457 * [ScatterFeatureRequirement](#ScatterFeatureRequirement) must be specified 2458 * in the workflow or workflow step requirements. 2459 * 2460 * A "scatter" operation specifies that the associated workflow step or 2461 * subworkflow should execute separately over a list of input elements. Each 2462 * job making up a scatter operation is independent and may be executed 2463 * concurrently. 2464 * 2465 * The `scatter` field specifies one or more input parameters which will be 2466 * scattered. An input parameter may be listed more than once. The declared 2467 * type of each input parameter is implicitly becomes an array of items of the 2468 * input parameter type. If a parameter is listed more than once, it becomes 2469 * a nested array. As a result, upstream parameters which are connected to 2470 * scattered parameters must be arrays. 2471 * 2472 * All output parameter types are also implicitly wrapped in arrays. Each job 2473 * in the scatter results in an entry in the output array. 2474 * 2475 * If any scattered parameter runtime value is an empty array, all outputs are 2476 * set to empty arrays and no work is done for the step, according to 2477 * applicable scattering rules. 2478 * 2479 * If `scatter` declares more than one input parameter, `scatterMethod` 2480 * describes how to decompose the input into a discrete set of jobs. 2481 * 2482 * * **dotproduct** specifies that each of the input arrays are aligned and one 2483 * element taken from each array to construct each job. It is an error 2484 * if all input arrays are not the same length. 2485 * 2486 * * **nested_crossproduct** specifies the Cartesian product of the inputs, 2487 * producing a job for every combination of the scattered inputs. The 2488 * output must be nested arrays for each level of scattering, in the 2489 * order that the input arrays are listed in the `scatter` field. 2490 * 2491 * * **flat_crossproduct** specifies the Cartesian product of the inputs, 2492 * producing a job for every combination of the scattered inputs. The 2493 * output arrays must be flattened to a single level, but otherwise listed in the 2494 * order that the input arrays are listed in the `scatter` field. 2495 * 2496 * # Subworkflows 2497 * 2498 * To specify a nested workflow as part of a workflow step, 2499 * [SubworkflowFeatureRequirement](#SubworkflowFeatureRequirement) must be 2500 * specified in the workflow or workflow step requirements. 2501 * 2502 * It is a fatal error if a workflow directly or indirectly invokes itself as 2503 * a subworkflow (recursive workflows are not allowed). 2504 */ 2505 class WorkflowStep : RecordSchemaBase 2506 { 2507 /** 2508 * The unique identifier for this workflow step. 2509 */ 2510 @id string id_; 2511 /** 2512 * Defines the input parameters of the workflow step. The process is ready to 2513 * run when all required input parameters are associated with concrete 2514 * values. Input parameters include a schema for each parameter which is 2515 * used to validate the input object. It may also be used build a user 2516 * interface for constructing the input object. 2517 */ 2518 @idMap("id", "source") WorkflowStepInput[] in_; 2519 /** 2520 * Defines the parameters representing the output of the process. May be 2521 * used to generate and/or validate the output object. 2522 */ 2523 @link(LinkResolver.id) Union!(string, WorkflowStepOutput)[] out_; 2524 /** 2525 * Declares requirements that apply to either the runtime environment or the 2526 * workflow engine that must be met in order to execute this workflow step. If 2527 * an implementation cannot satisfy all requirements, or a requirement is 2528 * listed which is not recognized by the implementation, it is a fatal 2529 * error and the implementation must not attempt to run the process, 2530 * unless overridden at user option. 2531 */ 2532 @idMap("class") Union!(None, Union!(InlineJavascriptRequirement, SchemaDefRequirement, DockerRequirement, SoftwareRequirement, InitialWorkDirRequirement, EnvVarRequirement, ShellCommandRequirement, ResourceRequirement, SubworkflowFeatureRequirement, ScatterFeatureRequirement, MultipleInputFeatureRequirement, StepInputExpressionRequirement, Any)[]) requirements_; 2533 /** 2534 * Declares hints applying to either the runtime environment or the 2535 * workflow engine that may be helpful in executing this workflow step. It is 2536 * not an error if an implementation cannot satisfy all hints, however 2537 * the implementation may report a warning. 2538 */ 2539 @idMap("class") Union!(None, Any[]) hints_; 2540 /** 2541 * A short, human-readable label of this process object. 2542 */ 2543 Union!(None, string) label_; 2544 /** 2545 * A long, human-readable description of this process object. 2546 */ 2547 Union!(None, string) doc_; 2548 /** 2549 * Specifies the process to run. 2550 */ 2551 @link() Union!(string, CommandLineTool, ExpressionTool, Workflow) run_; 2552 /// 2553 @link() Union!(None, string, string[]) scatter_; 2554 /** 2555 * Required if `scatter` is an array of more than one element. 2556 */ 2557 Union!(None, ScatterMethod) scatterMethod_; 2558 2559 mixin genBody; 2560 } 2561 2562 /** 2563 * A workflow describes a set of **steps** and the **dependencies** between 2564 * those steps. When a step produces output that will be consumed by a 2565 * second step, the first step is a dependency of the second step. 2566 * 2567 * When there is a dependency, the workflow engine must execute the preceding 2568 * step and wait for it to successfully produce output before executing the 2569 * dependent step. If two steps are defined in the workflow graph that 2570 * are not directly or indirectly dependent, these steps are **independent**, 2571 * and may execute in any order or execute concurrently. A workflow is 2572 * complete when all steps have been executed. 2573 * 2574 * Dependencies between parameters are expressed using the `source` field on 2575 * [workflow step input parameters](#WorkflowStepInput) and [workflow output 2576 * parameters](#WorkflowOutputParameter). 2577 * 2578 * The `source` field expresses the dependency of one parameter on another 2579 * such that when a value is associated with the parameter specified by 2580 * `source`, that value is propagated to the destination parameter. When all 2581 * data links inbound to a given step are fufilled, the step is ready to 2582 * execute. 2583 * 2584 * ## Workflow success and failure 2585 * 2586 * A completed step must result in one of `success`, `temporaryFailure` or 2587 * `permanentFailure` states. An implementation may choose to retry a step 2588 * execution which resulted in `temporaryFailure`. An implementation may 2589 * choose to either continue running other steps of a workflow, or terminate 2590 * immediately upon `permanentFailure`. 2591 * 2592 * * If any step of a workflow execution results in `permanentFailure`, then 2593 * the workflow status is `permanentFailure`. 2594 * 2595 * * If one or more steps result in `temporaryFailure` and all other steps 2596 * complete `success` or are not executed, then the workflow status is 2597 * `temporaryFailure`. 2598 * 2599 * * If all workflow steps are executed and complete with `success`, then the 2600 * workflow status is `success`. 2601 * 2602 * # Extensions 2603 * 2604 * [ScatterFeatureRequirement](#ScatterFeatureRequirement) and 2605 * [SubworkflowFeatureRequirement](#SubworkflowFeatureRequirement) are 2606 * available as standard [extensions](#Extensions_and_Metadata) to core 2607 * workflow semantics. 2608 */ 2609 @documentRoot class Workflow : RecordSchemaBase 2610 { 2611 /** 2612 * The unique identifier for this process object. 2613 */ 2614 @id Union!(None, string) id_; 2615 /** 2616 * Defines the input parameters of the process. The process is ready to 2617 * run when all required input parameters are associated with concrete 2618 * values. Input parameters include a schema for each parameter which is 2619 * used to validate the input object. It may also be used to build a user 2620 * interface for constructing the input object. 2621 * 2622 * When accepting an input object, all input parameters must have a value. 2623 * If an input parameter is missing from the input object, it must be 2624 * assigned a value of `null` (or the value of `default` for that 2625 * parameter, if provided) for the purposes of validation and evaluation 2626 * of expressions. 2627 */ 2628 @idMap("id", "type") InputParameter[] inputs_; 2629 /** 2630 * Defines the parameters representing the output of the process. May be 2631 * used to generate and/or validate the output object. 2632 */ 2633 @idMap("id", "type") WorkflowOutputParameter[] outputs_; 2634 /** 2635 * Declares requirements that apply to either the runtime environment or the 2636 * workflow engine that must be met in order to execute this process. If 2637 * an implementation cannot satisfy all requirements, or a requirement is 2638 * listed which is not recognized by the implementation, it is a fatal 2639 * error and the implementation must not attempt to run the process, 2640 * unless overridden at user option. 2641 */ 2642 @idMap("class") Union!(None, Union!(InlineJavascriptRequirement, SchemaDefRequirement, DockerRequirement, SoftwareRequirement, InitialWorkDirRequirement, EnvVarRequirement, ShellCommandRequirement, ResourceRequirement, SubworkflowFeatureRequirement, ScatterFeatureRequirement, MultipleInputFeatureRequirement, StepInputExpressionRequirement, Any)[]) requirements_; 2643 /** 2644 * Declares hints applying to either the runtime environment or the 2645 * workflow engine that may be helpful in executing this process. It is 2646 * not an error if an implementation cannot satisfy all hints, however 2647 * the implementation may report a warning. 2648 */ 2649 @idMap("class") Union!(None, Union!(InlineJavascriptRequirement, SchemaDefRequirement, DockerRequirement, SoftwareRequirement, InitialWorkDirRequirement, EnvVarRequirement, ShellCommandRequirement, ResourceRequirement, SubworkflowFeatureRequirement, ScatterFeatureRequirement, MultipleInputFeatureRequirement, StepInputExpressionRequirement, Any)[]) hints_; 2650 /** 2651 * A short, human-readable label of this process object. 2652 */ 2653 Union!(None, string) label_; 2654 /** 2655 * A long, human-readable description of this process object. 2656 */ 2657 Union!(None, string) doc_; 2658 /** 2659 * CWL document version. Always required at the document root. Not 2660 * required for a Process embedded inside another Process. 2661 */ 2662 Union!(None, CWLVersion) cwlVersion_; 2663 /// 2664 static immutable class_ = "Workflow"; 2665 /** 2666 * The individual steps that make up the workflow. Each step is executed when all of its 2667 * input data links are fufilled. An implementation may choose to execute 2668 * the steps in a different order than listed and/or execute steps 2669 * concurrently, provided that dependencies between steps are met. 2670 */ 2671 @idMap("id") WorkflowStep[] steps_; 2672 2673 mixin genBody; 2674 } 2675 2676 /** 2677 * Indicates that the workflow platform must support nested workflows in 2678 * the `run` field of [WorkflowStep](#WorkflowStep). 2679 */ 2680 class SubworkflowFeatureRequirement : RecordSchemaBase 2681 { 2682 /** 2683 * Always 'SubworkflowFeatureRequirement' 2684 */ 2685 static immutable class_ = "SubworkflowFeatureRequirement"; 2686 2687 mixin genBody; 2688 } 2689 2690 /** 2691 * Indicates that the workflow platform must support the `scatter` and 2692 * `scatterMethod` fields of [WorkflowStep](#WorkflowStep). 2693 */ 2694 class ScatterFeatureRequirement : RecordSchemaBase 2695 { 2696 /** 2697 * Always 'ScatterFeatureRequirement' 2698 */ 2699 static immutable class_ = "ScatterFeatureRequirement"; 2700 2701 mixin genBody; 2702 } 2703 2704 /** 2705 * Indicates that the workflow platform must support multiple inbound data links 2706 * listed in the `source` field of [WorkflowStepInput](#WorkflowStepInput). 2707 */ 2708 class MultipleInputFeatureRequirement : RecordSchemaBase 2709 { 2710 /** 2711 * Always 'MultipleInputFeatureRequirement' 2712 */ 2713 static immutable class_ = "MultipleInputFeatureRequirement"; 2714 2715 mixin genBody; 2716 } 2717 2718 /** 2719 * Indicate that the workflow platform must support the `valueFrom` field 2720 * of [WorkflowStepInput](#WorkflowStepInput). 2721 */ 2722 class StepInputExpressionRequirement : RecordSchemaBase 2723 { 2724 /** 2725 * Always 'StepInputExpressionRequirement' 2726 */ 2727 static immutable class_ = "StepInputExpressionRequirement"; 2728 2729 mixin genBody; 2730 } 2731 2732 /// 2733 alias DocumentRootType = Union!(CommandLineTool, ExpressionTool, Workflow); 2734 2735 /// 2736 alias importFromURI = import_!DocumentRootType; 2737 2738 @("Test for generated parser") 2739 unittest 2740 { 2741 import std : dirEntries, SpanMode, stdThreadLocalLog, NullLogger; 2742 2743 auto currentLogger = stdThreadLocalLog; 2744 stdThreadLocalLog = new NullLogger; 2745 scope(exit) stdThreadLocalLog = currentLogger; 2746 2747 auto resourceDir = "resources/cwl-v1.0"; 2748 foreach (file; dirEntries(resourceDir, SpanMode.depth)) 2749 { 2750 import std : assertNotThrown, baseName, format, startsWith; 2751 import salad.resolver : absoluteURI; 2752 2753 if (!file.baseName.startsWith("valid")) 2754 { 2755 continue; 2756 } 2757 importFromURI(file.absoluteURI).assertNotThrown(format!"Failed to load %s"(file)); 2758 } 2759 }