diff --git a/.github/scripts/curate_autogenerated_schema.py b/.github/scripts/curate_autogenerated_schema.py new file mode 100644 index 0000000..81c7be2 --- /dev/null +++ b/.github/scripts/curate_autogenerated_schema.py @@ -0,0 +1,1893 @@ +#!/usr/bin/env python3 + +# Imports +import json +from copy import deepcopy +from itertools import chain +from pathlib import Path +from typing import Dict, List, Any, Union +import sys +import logging + +# Logging +logging.basicConfig( + level=logging.INFO, + format='%(asctime)s - %(name)s - %(levelname)s - %(message)s' +) + + +def update_items_key_recursively(property_dict_or_list: Union[Dict, List]) -> Union[Dict, List]: + """ + Check property has key recursively + :param property_dict_or_list: + :return: + """ + + # property_dict_or_list will be a dict at the top level but always list underneath, + # This is we only look through anyOf, allOf, oneOf. + # This function is only used for checking if items exists a property. + # We then update the items to be from + # items: { item }... to be # items: { anyOf: [ { item }, { "$ref": "CWLImportManual" } ] } + def update_items_key(items_dict: Dict) -> Dict: + return { + "items": { + "anyOf": [ + items_dict, + { + "$ref": f"#/definitions/CWLImportManual" + }, + { + "$ref": f"#/definitions/CWLIncludeManual" + }, + ] + } + } + + # Always do a deepcopy first + property_dict_or_list = deepcopy(property_dict_or_list) + + # If we can find 'items' under the property_dict_or_list, we update it + if isinstance(property_dict_or_list, List): + for index, iter_ in enumerate(deepcopy(property_dict_or_list)): + if not isinstance(iter_, Dict): + logging.error(f"Expected a dictionary but got {type(iter_)} instead") + property_dict_or_list[index] = update_items_key_recursively(iter_) + + elif isinstance(property_dict_or_list, Dict): + for key in deepcopy(property_dict_or_list).keys(): + if key == "items" and "type" in property_dict_or_list.keys() and property_dict_or_list["type"] == "array": + property_dict_or_list.update(update_items_key(property_dict_or_list["items"])) + elif key not in ["anyOf", "allOf", "oneOf"]: + continue + property_dict_or_list[key] = update_items_key_recursively(property_dict_or_list[key]) + + return property_dict_or_list + + +def remove_loading_options_and_extension_fields_from_schema(schema_dict: Any) -> Dict: + """ + Remove loadingOptions from schema recursively + :param schema_dict: + :return: + """ + + new_schema_dict = {} + + if isinstance(schema_dict, Dict): + for key, value in deepcopy(schema_dict).items(): + if isinstance(value, Dict): + if "loadingOptions" in value: + del value["loadingOptions"] + if "extensionFields" in value: + del value["extensionFields"] + new_schema_dict[key] = remove_loading_options_and_extension_fields_from_schema(value) + elif isinstance(value, List): + if "loadingOptions" in value: + _ = value.pop(value.index("loadingOptions")) + if "extensionFields" in value: + _ = value.pop(value.index("extensionFields")) + new_schema_dict[key] = remove_loading_options_and_extension_fields_from_schema(value) + else: + new_schema_dict[key] = value + elif isinstance(schema_dict, List): + new_schema_dict = list( + map( + lambda value_iter: remove_loading_options_and_extension_fields_from_schema(value_iter), + schema_dict + ) + ) + else: + # Item is a list of number + new_schema_dict = schema_dict + + return new_schema_dict + + +def fix_unnamed_maps( + schema_dict: Dict, + definition_key: str, + property_name: str, + allow_type_as_only_input: bool = False, + allow_type_array_as_only_input: bool = False, +): + """ + Inputs, Steps, Outputs etc. can use the id as the key. + + So we want to convert + + FROM + + { + "inputs": { + "description": "" + "Defines the input parameters of the process. The process is ready to" + "run when all required input parameters are associated with concrete" + "values. Input parameters include a schema for each parameter which is" + "used to validate the input object. It may also be used to build a user" + "interface for constructing the input object." + "When accepting an input object, all input parameters must have a value." + "If an input parameter is missing from the input object, it must be" + "assigned a value of `null` (or the value of `default` for that" + "parameter, if provided) for the purposes of validation and evaluation" + "of expressions.", + "items": { + "$ref": "#/definitions/WorkflowInputParameter" + }, + "type": "array" + } + } + + TO + + { + "inputs": { + "description": "" + "Defines the input parameters of the process. The process is ready to" + "run when all required input parameters are associated with concrete" + "values. Input parameters include a schema for each parameter which is" + "used to validate the input object. It may also be used to build a user" + "interface for constructing the input object." + "When accepting an input object, all input parameters must have a value." + "If an input parameter is missing from the input object, it must be" + "assigned a value of `null` (or the value of `default` for that" + "parameter, if provided) for the purposes of validation and evaluation" + "of expressions.", + "oneOf": [ + { + "items": { + "$ref": "#/definitions/WorkflowInputParameter" + }, + "type": "array" + }, + { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "$ref": "#/definitions/WorkflowInputParameter" + } + }, + "type": "object" + } + ] + } + } + + :param schema_dict: The schema dictionary to update + :param definition_key: The definition key to update, one of Workflow, ExpressionTool, CommandlineTool + :param property_name: The property to update, one of inputs, outputs, steps + :param allow_type_as_only_input: Allow the type to be the only input, expected to match the 'type' input + :param allow_type_array_as_only_input: + Count lines test 4 - https://github.com/common-workflow-language/cwl-v1.2/blob/main/tests/count-lines4-wf.cwl + file1: [file1, file2] should be support even if I don't recommend this + Along with + Count lines test 12 - https://github.com/common-workflow-language/cwl-v1.2/blob/main/tests/count-lines12-wf.cwl + file1: + - type: array + items: File + file2: + - type: array + items: File + Ew! + :return: + """ + + # Always do a deepcopy on the input + schema_dict = deepcopy(schema_dict) + + # Confirm definitions key + assert_definitions_key(schema_dict) + + # Assert definition_key exists in definitions + if definition_key not in schema_dict["definitions"]: + raise ValueError(f"Schema does not contain an '{definition_key}' key in 'definitions'") + + # Confirm that the definition_key has a properties key and the properties key is a dictionary + if ( + "properties" not in schema_dict["definitions"][definition_key] or + not isinstance(schema_dict["definitions"][definition_key]["properties"], Dict) + ): + raise ValueError( + f"Schema does not contain a 'properties' key in '{definition_key}.definitions' " + "or 'properties' is not a dictionary" + ) + + # Confirm that properties has a property_name key + if property_name not in schema_dict["definitions"][definition_key]["properties"]: + raise ValueError(f"Schema does not contain an '{property_name}' key in '{definition_key}.properties'") + + # Nest items and array key under oneOf array along with the patternProperties + property_old = deepcopy(schema_dict["definitions"][definition_key]["properties"][property_name]) + + pattern_properties_regex_match_ref = property_old.get("items", {}) + + # Sometimes a user might have the following + # Which I wouldn't recommend btw + # outputs: + # lit: File + if allow_type_as_only_input: + type_definition_key = property_old.get("items", {}).get("$ref").replace("#/definitions/", "") + if "type" in schema_dict["definitions"][type_definition_key]["properties"].keys(): + pattern_properties_regex_match_ref = { + "oneOf": [ + { + "$ref": property_old.get("items", {}).get("$ref") + }, + schema_dict["definitions"][type_definition_key]["properties"]["type"] + ] + } + else: + pattern_properties_regex_match_ref = { + "oneOf": [ + { + "$ref": property_old.get("items", {}).get("$ref") + }, + { + "type": "string" + } + ] + } + + # For situations where the type is defined by a either a single string or an array of items where + # Each element of the array is equivalent to the 'type' property + if allow_type_array_as_only_input: + pattern_properties_regex_match_ref["oneOf"].append( + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": f"#/definitions/{type_definition_key}" + } + ] + } + } + ) + + # Re-initialise the definitions + schema_dict["definitions"][definition_key]["properties"][property_name] = { + "description": property_old.get("description", ""), + "oneOf": [ + { + "items": property_old.get("items", {}), + "type": property_old.get("type", {}) + }, + { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": pattern_properties_regex_match_ref + }, + "type": "object" + } + ] + } + else: + # For WorkflowStep, we just allow the patternProperties to match the property_old items type + # While the property itself is an object + # Re-initialise the definitions + schema_dict["definitions"][definition_key]["properties"][property_name] = { + "description": property_old.get("description", ""), + "oneOf": [ + { + "items": property_old.get("items", {}), + "type": property_old.get("type", {}) + }, + { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": property_old.get("items", {}) + }, + "type": "object" + } + ] + } + + return schema_dict + + +def fix_secondary_file_schema(schema_dict: Dict) -> Dict: + """ + SecondaryFileSchema should allow for a single string entry to represent the secondary file pattern + Although not recommended, it is allowed in the CWL spec + + FROM + + { + "SecondaryFileSchema": { + "additionalProperties": false, + "description": "Secondary files are specified using the following micro-DSL for secondary files:\n\n* If the value is a string, it is transformed to an object with two fields\n `pattern` and `required`\n* By default, the value of `required` is `null`\n (this indicates default behavior, which may be based on the context)\n* If the value ends with a question mark `?` the question mark is\n stripped off and the value of the field `required` is set to `False`\n* The remaining value is assigned to the field `pattern`\n\nFor implementation details and examples, please see\n[this section](SchemaSalad.html#Domain_Specific_Language_for_secondary_files)\nin the Schema Salad specification.", + "properties": { + "pattern": { + "description": "Provides a pattern or expression specifying files or directories that\nshould be included alongside the primary file.\n\nIf the value is an expression, the value of `self` in the\nexpression must be the primary input or output File object to\nwhich this binding applies. The `basename`, `nameroot` and\n`nameext` fields must be present in `self`. For\n`CommandLineTool` inputs the `location` field must also be\npresent. For `CommandLineTool` outputs the `path` field must\nalso be present. If secondary files were included on an input\nFile object as part of the Process invocation, they must also\nbe present in `secondaryFiles` on `self`.\n\nThe expression must return either: a filename string relative\nto the path to the primary File, a File or Directory object\n(`class: File` or `class: Directory`) with either `location`\n(for inputs) or `path` (for outputs) and `basename` fields\nset, or an array consisting of strings or File or Directory\nobjects as previously described.\n\nIt is legal to use `location` from a File or Directory object\npassed in as input, including `location` from secondary files\non `self`. If an expression returns a File object with the\nsame `location` but a different `basename` as a secondary file\nthat was passed in, the expression result takes precedence.\nSetting the basename with an expression this way affects the\n`path` where the secondary file will be staged to in the\nCommandLineTool.\n\nThe expression may return \"null\" in which case there is no\nsecondary file from that expression.\n\nTo work on non-filename-preserving storage systems, portable\ntool descriptions should treat `location` as an\n[opaque identifier](#opaque-strings) and avoid constructing new\nvalues from `location`, but should construct relative references\nusing `basename` or `nameroot` instead, or propagate `location`\nfrom defined inputs.\n\nIf a value in `secondaryFiles` is a string that is not an expression,\nit specifies that the following pattern should be applied to the path\nof the primary file to yield a filename relative to the primary File:\n\n 1. If string ends with `?` character, remove the last `?` and mark\n the resulting secondary file as optional.\n 2. If string begins with one or more caret `^` characters, for each\n caret, remove the last file extension from the path (the last\n period `.` and all following characters). If there are no file\n extensions, the path is unchanged.\n 3. Append the remainder of the string to the end of the file path.", + "type": "string" + }, + "required": { + "description": "An implementation must not fail workflow execution if `required` is\nset to `false` and the expected secondary file does not exist.\nDefault value for `required` field is `true` for secondary files on\ninput and `false` for secondary files on output.", + "type": [ + "string", + "boolean" + ] + } + }, + "required": [ + "pattern" + ], + "type": "object" + } + } + + TO + + { + "SecondaryFileSchema": { + "additionalProperties": false, + "description": "Secondary files are specified using the following micro-DSL for secondary files:\n\n* If the value is a string, it is transformed to an object with two fields\n `pattern` and `required`\n* By default, the value of `required` is `null`\n (this indicates default behavior, which may be based on the context)\n* If the value ends with a question mark `?` the question mark is\n stripped off and the value of the field `required` is set to `False`\n* The remaining value is assigned to the field `pattern`\n\nFor implementation details and examples, please see\n[this section](SchemaSalad.html#Domain_Specific_Language_for_secondary_files)\nin the Schema Salad specification.", + "oneOf": [ + { + "properties": { + "pattern": { + "description": "Provides a pattern or expression specifying files or directories that\nshould be included alongside the primary file.\n\nIf the value is an expression, the value of `self` in the\nexpression must be the primary input or output File object to\nwhich this binding applies. The `basename`, `nameroot` and\n`nameext` fields must be present in `self`. For\n`CommandLineTool` inputs the `location` field must also be\npresent. For `CommandLineTool` outputs the `path` field must\nalso be present. If secondary files were included on an input\nFile object as part of the Process invocation, they must also\nbe present in `secondaryFiles` on `self`.\n\nThe expression must return either: a filename string relative\nto the path to the primary File, a File or Directory object\n(`class: File` or `class: Directory`) with either `location`\n(for inputs) or `path` (for outputs) and `basename` fields\nset, or an array consisting of strings or File or Directory\nobjects as previously described.\n\nIt is legal to use `location` from a File or Directory object\npassed in as input, including `location` from secondary files\non `self`. If an expression returns a File object with the\nsame `location` but a different `basename` as a secondary file\nthat was passed in, the expression result takes precedence.\nSetting the basename with an expression this way affects the\n`path` where the secondary file will be staged to in the\nCommandLineTool.\n\nThe expression may return \"null\" in which case there is no\nsecondary file from that expression.\n\nTo work on non-filename-preserving storage systems, portable\ntool descriptions should treat `location` as an\n[opaque identifier](#opaque-strings) and avoid constructing new\nvalues from `location`, but should construct relative references\nusing `basename` or `nameroot` instead, or propagate `location`\nfrom defined inputs.\n\nIf a value in `secondaryFiles` is a string that is not an expression,\nit specifies that the following pattern should be applied to the path\nof the primary file to yield a filename relative to the primary File:\n\n 1. If string ends with `?` character, remove the last `?` and mark\n the resulting secondary file as optional.\n 2. If string begins with one or more caret `^` characters, for each\n caret, remove the last file extension from the path (the last\n period `.` and all following characters). If there are no file\n extensions, the path is unchanged.\n 3. Append the remainder of the string to the end of the file path.", + "type": "string" + }, + "required": { + "description": "An implementation must not fail workflow execution if `required` is\nset to `false` and the expected secondary file does not exist.\nDefault value for `required` field is `true` for secondary files on\ninput and `false` for secondary files on output.", + "type": [ + "string", + "boolean" + ] + } + }, + "required": [ + "pattern" + ], + "type": "object" + }, + { + "type": "string" + } + ] + } + } + + :param schema_dict: + :return: + """ + + # Always do a deepcopy on the input + schema_dict = deepcopy(schema_dict) + + # Confirm definitions key + assert_definitions_key(schema_dict) + + # Confirm definition_key exists in definitions + if "SecondaryFileSchema" not in schema_dict["definitions"]: + raise ValueError("Schema does not contain an 'SecondaryFileSchema' key in 'definitions'") + + # Confirm that the definition_key has a properties key and the properties key is a dictionary + if ( + "properties" not in schema_dict["definitions"]["SecondaryFileSchema"] or + not isinstance(schema_dict["definitions"]["SecondaryFileSchema"]["properties"], Dict) + ): + raise ValueError( + "Schema does not contain a 'properties' key in 'SecondaryFileSchema.definitions' " + "or 'properties' is not a dictionary" + ) + + # Move 'properties', 'required' and 'type' under 'oneOf' array for the SecondaryFileSchema definition + # We also need to drop the additional properties to be under the oneOf object type + schema_dict["definitions"]["SecondaryFileSchema"] = { + "description": schema_dict["definitions"]["SecondaryFileSchema"]["description"], + "oneOf": [ + { + "additionalProperties": schema_dict["definitions"]["SecondaryFileSchema"]["additionalProperties"], + "properties": schema_dict["definitions"]["SecondaryFileSchema"]["properties"], + "required": schema_dict["definitions"]["SecondaryFileSchema"]["required"], + "type": "object" + }, + { + "type": "string" + } + ] + } + + # Return the schema dictionary + return schema_dict + + +def fix_record_field_maps(schema_dict: Dict, definition_key: str) -> Dict: + """ + For each of the record field maps, + Duplicate the record field map but remove 'name' from the required list + And name the key InputRecordFieldMap + + We also need to allow for the InputRecordField to be of type 'array' where each item represents the 'type' + We can pull this anyOf from the 'type' field from the InputRecordField + + For example + + FROM + + { + "CommandInputRecordField": { + "additionalProperties": false, + "oneOf": [ + { + ... + "required": [ + "name", + "type" + ], + "type": "object" + }, + { + "type" "array", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/InputRecordSchema" + }, + { + "$ref": "#/definitions/InputEnumSchema" + }, + { + "$ref": "#/definitions/InputArraySchema" + }, + { + "type": "string" + } + ] + } + } + ] + } + } + + TO + + + { + "CommandInputRecordField": { + "additionalProperties": false, + ... + "required": [ + "name", + "type" + ], + "type": "object" + }, + "CommandInputRecordFieldMap": { + "additionalProperties": false, + ... + "required": [ + "type" + ], + "type": "object" + } + } + + + :param schema_dict: + :param definition_key: + :return: + """ + + # Always do a deepcopy on the input + schema_dict = deepcopy(schema_dict) + + # Confirm definitions key + assert_definitions_key(schema_dict) + + # Confirm definition_key exists in definitions + if definition_key not in schema_dict["definitions"]: + raise ValueError(f"Schema does not contain an '{definition_key}' key in 'definitions'") + + # Confirm that the definition_key has a required key and the required key is an array + if ( + "required" not in schema_dict["definitions"][definition_key] or + not isinstance(schema_dict["definitions"][definition_key]["required"], List) + ): + raise ValueError( + f"Schema does not contain a 'required' key in '{definition_key}.definitions' " + "or 'required' is not a list" + ) + + # Update the record field type to be of the array type where each item represents the 'type' + schema_dict["definitions"][definition_key] = { + "description": schema_dict["definitions"][definition_key].get("description", ""), + "oneOf": [ + { + **{ + key: value + for key, value in schema_dict["definitions"][definition_key].items() + if key not in ["description"] + } + }, + { + "type": "array", + "items": schema_dict["definitions"][definition_key]["properties"].get("type", {}) + } + ] + } + + # Create the new key in the definitions with the Map suffix and remove the 'name' from the required list + schema_dict["definitions"][definition_key + "Map"] = { + "description": schema_dict["definitions"][definition_key].get("description", ""), + "oneOf": [ + { + **{ + key: value + for key, value in schema_dict["definitions"][definition_key]["oneOf"][0].items() + if key not in ["description", "required"] + }, + "required": list( + filter( + lambda required_iter: required_iter != "name", + schema_dict["definitions"][definition_key]["oneOf"][0].get("required", []) + ) + ) + }, + { + "type": "array", + "items": schema_dict["definitions"][definition_key]["oneOf"][0]["properties"].get("type", {}) + }, + { + # In situations where the type is defined by a single string + # Again, wouldn't recommend this. But it is allowed in the CWL spec + "type": "string" + } + ] + } + + # Return the updated schema + return schema_dict + + +def fix_schema_field_maps(schema_dict: Dict, definition_key: str, record_reference: str) -> Dict: + """ + Update the schema field to allow for mapped fields - that use the name as the key + + From: + + { + "CommandInputRecordSchema": { + "additionalProperties": false, + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandInputRecordSchema", + "properties": { + ... + "fields": { + "description": "Defines the fields of the record.", + "items": { + "$ref": "#/definitions/CommandInputRecordField" + }, + "type": "array" + }, + ... + }, + "required": [ + "type" + ], + "type": "object" + } + } + + TO + + { + "CommandInputRecordSchema": { + "additionalProperties": false, + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandInputRecordSchema", + "properties": { + ... + "fields": { + "description": "Defines the fields of the record.", + "oneOf": [ + { + "items": { + "$ref": "#/definitions/CommandInputRecordField" + }, + "type": "array" + }, + { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "$ref": "#/definitions/CommandInputRecordFieldMap" + } + }, + "type": "object" + } + ] + + }, + ... + }, + "required": [ + "type" + ], + "type": "object" + } + } + + :param schema_dict: The schema dict + :param definition_key: One of CommandInputRecordSchema or InputRecordSchema + :param record_reference: One of CommandInputRecordFieldMap or InputRecordFieldMap + :return: + """ + + # Always do a deepcopy on the input + schema_dict = deepcopy(schema_dict) + + # Confirm definitions key + assert_definitions_key(schema_dict) + + # Confirm definition_key exists in definitions + if definition_key not in schema_dict["definitions"]: + raise ValueError(f"Schema does not contain an '{definition_key}' key in 'definitions'") + + # Confirm that the definition_key has a properties key and the properties key is a dictionary + if ( + "properties" not in schema_dict["definitions"][definition_key] or + not isinstance(schema_dict["definitions"][definition_key]["properties"], Dict) + ): + raise ValueError( + f"Schema does not contain a 'properties' key in '{definition_key}.definitions' " + "or 'properties' is not a dictionary" + ) + + # Confirm that properties has a fields key + if "fields" not in schema_dict["definitions"][definition_key]["properties"]: + raise ValueError(f"Schema does not contain an 'fields' key in '{definition_key}.properties'") + + # Confirm that fields is of type array and has an items key + if ( + "type" not in schema_dict["definitions"][definition_key]["properties"]["fields"] + or + not schema_dict["definitions"][definition_key]["properties"]["fields"]["type"] == "array" + or + "items" not in schema_dict["definitions"][definition_key]["properties"]["fields"] + ): + raise ValueError( + f"Schema does not contain an 'fields' key in '{definition_key}.properties' " + "of type array with an 'items' key" + ) + + # Nest items and array key under oneOf array along with the patternProperties + property_old = deepcopy(schema_dict["definitions"][definition_key]["properties"]["fields"]) + + # Re-initialise the definitions + schema_dict["definitions"][definition_key]["properties"]["fields"] = { + "description": property_old.get("description", ""), + "oneOf": [ + { + "items": property_old.get("items", {}), + "type": property_old.get("type", {}) + }, + { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "$ref": f"#/definitions/{record_reference}Map" + } + }, + "type": "object" + } + ] + } + + # Set the additionalProperties to false since we nest through reference classes + # Additional properties is set to false in subclasses - resolves https://stoic-agnesi-d0ac4a.netlify.app/37 + # _ = schema_dict["definitions"][definition_key].pop("additionalProperties", None) + + # Return the updated schema + return schema_dict + + +def fix_named_maps(schema_dict: Dict, definition_key: str, property_name: str) -> Dict: + """ + For hints and requirements, which have a named list of values we want to convert from + We also need to duplicate the Requirements and Hints properties + to allow for the map objects to not have the 'class' key + + { + "requirements": { + "description": "" + "Declares requirements that apply to either the runtime environment or the" + "workflow engine that must be met in order to execute this process. If" + "an implementation cannot satisfy all requirements, or a requirement is" + "listed which is not recognized by the implementation, it is a fatal" + "error and the implementation must not attempt to run the process," + "unless overridden at user option.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/InlineJavascriptRequirement" + }, + ... + ] + }, + "type": "array" + } + } + + TO + + { + "requirements": { + "description": "" + "Declares requirements that apply to either the runtime environment or the" + "workflow engine that must be met in order to execute this process. If" + "an implementation cannot satisfy all requirements, or a requirement is" + "listed which is not recognized by the implementation, it is a fatal" + "error and the implementation must not attempt to run the process," + "unless overridden at user option.", + "oneOf": [ + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/InlineJavascriptRequirement" + }, + ... + ] + }, + "type": "array" + }, + { + "type": "object", + "properties": { + "InlineJavascriptRequirement": { + "oneOf": [ + { + "$ref": "#/definitions/InlineJavascriptRequirementMap" + }, + // Empty object + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + ... + } + } + ] + } + } + + AND add the Map definition by duplicating the original definition and removing the 'class' key from properties + and remove the class item from the removed map definition + + FROM + + { + "InlineJavascriptRequirement": { + "type": "object", + "properties": { + "class": { + "enum": [ + "InlineJavascriptRequirement" + ] + }, + "expressionLib": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "class", + "expressionLib" + ] + }, + ... + } + + TO + + { + "InlineJavascriptRequirement": { + "type": "object", + "properties": { + "expressionLib": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "class", + "expressionLib" + ] + }, + "InlineJavascriptRequirementMap": { + "type": "object", + "properties": { + "expressionLib": { + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "expressionLib" + ] + }, + ... + } + + :param schema_dict: The schema definition + :param definition_key: One of Workflow, CommandlineTool or ExpressionTool + :param property_name: One of requirements or hints + :return: + """ + + # Always do a deepcopy on the input + schema_dict = deepcopy(schema_dict) + + # Assert that definitions key exists + assert_definitions_key(schema_dict) + + # Confirm definitions key exists + if definition_key not in schema_dict["definitions"]: + raise ValueError(f"Schema does not contain an '{definition_key}' key in 'definitions'") + + # Confirm that the definition_key has a properties key and the properties key is a dictionary + if ( + "properties" not in schema_dict["definitions"][definition_key] or + not isinstance(schema_dict["definitions"][definition_key]["properties"], Dict) + ): + raise ValueError( + f"Schema does not contain a 'properties' key in '{definition_key}.definitions' " + "or 'properties' is not a dictionary" + ) + + # Confirm that properties has a property_name key + if property_name not in schema_dict["definitions"][definition_key]["properties"]: + raise ValueError(f"Schema does not contain an '{property_name}' key in '{definition_key}.properties'") + + # Confirm that property_name is of type array and has an items key + if ( + "type" not in schema_dict["definitions"][definition_key]["properties"][property_name] + or + not schema_dict["definitions"][definition_key]["properties"][property_name]["type"] == "array" + or + "items" not in schema_dict["definitions"][definition_key]["properties"][property_name] + ): + raise ValueError( + f"Schema does not contain an '{property_name}' key in '{definition_key}.properties' " + "of type array with an 'items' key" + ) + + # If items is an empty object, we just convert from empty items of type array to + # oneOf array with an empty object or type object with patternProperties + # This is important for hints + if len(schema_dict["definitions"][definition_key]["properties"][property_name]["items"]) == 0: + schema_dict["definitions"][definition_key]["properties"][property_name] = { + "description": schema_dict["definitions"][definition_key]["properties"][property_name].get( + "description", "" + ), + "additionalProperties": False, + "oneOf": [ + { + "items": schema_dict["definitions"][definition_key]["properties"][property_name].get("items", {}), + "type": schema_dict["definitions"][definition_key]["properties"][property_name].get("type", {}) + }, + { + "type": "object", + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "type": "object" + } + } + } + ] + } + + return schema_dict + + # Confirm that property.items has an anyOf key and the anyOf key is an array + if ( + "anyOf" not in schema_dict["definitions"][definition_key]["properties"][property_name]["items"] + or + not isinstance( + schema_dict["definitions"][definition_key]["properties"][property_name]["items"]["anyOf"], + List + ) + ): + raise ValueError( + f"Schema does not contain an 'anyOf' key in '{definition_key}.properties.{property_name}.items' " + "or 'anyOf' is not a list" + ) + + # Nest items and array key under oneOf array along with and object type + property_old = deepcopy(schema_dict["definitions"][definition_key]["properties"][property_name]) + + schema_dict["definitions"][definition_key]["properties"][property_name] = { + "description": property_old.get("description", ""), + "oneOf": [ + { + "items": { + "anyOf": ( + # prepend $import to the list of possible items + # https://github.com/common-workflow-language/cwl-v1.2/blob/main/tests/schemadef-wf.cwl + [ + { + "$ref": "#/definitions/CWLImportManual" + }, + { + "$ref": "#/definitions/CWLIncludeManual" + }, + ] + + property_old.get("items")["anyOf"] + ) + }, + "type": property_old.get("type", {}) + }, + { + "type": "object", + "properties": dict( + map( + # requirements_iter will be a dict looking like this + # { + # "$ref": "#/definitions/InlineJavascriptRequirement" + # } + # We need to convert to + # "InlineJavascriptRequirement": { + # "oneOf": [ + # { + # "$ref": "#/definitions/InlineJavascriptRequirementMap" + # }, + # // Empty object + # { + # "type": "object", + # "properties": {}, + # "additionalProperties": false + # } + # ] + # } + lambda requirement_dict_iter: ( + requirement_dict_iter.get("$ref").split("#/definitions/")[1], + { + "anyOf": [ + { + "$ref": f"#/definitions/{requirement_dict_iter.get('$ref').split('#/definitions/')[1]}Map" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": False + } + ] + } + ), + property_old.get("items", {}).get("anyOf", []) + ) + ), + "additionalProperties": False + } + ] + } + + for requirement_iter in property_old.get("items", {}).get("anyOf", []): + requirement_name = requirement_iter.get("$ref").split("#/definitions/")[1] + + # Update property iter for each requirement such that the non-class key list allows for the + # $include and $import pattern + # i.e + # SchemaDefRequirement: + # types: + # - $import: Path to file + # Or + # InitialWorkDirRequirement: + # listing: + # - $import: Path to file + schema_dict["definitions"][requirement_name + "Map"] = { + "type": "object", + "properties": dict( + map( + lambda requirement_property_iter: ( + requirement_property_iter, + schema_dict["definitions"][requirement_name]["properties"][requirement_property_iter] + ), + filter( + lambda requirement_property_iter: requirement_property_iter != "class", + schema_dict["definitions"][requirement_name].get("properties", {}) + ) + ) + ), + "required": list( + filter( + lambda requirement_property_iter: requirement_property_iter != "class", + schema_dict["definitions"][requirement_name].get("required", []) + ) + ), + "description": schema_dict["definitions"][requirement_name].get("description", "") + } + + return schema_dict + + +def read_schema_in_from_file(file_path: Path) -> Dict: + """ + Read in the auto-generated schema from the file + :param file_path: + :return: + """ + if not file_path.exists(): + raise FileNotFoundError(f"File {file_path} does not exist") + + with open(file_path, "r") as file_h: + return json.load(file_h) + + +def assert_definitions_key(schema_dict: Dict): + """ + Ensure that the definitions key is part of the schema dictionary and is itself is a dictionary + :param schema_dict: + :return: + """ + if "definitions" not in schema_dict.keys() and not isinstance(schema_dict["definitions"], Dict): + raise ValueError("Schema does not contain a 'definitions' key or 'definitions' is not a dictionary") + + +def add_import_and_include_to_schema(schema_dict) -> Dict: + """ + Under the definitions section, add in the $import and $include definitions + Copied from https://github.com/common-workflow-language/cwl-v1.2/blob/76bdf9b55e2378432e0e6380ccedebb4a94ce483/json-schema/cwl.yaml#L57-L72 + + { + "CWLImportManual": { + "description": \"\"\" + Represents an '$import' directive that should point toward another compatible CWL file to import + where specified. + The contents of the imported file should be relevant contextually where it is being imported + \"\"\", + "$comment": \"\"\" + The schema validation of the CWL will not itself perform the '$import' to resolve and validate its contents. + Therefore, the complete schema will not be validated entirely, and could still be partially malformed. + To ensure proper and exhaustive validation of a CWL definition with this schema, all '$import' directives + should be resolved and extended beforehand. + \"\"\", + "type": "object", + "properties": { + "$import": { + "type": "string" + } + }, + "required": [ + "$import" + ], + "additionalProperties": false + } + } + + Ditto for $include directive + + { + "CWLIncludeManual": { + "description": " + Represents an '$include' directive that should point toward another compatible CWL file to import + where specified. + The contents of the imported file should be relevant contextually where it is being imported + ", + "$comment": " + The schema validation of the CWL will not itself perform the '$include' to resolve and validate its contents. + Therefore, the complete schema will not be validated entirely, and could still be partially malformed. + To ensure proper and exhaustive validation of a CWL definition with this schema, all '$include' directives + should be resolved and extended beforehand. + ", + "type": "object", + "properties": { + "$include": { + "type": "string" + } + }, + "required": [ + "$include" + ], + "additionalProperties": false + } + } + + + :param schema_dict: + :return: + """ + + # Always do a deepcopy on the input + schema_dict = deepcopy(schema_dict) + + # Confirm definitions key + assert_definitions_key(schema_dict) + + # Add in the $import and $include to the definitions + schema_dict["definitions"].update( + { + "CWLImportManual": { + "description": "" + "Represents an '$import' directive that should point toward another compatible " + "CWL file to import where specified. The contents of the imported file should be " + "relevant contextually where it is being imported", + "$comment": "" + "The schema validation of the CWL will not itself perform the '$import' to resolve and " + "validate its contents. Therefore, the complete schema will not be validated entirely, " + "and could still be partially malformed. " + "To ensure proper and exhaustive validation of a CWL definition with this schema, " + "all '$import' directives should be resolved and extended beforehand", + "type": "object", + "properties": { + "$import": { + "type": "string" + } + }, + "required": [ + "$import" + ], + "additionalProperties": False + }, + "CWLIncludeManual": { + "description": "" + "Represents an '$include' directive that should point toward another compatible " + "CWL file to import where specified. The contents of the imported file should be " + "relevant contextually where it is being imported", + "$comment": "" + "The schema validation of the CWL will not itself perform the '$include' to resolve and " + "validate its contents. Therefore, the complete schema will not be validated entirely, " + "and could still be partially malformed. " + "To ensure proper and exhaustive validation of a CWL definition with this schema, " + "all '$include' directives should be resolved and extended beforehand", + "type": "object", + "properties": { + "$include": { + "type": "string" + } + }, + "required": [ + "$include" + ], + "additionalProperties": False + } + } + ) + + return schema_dict + + +def add_import_and_include_to_requirements(schema_dict: Dict) -> Dict: + """ + Only applies to requirement properties where the property can be a list + + For example allows SchemaDefRequirement.types array to be $import type or + InlineJavascriptRequirement.expressionLib to be $import type + + FROM + + { + "SchemaDefRequirement": { + "additionalProperties": false, + "description": "" + "Auto-generated class implementation for https://w3id.org/cwl/cwl#SchemaDefRequirement" + "This field consists of an array of type definitions which must be used when" + "interpreting the `inputs` and `outputs` fields. When a `type` field" + "contains a IRI, the implementation must check if the type is defined in" + "`schemaDefs` and use that definition. If the type is not found in" + "`schemaDefs`, it is an error. The entries in `schemaDefs` must be" + "processed in the order listed such that later schema definitions may refer" + "to earlier schema definitions." + "- **Type definitions are allowed for `enum` and `record` types only.**" + "- Type definitions may be shared by defining them in a file and then" + " `$include`-ing them in the `types` field.\n- A file can contain a list of type definitions", + "properties": { + "class": { + "const": "SchemaDefRequirement", + "description": "Always 'SchemaDefRequirement'", + "type": "string" + }, + "extensionFields": { + "$ref": "#/definitions/Dictionary" + }, + "loadingOptions": { + "$ref": "#/definitions/LoadingOptions" + }, + "types": { + "description": "The list of type definitions.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CommandInputArraySchema" + }, + { + "$ref": "#/definitions/CommandInputRecordSchema" + }, + { + "$ref": "#/definitions/CommandInputEnumSchema" + } + ] + }, + "type": "array" + } + }, + "required": [ + "class", + "types" + ], + "type": "object" + } + } + + TO + + { + "SchemaDefRequirement": { + "additionalProperties": false, + "description": "" + "Auto-generated class implementation for https://w3id.org/cwl/cwl#SchemaDefRequirement" + "This field consists of an array of type definitions which must be used when" + "interpreting the `inputs` and `outputs` fields. When a `type` field" + "contains a IRI, the implementation must check if the type is defined in" + "`schemaDefs` and use that definition. If the type is not found in" + "`schemaDefs`, it is an error. The entries in `schemaDefs` must be" + "processed in the order listed such that later schema definitions may refer" + "to earlier schema definitions." + "- **Type definitions are allowed for `enum` and `record` types only.**" + "- Type definitions may be shared by defining them in a file and then" + " `$include`-ing them in the `types` field.\n- A file can contain a list of type definitions", + "properties": { + "class": { + "const": "SchemaDefRequirement", + "description": "Always 'SchemaDefRequirement'", + "type": "string" + }, + "extensionFields": { + "$ref": "#/definitions/Dictionary" + }, + "loadingOptions": { + "$ref": "#/definitions/LoadingOptions" + }, + "types": { + "description": "The list of type definitions.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CommandInputArraySchema" + }, + { + "$ref": "#/definitions/CommandInputRecordSchema" + }, + { + "$ref": "#/definitions/CommandInputEnumSchema" + }, + { + "$ref": "#/definitions/CWLImportManual" + } + ] + }, + "type": "array" + } + }, + "required": [ + "class", + "types" + ], + "type": "object" + } + } + + :param schema_dict: + :return: + """ + + # Always do a deepcopy on the input + schema_dict = deepcopy(schema_dict) + + # Confirm definitions key + assert_definitions_key(schema_dict) + + for definition_key in schema_dict["definitions"]: + if definition_key.endswith("Requirement"): + for property_name, property_value in schema_dict["definitions"][definition_key]["properties"].items(): + schema_dict["definitions"][definition_key]["properties"][property_name] = ( + update_items_key_recursively(property_value) + ) + + return schema_dict + + +def fix_env_var_requirement(schema_dict: Dict) -> Dict: + """ + Go from + + FROM + { + "EnvVarRequirement": { + "additionalProperties": false, + "description": "Define a list of environment variables which will be set in the\nexecution environment of the tool. See `EnvironmentDef` for details.", + "properties": { + "class": { + "const": "EnvVarRequirement", + "description": "Always 'EnvVarRequirement'", + "type": "string" + }, + "envDef": { + "description": "The list of environment variables.", + "items": { + "$ref": "#/definitions/EnvironmentDef" + }, + "type": "array" + } + }, + "required": [ + "class", + "envDef" + ], + "type": "object" + } + } + + TO + { + "EnvVarRequirement": { + "additionalProperties": false, + "description": "Define a list of environment variables which will be set in the\nexecution environment of the tool. See `EnvironmentDef` for details.", + "properties": { + "class": { + "const": "EnvVarRequirement", + "description": "Always 'EnvVarRequirement'", + "type": "string" + }, + "envDef": { + "description": "The list of environment variables.", + "oneOf": [ + { + "items": { + "$ref": "#/definitions/EnvironmentDef" + }, + "type": "array" + }, + { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "type": "string" + } + } + } + ] + } + }, + "required": [ + "class", + "envDef" + ], + "type": "object" + } + } + + + :param schema_dict: + :return: + """ + + # Always do a deepcopy on the input + schema_dict = deepcopy(schema_dict) + + # Confirm definitions key + assert_definitions_key(schema_dict) + + # Confirm EnvVarRequirement exists in definitions + if "EnvVarRequirement" not in schema_dict["definitions"]: + raise ValueError("Schema does not contain an 'EnvVarRequirement' key in 'definitions'") + + # Confirm that the EnvVarRequirement has a properties key and the properties key is a dictionary + if ( + "properties" not in schema_dict["definitions"]["EnvVarRequirement"] or + not isinstance(schema_dict["definitions"]["EnvVarRequirement"]["properties"], Dict) + ): + raise ValueError( + "Schema does not contain a 'properties' key in 'EnvVarRequirement.definitions' " + "or 'properties' is not a dictionary" + ) + + # Confirm that properties has a envDef key + if "envDef" not in schema_dict["definitions"]["EnvVarRequirement"]["properties"]: + raise ValueError("Schema does not contain an 'envDef' key in 'EnvVarRequirement.properties'") + + # Confirm that envDef is of type array and has an items key + if ( + "type" not in schema_dict["definitions"]["EnvVarRequirement"]["properties"]["envDef"] + or + not schema_dict["definitions"]["EnvVarRequirement"]["properties"]["envDef"]["type"] == "array" + or + "items" not in schema_dict["definitions"]["EnvVarRequirement"]["properties"]["envDef"] + ): + raise ValueError( + "Schema does not contain an 'envDef' key in 'EnvVarRequirement.properties' " + "of type array with an 'items' key" + ) + + # Allow for patternProperties in the envDef array by updating the envDef to be a oneOf array + schema_dict["definitions"]["EnvVarRequirement"]["properties"]["envDef"] = { + "description": schema_dict["definitions"]["EnvVarRequirement"]["properties"]["envDef"].get("description", ""), + "oneOf": [ + { + "items": schema_dict["definitions"]["EnvVarRequirement"]["properties"]["envDef"].get("items", {}), + "type": schema_dict["definitions"]["EnvVarRequirement"]["properties"]["envDef"].get("type", {}) + }, + { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "type": "string" + } + } + } + ] + } + + # Return schema dict + return schema_dict + + +def add_cwl_metadata_to_schema(schema_dict: Dict) -> Dict: + """ + Add in the CWL metadata to the schema + Derived from https://github.com/common-workflow-language/cwl-v1.2/blob/76bdf9b55e2378432e0e6380ccedebb4a94ce483/json-schema/cwl.yaml#L2231-L2241 + :param schema_dict: + :return: + """ + + # Always do a deepcopy on the input + schema_dict = deepcopy(schema_dict) + + # Assert defintions + assert_definitions_key(schema_dict) + + # Add in the CWL metadata to the definitions + schema_dict["definitions"].update( + { + "CWLDocumentMetadata": { + "description": "Metadata for a CWL document", + "type": "object", + "properties": { + "$namespaces": { + "description": "The namespaces used in the document", + "type": "object", + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "type": "string" + } + } + }, + "$schemas": { + "description": "The schemas used in the document", + "type": "array", + "items": { + "type": "string" + } + } + }, + "patternProperties": { + # Shorthand notation + # s: + "^\w+:.*$": { + "type": "object" + }, + # Or the full version + # https://schema.org/ # + # Ensure :// is present + "^\w+:\/\/.*": { + "type": "object" + } + }, + "additionalProperties": False, + "required": [] + } + } + ) + return schema_dict + + +def write_schema_out_to_json_file(schema_dict: Dict, file_path: Path): + """ + Write out the schema to the file + :param schema_dict: + :param file_path: + :return: + """ + with open(file_path, "w") as file_h: + json.dump(schema_dict, file_h, indent=4) + + +def rename_all_keys_with_trailing_underscore(schema_dict: Any) -> Dict: + """ + Keys such as class_, type_ etc. are renames from TypeScript. We need to rename them in the JSON schema back + to their original names to generate a valid CWL JSON schema + :param schema_dict: + :return: + """ + + new_schema_dict = {} + + if isinstance(schema_dict, Dict): + for key, value in deepcopy(schema_dict).items(): + key = key.rstrip("_") + if isinstance(value, Dict): + new_schema_dict[key] = rename_all_keys_with_trailing_underscore(value) + elif isinstance(value, List): + new_schema_dict[key] = rename_all_keys_with_trailing_underscore(value) + else: + new_schema_dict[key] = value + elif isinstance(schema_dict, List): + new_schema_dict = list( + map(lambda value_iter: rename_all_keys_with_trailing_underscore(value_iter), schema_dict)) + else: + # Item is a value + new_schema_dict = schema_dict.rstrip("_") + + return new_schema_dict + + +def add_cwl_file(schema_dict: Dict) -> Dict: + """ + Large updates to the actual file body + + Can come in two forms, File and Graph. + + In File form, can be of type Workflow, ExpressionTool or CommandLineTool, + In Graph form, we have the $graph property which then has elements of type CWLFile + + Both can have the metadata objects such as $namespaces and $schemas + + We initialise both objects. + + Then state that the file can be a file or a graph + + :param schema_dict: + :return: + """ + # Always deep copy the input + schema_dict = deepcopy(schema_dict) + + # Assert $ref key + if "$ref" not in schema_dict: + raise ValueError("Schema does not contain a '$ref' key") + + # Assert $ref value is "#/definitions/Workflow" + if schema_dict["$ref"] != "#/definitions/Workflow": + raise ValueError("Schema does not contain a '$ref' value of '#/definitions/Workflow'") + + # Update the schema to use 'if-else' for CommandlineTool and Expression + schema_dict.update( + { + "$ref": "#/definitions/CWLGraphOrFile", + } + ) + + schema_dict["definitions"].update( + { + # First create the yaml option + # Which is either a workflow, commandline tool or expression tool + "CWLFile": { + "type": "object", + "additionalProperties": False, + "allOf": [ + { + "oneOf": [ + { + "$ref": "#/definitions/Workflow" + }, + { + "$ref": "#/definitions/CommandLineTool" + }, + { + "$ref": "#/definitions/ExpressionTool" + } + ] + }, + { + "oneOf": [ + { + "$ref": "#/definitions/CWLDocumentMetadata" + } + ] + } + ] + }, + # Now create the graph option + "CWLGraph": { + "type": "object", + "properties": { + "$graph": { + "type": "array", + "items": { + "$ref": "#/definitions/CWLFile" + } + }, + # Copy from Workflow + "cwlVersion": schema_dict["definitions"]["Workflow"]["properties"]["cwlVersion"] + }, + "required": [ + "$graph" + ] + }, + "CWLGraphOrFile": { + "type": "object", + "additionalProperties": False, + "allOf": [ + { + "oneOf": [ + { + "$ref": "#/definitions/CWLGraph" + }, + { + "$ref": "#/definitions/CWLFile" + } + ] + }, + { + "$ref": "#/definitions/CWLDocumentMetadata" + } + ] + } + + } + ) + + return schema_dict + + +def fix_descriptions(schema_dict: Dict) -> Dict: + """ + Fix the descriptions for all definitions by removing the 'Auto-generated' class implementation ... + Means that users will see helpful descriptions in the schema + :param schema_dict: + :return: + """ + # Always deep copy the input + schema_dict = deepcopy(schema_dict) + + # Assert definitions + assert_definitions_key(schema_dict) + + # Iterate over all definitions and remove the 'Auto-generated' class implementation + for schema_def_name, schema_def_dict in schema_dict.get("definitions", {}).items(): + if "description" not in schema_def_dict: + continue + schema_dict["definitions"][schema_def_name]["description"] = ( + schema_def_dict.get("description", "").split("\n\n", 1)[-1] + ) + + # Update top level description + schema_dict["description"] = schema_dict.get("description", "").split("\n\n", 1)[-1] + + return schema_dict + + +def fix_additional_properties(schema_dict: Dict, top_definition: str, sub_definition_keys: List) -> Dict: + """ + Fix the additionalProperties issues demonstrated in https://stoic-agnesi-d0ac4a.netlify.app/37 + :param schema_dict: + :return: + """ + # Always copy the input + schema_dict = deepcopy(schema_dict) + + # Part 1, drop additionalProperties: false from Workflow, CommandLineTool and ExpressionTool definitions + for definition_key in sub_definition_keys: + _ = schema_dict["definitions"][definition_key].pop("additionalProperties", None) + + # Part 2 + # For CWLFileorGraph definition, add in the collective set of properties keys defined under + # Workflow, CommandLineTool, ExpressionTool, $graph and CWLMetadata + # And for each property key set the value to true - + property_keys = [] + for definition_key in sub_definition_keys: + if "properties" not in schema_dict["definitions"][definition_key]: + continue + property_keys.append(list(schema_dict["definitions"][definition_key]["properties"].keys())) + property_keys = list(set(chain(*property_keys))) + + schema_dict["definitions"][top_definition]["properties"] = dict( + map( + lambda property_key_iter: (property_key_iter, True), + property_keys + ) + ) + + # Part 2a, copy over patternProperties + pattern_property_objects = {} + for definition_key in sub_definition_keys: + if "patternProperties" not in schema_dict["definitions"][definition_key]: + continue + pattern_property_objects.update( + schema_dict["definitions"][definition_key]["patternProperties"] + ) + + schema_dict["definitions"][top_definition]["patternProperties"] = pattern_property_objects + + # Make additionalProperties false to this top CWLDocumentMetadata + schema_dict["definitions"][top_definition]["additionalProperties"] = False + + return schema_dict + + +def fix_hints(schema_dict, definition_key): + """ + Hints property should be the same as requirements for the given key + :param schema_dict: + :param definition_key: + :return: + """ + + # Always do a deepcopy on the input + schema_dict = deepcopy(schema_dict) + + # Assert definitions key + assert_definitions_key(schema_dict) + + # Confirm definitions key exists + if definition_key not in schema_dict["definitions"]: + raise ValueError(f"Schema does not contain an '{definition_key}' key in 'definitions'") + + # Confirm that the definition_key has a properties key and the properties key is a dictionary + if ( + "properties" not in schema_dict["definitions"][definition_key] or + not isinstance(schema_dict["definitions"][definition_key]["properties"], Dict) + ): + raise ValueError( + f"Schema does not contain a 'properties' key in '{definition_key}.definitions' " + "or 'properties' is not a dictionary" + ) + + # Confirm that properties has a requirements key + if "requirements" not in schema_dict["definitions"][definition_key]["properties"]: + raise ValueError(f"Schema does not contain an 'requirements' key in '{definition_key}.properties'") + + # Copy requirements to hints + schema_dict["definitions"][definition_key]["properties"]["hints"] = \ + schema_dict["definitions"][definition_key]["properties"]["requirements"] + + return schema_dict + + +def main(): + # Step 1 - read in existing schema + schema_dict = read_schema_in_from_file(Path(sys.argv[1])) + + # Remove loading options from schema + schema_dict = remove_loading_options_and_extension_fields_from_schema(schema_dict) + + # Rename all keys with trailing underscore + schema_dict = rename_all_keys_with_trailing_underscore(schema_dict) + + # Add in $import and $include definitions to the schema + schema_dict = add_import_and_include_to_schema(schema_dict) + + # Add metadata to definitions list + schema_dict = add_cwl_metadata_to_schema(schema_dict) + + # Fix EnvVarRequirement.envDef array to allow for string type not just array type + schema_dict = fix_env_var_requirement(schema_dict) + + # Allow all requirements to $import + schema_dict = add_import_and_include_to_requirements(schema_dict) + + # Fix secondaryfile schema + schema_dict = fix_secondary_file_schema(schema_dict) + + # Fix record fields + for record_field_definition_key in ( + [ + "CommandInputRecordField", "InputRecordField", + "CommandOutputRecordField", "OutputRecordField" + ] + ): + schema_dict = fix_record_field_maps(schema_dict, record_field_definition_key) + + # Fix schema fields + for schema_field_definition_key in ( + [ + "CommandInputRecordSchema", "InputRecordSchema", + "CommandOutputRecordSchema", "OutputRecordSchema", + ] + ): + schema_dict = fix_schema_field_maps( + schema_dict, + schema_field_definition_key, + schema_field_definition_key.replace("Schema", "Field") + ) + + # Add unnamed maps for inputs, outputs, and steps + for definition_key in ["Workflow", "ExpressionTool", "CommandLineTool", "Operation"]: + for property_name in ["inputs", "outputs", "steps"]: + # Only Workflow has the steps property + if not definition_key == "Workflow" and property_name == "steps": + continue + if property_name == 'steps': + # Step items must be objects + schema_dict = fix_unnamed_maps( + schema_dict, + definition_key, + property_name, + allow_type_as_only_input=False + ) + else: + # Inputs / Outputs can allow for type to be the only attribute in the patternProperties + schema_dict = fix_unnamed_maps( + schema_dict, + definition_key, + property_name, + allow_type_as_only_input=True, + allow_type_array_as_only_input=True + ) + + for property_name in ["requirements", "hints"]: + # Add named maps for hints and requirements + schema_dict = fix_named_maps(schema_dict, definition_key, property_name) + + # Also fix for 'in' for WorkflowStep + schema_dict = fix_unnamed_maps( + schema_dict, + "WorkflowStep", + "in", + allow_type_as_only_input=True, + allow_type_array_as_only_input=True + ) + + # And named maps for WorkflowStep + for property_name in ["requirements"]: + schema_dict = fix_named_maps(schema_dict, "WorkflowStep", property_name) + + # Hints should map to requirements + for definition_key in ["Workflow", "ExpressionTool", "CommandLineTool", "Operation"]: + schema_dict = fix_hints(schema_dict, definition_key) + + # Update the schema to use 'if-else' for CommandlineTool and Expression + schema_dict = add_cwl_file(schema_dict) + + # Fix descriptions + schema_dict = fix_descriptions(schema_dict) + + # Remove workflow description from top object as this is now any workflow description + _ = schema_dict.pop("description") + + # Fix additionalProperties issues + # https://stoic-agnesi-d0ac4a.netlify.app/37 + schema_dict = fix_additional_properties( + schema_dict, + "CWLGraphOrFile", + ["Workflow", "CommandLineTool", "ExpressionTool", "CWLDocumentMetadata", "CWLFile", "CWLGraph"] + ) + + # Also complete for CWLFile as it is implemented by CWLGraph + schema_dict = fix_additional_properties( + schema_dict, + "CWLFile", + ["Workflow", "CommandLineTool", "ExpressionTool", "CWLDocumentMetadata"] + ) + + # Write out the new schema + write_schema_out_to_json_file(schema_dict, Path(sys.argv[2])) + + +if __name__ == "__main__": + main() diff --git a/.github/scripts/validate_schema.py b/.github/scripts/validate_schema.py new file mode 100644 index 0000000..572747c --- /dev/null +++ b/.github/scripts/validate_schema.py @@ -0,0 +1,119 @@ +#!/usr/bin/env python3 + +""" +Clone the cwl-v1.2 repo and run against the tests directory for all files ending with cwl +""" +# Imports +import json +import sys +from typing import Dict +from jsonschema import validate, ValidationError +from pathlib import Path +from ruamel.yaml import YAML +import logging +from tempfile import TemporaryDirectory +from subprocess import run + +# Globals +SCHEMA_PATH = Path(sys.argv[1]) +CWL12_REPO_PARENT_TMPDIR_OBJ = TemporaryDirectory() +CWL12_REPO_DIR = Path(CWL12_REPO_PARENT_TMPDIR_OBJ.name) / "cwl-v1.2" + +IGNORED_FILES = [ + 'cwl-runner.cwl', # Not a test file + 'cat5-tool.cwl' # Rogue hints requirement +] + +# Logging +logging.basicConfig( + level=logging.INFO, + format='%(asctime)s - %(name)s - %(levelname)s - %(message)s' +) + + +def clone_cwl12_repo(): + # Clone the cwl-v1.2 repo + git_clone_command = [ + "git", "clone", + "--branch", "main", + "--depth", "1", + "https://github.com/common-workflow-language/cwl-v1.2" + ] + + # Run the git clone command + git_clone_proc = run( + git_clone_command, + cwd=CWL12_REPO_PARENT_TMPDIR_OBJ.name, + capture_output=True + ) + + if not git_clone_proc.returncode == 0: + logging.error(f'Error cloning cwl-v1.2 repo: Stdout {git_clone_proc.stdout}') + logging.error(f'Error cloning cwl-v1.2 repo: Stderr {git_clone_proc.stderr}') + raise ChildProcessError(f'Error cloning cwl-v1.2 repo: {git_clone_proc.stderr}') + + +def import_schema(schema_path: Path) -> Dict: + with open(schema_path, 'r') as schema_h: + return json.load(schema_h) + + +def load_cwl_file(cwl_file: Path) -> Dict: + # Initalise yaml loader + yaml = YAML() + + with open(cwl_file, 'r') as cwl_h: + # Load cwl file + cwl_yaml = yaml.load(cwl_h) + + return dict(cwl_yaml) + + +def validate_cwl(cwl: Dict, schema: Dict) -> bool: + try: + validate(cwl, schema) + logging.info(f"Passing: CWL file {cwl}") + return True + except ValidationError as e: + logging.warning(f'Error validating {cwl}: {e}') + return False + + +def main(): + # Clone v1.2 repo + clone_cwl12_repo() + + schema_obj = import_schema(SCHEMA_PATH) + passed = [] + failed = [] + + for file in CWL12_REPO_DIR.rglob('*.cwl'): + if file.name in IGNORED_FILES: + continue + # Load cwl file + cwl_file = load_cwl_file(file) + + # Check if cwlVersion is a key in the cwl_file + if 'cwlVersion' not in cwl_file: + logging.info(f"Skipping {file} as it does not contain a cwlVersion key") + logging.info(f"Likely not a CWL file") + continue + + # Validate cwl file + if validate_cwl(cwl_file, schema_obj): + passed.append(file) + else: + failed.append(file) + + logging.info(f"Passed: {len(passed)}") + logging.info(f"Failed: {len(failed)}") + + if len(failed) > 0: + logging.warning("The following files failed validation:") + for file_path in failed: + logging.warning(file_path) + raise ValueError(f"{len(failed)} files failed validation") + + +if __name__ == '__main__': + main() diff --git a/.github/workflows/generate_json_schema.yml b/.github/workflows/generate_json_schema.yml new file mode 100644 index 0000000..d2670af --- /dev/null +++ b/.github/workflows/generate_json_schema.yml @@ -0,0 +1,85 @@ +name: Generate JSON Schema + +on: + workflow_dispatch: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +env: + NODE_VERSION: 20.x + TYPESCRIPT_JSON_SCHEMA_VERSION: "^0.62.0" # 0.62.0 or higher but less than 1 + PYTHON_VERSION: "3.10" + # Add Globals for Github actions bot + GITHUB_ACTIONS_USERNAME: "github-actions[bot]" + GITHUB_ACTIONS_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com" + YQ_BINARY_URL: "https://github.com/mikefarah/yq/releases/download/v4.41.1/yq_linux_amd64" + +jobs: + generate_json_schema: + runs-on: ubuntu-latest + steps: + # From https://github.com/EndBug/add-and-commit?tab=readme-ov-file#working-with-prs + - if: github.event_name != 'pull_request' + uses: actions/checkout@v4 + - if: github.event_name == 'pull_request' + uses: actions/checkout@v4 + with: + repository: ${{ github.event.pull_request.head.repo.full_name }} + ref: ${{ github.event.pull_request.head.ref }} + - uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + - uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + - name: Install TypeScript JSON Schema + run: npm install typescript-json-schema@${{ env.TYPESCRIPT_JSON_SCHEMA_VERSION }} + - name: Install JSON Schema + run: | + pip install \ + jsonschema \ + ruamel.yaml + - name: Install yq + run: | + wget \ + --output-document yq \ + "${{ env.YQ_BINARY_URL }}" + chmod +x yq + sudo mv yq /usr/local/bin/yq + - name: Run TypeScript JSON Schema on Workflow object + run: | + npx typescript-json-schema \ + --required --noExtraProps \ + tsconfig.json \ + Workflow > cwl_schema.raw.json + - name: Curate JSON Schema + run: | + mkdir -p json_schemas + python3 \ + .github/scripts/curate_autogenerated_schema.py \ + cwl_schema.raw.json \ + json_schemas/cwl_schema.json + - name: Validate JSON Schema + run: | + python3 \ + .github/scripts/validate_schema.py \ + json_schemas/cwl_schema.json + - name: Convert cwl schema json to yq + run: | + yq \ + --output-format=yaml \ + --prettyPrint \ + --unwrapScalar < json_schemas/cwl_schema.json \ + > json_schemas/cwl_schema.yaml + - name: Commit JSON Schema + uses: EndBug/add-and-commit@v9 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + add: "['json_schemas/cwl_schema.json', 'json_schemas/cwl_schema.yaml']" + message: "Updating CWL and CWLGraph Schema" + default_author: github_actions + push: true + diff --git a/json_schemas/cwl_schema.json b/json_schemas/cwl_schema.json new file mode 100644 index 0000000..271d700 --- /dev/null +++ b/json_schemas/cwl_schema.json @@ -0,0 +1,7807 @@ +{ + "$ref": "#/definitions/CWLGraphOrFile", + "$schema": "http://json-schema.org/draft-07/schema#", + "definitions": { + "CommandInputArraySchema": { + "additionalProperties": false, + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandInputArraySchema", + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "inputBinding": { + "$ref": "#/definitions/CommandLineBinding", + "description": "Describes how to turn this object into command line arguments." + }, + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CommandInputArraySchema" + }, + { + "$ref": "#/definitions/CommandInputRecordSchema" + }, + { + "$ref": "#/definitions/CommandInputEnumSchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CommandInputArraySchema" + }, + { + "$ref": "#/definitions/CommandInputRecordSchema" + }, + { + "$ref": "#/definitions/CommandInputEnumSchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Defines the type of the array elements." + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "name": { + "description": "The identifier for this type", + "type": "string" + }, + "type": { + "const": "array", + "description": "Must be `array`", + "type": "string" + } + }, + "required": [ + "items", + "type" + ], + "type": "object" + }, + "CommandInputEnumSchema": { + "additionalProperties": false, + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandInputEnumSchema", + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "inputBinding": { + "$ref": "#/definitions/CommandLineBinding", + "description": "Describes how to turn this object into command line arguments." + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "name": { + "description": "The identifier for this type", + "type": "string" + }, + "symbols": { + "description": "Defines the set of valid symbols.", + "items": { + "type": "string" + }, + "type": "array" + }, + "type": { + "const": "enum", + "description": "Must be `enum`", + "type": "string" + } + }, + "required": [ + "symbols", + "type" + ], + "type": "object" + }, + "CommandInputParameter": { + "additionalProperties": false, + "description": "An input parameter for a CommandLineTool.", + "properties": { + "default": { + "description": "The default value to use for this parameter if the parameter is missing\nfrom the input object, or if the value of the parameter in the input\nobject is `null`. Default values are applied before evaluating expressions\n(e.g. dependent `valueFrom` fields)." + }, + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "format": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nThis must be one or more IRIs of concept nodes\nthat represents file formats which are allowed as input to this\nparameter, preferably defined within an ontology. If no ontology is\navailable, file formats may be tested by exact match." + }, + "id": { + "description": "The unique identifier for this object.", + "type": "string" + }, + "inputBinding": { + "$ref": "#/definitions/CommandLineBinding", + "description": "Describes how to turn the input parameters of a process into\ncommand line arguments." + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "loadContents": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nIf true, the file (or each file in the array) must be a UTF-8\ntext file 64 KiB or smaller, and the implementation must read\nthe entire contents of the file (or file array) and place it\nin the `contents` field of the File object for use by\nexpressions. If the size of the file is greater than 64 KiB,\nthe implementation must raise a fatal error.", + "type": "boolean" + }, + "loadListing": { + "description": "Only valid when `type: Directory` or is an array of `items: Directory`.\n\nSpecify the desired behavior for loading the `listing` field of\na Directory object for use by expressions.\n\nThe order of precedence for loadListing is:\n\n 1. `loadListing` on an individual parameter\n 2. Inherited from `LoadListingRequirement`\n 3. By default: `no_listing`", + "enum": [ + "deep_listing", + "no_listing", + "shallow_listing" + ], + "type": "string" + }, + "secondaryFiles": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFileSchema" + }, + { + "items": { + "$ref": "#/definitions/SecondaryFileSchema" + }, + "type": "array" + } + ], + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nProvides a pattern or expression specifying files or\ndirectories that should be included alongside the primary\nfile. Secondary files may be required or optional. When not\nexplicitly specified, secondary files specified for `inputs`\nare required and `outputs` are optional. An implementation\nmust include matching Files and Directories in the\n`secondaryFiles` property of the primary file. These Files\nand Directories must be transferred and staged alongside the\nprimary file. An implementation may fail workflow execution\nif a required secondary file does not exist.\n\nIf the value is an expression, the value of `self` in the expression\nmust be the primary input or output File object to which this binding\napplies. The `basename`, `nameroot` and `nameext` fields must be\npresent in `self`. For `CommandLineTool` outputs the `path` field must\nalso be present. The expression must return a filename string relative\nto the path to the primary File, a File or Directory object with either\n`path` or `location` and `basename` fields set, or an array consisting\nof strings or File or Directory objects. It is legal to reference an\nunchanged File or Directory object taken from input as a secondaryFile.\nThe expression may return \"null\" in which case there is no secondaryFile\nfrom that expression.\n\nTo work on non-filename-preserving storage systems, portable tool\ndescriptions should avoid constructing new values from `location`, but\nshould construct relative references using `basename` or `nameroot`\ninstead.\n\nIf a value in `secondaryFiles` is a string that is not an expression,\nit specifies that the following pattern should be applied to the path\nof the primary file to yield a filename relative to the primary File:\n\n 1. If string ends with `?` character, remove the last `?` and mark\n the resulting secondary file as optional.\n 2. If string begins with one or more caret `^` characters, for each\n caret, remove the last file extension from the path (the last\n period `.` and all following characters). If there are no file\n extensions, the path is unchanged.\n 3. Append the remainder of the string to the end of the file path." + }, + "streamable": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nA value of `true` indicates that the file is read or written\nsequentially without seeking. An implementation may use this flag to\nindicate whether it is valid to stream file contents using a named\npipe. Default: `false`.", + "type": "boolean" + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/CommandInputArraySchema" + }, + { + "$ref": "#/definitions/CommandInputRecordSchema" + }, + { + "$ref": "#/definitions/CommandInputEnumSchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CommandInputArraySchema" + }, + { + "$ref": "#/definitions/CommandInputRecordSchema" + }, + { + "$ref": "#/definitions/CommandInputEnumSchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Specify valid types of data that may be assigned to this parameter." + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "CommandInputRecordField": { + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandInputRecordField", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "format": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nThis must be one or more IRIs of concept nodes\nthat represents file formats which are allowed as input to this\nparameter, preferably defined within an ontology. If no ontology is\navailable, file formats may be tested by exact match." + }, + "inputBinding": { + "$ref": "#/definitions/CommandLineBinding", + "description": "Describes how to turn this object into command line arguments." + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "loadContents": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nIf true, the file (or each file in the array) must be a UTF-8\ntext file 64 KiB or smaller, and the implementation must read\nthe entire contents of the file (or file array) and place it\nin the `contents` field of the File object for use by\nexpressions. If the size of the file is greater than 64 KiB,\nthe implementation must raise a fatal error.", + "type": "boolean" + }, + "loadListing": { + "description": "Only valid when `type: Directory` or is an array of `items: Directory`.\n\nSpecify the desired behavior for loading the `listing` field of\na Directory object for use by expressions.\n\nThe order of precedence for loadListing is:\n\n 1. `loadListing` on an individual parameter\n 2. Inherited from `LoadListingRequirement`\n 3. By default: `no_listing`", + "enum": [ + "deep_listing", + "no_listing", + "shallow_listing" + ], + "type": "string" + }, + "name": { + "description": "The name of the field", + "type": "string" + }, + "secondaryFiles": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFileSchema" + }, + { + "items": { + "$ref": "#/definitions/SecondaryFileSchema" + }, + "type": "array" + } + ], + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nProvides a pattern or expression specifying files or\ndirectories that should be included alongside the primary\nfile. Secondary files may be required or optional. When not\nexplicitly specified, secondary files specified for `inputs`\nare required and `outputs` are optional. An implementation\nmust include matching Files and Directories in the\n`secondaryFiles` property of the primary file. These Files\nand Directories must be transferred and staged alongside the\nprimary file. An implementation may fail workflow execution\nif a required secondary file does not exist.\n\nIf the value is an expression, the value of `self` in the expression\nmust be the primary input or output File object to which this binding\napplies. The `basename`, `nameroot` and `nameext` fields must be\npresent in `self`. For `CommandLineTool` outputs the `path` field must\nalso be present. The expression must return a filename string relative\nto the path to the primary File, a File or Directory object with either\n`path` or `location` and `basename` fields set, or an array consisting\nof strings or File or Directory objects. It is legal to reference an\nunchanged File or Directory object taken from input as a secondaryFile.\nThe expression may return \"null\" in which case there is no secondaryFile\nfrom that expression.\n\nTo work on non-filename-preserving storage systems, portable tool\ndescriptions should avoid constructing new values from `location`, but\nshould construct relative references using `basename` or `nameroot`\ninstead.\n\nIf a value in `secondaryFiles` is a string that is not an expression,\nit specifies that the following pattern should be applied to the path\nof the primary file to yield a filename relative to the primary File:\n\n 1. If string ends with `?` character, remove the last `?` and mark\n the resulting secondary file as optional.\n 2. If string begins with one or more caret `^` characters, for each\n caret, remove the last file extension from the path (the last\n period `.` and all following characters). If there are no file\n extensions, the path is unchanged.\n 3. Append the remainder of the string to the end of the file path." + }, + "streamable": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nA value of `true` indicates that the file is read or written\nsequentially without seeking. An implementation may use this flag to\nindicate whether it is valid to stream file contents using a named\npipe. Default: `false`.", + "type": "boolean" + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/CommandInputArraySchema" + }, + { + "$ref": "#/definitions/CommandInputRecordSchema" + }, + { + "$ref": "#/definitions/CommandInputEnumSchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CommandInputArraySchema" + }, + { + "$ref": "#/definitions/CommandInputRecordSchema" + }, + { + "$ref": "#/definitions/CommandInputEnumSchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The field type" + } + }, + "required": [ + "name", + "type" + ], + "type": "object" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CommandInputArraySchema" + }, + { + "$ref": "#/definitions/CommandInputRecordSchema" + }, + { + "$ref": "#/definitions/CommandInputEnumSchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CommandInputArraySchema" + }, + { + "$ref": "#/definitions/CommandInputRecordSchema" + }, + { + "$ref": "#/definitions/CommandInputEnumSchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The field type" + } + } + ] + }, + "CommandInputRecordSchema": { + "additionalProperties": false, + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandInputRecordSchema", + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "fields": { + "description": "Defines the fields of the record.", + "oneOf": [ + { + "items": { + "$ref": "#/definitions/CommandInputRecordField" + }, + "type": "array" + }, + { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "$ref": "#/definitions/CommandInputRecordFieldMap" + } + }, + "type": "object" + } + ] + }, + "inputBinding": { + "$ref": "#/definitions/CommandLineBinding", + "description": "Describes how to turn this object into command line arguments." + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "name": { + "description": "The identifier for this type", + "type": "string" + }, + "type": { + "const": "record", + "description": "Must be `record`", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "CommandLineBinding": { + "additionalProperties": false, + "description": "\nWhen listed under `inputBinding` in the input schema, the term\n\"value\" refers to the corresponding value in the input object. For\nbinding objects listed in `CommandLineTool.arguments`, the term \"value\"\nrefers to the effective value after evaluating `valueFrom`.\n\nThe binding behavior when building the command line depends on the data\ntype of the value. If there is a mismatch between the type described by\nthe input schema and the effective value, such as resulting from an\nexpression evaluation, an implementation must use the data type of the\neffective value.\n\n - **string**: Add `prefix` and the string to the command line.\n\n - **number**: Add `prefix` and decimal representation to command line.\n\n - **boolean**: If true, add `prefix` to the command line. If false, add\n nothing.\n\n - **File**: Add `prefix` and the value of\n [`File.path`](#File) to the command line.\n\n - **Directory**: Add `prefix` and the value of\n [`Directory.path`](#Directory) to the command line.\n\n - **array**: If `itemSeparator` is specified, add `prefix` and the join\n the array into a single string with `itemSeparator` separating the\n items. Otherwise, first add `prefix`, then recursively process\n individual elements.\n If the array is empty, it does not add anything to command line.\n\n - **object**: Add `prefix` only, and recursively add object fields for\n which `inputBinding` is specified.\n\n - **null**: Add nothing.", + "properties": { + "itemSeparator": { + "description": "Join the array elements into a single string with the elements\nseparated by `itemSeparator`.", + "type": "string" + }, + "loadContents": { + "description": "Use of `loadContents` in `InputBinding` is deprecated.\nPreserved for v1.0 backwards compatibility. Will be removed in\nCWL v2.0. Use `InputParameter.loadContents` instead.", + "type": "boolean" + }, + "position": { + "description": "The sorting key. Default position is 0. If a [CWL Parameter Reference](#Parameter_references)\nor [CWL Expression](#Expressions_(Optional)) is used and if the\ninputBinding is associated with an input parameter, then the value of\n`self` will be the value of the input parameter. Input parameter\ndefaults (as specified by the `InputParameter.default` field) must be\napplied before evaluating the expression. Expressions must return a\nsingle value of type int or a null.", + "type": [ + "string", + "number" + ] + }, + "prefix": { + "description": "Command line prefix to add before the value.", + "type": "string" + }, + "separate": { + "description": "If true (default), then the prefix and value must be added as separate\ncommand line arguments; if false, prefix and value must be concatenated\ninto a single command line argument.", + "type": "boolean" + }, + "shellQuote": { + "description": "If `ShellCommandRequirement` is in the requirements for the current command,\nthis controls whether the value is quoted on the command line (default is true).\nUse `shellQuote: false` to inject metacharacters for operations such as pipes.\n\nIf `shellQuote` is true or not provided, the implementation must not\npermit interpretation of any shell metacharacters or directives.", + "type": "boolean" + }, + "valueFrom": { + "description": "If `valueFrom` is a constant string value, use this as the value and\napply the binding rules above.\n\nIf `valueFrom` is an expression, evaluate the expression to yield the\nactual value to use to build the command line and apply the binding\nrules above. If the inputBinding is associated with an input\nparameter, the value of `self` in the expression will be the value of\nthe input parameter. Input parameter defaults (as specified by the\n`InputParameter.default` field) must be applied before evaluating the\nexpression.\n\nIf the value of the associated input parameter is `null`, `valueFrom` is\nnot evaluated and nothing is added to the command line.\n\nWhen a binding is part of the `CommandLineTool.arguments` field,\nthe `valueFrom` field is required.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "CommandLineTool": { + "description": "This defines the schema of the CWL Command Line Tool Description document.", + "properties": { + "arguments": { + "description": "Command line bindings which are not directly associated with input\nparameters. If the value is a string, it is used as a string literal\nargument. If it is an Expression, the result of the evaluation is used\nas an argument.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CommandLineBinding" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "baseCommand": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Specifies the program to execute. If an array, the first element of\nthe array is the command to execute, and subsequent elements are\nmandatory command line arguments. The elements in `baseCommand` must\nappear before any command line bindings from `inputBinding` or\n`arguments`.\n\nIf `baseCommand` is not provided or is an empty array, the first\nelement of the command line produced after processing `inputBinding` or\n`arguments` must be used as the program to execute.\n\nIf the program includes a path separator character it must\nbe an absolute path, otherwise it is an error. If the program does not\ninclude a path separator, search the `$PATH` variable in the runtime\nenvironment of the workflow runner find the absolute path of the\nexecutable." + }, + "class": { + "const": "CommandLineTool", + "type": "string" + }, + "cwlVersion": { + "description": "CWL document version. Always required at the document root. Not\nrequired for a Process embedded inside another Process.", + "enum": [ + "draft-2", + "draft-3", + "draft-3.dev1", + "draft-3.dev2", + "draft-3.dev3", + "draft-3.dev4", + "draft-3.dev5", + "draft-4.dev1", + "draft-4.dev2", + "draft-4.dev3", + "v1.0", + "v1.0.dev4", + "v1.1", + "v1.1.0-dev1", + "v1.2", + "v1.2.0-dev1", + "v1.2.0-dev2", + "v1.2.0-dev3", + "v1.2.0-dev4", + "v1.2.0-dev5" + ], + "type": "string" + }, + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "hints": { + "description": "Declares requirements that apply to either the runtime environment or the\nworkflow engine that must be met in order to execute this process. If\nan implementation cannot satisfy all requirements, or a requirement is\nlisted which is not recognized by the implementation, it is a fatal\nerror and the implementation must not attempt to run the process,\nunless overridden at user option.", + "oneOf": [ + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CWLImportManual" + }, + { + "$ref": "#/definitions/CWLIncludeManual" + }, + { + "$ref": "#/definitions/InlineJavascriptRequirement" + }, + { + "$ref": "#/definitions/SchemaDefRequirement" + }, + { + "$ref": "#/definitions/LoadListingRequirement" + }, + { + "$ref": "#/definitions/DockerRequirement" + }, + { + "$ref": "#/definitions/SoftwareRequirement" + }, + { + "$ref": "#/definitions/InitialWorkDirRequirement" + }, + { + "$ref": "#/definitions/EnvVarRequirement" + }, + { + "$ref": "#/definitions/ShellCommandRequirement" + }, + { + "$ref": "#/definitions/ResourceRequirement" + }, + { + "$ref": "#/definitions/WorkReuse" + }, + { + "$ref": "#/definitions/NetworkAccess" + }, + { + "$ref": "#/definitions/InplaceUpdateRequirement" + }, + { + "$ref": "#/definitions/ToolTimeLimit" + }, + { + "$ref": "#/definitions/SubworkflowFeatureRequirement" + }, + { + "$ref": "#/definitions/ScatterFeatureRequirement" + }, + { + "$ref": "#/definitions/MultipleInputFeatureRequirement" + }, + { + "$ref": "#/definitions/StepInputExpressionRequirement" + } + ] + }, + "type": "array" + }, + { + "type": "object", + "properties": { + "InlineJavascriptRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InlineJavascriptRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SchemaDefRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SchemaDefRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "LoadListingRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/LoadListingRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "DockerRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/DockerRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SoftwareRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SoftwareRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "InitialWorkDirRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InitialWorkDirRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "EnvVarRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/EnvVarRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ShellCommandRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ShellCommandRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ResourceRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ResourceRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "WorkReuse": { + "anyOf": [ + { + "$ref": "#/definitions/WorkReuseMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "NetworkAccess": { + "anyOf": [ + { + "$ref": "#/definitions/NetworkAccessMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "InplaceUpdateRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InplaceUpdateRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ToolTimeLimit": { + "anyOf": [ + { + "$ref": "#/definitions/ToolTimeLimitMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SubworkflowFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SubworkflowFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ScatterFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ScatterFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "MultipleInputFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/MultipleInputFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "StepInputExpressionRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/StepInputExpressionRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + } + }, + "additionalProperties": false + } + ] + }, + "id": { + "description": "The unique identifier for this object.\n\nOnly useful for `$graph` at `Process` level. Should not be exposed\nto users in graphical or terminal user interfaces.", + "type": "string" + }, + "inputs": { + "description": "Defines the input parameters of the process. The process is ready to\nrun when all required input parameters are associated with concrete\nvalues. Input parameters include a schema for each parameter which is\nused to validate the input object. It may also be used to build a user\ninterface for constructing the input object.\n\nWhen accepting an input object, all input parameters must have a value.\nIf an input parameter is missing from the input object, it must be\nassigned a value of `null` (or the value of `default` for that\nparameter, if provided) for the purposes of validation and evaluation\nof expressions.", + "oneOf": [ + { + "items": { + "$ref": "#/definitions/CommandInputParameter" + }, + "type": "array" + }, + { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "oneOf": [ + { + "$ref": "#/definitions/CommandInputParameter" + }, + { + "anyOf": [ + { + "$ref": "#/definitions/CommandInputArraySchema" + }, + { + "$ref": "#/definitions/CommandInputRecordSchema" + }, + { + "$ref": "#/definitions/CommandInputEnumSchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CommandInputArraySchema" + }, + { + "$ref": "#/definitions/CommandInputRecordSchema" + }, + { + "$ref": "#/definitions/CommandInputEnumSchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Specify valid types of data that may be assigned to this parameter." + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/CommandInputParameter" + } + ] + } + } + ] + } + }, + "type": "object" + } + ] + }, + "intent": { + "description": "An identifier for the type of computational operation, of this Process.\nEspecially useful for \"class: Operation\", but can also be used for\nCommandLineTool, Workflow, or ExpressionTool.\n\nIf provided, then this must be an IRI of a concept node that\nrepresents the type of operation, preferably defined within an ontology.\n\nFor example, in the domain of bioinformatics, one can use an IRI from\nthe EDAM Ontology's [Operation concept nodes](http://edamontology.org/operation_0004),\nlike [Alignment](http://edamontology.org/operation_2928),\nor [Clustering](http://edamontology.org/operation_3432); or a more\nspecific Operation concept like\n[Split read mapping](http://edamontology.org/operation_3199).", + "items": { + "type": "string" + }, + "type": "array" + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "outputs": { + "description": "Defines the parameters representing the output of the process. May be\nused to generate and/or validate the output object.", + "oneOf": [ + { + "items": { + "$ref": "#/definitions/CommandOutputParameter" + }, + "type": "array" + }, + { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "oneOf": [ + { + "$ref": "#/definitions/CommandOutputParameter" + }, + { + "anyOf": [ + { + "$ref": "#/definitions/CommandOutputArraySchema" + }, + { + "$ref": "#/definitions/CommandOutputRecordSchema" + }, + { + "$ref": "#/definitions/CommandOutputEnumSchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CommandOutputArraySchema" + }, + { + "$ref": "#/definitions/CommandOutputRecordSchema" + }, + { + "$ref": "#/definitions/CommandOutputEnumSchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Specify valid types of data that may be assigned to this parameter." + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/CommandOutputParameter" + } + ] + } + } + ] + } + }, + "type": "object" + } + ] + }, + "permanentFailCodes": { + "description": "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.\nIf not specified, all exit codes except 0 are considered permanent failure.", + "items": { + "type": "number" + }, + "type": "array" + }, + "requirements": { + "description": "Declares requirements that apply to either the runtime environment or the\nworkflow engine that must be met in order to execute this process. If\nan implementation cannot satisfy all requirements, or a requirement is\nlisted which is not recognized by the implementation, it is a fatal\nerror and the implementation must not attempt to run the process,\nunless overridden at user option.", + "oneOf": [ + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CWLImportManual" + }, + { + "$ref": "#/definitions/CWLIncludeManual" + }, + { + "$ref": "#/definitions/InlineJavascriptRequirement" + }, + { + "$ref": "#/definitions/SchemaDefRequirement" + }, + { + "$ref": "#/definitions/LoadListingRequirement" + }, + { + "$ref": "#/definitions/DockerRequirement" + }, + { + "$ref": "#/definitions/SoftwareRequirement" + }, + { + "$ref": "#/definitions/InitialWorkDirRequirement" + }, + { + "$ref": "#/definitions/EnvVarRequirement" + }, + { + "$ref": "#/definitions/ShellCommandRequirement" + }, + { + "$ref": "#/definitions/ResourceRequirement" + }, + { + "$ref": "#/definitions/WorkReuse" + }, + { + "$ref": "#/definitions/NetworkAccess" + }, + { + "$ref": "#/definitions/InplaceUpdateRequirement" + }, + { + "$ref": "#/definitions/ToolTimeLimit" + }, + { + "$ref": "#/definitions/SubworkflowFeatureRequirement" + }, + { + "$ref": "#/definitions/ScatterFeatureRequirement" + }, + { + "$ref": "#/definitions/MultipleInputFeatureRequirement" + }, + { + "$ref": "#/definitions/StepInputExpressionRequirement" + } + ] + }, + "type": "array" + }, + { + "type": "object", + "properties": { + "InlineJavascriptRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InlineJavascriptRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SchemaDefRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SchemaDefRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "LoadListingRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/LoadListingRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "DockerRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/DockerRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SoftwareRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SoftwareRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "InitialWorkDirRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InitialWorkDirRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "EnvVarRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/EnvVarRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ShellCommandRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ShellCommandRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ResourceRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ResourceRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "WorkReuse": { + "anyOf": [ + { + "$ref": "#/definitions/WorkReuseMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "NetworkAccess": { + "anyOf": [ + { + "$ref": "#/definitions/NetworkAccessMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "InplaceUpdateRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InplaceUpdateRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ToolTimeLimit": { + "anyOf": [ + { + "$ref": "#/definitions/ToolTimeLimitMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SubworkflowFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SubworkflowFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ScatterFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ScatterFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "MultipleInputFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/MultipleInputFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "StepInputExpressionRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/StepInputExpressionRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + } + }, + "additionalProperties": false + } + ] + }, + "stderr": { + "description": "Capture the command's standard error stream to a file written to\nthe designated output directory.\n\nIf `stderr` is a string, it specifies the file name to use.\n\nIf `stderr` is an expression, the expression is evaluated and must\nreturn a string with the file name to use to capture stderr. If the\nreturn value is not a string, or the resulting path contains illegal\ncharacters (such as the path separator `/`) it is an error.", + "type": "string" + }, + "stdin": { + "description": "A path to a file whose contents must be piped into the command's\nstandard input stream.", + "type": "string" + }, + "stdout": { + "description": "Capture the command's standard output stream to a file written to\nthe designated output directory.\n\nIf the `CommandLineTool` contains logically chained commands\n(e.g. `echo a && echo b`) `stdout` must include the output of\nevery command.\n\nIf `stdout` is a string, it specifies the file name to use.\n\nIf `stdout` is an expression, the expression is evaluated and must\nreturn a string with the file name to use to capture stdout. If the\nreturn value is not a string, or the resulting path contains illegal\ncharacters (such as the path separator `/`) it is an error.", + "type": "string" + }, + "successCodes": { + "description": "Exit codes that indicate the process completed successfully.\n\nIf not specified, only exit code 0 is considered success.", + "items": { + "type": "number" + }, + "type": "array" + }, + "temporaryFailCodes": { + "description": "Exit codes that indicate the process failed due to a possibly\ntemporary condition, where executing the process with the same\nruntime environment and inputs may produce different results.\n\nIf not specified, no exit codes are considered temporary failure.", + "items": { + "type": "number" + }, + "type": "array" + } + }, + "required": [ + "class", + "inputs", + "outputs" + ], + "type": "object" + }, + "CommandOutputArraySchema": { + "additionalProperties": false, + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandOutputArraySchema", + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CommandOutputArraySchema" + }, + { + "$ref": "#/definitions/CommandOutputRecordSchema" + }, + { + "$ref": "#/definitions/CommandOutputEnumSchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CommandOutputArraySchema" + }, + { + "$ref": "#/definitions/CommandOutputRecordSchema" + }, + { + "$ref": "#/definitions/CommandOutputEnumSchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Defines the type of the array elements." + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "name": { + "description": "The identifier for this type", + "type": "string" + }, + "type": { + "const": "array", + "description": "Must be `array`", + "type": "string" + } + }, + "required": [ + "items", + "type" + ], + "type": "object" + }, + "CommandOutputBinding": { + "additionalProperties": false, + "description": "Describes how to generate an output parameter based on the files produced\nby a CommandLineTool.\n\nThe output parameter value is generated by applying these operations in the\nfollowing order:\n\n - glob\n - loadContents\n - outputEval\n - secondaryFiles", + "properties": { + "glob": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Find files or directories relative to the output directory, using POSIX\nglob(3) pathname matching. If an array is provided, find files or\ndirectories that match any pattern in the array. If an expression is\nprovided, the expression must return a string or an array of strings,\nwhich will then be evaluated as one or more glob patterns. Must only\nmatch and return files/directories which actually exist.\n\nIf the value of glob is a relative path pattern (does not\nbegin with a slash '/') then it is resolved relative to the\noutput directory. If the value of the glob is an absolute\npath pattern (it does begin with a slash '/') then it must\nrefer to a path within the output directory. It is an error\nif any glob resolves to a path outside the output directory.\nSpecifically this means globs that resolve to paths outside the output\ndirectory are illegal.\n\nA glob may match a path within the output directory which is\nactually a symlink to another file. In this case, the\nexpected behavior is for the resulting File/Directory object to take the\n`basename` (and corresponding `nameroot` and `nameext`) of the\nsymlink. The `location` of the File/Directory is implementation\ndependent, but logically the File/Directory should have the same content\nas the symlink target. Platforms may stage output files/directories to\ncloud storage that lack the concept of a symlink. In\nthis case file content and directories may be duplicated, or (to avoid\nduplication) the File/Directory `location` may refer to the symlink\ntarget.\n\nIt is an error if a symlink in the output directory (or any\nsymlink in a chain of links) refers to any file or directory\nthat is not under an input or output directory.\n\nImplementations may shut down a container before globbing\noutput, so globs and expressions must not assume access to the\ncontainer filesystem except for declared input and output." + }, + "loadContents": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nIf true, the file (or each file in the array) must be a UTF-8\ntext file 64 KiB or smaller, and the implementation must read\nthe entire contents of the file (or file array) and place it\nin the `contents` field of the File object for use by\nexpressions. If the size of the file is greater than 64 KiB,\nthe implementation must raise a fatal error.", + "type": "boolean" + }, + "loadListing": { + "description": "Only valid when `type: Directory` or is an array of `items: Directory`.\n\nSpecify the desired behavior for loading the `listing` field of\na Directory object for use by expressions.\n\nThe order of precedence for loadListing is:\n\n 1. `loadListing` on an individual parameter\n 2. Inherited from `LoadListingRequirement`\n 3. By default: `no_listing`", + "enum": [ + "deep_listing", + "no_listing", + "shallow_listing" + ], + "type": "string" + }, + "outputEval": { + "description": "Evaluate an expression to generate the output value. If\n`glob` was specified, the value of `self` must be an array\ncontaining file objects that were matched. If no files were\nmatched, `self` must be a zero length array; if a single file\nwas matched, the value of `self` is an array of a single\nelement. The exit code of the process is\navailable in the expression as `runtime.exitCode`.\n\nAdditionally, if `loadContents` is true, the file must be a\nUTF-8 text file 64 KiB or smaller, and the implementation must\nread the entire contents of the file (or file array) and place\nit in the `contents` field of the File object for use in\n`outputEval`. If the size of the file is greater than 64 KiB,\nthe implementation must raise a fatal error.\n\nIf a tool needs to return a large amount of structured data to\nthe workflow, loading the output object from `cwl.output.json`\nbypasses `outputEval` and is not subject to the 64 KiB\n`loadContents` limit.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "CommandOutputEnumSchema": { + "additionalProperties": false, + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandOutputEnumSchema", + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "name": { + "description": "The identifier for this type", + "type": "string" + }, + "symbols": { + "description": "Defines the set of valid symbols.", + "items": { + "type": "string" + }, + "type": "array" + }, + "type": { + "const": "enum", + "description": "Must be `enum`", + "type": "string" + } + }, + "required": [ + "symbols", + "type" + ], + "type": "object" + }, + "CommandOutputParameter": { + "additionalProperties": false, + "description": "An output parameter for a CommandLineTool.", + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "format": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nThis is the file format that will be assigned to the output\nFile object.", + "type": "string" + }, + "id": { + "description": "The unique identifier for this object.", + "type": "string" + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "outputBinding": { + "$ref": "#/definitions/CommandOutputBinding", + "description": "Describes how to generate this output object based on the files produced by a CommandLineTool" + }, + "secondaryFiles": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFileSchema" + }, + { + "items": { + "$ref": "#/definitions/SecondaryFileSchema" + }, + "type": "array" + } + ], + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nProvides a pattern or expression specifying files or\ndirectories that should be included alongside the primary\nfile. Secondary files may be required or optional. When not\nexplicitly specified, secondary files specified for `inputs`\nare required and `outputs` are optional. An implementation\nmust include matching Files and Directories in the\n`secondaryFiles` property of the primary file. These Files\nand Directories must be transferred and staged alongside the\nprimary file. An implementation may fail workflow execution\nif a required secondary file does not exist.\n\nIf the value is an expression, the value of `self` in the expression\nmust be the primary input or output File object to which this binding\napplies. The `basename`, `nameroot` and `nameext` fields must be\npresent in `self`. For `CommandLineTool` outputs the `path` field must\nalso be present. The expression must return a filename string relative\nto the path to the primary File, a File or Directory object with either\n`path` or `location` and `basename` fields set, or an array consisting\nof strings or File or Directory objects. It is legal to reference an\nunchanged File or Directory object taken from input as a secondaryFile.\nThe expression may return \"null\" in which case there is no secondaryFile\nfrom that expression.\n\nTo work on non-filename-preserving storage systems, portable tool\ndescriptions should avoid constructing new values from `location`, but\nshould construct relative references using `basename` or `nameroot`\ninstead.\n\nIf a value in `secondaryFiles` is a string that is not an expression,\nit specifies that the following pattern should be applied to the path\nof the primary file to yield a filename relative to the primary File:\n\n 1. If string ends with `?` character, remove the last `?` and mark\n the resulting secondary file as optional.\n 2. If string begins with one or more caret `^` characters, for each\n caret, remove the last file extension from the path (the last\n period `.` and all following characters). If there are no file\n extensions, the path is unchanged.\n 3. Append the remainder of the string to the end of the file path." + }, + "streamable": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nA value of `true` indicates that the file is read or written\nsequentially without seeking. An implementation may use this flag to\nindicate whether it is valid to stream file contents using a named\npipe. Default: `false`.", + "type": "boolean" + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/CommandOutputArraySchema" + }, + { + "$ref": "#/definitions/CommandOutputRecordSchema" + }, + { + "$ref": "#/definitions/CommandOutputEnumSchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CommandOutputArraySchema" + }, + { + "$ref": "#/definitions/CommandOutputRecordSchema" + }, + { + "$ref": "#/definitions/CommandOutputEnumSchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Specify valid types of data that may be assigned to this parameter." + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "CommandOutputRecordField": { + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandOutputRecordField", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "format": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nThis is the file format that will be assigned to the output\nFile object.", + "type": "string" + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "name": { + "description": "The name of the field", + "type": "string" + }, + "outputBinding": { + "$ref": "#/definitions/CommandOutputBinding", + "description": "Describes how to generate this output object based on the files\nproduced by a CommandLineTool" + }, + "secondaryFiles": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFileSchema" + }, + { + "items": { + "$ref": "#/definitions/SecondaryFileSchema" + }, + "type": "array" + } + ], + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nProvides a pattern or expression specifying files or\ndirectories that should be included alongside the primary\nfile. Secondary files may be required or optional. When not\nexplicitly specified, secondary files specified for `inputs`\nare required and `outputs` are optional. An implementation\nmust include matching Files and Directories in the\n`secondaryFiles` property of the primary file. These Files\nand Directories must be transferred and staged alongside the\nprimary file. An implementation may fail workflow execution\nif a required secondary file does not exist.\n\nIf the value is an expression, the value of `self` in the expression\nmust be the primary input or output File object to which this binding\napplies. The `basename`, `nameroot` and `nameext` fields must be\npresent in `self`. For `CommandLineTool` outputs the `path` field must\nalso be present. The expression must return a filename string relative\nto the path to the primary File, a File or Directory object with either\n`path` or `location` and `basename` fields set, or an array consisting\nof strings or File or Directory objects. It is legal to reference an\nunchanged File or Directory object taken from input as a secondaryFile.\nThe expression may return \"null\" in which case there is no secondaryFile\nfrom that expression.\n\nTo work on non-filename-preserving storage systems, portable tool\ndescriptions should avoid constructing new values from `location`, but\nshould construct relative references using `basename` or `nameroot`\ninstead.\n\nIf a value in `secondaryFiles` is a string that is not an expression,\nit specifies that the following pattern should be applied to the path\nof the primary file to yield a filename relative to the primary File:\n\n 1. If string ends with `?` character, remove the last `?` and mark\n the resulting secondary file as optional.\n 2. If string begins with one or more caret `^` characters, for each\n caret, remove the last file extension from the path (the last\n period `.` and all following characters). If there are no file\n extensions, the path is unchanged.\n 3. Append the remainder of the string to the end of the file path." + }, + "streamable": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nA value of `true` indicates that the file is read or written\nsequentially without seeking. An implementation may use this flag to\nindicate whether it is valid to stream file contents using a named\npipe. Default: `false`.", + "type": "boolean" + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/CommandOutputArraySchema" + }, + { + "$ref": "#/definitions/CommandOutputRecordSchema" + }, + { + "$ref": "#/definitions/CommandOutputEnumSchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CommandOutputArraySchema" + }, + { + "$ref": "#/definitions/CommandOutputRecordSchema" + }, + { + "$ref": "#/definitions/CommandOutputEnumSchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The field type" + } + }, + "required": [ + "name", + "type" + ], + "type": "object" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CommandOutputArraySchema" + }, + { + "$ref": "#/definitions/CommandOutputRecordSchema" + }, + { + "$ref": "#/definitions/CommandOutputEnumSchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CommandOutputArraySchema" + }, + { + "$ref": "#/definitions/CommandOutputRecordSchema" + }, + { + "$ref": "#/definitions/CommandOutputEnumSchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The field type" + } + } + ] + }, + "CommandOutputRecordSchema": { + "additionalProperties": false, + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandOutputRecordSchema", + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "fields": { + "description": "Defines the fields of the record.", + "oneOf": [ + { + "items": { + "$ref": "#/definitions/CommandOutputRecordField" + }, + "type": "array" + }, + { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "$ref": "#/definitions/CommandOutputRecordFieldMap" + } + }, + "type": "object" + } + ] + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "name": { + "description": "The identifier for this type", + "type": "string" + }, + "type": { + "const": "record", + "description": "Must be `record`", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "DefaultFetcher": { + "additionalProperties": false, + "type": "object" + }, + "Dictionary": { + "additionalProperties": { + "$ref": "#/definitions/T" + }, + "type": "object" + }, + "Dictionary": { + "additionalProperties": { + "$ref": "#/definitions/T" + }, + "type": "object" + }, + "Directory": { + "additionalProperties": false, + "description": "Represents a directory to present to a command line tool.\n\nDirectories are represented as objects with `class` of `Directory`. Directory objects have\na number of properties that provide metadata about the directory.\n\nThe `location` property of a Directory is a URI that uniquely identifies\nthe directory. Implementations must support the file:// URI scheme and may\nsupport other schemes such as http://. Alternately to `location`,\nimplementations must also accept the `path` property on Directory, which\nmust be a filesystem path available on the same host as the CWL runner (for\ninputs) or the runtime environment of a command line tool execution (for\ncommand line tool outputs).\n\nA Directory object may have a `listing` field. This is a list of File and\nDirectory objects that are contained in the Directory. For each entry in\n`listing`, the `basename` property defines the name of the File or\nSubdirectory when staged to disk. If `listing` is not provided, the\nimplementation must have some way of fetching the Directory listing at\nruntime based on the `location` field.\n\nIf a Directory does not have `location`, it is a Directory literal. A\nDirectory literal must provide `listing`. Directory literals must be\ncreated on disk at runtime as needed.\n\nThe resources in a Directory literal do not need to have any implied\nrelationship in their `location`. For example, a Directory listing may\ncontain two files located on different hosts. It is the responsibility of\nthe runtime to ensure that those files are staged to disk appropriately.\nSecondary files associated with files in `listing` must also be staged to\nthe same Directory.\n\nWhen executing a CommandLineTool, Directories must be recursively staged\nfirst and have local values of `path` assigned.\n\nDirectory objects in CommandLineTool output must provide either a\n`location` URI or a `path` property in the context of the tool execution\nruntime (local to the compute node, or within the executing container).\n\nAn ExpressionTool may forward file references from input to output by using\nthe same value for `location`.\n\nName conflicts (the same `basename` appearing multiple times in `listing`\nor in any entry in `secondaryFiles` in the listing) is a fatal error.", + "properties": { + "basename": { + "description": "The base name of the directory, that is, the name of the file without any\nleading directory path. The base name must not contain a slash `/`.\n\nIf not provided, the implementation must set this field based on the\n`location` field by taking the final path component after parsing\n`location` as an IRI. If `basename` is provided, it is not required to\nmatch the value from `location`.\n\nWhen this file is made available to a CommandLineTool, it must be named\nwith `basename`, i.e. the final component of the `path` field must match\n`basename`.", + "type": "string" + }, + "class": { + "const": "Directory", + "description": "Must be `Directory` to indicate this object describes a Directory.", + "type": "string" + }, + "listing": { + "description": "List of files or subdirectories contained in this directory. The name\nof each file or subdirectory is determined by the `basename` field of\neach `File` or `Directory` object. It is an error if a `File` shares a\n`basename` with any other entry in `listing`. If two or more\n`Directory` object share the same `basename`, this must be treated as\nequivalent to a single subdirectory with the listings recursively\nmerged.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/File" + }, + { + "$ref": "#/definitions/Directory" + } + ] + }, + "type": "array" + }, + "location": { + "description": "An IRI that identifies the directory resource. This may be a relative\nreference, in which case it must be resolved using the base IRI of the\ndocument. The location may refer to a local or remote resource. If\nthe `listing` field is not set, the implementation must use the\nlocation IRI to retrieve directory listing. If an implementation is\nunable to retrieve the directory listing stored at a remote resource (due to\nunsupported protocol, access denied, or other issue) it must signal an\nerror.\n\nIf the `location` field is not provided, the `listing` field must be\nprovided. The implementation must assign a unique identifier for\nthe `location` field.\n\nIf the `path` field is provided but the `location` field is not, an\nimplementation may assign the value of the `path` field to `location`,\nthen follow the rules above.", + "type": "string" + }, + "path": { + "description": "The local path where the Directory is made available prior to executing a\nCommandLineTool. This must be set by the implementation. This field\nmust not be used in any other context. The command line tool being\nexecuted must be able to access the directory at `path` using the POSIX\n`opendir(2)` syscall.\n\nIf the `path` contains [POSIX shell metacharacters](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02)\n(`|`,`&`, `;`, `<`, `>`, `(`,`)`, `$`,`` ` ``, `\\`, `\"`, `'`,\n``, ``, and ``) or characters\n[not allowed](http://www.iana.org/assignments/idna-tables-6.3.0/idna-tables-6.3.0.xhtml)\nfor [Internationalized Domain Names for Applications](https://tools.ietf.org/html/rfc6452)\nthen implementations may terminate the process with a\n`permanentFailure`.", + "type": "string" + } + }, + "required": [ + "class" + ], + "type": "object" + }, + "Dirent": { + "additionalProperties": false, + "description": "Define a file or subdirectory that must be staged to a particular\nplace prior to executing the command line tool. May be the result\nof executing an expression, such as building a configuration file\nfrom a template.\n\nUsually files are staged within the [designated output directory](#Runtime_environment).\nHowever, under certain circumstances, files may be staged at\narbitrary locations, see discussion for `entryname`.", + "properties": { + "entry": { + "description": "If the value is a string literal or an expression which evaluates to a\nstring, a new text file must be created with the string as the file contents.\n\nIf the value is an expression that evaluates to a `File` or\n`Directory` object, or an array of `File` or `Directory`\nobjects, this indicates the referenced file or directory\nshould be added to the designated output directory prior to\nexecuting the tool.\n\nIf the value is an expression that evaluates to `null`,\nnothing is added to the designated output directory, the entry\nhas no effect.\n\nIf the value is an expression that evaluates to some other\narray, number, or object not consisting of `File` or\n`Directory` objects, a new file must be created with the value\nserialized to JSON text as the file contents. The JSON\nserialization behavior should match the behavior of string\ninterpolation of [Parameter\nreferences](#Parameter_references).", + "type": "string" + }, + "entryname": { + "description": "The \"target\" name of the file or subdirectory. If `entry` is\na File or Directory, the `entryname` field overrides the value\nof `basename` of the File or Directory object.\n\n* Required when `entry` evaluates to file contents only\n* Optional when `entry` evaluates to a File or Directory object with a `basename`\n* Invalid when `entry` evaluates to an array of File or Directory objects.\n\nIf `entryname` is a relative path, it specifies a name within\nthe designated output directory. A relative path starting\nwith `../` or that resolves to location above the designated output directory is an error.\n\nIf `entryname` is an absolute path (starts with a slash `/`)\nit is an error unless the following conditions are met:\n\n * `DockerRequirement` is present in `requirements`\n * The program is will run inside a software container\n where, from the perspective of the program, the root\n filesystem is not shared with any other user or\n running program.\n\nIn this case, and the above conditions are met, then\n`entryname` may specify the absolute path within the container\nwhere the file or directory must be placed.", + "type": "string" + }, + "writable": { + "description": "If true, the File or Directory (or array of Files or\nDirectories) declared in `entry` must be writable by the tool.\n\nChanges to the file or directory must be isolated and not\nvisible by any other CommandLineTool process. This may be\nimplemented by making a copy of the original file or\ndirectory.\n\nDisruptive changes to the referenced file or directory must not\nbe allowed unless `InplaceUpdateRequirement.inplaceUpdate` is true.\n\nDefault false (files and directories read-only by default).\n\nA directory marked as `writable: true` implies that all files and\nsubdirectories are recursively writable as well.\n\nIf `writable` is false, the file may be made available using a\nbind mount or file system link to avoid unnecessary copying of\nthe input file. Command line tools may receive an error on\nattempting to rename or delete files or directories that are\nnot explicitly marked as writable.", + "type": "boolean" + } + }, + "required": [ + "entry" + ], + "type": "object" + }, + "DockerRequirement": { + "additionalProperties": false, + "description": "Indicates that a workflow component should be run in a\n[Docker](https://docker.com) or Docker-compatible (such as\n[Singularity](https://www.sylabs.io/) and [udocker](https://github.com/indigo-dc/udocker)) container environment and\nspecifies how to fetch or build the image.\n\nIf a CommandLineTool lists `DockerRequirement` under\n`hints` (or `requirements`), it may (or must) be run in the specified Docker\ncontainer.\n\nThe platform must first acquire or install the correct Docker image as\nspecified by `dockerPull`, `dockerImport`, `dockerLoad` or `dockerFile`.\n\nThe platform must execute the tool in the container using `docker run` with\nthe appropriate Docker image and tool command line.\n\nThe workflow platform may provide input files and the designated output\ndirectory through the use of volume bind mounts. The platform should rewrite\nfile paths in the input object to correspond to the Docker bind mounted\nlocations. That is, the platform should rewrite values in the parameter context\nsuch as `runtime.outdir`, `runtime.tmpdir` and others to be valid paths\nwithin the container. The platform must ensure that `runtime.outdir` and\n`runtime.tmpdir` are distinct directories.\n\nWhen running a tool contained in Docker, the workflow platform must not\nassume anything about the contents of the Docker container, such as the\npresence or absence of specific software, except to assume that the\ngenerated command line represents a valid command within the runtime\nenvironment of the container.\n\nA container image may specify an\n[ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint)\nand/or\n[CMD](https://docs.docker.com/engine/reference/builder/#cmd).\nCommand line arguments will be appended after all elements of\nENTRYPOINT, and will override all elements specified using CMD (in\nother words, CMD is only used when the CommandLineTool definition\nproduces an empty command line).\n\nUse of implicit ENTRYPOINT or CMD are discouraged due to reproducibility\nconcerns of the implicit hidden execution point (For further discussion, see\n[https://doi.org/10.12688/f1000research.15140.1](https://doi.org/10.12688/f1000research.15140.1)). Portable\nCommandLineTool wrappers in which use of a container is optional must not rely on ENTRYPOINT or CMD.\nCommandLineTools which do rely on ENTRYPOINT or CMD must list `DockerRequirement` in the\n`requirements` section.\n\n## Interaction with other requirements\n\nIf [EnvVarRequirement](#EnvVarRequirement) is specified alongside a\nDockerRequirement, the environment variables must be provided to Docker\nusing `--env` or `--env-file` and interact with the container's preexisting\nenvironment as defined by Docker.", + "properties": { + "class": { + "const": "DockerRequirement", + "description": "Always 'DockerRequirement'", + "type": "string" + }, + "dockerFile": { + "description": "Supply the contents of a Dockerfile which will be built using `docker build`.", + "type": "string" + }, + "dockerImageId": { + "description": "The image id that will be used for `docker run`. May be a\nhuman-readable image name or the image identifier hash. May be skipped\nif `dockerPull` is specified, in which case the `dockerPull` image id\nmust be used.", + "type": "string" + }, + "dockerImport": { + "description": "Provide HTTP URL to download and gunzip a Docker images using `docker import.", + "type": "string" + }, + "dockerLoad": { + "description": "Specify an HTTP URL from which to download a Docker image using `docker load`.", + "type": "string" + }, + "dockerOutputDirectory": { + "description": "Set the designated output directory to a specific location inside the\nDocker container.", + "type": "string" + }, + "dockerPull": { + "description": "Specify a Docker image to retrieve using `docker pull`. Can contain the\nimmutable digest to ensure an exact container is used:\n`dockerPull: ubuntu@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2`", + "type": "string" + } + }, + "required": [ + "class" + ], + "type": "object" + }, + "EnvVarRequirement": { + "additionalProperties": false, + "description": "Define a list of environment variables which will be set in the\nexecution environment of the tool. See `EnvironmentDef` for details.", + "properties": { + "class": { + "const": "EnvVarRequirement", + "description": "Always 'EnvVarRequirement'", + "type": "string" + }, + "envDef": { + "description": "The list of environment variables.", + "oneOf": [ + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/EnvironmentDef" + }, + { + "$ref": "#/definitions/CWLImportManual" + }, + { + "$ref": "#/definitions/CWLIncludeManual" + } + ] + }, + "type": "array" + }, + { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "type": "string" + } + } + } + ] + } + }, + "required": [ + "class", + "envDef" + ], + "type": "object" + }, + "EnvironmentDef": { + "additionalProperties": false, + "description": "Define an environment variable that will be set in the runtime environment\nby the workflow platform when executing the command line tool. May be the\nresult of executing an expression, such as getting a parameter from input.", + "properties": { + "envName": { + "description": "The environment variable name", + "type": "string" + }, + "envValue": { + "description": "The environment variable value", + "type": "string" + } + }, + "required": [ + "envName", + "envValue" + ], + "type": "object" + }, + "ExpressionTool": { + "description": "An ExpressionTool is a type of Process object that can be run by itself\nor as a Workflow step. It executes a pure Javascript expression that has\naccess to the same input parameters as a workflow. It is meant to be used\nsparingly as a way to isolate complex Javascript expressions that need to\noperate on input data and produce some result; perhaps just a\nrearrangement of the inputs. No Docker software container is required\nor allowed.", + "properties": { + "class": { + "const": "ExpressionTool", + "type": "string" + }, + "cwlVersion": { + "description": "CWL document version. Always required at the document root. Not\nrequired for a Process embedded inside another Process.", + "enum": [ + "draft-2", + "draft-3", + "draft-3.dev1", + "draft-3.dev2", + "draft-3.dev3", + "draft-3.dev4", + "draft-3.dev5", + "draft-4.dev1", + "draft-4.dev2", + "draft-4.dev3", + "v1.0", + "v1.0.dev4", + "v1.1", + "v1.1.0-dev1", + "v1.2", + "v1.2.0-dev1", + "v1.2.0-dev2", + "v1.2.0-dev3", + "v1.2.0-dev4", + "v1.2.0-dev5" + ], + "type": "string" + }, + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "expression": { + "description": "The expression to execute. The expression must return a plain\nJavascript object which matches the output parameters of the\nExpressionTool.", + "type": "string" + }, + "hints": { + "description": "Declares requirements that apply to either the runtime environment or the\nworkflow engine that must be met in order to execute this process. If\nan implementation cannot satisfy all requirements, or a requirement is\nlisted which is not recognized by the implementation, it is a fatal\nerror and the implementation must not attempt to run the process,\nunless overridden at user option.", + "oneOf": [ + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CWLImportManual" + }, + { + "$ref": "#/definitions/CWLIncludeManual" + }, + { + "$ref": "#/definitions/InlineJavascriptRequirement" + }, + { + "$ref": "#/definitions/SchemaDefRequirement" + }, + { + "$ref": "#/definitions/LoadListingRequirement" + }, + { + "$ref": "#/definitions/DockerRequirement" + }, + { + "$ref": "#/definitions/SoftwareRequirement" + }, + { + "$ref": "#/definitions/InitialWorkDirRequirement" + }, + { + "$ref": "#/definitions/EnvVarRequirement" + }, + { + "$ref": "#/definitions/ShellCommandRequirement" + }, + { + "$ref": "#/definitions/ResourceRequirement" + }, + { + "$ref": "#/definitions/WorkReuse" + }, + { + "$ref": "#/definitions/NetworkAccess" + }, + { + "$ref": "#/definitions/InplaceUpdateRequirement" + }, + { + "$ref": "#/definitions/ToolTimeLimit" + }, + { + "$ref": "#/definitions/SubworkflowFeatureRequirement" + }, + { + "$ref": "#/definitions/ScatterFeatureRequirement" + }, + { + "$ref": "#/definitions/MultipleInputFeatureRequirement" + }, + { + "$ref": "#/definitions/StepInputExpressionRequirement" + } + ] + }, + "type": "array" + }, + { + "type": "object", + "properties": { + "InlineJavascriptRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InlineJavascriptRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SchemaDefRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SchemaDefRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "LoadListingRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/LoadListingRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "DockerRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/DockerRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SoftwareRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SoftwareRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "InitialWorkDirRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InitialWorkDirRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "EnvVarRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/EnvVarRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ShellCommandRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ShellCommandRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ResourceRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ResourceRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "WorkReuse": { + "anyOf": [ + { + "$ref": "#/definitions/WorkReuseMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "NetworkAccess": { + "anyOf": [ + { + "$ref": "#/definitions/NetworkAccessMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "InplaceUpdateRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InplaceUpdateRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ToolTimeLimit": { + "anyOf": [ + { + "$ref": "#/definitions/ToolTimeLimitMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SubworkflowFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SubworkflowFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ScatterFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ScatterFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "MultipleInputFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/MultipleInputFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "StepInputExpressionRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/StepInputExpressionRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + } + }, + "additionalProperties": false + } + ] + }, + "id": { + "description": "The unique identifier for this object.\n\nOnly useful for `$graph` at `Process` level. Should not be exposed\nto users in graphical or terminal user interfaces.", + "type": "string" + }, + "inputs": { + "description": "Defines the input parameters of the process. The process is ready to\nrun when all required input parameters are associated with concrete\nvalues. Input parameters include a schema for each parameter which is\nused to validate the input object. It may also be used to build a user\ninterface for constructing the input object.\n\nWhen accepting an input object, all input parameters must have a value.\nIf an input parameter is missing from the input object, it must be\nassigned a value of `null` (or the value of `default` for that\nparameter, if provided) for the purposes of validation and evaluation\nof expressions.", + "oneOf": [ + { + "items": { + "$ref": "#/definitions/WorkflowInputParameter" + }, + "type": "array" + }, + { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "oneOf": [ + { + "$ref": "#/definitions/WorkflowInputParameter" + }, + { + "anyOf": [ + { + "$ref": "#/definitions/InputRecordSchema" + }, + { + "$ref": "#/definitions/InputEnumSchema" + }, + { + "$ref": "#/definitions/InputArraySchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/InputRecordSchema" + }, + { + "$ref": "#/definitions/InputEnumSchema" + }, + { + "$ref": "#/definitions/InputArraySchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Specify valid types of data that may be assigned to this parameter." + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/WorkflowInputParameter" + } + ] + } + } + ] + } + }, + "type": "object" + } + ] + }, + "intent": { + "description": "An identifier for the type of computational operation, of this Process.\nEspecially useful for \"class: Operation\", but can also be used for\nCommandLineTool, Workflow, or ExpressionTool.\n\nIf provided, then this must be an IRI of a concept node that\nrepresents the type of operation, preferably defined within an ontology.\n\nFor example, in the domain of bioinformatics, one can use an IRI from\nthe EDAM Ontology's [Operation concept nodes](http://edamontology.org/operation_0004),\nlike [Alignment](http://edamontology.org/operation_2928),\nor [Clustering](http://edamontology.org/operation_3432); or a more\nspecific Operation concept like\n[Split read mapping](http://edamontology.org/operation_3199).", + "items": { + "type": "string" + }, + "type": "array" + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "outputs": { + "description": "Defines the parameters representing the output of the process. May be\nused to generate and/or validate the output object.", + "oneOf": [ + { + "items": { + "$ref": "#/definitions/ExpressionToolOutputParameter" + }, + "type": "array" + }, + { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "oneOf": [ + { + "$ref": "#/definitions/ExpressionToolOutputParameter" + }, + { + "anyOf": [ + { + "$ref": "#/definitions/OutputRecordSchema" + }, + { + "$ref": "#/definitions/OutputEnumSchema" + }, + { + "$ref": "#/definitions/OutputArraySchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/OutputRecordSchema" + }, + { + "$ref": "#/definitions/OutputEnumSchema" + }, + { + "$ref": "#/definitions/OutputArraySchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Specify valid types of data that may be assigned to this parameter." + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/ExpressionToolOutputParameter" + } + ] + } + } + ] + } + }, + "type": "object" + } + ] + }, + "requirements": { + "description": "Declares requirements that apply to either the runtime environment or the\nworkflow engine that must be met in order to execute this process. If\nan implementation cannot satisfy all requirements, or a requirement is\nlisted which is not recognized by the implementation, it is a fatal\nerror and the implementation must not attempt to run the process,\nunless overridden at user option.", + "oneOf": [ + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CWLImportManual" + }, + { + "$ref": "#/definitions/CWLIncludeManual" + }, + { + "$ref": "#/definitions/InlineJavascriptRequirement" + }, + { + "$ref": "#/definitions/SchemaDefRequirement" + }, + { + "$ref": "#/definitions/LoadListingRequirement" + }, + { + "$ref": "#/definitions/DockerRequirement" + }, + { + "$ref": "#/definitions/SoftwareRequirement" + }, + { + "$ref": "#/definitions/InitialWorkDirRequirement" + }, + { + "$ref": "#/definitions/EnvVarRequirement" + }, + { + "$ref": "#/definitions/ShellCommandRequirement" + }, + { + "$ref": "#/definitions/ResourceRequirement" + }, + { + "$ref": "#/definitions/WorkReuse" + }, + { + "$ref": "#/definitions/NetworkAccess" + }, + { + "$ref": "#/definitions/InplaceUpdateRequirement" + }, + { + "$ref": "#/definitions/ToolTimeLimit" + }, + { + "$ref": "#/definitions/SubworkflowFeatureRequirement" + }, + { + "$ref": "#/definitions/ScatterFeatureRequirement" + }, + { + "$ref": "#/definitions/MultipleInputFeatureRequirement" + }, + { + "$ref": "#/definitions/StepInputExpressionRequirement" + } + ] + }, + "type": "array" + }, + { + "type": "object", + "properties": { + "InlineJavascriptRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InlineJavascriptRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SchemaDefRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SchemaDefRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "LoadListingRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/LoadListingRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "DockerRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/DockerRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SoftwareRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SoftwareRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "InitialWorkDirRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InitialWorkDirRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "EnvVarRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/EnvVarRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ShellCommandRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ShellCommandRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ResourceRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ResourceRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "WorkReuse": { + "anyOf": [ + { + "$ref": "#/definitions/WorkReuseMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "NetworkAccess": { + "anyOf": [ + { + "$ref": "#/definitions/NetworkAccessMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "InplaceUpdateRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InplaceUpdateRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ToolTimeLimit": { + "anyOf": [ + { + "$ref": "#/definitions/ToolTimeLimitMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SubworkflowFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SubworkflowFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ScatterFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ScatterFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "MultipleInputFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/MultipleInputFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "StepInputExpressionRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/StepInputExpressionRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + } + }, + "additionalProperties": false + } + ] + } + }, + "required": [ + "class", + "expression", + "inputs", + "outputs" + ], + "type": "object" + }, + "ExpressionToolOutputParameter": { + "additionalProperties": false, + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#ExpressionToolOutputParameter", + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "format": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nThis is the file format that will be assigned to the output\nFile object.", + "type": "string" + }, + "id": { + "description": "The unique identifier for this object.", + "type": "string" + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "secondaryFiles": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFileSchema" + }, + { + "items": { + "$ref": "#/definitions/SecondaryFileSchema" + }, + "type": "array" + } + ], + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nProvides a pattern or expression specifying files or\ndirectories that should be included alongside the primary\nfile. Secondary files may be required or optional. When not\nexplicitly specified, secondary files specified for `inputs`\nare required and `outputs` are optional. An implementation\nmust include matching Files and Directories in the\n`secondaryFiles` property of the primary file. These Files\nand Directories must be transferred and staged alongside the\nprimary file. An implementation may fail workflow execution\nif a required secondary file does not exist.\n\nIf the value is an expression, the value of `self` in the expression\nmust be the primary input or output File object to which this binding\napplies. The `basename`, `nameroot` and `nameext` fields must be\npresent in `self`. For `CommandLineTool` outputs the `path` field must\nalso be present. The expression must return a filename string relative\nto the path to the primary File, a File or Directory object with either\n`path` or `location` and `basename` fields set, or an array consisting\nof strings or File or Directory objects. It is legal to reference an\nunchanged File or Directory object taken from input as a secondaryFile.\nThe expression may return \"null\" in which case there is no secondaryFile\nfrom that expression.\n\nTo work on non-filename-preserving storage systems, portable tool\ndescriptions should avoid constructing new values from `location`, but\nshould construct relative references using `basename` or `nameroot`\ninstead.\n\nIf a value in `secondaryFiles` is a string that is not an expression,\nit specifies that the following pattern should be applied to the path\nof the primary file to yield a filename relative to the primary File:\n\n 1. If string ends with `?` character, remove the last `?` and mark\n the resulting secondary file as optional.\n 2. If string begins with one or more caret `^` characters, for each\n caret, remove the last file extension from the path (the last\n period `.` and all following characters). If there are no file\n extensions, the path is unchanged.\n 3. Append the remainder of the string to the end of the file path." + }, + "streamable": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nA value of `true` indicates that the file is read or written\nsequentially without seeking. An implementation may use this flag to\nindicate whether it is valid to stream file contents using a named\npipe. Default: `false`.", + "type": "boolean" + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/OutputRecordSchema" + }, + { + "$ref": "#/definitions/OutputEnumSchema" + }, + { + "$ref": "#/definitions/OutputArraySchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/OutputRecordSchema" + }, + { + "$ref": "#/definitions/OutputEnumSchema" + }, + { + "$ref": "#/definitions/OutputArraySchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Specify valid types of data that may be assigned to this parameter." + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "Fetcher": { + "oneOf": [ + { + "$ref": "#/definitions/DefaultFetcher" + } + ] + }, + "File": { + "additionalProperties": false, + "description": "Represents a file (or group of files when `secondaryFiles` is provided) that\nwill be accessible by tools using standard POSIX file system call API such as\nopen(2) and read(2).\n\nFiles are represented as objects with `class` of `File`. File objects have\na number of properties that provide metadata about the file.\n\nThe `location` property of a File is a URI that uniquely identifies the\nfile. Implementations must support the `file://` URI scheme and may support\nother schemes such as `http://` and `https://`. The value of `location` may also be a\nrelative reference, in which case it must be resolved relative to the URI\nof the document it appears in. Alternately to `location`, implementations\nmust also accept the `path` property on File, which must be a filesystem\npath available on the same host as the CWL runner (for inputs) or the\nruntime environment of a command line tool execution (for command line tool\noutputs).\n\nIf no `location` or `path` is specified, a file object must specify\n`contents` with the UTF-8 text content of the file. This is a \"file\nliteral\". File literals do not correspond to external resources, but are\ncreated on disk with `contents` with when needed for executing a tool.\nWhere appropriate, expressions can return file literals to define new files\non a runtime. The maximum size of `contents` is 64 kilobytes.\n\nThe `basename` property defines the filename on disk where the file is\nstaged. This may differ from the resource name. If not provided,\n`basename` must be computed from the last path part of `location` and made\navailable to expressions.\n\nThe `secondaryFiles` property is a list of File or Directory objects that\nmust be staged in the same directory as the primary file. It is an error\nfor file names to be duplicated in `secondaryFiles`.\n\nThe `size` property is the size in bytes of the File. It must be computed\nfrom the resource and made available to expressions. The `checksum` field\ncontains a cryptographic hash of the file content for use it verifying file\ncontents. Implementations may, at user option, enable or disable\ncomputation of the `checksum` field for performance or other reasons.\nHowever, the ability to compute output checksums is required to pass the\nCWL conformance test suite.\n\nWhen executing a CommandLineTool, the files and secondary files may be\nstaged to an arbitrary directory, but must use the value of `basename` for\nthe filename. The `path` property must be file path in the context of the\ntool execution runtime (local to the compute node, or within the executing\ncontainer). All computed properties should be available to expressions.\nFile literals also must be staged and `path` must be set.\n\nWhen collecting CommandLineTool outputs, `glob` matching returns file paths\n(with the `path` property) and the derived properties. This can all be\nmodified by `outputEval`. Alternately, if the file `cwl.output.json` is\npresent in the output, `outputBinding` is ignored.\n\nFile objects in the output must provide either a `location` URI or a `path`\nproperty in the context of the tool execution runtime (local to the compute\nnode, or within the executing container).\n\nWhen evaluating an ExpressionTool, file objects must be referenced via\n`location` (the expression tool does not have access to files on disk so\n`path` is meaningless) or as file literals. It is legal to return a file\nobject with an existing `location` but a different `basename`. The\n`loadContents` field of ExpressionTool inputs behaves the same as on\nCommandLineTool inputs, however it is not meaningful on the outputs.\n\nAn ExpressionTool may forward file references from input to output by using\nthe same value for `location`.", + "properties": { + "basename": { + "description": "The base name of the file, that is, the name of the file without any\nleading directory path. The base name must not contain a slash `/`.\n\nIf not provided, the implementation must set this field based on the\n`location` field by taking the final path component after parsing\n`location` as an IRI. If `basename` is provided, it is not required to\nmatch the value from `location`.\n\nWhen this file is made available to a CommandLineTool, it must be named\nwith `basename`, i.e. the final component of the `path` field must match\n`basename`.", + "type": "string" + }, + "checksum": { + "description": "Optional hash code for validating file integrity. Currently, must be in the form\n\"sha1$ + hexadecimal string\" using the SHA-1 algorithm.", + "type": "string" + }, + "class": { + "const": "File", + "description": "Must be `File` to indicate this object describes a file.", + "type": "string" + }, + "contents": { + "description": "File contents literal.\n\nIf neither `location` nor `path` is provided, `contents` must be\nnon-null. The implementation must assign a unique identifier for the\n`location` field. When the file is staged as input to CommandLineTool,\nthe value of `contents` must be written to a file.\n\nIf `contents` is set as a result of a Javascript expression,\nan `entry` in `InitialWorkDirRequirement`, or read in from\n`cwl.output.json`, there is no specified upper limit on the\nsize of `contents`. Implementations may have practical limits\non the size of `contents` based on memory and storage\navailable to the workflow runner or other factors.\n\nIf the `loadContents` field of an `InputParameter` or\n`OutputParameter` is true, and the input or output File object\n`location` is valid, the file must be a UTF-8 text file 64 KiB\nor smaller, and the implementation must read the entire\ncontents of the file and place it in the `contents` field. If\nthe size of the file is greater than 64 KiB, the\nimplementation must raise a fatal error.", + "type": "string" + }, + "dirname": { + "description": "The name of the directory containing file, that is, the path leading up\nto the final slash in the path such that `dirname + '/' + basename ==\npath`.\n\nThe implementation must set this field based on the value of `path`\nprior to evaluating parameter references or expressions in a\nCommandLineTool document. This field must not be used in any other\ncontext.", + "type": "string" + }, + "format": { + "description": "The format of the file: this must be an IRI of a concept node that\nrepresents the file format, preferably defined within an ontology.\nIf no ontology is available, file formats may be tested by exact match.\n\nReasoning about format compatibility must be done by checking that an\ninput file format is the same, `owl:equivalentClass` or\n`rdfs:subClassOf` the format required by the input parameter.\n`owl:equivalentClass` is transitive with `rdfs:subClassOf`, e.g. if\n` owl:equivalentClass ` and ` owl:subclassOf ` then infer\n` owl:subclassOf `.\n\nFile format ontologies may be provided in the \"$schemas\" metadata at the\nroot of the document. If no ontologies are specified in `$schemas`, the\nruntime may perform exact file format matches.", + "type": "string" + }, + "location": { + "description": "An IRI that identifies the file resource. This may be a relative\nreference, in which case it must be resolved using the base IRI of the\ndocument. The location may refer to a local or remote resource; the\nimplementation must use the IRI to retrieve file content. If an\nimplementation is unable to retrieve the file content stored at a\nremote resource (due to unsupported protocol, access denied, or other\nissue) it must signal an error.\n\nIf the `location` field is not provided, the `contents` field must be\nprovided. The implementation must assign a unique identifier for\nthe `location` field.\n\nIf the `path` field is provided but the `location` field is not, an\nimplementation may assign the value of the `path` field to `location`,\nthen follow the rules above.", + "type": "string" + }, + "nameext": { + "description": "The basename extension such that `nameroot + nameext == basename`, and\n`nameext` is empty or begins with a period and contains at most one\nperiod. Leading periods on the basename are ignored; a basename of\n`.cshrc` will have an empty `nameext`.\n\nThe implementation must set this field automatically based on the value\nof `basename` prior to evaluating parameter references or expressions.", + "type": "string" + }, + "nameroot": { + "description": "The basename root such that `nameroot + nameext == basename`, and\n`nameext` is empty or begins with a period and contains at most one\nperiod. For the purposes of path splitting leading periods on the\nbasename are ignored; a basename of `.cshrc` will have a nameroot of\n`.cshrc`.\n\nThe implementation must set this field automatically based on the value\nof `basename` prior to evaluating parameter references or expressions.", + "type": "string" + }, + "path": { + "description": "The local host path where the File is available when a CommandLineTool is\nexecuted. This field must be set by the implementation. The final\npath component must match the value of `basename`. This field\nmust not be used in any other context. The command line tool being\nexecuted must be able to access the file at `path` using the POSIX\n`open(2)` syscall.\n\nAs a special case, if the `path` field is provided but the `location`\nfield is not, an implementation may assign the value of the `path`\nfield to `location`, and remove the `path` field.\n\nIf the `path` contains [POSIX shell metacharacters](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02)\n(`|`,`&`, `;`, `<`, `>`, `(`,`)`, `$`,`` ` ``, `\\`, `\"`, `'`,\n``, ``, and ``) or characters\n[not allowed](http://www.iana.org/assignments/idna-tables-6.3.0/idna-tables-6.3.0.xhtml)\nfor [Internationalized Domain Names for Applications](https://tools.ietf.org/html/rfc6452)\nthen implementations may terminate the process with a\n`permanentFailure`.", + "type": "string" + }, + "secondaryFiles": { + "description": "A list of additional files or directories that are associated with the\nprimary file and must be transferred alongside the primary file.\nExamples include indexes of the primary file, or external references\nwhich must be included when loading primary document. A file object\nlisted in `secondaryFiles` may itself include `secondaryFiles` for\nwhich the same rules apply.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/File" + }, + { + "$ref": "#/definitions/Directory" + } + ] + }, + "type": "array" + }, + "size": { + "description": "Optional file size (in bytes)", + "type": "number" + } + }, + "required": [ + "class" + ], + "type": "object" + }, + "InitialWorkDirRequirement": { + "additionalProperties": false, + "description": "Define a list of files and subdirectories that must be staged by the workflow platform prior to executing the command line tool.\nNormally files are staged within the designated output directory. However, when running inside containers, files may be staged at arbitrary locations, see discussion for [`Dirent.entryname`](#Dirent). Together with `DockerRequirement.dockerOutputDirectory` it is possible to control the locations of both input and output files when running in containers.", + "properties": { + "class": { + "const": "InitialWorkDirRequirement", + "description": "InitialWorkDirRequirement", + "type": "string" + }, + "listing": { + "anyOf": [ + { + "items": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/File" + }, + { + "$ref": "#/definitions/Directory" + }, + { + "items": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/File" + }, + { + "$ref": "#/definitions/Directory" + } + ] + }, + { + "$ref": "#/definitions/CWLImportManual" + }, + { + "$ref": "#/definitions/CWLIncludeManual" + } + ] + }, + "type": "array" + }, + { + "$ref": "#/definitions/Dirent" + }, + { + "type": "string" + } + ] + }, + { + "$ref": "#/definitions/CWLImportManual" + }, + { + "$ref": "#/definitions/CWLIncludeManual" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The list of files or subdirectories that must be staged prior\nto executing the command line tool.\n\nReturn type of each expression must validate as `[\"null\",\nFile, Directory, Dirent, {type: array, items: [File,\nDirectory]}]`.\n\nEach `File` or `Directory` that is returned by an Expression\nmust be added to the designated output directory prior to\nexecuting the tool.\n\nEach `Dirent` record that is listed or returned by an\nexpression specifies a file to be created or staged in the\ndesignated output directory prior to executing the tool.\n\nExpressions may return null, in which case they have no effect.\n\nFiles or Directories which are listed in the input parameters\nand appear in the `InitialWorkDirRequirement` listing must\nhave their `path` set to their staged location. If the same\nFile or Directory appears more than once in the\n`InitialWorkDirRequirement` listing, the implementation must\nchoose exactly one value for `path`; how this value is chosen\nis undefined." + } + }, + "required": [ + "class" + ], + "type": "object" + }, + "InlineJavascriptRequirement": { + "additionalProperties": false, + "description": "Indicates that the workflow platform must support inline Javascript expressions.\nIf this requirement is not present, the workflow platform must not perform expression\ninterpolation.", + "properties": { + "class": { + "const": "InlineJavascriptRequirement", + "description": "Always 'InlineJavascriptRequirement'", + "type": "string" + }, + "expressionLib": { + "description": "Additional code fragments that will also be inserted\nbefore executing the expression code. Allows for function definitions that may\nbe called from CWL expressions.", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/CWLImportManual" + }, + { + "$ref": "#/definitions/CWLIncludeManual" + } + ] + }, + "type": "array" + } + }, + "required": [ + "class" + ], + "type": "object" + }, + "InplaceUpdateRequirement": { + "additionalProperties": false, + "description": "\nIf `inplaceUpdate` is true, then an implementation supporting this\nfeature may permit tools to directly update files with `writable:\ntrue` in InitialWorkDirRequirement. That is, as an optimization,\nfiles may be destructively modified in place as opposed to copied\nand updated.\n\nAn implementation must ensure that only one workflow step may\naccess a writable file at a time. It is an error if a file which\nis writable by one workflow step file is accessed (for reading or\nwriting) by any other workflow step running independently.\nHowever, a file which has been updated in a previous completed\nstep may be used as input to multiple steps, provided it is\nread-only in every step.\n\nWorkflow steps which modify a file must produce the modified file\nas output. Downstream steps which further process the file must\nuse the output of previous steps, and not refer to a common input\n(this is necessary for both ordering and correctness).\n\nWorkflow authors should provide this in the `hints` section. The\nintent of this feature is that workflows produce the same results\nwhether or not InplaceUpdateRequirement is supported by the\nimplementation, and this feature is primarily available as an\noptimization for particular environments.\n\nUsers and implementers should be aware that workflows that\ndestructively modify inputs may not be repeatable or reproducible.\nIn particular, enabling this feature implies that WorkReuse should\nnot be enabled.", + "properties": { + "class": { + "const": "InplaceUpdateRequirement", + "description": "Always 'InplaceUpdateRequirement'", + "type": "string" + }, + "inplaceUpdate": { + "type": "boolean" + } + }, + "required": [ + "class", + "inplaceUpdate" + ], + "type": "object" + }, + "InputArraySchema": { + "additionalProperties": false, + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#InputArraySchema", + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "items": { + "anyOf": [ + { + "$ref": "#/definitions/InputRecordSchema" + }, + { + "$ref": "#/definitions/InputEnumSchema" + }, + { + "$ref": "#/definitions/InputArraySchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/InputRecordSchema" + }, + { + "$ref": "#/definitions/InputEnumSchema" + }, + { + "$ref": "#/definitions/InputArraySchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Defines the type of the array elements." + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "name": { + "description": "The identifier for this type", + "type": "string" + }, + "type": { + "const": "array", + "description": "Must be `array`", + "type": "string" + } + }, + "required": [ + "items", + "type" + ], + "type": "object" + }, + "InputBinding": { + "additionalProperties": false, + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#InputBinding", + "properties": { + "loadContents": { + "description": "Use of `loadContents` in `InputBinding` is deprecated.\nPreserved for v1.0 backwards compatibility. Will be removed in\nCWL v2.0. Use `InputParameter.loadContents` instead.", + "type": "boolean" + } + }, + "required": [], + "type": "object" + }, + "InputEnumSchema": { + "additionalProperties": false, + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#InputEnumSchema", + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "name": { + "description": "The identifier for this type", + "type": "string" + }, + "symbols": { + "description": "Defines the set of valid symbols.", + "items": { + "type": "string" + }, + "type": "array" + }, + "type": { + "const": "enum", + "description": "Must be `enum`", + "type": "string" + } + }, + "required": [ + "symbols", + "type" + ], + "type": "object" + }, + "InputRecordField": { + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#InputRecordField", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "format": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nThis must be one or more IRIs of concept nodes\nthat represents file formats which are allowed as input to this\nparameter, preferably defined within an ontology. If no ontology is\navailable, file formats may be tested by exact match." + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "loadContents": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nIf true, the file (or each file in the array) must be a UTF-8\ntext file 64 KiB or smaller, and the implementation must read\nthe entire contents of the file (or file array) and place it\nin the `contents` field of the File object for use by\nexpressions. If the size of the file is greater than 64 KiB,\nthe implementation must raise a fatal error.", + "type": "boolean" + }, + "loadListing": { + "description": "Only valid when `type: Directory` or is an array of `items: Directory`.\n\nSpecify the desired behavior for loading the `listing` field of\na Directory object for use by expressions.\n\nThe order of precedence for loadListing is:\n\n 1. `loadListing` on an individual parameter\n 2. Inherited from `LoadListingRequirement`\n 3. By default: `no_listing`", + "enum": [ + "deep_listing", + "no_listing", + "shallow_listing" + ], + "type": "string" + }, + "name": { + "description": "The name of the field", + "type": "string" + }, + "secondaryFiles": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFileSchema" + }, + { + "items": { + "$ref": "#/definitions/SecondaryFileSchema" + }, + "type": "array" + } + ], + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nProvides a pattern or expression specifying files or\ndirectories that should be included alongside the primary\nfile. Secondary files may be required or optional. When not\nexplicitly specified, secondary files specified for `inputs`\nare required and `outputs` are optional. An implementation\nmust include matching Files and Directories in the\n`secondaryFiles` property of the primary file. These Files\nand Directories must be transferred and staged alongside the\nprimary file. An implementation may fail workflow execution\nif a required secondary file does not exist.\n\nIf the value is an expression, the value of `self` in the expression\nmust be the primary input or output File object to which this binding\napplies. The `basename`, `nameroot` and `nameext` fields must be\npresent in `self`. For `CommandLineTool` outputs the `path` field must\nalso be present. The expression must return a filename string relative\nto the path to the primary File, a File or Directory object with either\n`path` or `location` and `basename` fields set, or an array consisting\nof strings or File or Directory objects. It is legal to reference an\nunchanged File or Directory object taken from input as a secondaryFile.\nThe expression may return \"null\" in which case there is no secondaryFile\nfrom that expression.\n\nTo work on non-filename-preserving storage systems, portable tool\ndescriptions should avoid constructing new values from `location`, but\nshould construct relative references using `basename` or `nameroot`\ninstead.\n\nIf a value in `secondaryFiles` is a string that is not an expression,\nit specifies that the following pattern should be applied to the path\nof the primary file to yield a filename relative to the primary File:\n\n 1. If string ends with `?` character, remove the last `?` and mark\n the resulting secondary file as optional.\n 2. If string begins with one or more caret `^` characters, for each\n caret, remove the last file extension from the path (the last\n period `.` and all following characters). If there are no file\n extensions, the path is unchanged.\n 3. Append the remainder of the string to the end of the file path." + }, + "streamable": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nA value of `true` indicates that the file is read or written\nsequentially without seeking. An implementation may use this flag to\nindicate whether it is valid to stream file contents using a named\npipe. Default: `false`.", + "type": "boolean" + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/InputRecordSchema" + }, + { + "$ref": "#/definitions/InputEnumSchema" + }, + { + "$ref": "#/definitions/InputArraySchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/InputRecordSchema" + }, + { + "$ref": "#/definitions/InputEnumSchema" + }, + { + "$ref": "#/definitions/InputArraySchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The field type" + } + }, + "required": [ + "name", + "type" + ], + "type": "object" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/InputRecordSchema" + }, + { + "$ref": "#/definitions/InputEnumSchema" + }, + { + "$ref": "#/definitions/InputArraySchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/InputRecordSchema" + }, + { + "$ref": "#/definitions/InputEnumSchema" + }, + { + "$ref": "#/definitions/InputArraySchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The field type" + } + } + ] + }, + "InputRecordSchema": { + "additionalProperties": false, + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#InputRecordSchema", + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "fields": { + "description": "Defines the fields of the record.", + "oneOf": [ + { + "items": { + "$ref": "#/definitions/InputRecordField" + }, + "type": "array" + }, + { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "$ref": "#/definitions/InputRecordFieldMap" + } + }, + "type": "object" + } + ] + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "name": { + "description": "The identifier for this type", + "type": "string" + }, + "type": { + "const": "record", + "description": "Must be `record`", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "LoadListingRequirement": { + "additionalProperties": false, + "description": "Specify the desired behavior for loading the `listing` field of\na Directory object for use by expressions.", + "properties": { + "class": { + "const": "LoadListingRequirement", + "description": "Always 'LoadListingRequirement'", + "type": "string" + }, + "loadListing": { + "enum": [ + "deep_listing", + "no_listing", + "shallow_listing" + ], + "type": "string" + } + }, + "required": [ + "class" + ], + "type": "object" + }, + "LoadingOptions": { + "additionalProperties": false, + "properties": { + "copyFrom": { + "$ref": "#/definitions/LoadingOptions" + }, + "fetcher": { + "$ref": "#/definitions/Fetcher" + }, + "fileUri": { + "type": "string" + }, + "idx": { + "$ref": "#/definitions/Dictionary" + }, + "namespaces": { + "$ref": "#/definitions/Dictionary" + }, + "originalDoc": {}, + "rvocab": { + "$ref": "#/definitions/Dictionary" + }, + "schemas": { + "$ref": "#/definitions/Dictionary" + }, + "vocab": { + "$ref": "#/definitions/Dictionary" + } + }, + "required": [ + "fetcher", + "idx", + "originalDoc", + "rvocab", + "vocab" + ], + "type": "object" + }, + "MultipleInputFeatureRequirement": { + "additionalProperties": false, + "description": "Indicates that the workflow platform must support multiple inbound data links\nlisted in the `source` field of [WorkflowStepInput](#WorkflowStepInput).", + "properties": { + "class": { + "const": "MultipleInputFeatureRequirement", + "description": "Always 'MultipleInputFeatureRequirement'", + "type": "string" + } + }, + "required": [ + "class" + ], + "type": "object" + }, + "NetworkAccess": { + "additionalProperties": false, + "description": "Indicate whether a process requires outgoing IPv4/IPv6 network\naccess. Choice of IPv4 or IPv6 is implementation and site\nspecific, correct tools must support both.\n\nIf `networkAccess` is false or not specified, tools must not\nassume network access, except for localhost (the loopback device).\n\nIf `networkAccess` is true, the tool must be able to make outgoing\nconnections to network resources. Resources may be on a private\nsubnet or the public Internet. However, implementations and sites\nmay apply their own security policies to restrict what is\naccessible by the tool.\n\nEnabling network access does not imply a publicly routable IP\naddress or the ability to accept inbound connections.", + "properties": { + "class": { + "const": "NetworkAccess", + "description": "Always 'NetworkAccess'", + "type": "string" + }, + "networkAccess": { + "type": [ + "string", + "boolean" + ] + } + }, + "required": [ + "class", + "networkAccess" + ], + "type": "object" + }, + "Operation": { + "additionalProperties": false, + "description": "This record describes an abstract operation. It is a potential\nstep of a workflow that has not yet been bound to a concrete\nimplementation. It specifies an input and output signature, but\ndoes not provide enough information to be executed. An\nimplementation (or other tooling) may provide a means of binding\nan Operation to a concrete process (such as Workflow,\nCommandLineTool, or ExpressionTool) with a compatible signature.", + "properties": { + "class": { + "const": "Operation", + "type": "string" + }, + "cwlVersion": { + "description": "CWL document version. Always required at the document root. Not\nrequired for a Process embedded inside another Process.", + "enum": [ + "draft-2", + "draft-3", + "draft-3.dev1", + "draft-3.dev2", + "draft-3.dev3", + "draft-3.dev4", + "draft-3.dev5", + "draft-4.dev1", + "draft-4.dev2", + "draft-4.dev3", + "v1.0", + "v1.0.dev4", + "v1.1", + "v1.1.0-dev1", + "v1.2", + "v1.2.0-dev1", + "v1.2.0-dev2", + "v1.2.0-dev3", + "v1.2.0-dev4", + "v1.2.0-dev5" + ], + "type": "string" + }, + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "hints": { + "description": "Declares requirements that apply to either the runtime environment or the\nworkflow engine that must be met in order to execute this process. If\nan implementation cannot satisfy all requirements, or a requirement is\nlisted which is not recognized by the implementation, it is a fatal\nerror and the implementation must not attempt to run the process,\nunless overridden at user option.", + "oneOf": [ + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CWLImportManual" + }, + { + "$ref": "#/definitions/CWLIncludeManual" + }, + { + "$ref": "#/definitions/InlineJavascriptRequirement" + }, + { + "$ref": "#/definitions/SchemaDefRequirement" + }, + { + "$ref": "#/definitions/LoadListingRequirement" + }, + { + "$ref": "#/definitions/DockerRequirement" + }, + { + "$ref": "#/definitions/SoftwareRequirement" + }, + { + "$ref": "#/definitions/InitialWorkDirRequirement" + }, + { + "$ref": "#/definitions/EnvVarRequirement" + }, + { + "$ref": "#/definitions/ShellCommandRequirement" + }, + { + "$ref": "#/definitions/ResourceRequirement" + }, + { + "$ref": "#/definitions/WorkReuse" + }, + { + "$ref": "#/definitions/NetworkAccess" + }, + { + "$ref": "#/definitions/InplaceUpdateRequirement" + }, + { + "$ref": "#/definitions/ToolTimeLimit" + }, + { + "$ref": "#/definitions/SubworkflowFeatureRequirement" + }, + { + "$ref": "#/definitions/ScatterFeatureRequirement" + }, + { + "$ref": "#/definitions/MultipleInputFeatureRequirement" + }, + { + "$ref": "#/definitions/StepInputExpressionRequirement" + } + ] + }, + "type": "array" + }, + { + "type": "object", + "properties": { + "InlineJavascriptRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InlineJavascriptRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SchemaDefRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SchemaDefRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "LoadListingRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/LoadListingRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "DockerRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/DockerRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SoftwareRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SoftwareRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "InitialWorkDirRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InitialWorkDirRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "EnvVarRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/EnvVarRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ShellCommandRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ShellCommandRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ResourceRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ResourceRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "WorkReuse": { + "anyOf": [ + { + "$ref": "#/definitions/WorkReuseMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "NetworkAccess": { + "anyOf": [ + { + "$ref": "#/definitions/NetworkAccessMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "InplaceUpdateRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InplaceUpdateRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ToolTimeLimit": { + "anyOf": [ + { + "$ref": "#/definitions/ToolTimeLimitMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SubworkflowFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SubworkflowFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ScatterFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ScatterFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "MultipleInputFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/MultipleInputFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "StepInputExpressionRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/StepInputExpressionRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + } + }, + "additionalProperties": false + } + ] + }, + "id": { + "description": "The unique identifier for this object.\n\nOnly useful for `$graph` at `Process` level. Should not be exposed\nto users in graphical or terminal user interfaces.", + "type": "string" + }, + "inputs": { + "description": "Defines the input parameters of the process. The process is ready to\nrun when all required input parameters are associated with concrete\nvalues. Input parameters include a schema for each parameter which is\nused to validate the input object. It may also be used to build a user\ninterface for constructing the input object.\n\nWhen accepting an input object, all input parameters must have a value.\nIf an input parameter is missing from the input object, it must be\nassigned a value of `null` (or the value of `default` for that\nparameter, if provided) for the purposes of validation and evaluation\nof expressions.", + "oneOf": [ + { + "items": { + "$ref": "#/definitions/OperationInputParameter" + }, + "type": "array" + }, + { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "oneOf": [ + { + "$ref": "#/definitions/OperationInputParameter" + }, + { + "anyOf": [ + { + "$ref": "#/definitions/InputRecordSchema" + }, + { + "$ref": "#/definitions/InputEnumSchema" + }, + { + "$ref": "#/definitions/InputArraySchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/InputRecordSchema" + }, + { + "$ref": "#/definitions/InputEnumSchema" + }, + { + "$ref": "#/definitions/InputArraySchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Specify valid types of data that may be assigned to this parameter." + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/OperationInputParameter" + } + ] + } + } + ] + } + }, + "type": "object" + } + ] + }, + "intent": { + "description": "An identifier for the type of computational operation, of this Process.\nEspecially useful for \"class: Operation\", but can also be used for\nCommandLineTool, Workflow, or ExpressionTool.\n\nIf provided, then this must be an IRI of a concept node that\nrepresents the type of operation, preferably defined within an ontology.\n\nFor example, in the domain of bioinformatics, one can use an IRI from\nthe EDAM Ontology's [Operation concept nodes](http://edamontology.org/operation_0004),\nlike [Alignment](http://edamontology.org/operation_2928),\nor [Clustering](http://edamontology.org/operation_3432); or a more\nspecific Operation concept like\n[Split read mapping](http://edamontology.org/operation_3199).", + "items": { + "type": "string" + }, + "type": "array" + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "outputs": { + "description": "Defines the parameters representing the output of the process. May be\nused to generate and/or validate the output object.", + "oneOf": [ + { + "items": { + "$ref": "#/definitions/OperationOutputParameter" + }, + "type": "array" + }, + { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "oneOf": [ + { + "$ref": "#/definitions/OperationOutputParameter" + }, + { + "anyOf": [ + { + "$ref": "#/definitions/OutputRecordSchema" + }, + { + "$ref": "#/definitions/OutputEnumSchema" + }, + { + "$ref": "#/definitions/OutputArraySchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/OutputRecordSchema" + }, + { + "$ref": "#/definitions/OutputEnumSchema" + }, + { + "$ref": "#/definitions/OutputArraySchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Specify valid types of data that may be assigned to this parameter." + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/OperationOutputParameter" + } + ] + } + } + ] + } + }, + "type": "object" + } + ] + }, + "requirements": { + "description": "Declares requirements that apply to either the runtime environment or the\nworkflow engine that must be met in order to execute this process. If\nan implementation cannot satisfy all requirements, or a requirement is\nlisted which is not recognized by the implementation, it is a fatal\nerror and the implementation must not attempt to run the process,\nunless overridden at user option.", + "oneOf": [ + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CWLImportManual" + }, + { + "$ref": "#/definitions/CWLIncludeManual" + }, + { + "$ref": "#/definitions/InlineJavascriptRequirement" + }, + { + "$ref": "#/definitions/SchemaDefRequirement" + }, + { + "$ref": "#/definitions/LoadListingRequirement" + }, + { + "$ref": "#/definitions/DockerRequirement" + }, + { + "$ref": "#/definitions/SoftwareRequirement" + }, + { + "$ref": "#/definitions/InitialWorkDirRequirement" + }, + { + "$ref": "#/definitions/EnvVarRequirement" + }, + { + "$ref": "#/definitions/ShellCommandRequirement" + }, + { + "$ref": "#/definitions/ResourceRequirement" + }, + { + "$ref": "#/definitions/WorkReuse" + }, + { + "$ref": "#/definitions/NetworkAccess" + }, + { + "$ref": "#/definitions/InplaceUpdateRequirement" + }, + { + "$ref": "#/definitions/ToolTimeLimit" + }, + { + "$ref": "#/definitions/SubworkflowFeatureRequirement" + }, + { + "$ref": "#/definitions/ScatterFeatureRequirement" + }, + { + "$ref": "#/definitions/MultipleInputFeatureRequirement" + }, + { + "$ref": "#/definitions/StepInputExpressionRequirement" + } + ] + }, + "type": "array" + }, + { + "type": "object", + "properties": { + "InlineJavascriptRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InlineJavascriptRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SchemaDefRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SchemaDefRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "LoadListingRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/LoadListingRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "DockerRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/DockerRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SoftwareRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SoftwareRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "InitialWorkDirRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InitialWorkDirRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "EnvVarRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/EnvVarRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ShellCommandRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ShellCommandRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ResourceRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ResourceRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "WorkReuse": { + "anyOf": [ + { + "$ref": "#/definitions/WorkReuseMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "NetworkAccess": { + "anyOf": [ + { + "$ref": "#/definitions/NetworkAccessMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "InplaceUpdateRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InplaceUpdateRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ToolTimeLimit": { + "anyOf": [ + { + "$ref": "#/definitions/ToolTimeLimitMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SubworkflowFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SubworkflowFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ScatterFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ScatterFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "MultipleInputFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/MultipleInputFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "StepInputExpressionRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/StepInputExpressionRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + } + }, + "additionalProperties": false + } + ] + } + }, + "required": [ + "class", + "inputs", + "outputs" + ], + "type": "object" + }, + "OperationInputParameter": { + "additionalProperties": false, + "description": "Describe an input parameter of an operation.", + "properties": { + "default": { + "description": "The default value to use for this parameter if the parameter is missing\nfrom the input object, or if the value of the parameter in the input\nobject is `null`. Default values are applied before evaluating expressions\n(e.g. dependent `valueFrom` fields)." + }, + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "format": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nThis must be one or more IRIs of concept nodes\nthat represents file formats which are allowed as input to this\nparameter, preferably defined within an ontology. If no ontology is\navailable, file formats may be tested by exact match." + }, + "id": { + "description": "The unique identifier for this object.", + "type": "string" + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "loadContents": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nIf true, the file (or each file in the array) must be a UTF-8\ntext file 64 KiB or smaller, and the implementation must read\nthe entire contents of the file (or file array) and place it\nin the `contents` field of the File object for use by\nexpressions. If the size of the file is greater than 64 KiB,\nthe implementation must raise a fatal error.", + "type": "boolean" + }, + "loadListing": { + "description": "Only valid when `type: Directory` or is an array of `items: Directory`.\n\nSpecify the desired behavior for loading the `listing` field of\na Directory object for use by expressions.\n\nThe order of precedence for loadListing is:\n\n 1. `loadListing` on an individual parameter\n 2. Inherited from `LoadListingRequirement`\n 3. By default: `no_listing`", + "enum": [ + "deep_listing", + "no_listing", + "shallow_listing" + ], + "type": "string" + }, + "secondaryFiles": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFileSchema" + }, + { + "items": { + "$ref": "#/definitions/SecondaryFileSchema" + }, + "type": "array" + } + ], + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nProvides a pattern or expression specifying files or\ndirectories that should be included alongside the primary\nfile. Secondary files may be required or optional. When not\nexplicitly specified, secondary files specified for `inputs`\nare required and `outputs` are optional. An implementation\nmust include matching Files and Directories in the\n`secondaryFiles` property of the primary file. These Files\nand Directories must be transferred and staged alongside the\nprimary file. An implementation may fail workflow execution\nif a required secondary file does not exist.\n\nIf the value is an expression, the value of `self` in the expression\nmust be the primary input or output File object to which this binding\napplies. The `basename`, `nameroot` and `nameext` fields must be\npresent in `self`. For `CommandLineTool` outputs the `path` field must\nalso be present. The expression must return a filename string relative\nto the path to the primary File, a File or Directory object with either\n`path` or `location` and `basename` fields set, or an array consisting\nof strings or File or Directory objects. It is legal to reference an\nunchanged File or Directory object taken from input as a secondaryFile.\nThe expression may return \"null\" in which case there is no secondaryFile\nfrom that expression.\n\nTo work on non-filename-preserving storage systems, portable tool\ndescriptions should avoid constructing new values from `location`, but\nshould construct relative references using `basename` or `nameroot`\ninstead.\n\nIf a value in `secondaryFiles` is a string that is not an expression,\nit specifies that the following pattern should be applied to the path\nof the primary file to yield a filename relative to the primary File:\n\n 1. If string ends with `?` character, remove the last `?` and mark\n the resulting secondary file as optional.\n 2. If string begins with one or more caret `^` characters, for each\n caret, remove the last file extension from the path (the last\n period `.` and all following characters). If there are no file\n extensions, the path is unchanged.\n 3. Append the remainder of the string to the end of the file path." + }, + "streamable": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nA value of `true` indicates that the file is read or written\nsequentially without seeking. An implementation may use this flag to\nindicate whether it is valid to stream file contents using a named\npipe. Default: `false`.", + "type": "boolean" + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/InputRecordSchema" + }, + { + "$ref": "#/definitions/InputEnumSchema" + }, + { + "$ref": "#/definitions/InputArraySchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/InputRecordSchema" + }, + { + "$ref": "#/definitions/InputEnumSchema" + }, + { + "$ref": "#/definitions/InputArraySchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Specify valid types of data that may be assigned to this parameter." + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "OperationOutputParameter": { + "additionalProperties": false, + "description": "Describe an output parameter of an operation.", + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "format": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nThis is the file format that will be assigned to the output\nFile object.", + "type": "string" + }, + "id": { + "description": "The unique identifier for this object.", + "type": "string" + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "secondaryFiles": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFileSchema" + }, + { + "items": { + "$ref": "#/definitions/SecondaryFileSchema" + }, + "type": "array" + } + ], + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nProvides a pattern or expression specifying files or\ndirectories that should be included alongside the primary\nfile. Secondary files may be required or optional. When not\nexplicitly specified, secondary files specified for `inputs`\nare required and `outputs` are optional. An implementation\nmust include matching Files and Directories in the\n`secondaryFiles` property of the primary file. These Files\nand Directories must be transferred and staged alongside the\nprimary file. An implementation may fail workflow execution\nif a required secondary file does not exist.\n\nIf the value is an expression, the value of `self` in the expression\nmust be the primary input or output File object to which this binding\napplies. The `basename`, `nameroot` and `nameext` fields must be\npresent in `self`. For `CommandLineTool` outputs the `path` field must\nalso be present. The expression must return a filename string relative\nto the path to the primary File, a File or Directory object with either\n`path` or `location` and `basename` fields set, or an array consisting\nof strings or File or Directory objects. It is legal to reference an\nunchanged File or Directory object taken from input as a secondaryFile.\nThe expression may return \"null\" in which case there is no secondaryFile\nfrom that expression.\n\nTo work on non-filename-preserving storage systems, portable tool\ndescriptions should avoid constructing new values from `location`, but\nshould construct relative references using `basename` or `nameroot`\ninstead.\n\nIf a value in `secondaryFiles` is a string that is not an expression,\nit specifies that the following pattern should be applied to the path\nof the primary file to yield a filename relative to the primary File:\n\n 1. If string ends with `?` character, remove the last `?` and mark\n the resulting secondary file as optional.\n 2. If string begins with one or more caret `^` characters, for each\n caret, remove the last file extension from the path (the last\n period `.` and all following characters). If there are no file\n extensions, the path is unchanged.\n 3. Append the remainder of the string to the end of the file path." + }, + "streamable": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nA value of `true` indicates that the file is read or written\nsequentially without seeking. An implementation may use this flag to\nindicate whether it is valid to stream file contents using a named\npipe. Default: `false`.", + "type": "boolean" + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/OutputRecordSchema" + }, + { + "$ref": "#/definitions/OutputEnumSchema" + }, + { + "$ref": "#/definitions/OutputArraySchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/OutputRecordSchema" + }, + { + "$ref": "#/definitions/OutputEnumSchema" + }, + { + "$ref": "#/definitions/OutputArraySchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Specify valid types of data that may be assigned to this parameter." + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "OutputArraySchema": { + "additionalProperties": false, + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#OutputArraySchema", + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "items": { + "anyOf": [ + { + "$ref": "#/definitions/OutputRecordSchema" + }, + { + "$ref": "#/definitions/OutputEnumSchema" + }, + { + "$ref": "#/definitions/OutputArraySchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/OutputRecordSchema" + }, + { + "$ref": "#/definitions/OutputEnumSchema" + }, + { + "$ref": "#/definitions/OutputArraySchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Defines the type of the array elements." + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "name": { + "description": "The identifier for this type", + "type": "string" + }, + "type": { + "const": "array", + "description": "Must be `array`", + "type": "string" + } + }, + "required": [ + "items", + "type" + ], + "type": "object" + }, + "OutputEnumSchema": { + "additionalProperties": false, + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#OutputEnumSchema", + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "name": { + "description": "The identifier for this type", + "type": "string" + }, + "symbols": { + "description": "Defines the set of valid symbols.", + "items": { + "type": "string" + }, + "type": "array" + }, + "type": { + "const": "enum", + "description": "Must be `enum`", + "type": "string" + } + }, + "required": [ + "symbols", + "type" + ], + "type": "object" + }, + "OutputRecordField": { + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#OutputRecordField", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "format": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nThis is the file format that will be assigned to the output\nFile object.", + "type": "string" + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "name": { + "description": "The name of the field", + "type": "string" + }, + "secondaryFiles": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFileSchema" + }, + { + "items": { + "$ref": "#/definitions/SecondaryFileSchema" + }, + "type": "array" + } + ], + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nProvides a pattern or expression specifying files or\ndirectories that should be included alongside the primary\nfile. Secondary files may be required or optional. When not\nexplicitly specified, secondary files specified for `inputs`\nare required and `outputs` are optional. An implementation\nmust include matching Files and Directories in the\n`secondaryFiles` property of the primary file. These Files\nand Directories must be transferred and staged alongside the\nprimary file. An implementation may fail workflow execution\nif a required secondary file does not exist.\n\nIf the value is an expression, the value of `self` in the expression\nmust be the primary input or output File object to which this binding\napplies. The `basename`, `nameroot` and `nameext` fields must be\npresent in `self`. For `CommandLineTool` outputs the `path` field must\nalso be present. The expression must return a filename string relative\nto the path to the primary File, a File or Directory object with either\n`path` or `location` and `basename` fields set, or an array consisting\nof strings or File or Directory objects. It is legal to reference an\nunchanged File or Directory object taken from input as a secondaryFile.\nThe expression may return \"null\" in which case there is no secondaryFile\nfrom that expression.\n\nTo work on non-filename-preserving storage systems, portable tool\ndescriptions should avoid constructing new values from `location`, but\nshould construct relative references using `basename` or `nameroot`\ninstead.\n\nIf a value in `secondaryFiles` is a string that is not an expression,\nit specifies that the following pattern should be applied to the path\nof the primary file to yield a filename relative to the primary File:\n\n 1. If string ends with `?` character, remove the last `?` and mark\n the resulting secondary file as optional.\n 2. If string begins with one or more caret `^` characters, for each\n caret, remove the last file extension from the path (the last\n period `.` and all following characters). If there are no file\n extensions, the path is unchanged.\n 3. Append the remainder of the string to the end of the file path." + }, + "streamable": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nA value of `true` indicates that the file is read or written\nsequentially without seeking. An implementation may use this flag to\nindicate whether it is valid to stream file contents using a named\npipe. Default: `false`.", + "type": "boolean" + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/OutputRecordSchema" + }, + { + "$ref": "#/definitions/OutputEnumSchema" + }, + { + "$ref": "#/definitions/OutputArraySchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/OutputRecordSchema" + }, + { + "$ref": "#/definitions/OutputEnumSchema" + }, + { + "$ref": "#/definitions/OutputArraySchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The field type" + } + }, + "required": [ + "name", + "type" + ], + "type": "object" + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/OutputRecordSchema" + }, + { + "$ref": "#/definitions/OutputEnumSchema" + }, + { + "$ref": "#/definitions/OutputArraySchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/OutputRecordSchema" + }, + { + "$ref": "#/definitions/OutputEnumSchema" + }, + { + "$ref": "#/definitions/OutputArraySchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The field type" + } + } + ] + }, + "OutputRecordSchema": { + "additionalProperties": false, + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#OutputRecordSchema", + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "fields": { + "description": "Defines the fields of the record.", + "oneOf": [ + { + "items": { + "$ref": "#/definitions/OutputRecordField" + }, + "type": "array" + }, + { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "$ref": "#/definitions/OutputRecordFieldMap" + } + }, + "type": "object" + } + ] + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "name": { + "description": "The identifier for this type", + "type": "string" + }, + "type": { + "const": "record", + "description": "Must be `record`", + "type": "string" + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "ResourceRequirement": { + "additionalProperties": false, + "description": "Specify basic hardware resource requirements.\n\n\"min\" is the minimum amount of a resource that must be reserved to\nschedule a job. If \"min\" cannot be satisfied, the job should not\nbe run.\n\n\"max\" is the maximum amount of a resource that the job shall be\nallocated. If a node has sufficient resources, multiple jobs may\nbe scheduled on a single node provided each job's \"max\" resource\nrequirements are met. If a job attempts to exceed its resource\nallocation, an implementation may deny additional resources, which\nmay result in job failure.\n\nIf both \"min\" and \"max\" are specified, an implementation may\nchoose to allocate any amount between \"min\" and \"max\", with the\nactual allocation provided in the `runtime` object.\n\nIf \"min\" is specified but \"max\" is not, then \"max\" == \"min\"\nIf \"max\" is specified by \"min\" is not, then \"min\" == \"max\".\n\nIt is an error if max < min.\n\nIt is an error if the value of any of these fields is negative.\n\nIf neither \"min\" nor \"max\" is specified for a resource, use the default values below.", + "properties": { + "class": { + "const": "ResourceRequirement", + "description": "Always 'ResourceRequirement'", + "type": "string" + }, + "coresMax": { + "description": "Maximum reserved number of CPU cores.\n\nSee `coresMin` for discussion about fractional CPU requests.", + "type": [ + "string", + "number" + ] + }, + "coresMin": { + "description": "Minimum reserved number of CPU cores (default is 1).\n\nMay be a fractional value to indicate to a scheduling\nalgorithm that one core can be allocated to multiple\njobs. For example, a value of 0.25 indicates that up to 4\njobs may run in parallel on 1 core. A value of 1.25 means\nthat up to 3 jobs can run on a 4 core system (4/1.25 \u2248 3).\n\nProcesses can only share a core allocation if the sum of each\nof their `ramMax`, `tmpdirMax`, and `outdirMax` requests also\ndo not exceed the capacity of the node.\n\nProcesses sharing a core must have the same level of isolation\n(typically a container or VM) that they would normally.\n\nThe reported number of CPU cores reserved for the process,\nwhich is available to expressions on the CommandLineTool as\n`runtime.cores`, must be a non-zero integer, and may be\ncalculated by rounding up the cores request to the next whole\nnumber.\n\nScheduling systems may allocate fractional CPU resources by\nsetting quotas or scheduling weights. Scheduling systems that\ndo not support fractional CPUs may round up the request to the\nnext whole number.", + "type": [ + "string", + "number" + ] + }, + "outdirMax": { + "description": "Maximum reserved filesystem based storage for the designated output directory, in mebibytes (2**20)\n\nSee `outdirMin` for discussion about fractional storage requests.", + "type": [ + "string", + "number" + ] + }, + "outdirMin": { + "description": "Minimum reserved filesystem based storage for the designated output directory, in mebibytes (2**20) (default is 1024)\n\nMay be a fractional value. If so, the actual storage request\nmust be rounded up to the next whole number. The reported\namount of storage reserved for the process, which is available\nto expressions on the CommandLineTool as `runtime.outdirSize`,\nmust be a non-zero integer.", + "type": [ + "string", + "number" + ] + }, + "ramMax": { + "description": "Maximum reserved RAM in mebibytes (2**20)\n\nSee `ramMin` for discussion about fractional RAM requests.", + "type": [ + "string", + "number" + ] + }, + "ramMin": { + "description": "Minimum reserved RAM in mebibytes (2**20) (default is 256)\n\nMay be a fractional value. If so, the actual RAM request must\nbe rounded up to the next whole number. The reported amount of\nRAM reserved for the process, which is available to\nexpressions on the CommandLineTool as `runtime.ram`, must be a\nnon-zero integer.", + "type": [ + "string", + "number" + ] + }, + "tmpdirMax": { + "description": "Maximum reserved filesystem based storage for the designated temporary directory, in mebibytes (2**20)\n\nSee `tmpdirMin` for discussion about fractional storage requests.", + "type": [ + "string", + "number" + ] + }, + "tmpdirMin": { + "description": "Minimum reserved filesystem based storage for the designated temporary directory, in mebibytes (2**20) (default is 1024)\n\nMay be a fractional value. If so, the actual storage request\nmust be rounded up to the next whole number. The reported\namount of storage reserved for the process, which is available\nto expressions on the CommandLineTool as `runtime.tmpdirSize`,\nmust be a non-zero integer.", + "type": [ + "string", + "number" + ] + } + }, + "required": [ + "class" + ], + "type": "object" + }, + "ScatterFeatureRequirement": { + "additionalProperties": false, + "description": "Indicates that the workflow platform must support the `scatter` and\n`scatterMethod` fields of [WorkflowStep](#WorkflowStep).", + "properties": { + "class": { + "const": "ScatterFeatureRequirement", + "description": "Always 'ScatterFeatureRequirement'", + "type": "string" + } + }, + "required": [ + "class" + ], + "type": "object" + }, + "SchemaDefRequirement": { + "additionalProperties": false, + "description": "This field consists of an array of type definitions which must be used when\ninterpreting the `inputs` and `outputs` fields. When a `type` field\ncontains a IRI, the implementation must check if the type is defined in\n`schemaDefs` and use that definition. If the type is not found in\n`schemaDefs`, it is an error. The entries in `schemaDefs` must be\nprocessed in the order listed such that later schema definitions may refer\nto earlier schema definitions.\n\n- **Type definitions are allowed for `enum` and `record` types only.**\n- Type definitions may be shared by defining them in a file and then\n `$include`-ing them in the `types` field.\n- A file can contain a list of type definitions", + "properties": { + "class": { + "const": "SchemaDefRequirement", + "description": "Always 'SchemaDefRequirement'", + "type": "string" + }, + "types": { + "description": "The list of type definitions.", + "items": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/CommandInputArraySchema" + }, + { + "$ref": "#/definitions/CommandInputRecordSchema" + }, + { + "$ref": "#/definitions/CommandInputEnumSchema" + } + ] + }, + { + "$ref": "#/definitions/CWLImportManual" + }, + { + "$ref": "#/definitions/CWLIncludeManual" + } + ] + }, + "type": "array" + } + }, + "required": [ + "class", + "types" + ], + "type": "object" + }, + "SecondaryFileSchema": { + "description": "Secondary files are specified using the following micro-DSL for secondary files:\n\n* If the value is a string, it is transformed to an object with two fields\n `pattern` and `required`\n* By default, the value of `required` is `null`\n (this indicates default behavior, which may be based on the context)\n* If the value ends with a question mark `?` the question mark is\n stripped off and the value of the field `required` is set to `False`\n* The remaining value is assigned to the field `pattern`\n\nFor implementation details and examples, please see\n[this section](SchemaSalad.html#Domain_Specific_Language_for_secondary_files)\nin the Schema Salad specification.", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "pattern": { + "description": "Provides a pattern or expression specifying files or directories that\nshould be included alongside the primary file.\n\nIf the value is an expression, the value of `self` in the\nexpression must be the primary input or output File object to\nwhich this binding applies. The `basename`, `nameroot` and\n`nameext` fields must be present in `self`. For\n`CommandLineTool` inputs the `location` field must also be\npresent. For `CommandLineTool` outputs the `path` field must\nalso be present. If secondary files were included on an input\nFile object as part of the Process invocation, they must also\nbe present in `secondaryFiles` on `self`.\n\nThe expression must return either: a filename string relative\nto the path to the primary File, a File or Directory object\n(`class: File` or `class: Directory`) with either `location`\n(for inputs) or `path` (for outputs) and `basename` fields\nset, or an array consisting of strings or File or Directory\nobjects as previously described.\n\nIt is legal to use `location` from a File or Directory object\npassed in as input, including `location` from secondary files\non `self`. If an expression returns a File object with the\nsame `location` but a different `basename` as a secondary file\nthat was passed in, the expression result takes precedence.\nSetting the basename with an expression this way affects the\n`path` where the secondary file will be staged to in the\nCommandLineTool.\n\nThe expression may return \"null\" in which case there is no\nsecondary file from that expression.\n\nTo work on non-filename-preserving storage systems, portable\ntool descriptions should treat `location` as an\n[opaque identifier](#opaque-strings) and avoid constructing new\nvalues from `location`, but should construct relative references\nusing `basename` or `nameroot` instead, or propagate `location`\nfrom defined inputs.\n\nIf a value in `secondaryFiles` is a string that is not an expression,\nit specifies that the following pattern should be applied to the path\nof the primary file to yield a filename relative to the primary File:\n\n 1. If string ends with `?` character, remove the last `?` and mark\n the resulting secondary file as optional.\n 2. If string begins with one or more caret `^` characters, for each\n caret, remove the last file extension from the path (the last\n period `.` and all following characters). If there are no file\n extensions, the path is unchanged.\n 3. Append the remainder of the string to the end of the file path.", + "type": "string" + }, + "required": { + "description": "An implementation must not fail workflow execution if `required` is\nset to `false` and the expected secondary file does not exist.\nDefault value for `required` field is `true` for secondary files on\ninput and `false` for secondary files on output.", + "type": [ + "string", + "boolean" + ] + } + }, + "required": [ + "pattern" + ], + "type": "object" + }, + { + "type": "string" + } + ] + }, + "ShellCommandRequirement": { + "additionalProperties": false, + "description": "Modify the behavior of CommandLineTool to generate a single string\ncontaining a shell command line. Each item in the `arguments` list must\nbe joined into a string separated by single spaces and quoted to prevent\nintepretation by the shell, unless `CommandLineBinding` for that argument\ncontains `shellQuote: false`. If `shellQuote: false` is specified, the\nargument is joined into the command string without quoting, which allows\nthe use of shell metacharacters such as `|` for pipes.", + "properties": { + "class": { + "const": "ShellCommandRequirement", + "description": "Always 'ShellCommandRequirement'", + "type": "string" + } + }, + "required": [ + "class" + ], + "type": "object" + }, + "SoftwarePackage": { + "additionalProperties": false, + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#SoftwarePackage", + "properties": { + "package": { + "description": "The name of the software to be made available. If the name is\ncommon, inconsistent, or otherwise ambiguous it should be combined with\none or more identifiers in the `specs` field.", + "type": "string" + }, + "specs": { + "description": "One or more [IRI](https://en.wikipedia.org/wiki/Internationalized_Resource_Identifier)s\nidentifying resources for installing or enabling the software named in\nthe `package` field. Implementations may provide resolvers which map\nthese software identifier IRIs to some configuration action; or they can\nuse only the name from the `package` field on a best effort basis.\n\nFor example, the IRI https://packages.debian.org/bowtie could\nbe resolved with `apt-get install bowtie`. The IRI\nhttps://anaconda.org/bioconda/bowtie could be resolved with `conda\ninstall -c bioconda bowtie`.\n\nIRIs can also be system independent and used to map to a specific\nsoftware installation or selection mechanism.\nUsing [RRID](https://www.identifiers.org/rrid/) as an example:\nhttps://identifiers.org/rrid/RRID:SCR_005476\ncould be fulfilled using the above-mentioned Debian or bioconda\npackage, a local installation managed by [Environment Modules](https://modules.sourceforge.net/),\nor any other mechanism the platform chooses. IRIs can also be from\nidentifier sources that are discipline specific yet still system\nindependent. As an example, the equivalent [ELIXIR Tools and Data\nService Registry](https://bio.tools) IRI to the previous RRID example is\nhttps://bio.tools/tool/bowtie2/version/2.2.8.\nIf supported by a given registry, implementations are encouraged to\nquery these system independent software identifier IRIs directly for\nlinks to packaging systems.\n\nA site specific IRI can be listed as well. For example, an academic\ncomputing cluster using Environment Modules could list the IRI\n`https://hpc.example.edu/modules/bowtie-tbb/1.22` to indicate that\n`module load bowtie-tbb/1.1.2` should be executed to make available\n`bowtie` version 1.1.2 compiled with the TBB library prior to running\nthe accompanying Workflow or CommandLineTool. Note that the example IRI\nis specific to a particular institution and computing environment as\nthe Environment Modules system does not have a common namespace or\nstandardized naming convention.\n\nThis last example is the least portable and should only be used if\nmechanisms based off of the `package` field or more generic IRIs are\nunavailable or unsuitable. While harmless to other sites, site specific\nsoftware IRIs should be left out of shared CWL descriptions to avoid\nclutter.", + "items": { + "type": "string" + }, + "type": "array" + }, + "version": { + "description": "The (optional) versions of the software that are known to be\ncompatible.", + "items": { + "type": "string" + }, + "type": "array" + } + }, + "required": [ + "package" + ], + "type": "object" + }, + "SoftwareRequirement": { + "additionalProperties": false, + "description": "A list of software packages that should be configured in the environment of\nthe defined process.", + "properties": { + "class": { + "const": "SoftwareRequirement", + "description": "Always 'SoftwareRequirement'", + "type": "string" + }, + "packages": { + "description": "The list of software to be configured.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/SoftwarePackage" + }, + { + "$ref": "#/definitions/CWLImportManual" + }, + { + "$ref": "#/definitions/CWLIncludeManual" + } + ] + }, + "type": "array" + } + }, + "required": [ + "class", + "packages" + ], + "type": "object" + }, + "StepInputExpressionRequirement": { + "additionalProperties": false, + "description": "Indicate that the workflow platform must support the `valueFrom` field\nof [WorkflowStepInput](#WorkflowStepInput).", + "properties": { + "class": { + "const": "StepInputExpressionRequirement", + "description": "Always 'StepInputExpressionRequirement'", + "type": "string" + } + }, + "required": [ + "class" + ], + "type": "object" + }, + "SubworkflowFeatureRequirement": { + "additionalProperties": false, + "description": "Indicates that the workflow platform must support nested workflows in\nthe `run` field of [WorkflowStep](#WorkflowStep).", + "properties": { + "class": { + "const": "SubworkflowFeatureRequirement", + "description": "Always 'SubworkflowFeatureRequirement'", + "type": "string" + } + }, + "required": [ + "class" + ], + "type": "object" + }, + "T": { + "additionalProperties": false, + "type": "object" + }, + "ToolTimeLimit": { + "additionalProperties": false, + "description": "Set an upper limit on the execution time of a CommandLineTool.\nA CommandLineTool whose execution duration exceeds the time\nlimit may be preemptively terminated and considered failed.\nMay also be used by batch systems to make scheduling decisions.\nThe execution duration excludes external operations, such as\nstaging of files, pulling a docker image etc, and only counts\nwall-time for the execution of the command line itself.", + "properties": { + "class": { + "const": "ToolTimeLimit", + "description": "Always 'ToolTimeLimit'", + "type": "string" + }, + "timelimit": { + "description": "The time limit, in seconds. A time limit of zero means no\ntime limit. Negative time limits are an error.", + "type": [ + "string", + "number" + ] + } + }, + "required": [ + "class", + "timelimit" + ], + "type": "object" + }, + "WorkReuse": { + "additionalProperties": false, + "description": "For implementations that support reusing output from past work (on\nthe assumption that same code and same input produce same\nresults), control whether to enable or disable the reuse behavior\nfor a particular tool or step (to accommodate situations where that\nassumption is incorrect). A reused step is not executed but\ninstead returns the same output as the original execution.\n\nIf `WorkReuse` is not specified, correct tools should assume it\nis enabled by default.", + "properties": { + "class": { + "const": "WorkReuse", + "description": "Always 'WorkReuse'", + "type": "string" + }, + "enableReuse": { + "type": [ + "string", + "boolean" + ] + } + }, + "required": [ + "class", + "enableReuse" + ], + "type": "object" + }, + "Workflow": { + "description": "A workflow describes a set of **steps** and the **dependencies** between\nthose steps. When a step produces output that will be consumed by a\nsecond step, the first step is a dependency of the second step.\n\nWhen there is a dependency, the workflow engine must execute the preceding\nstep and wait for it to successfully produce output before executing the\ndependent step. If two steps are defined in the workflow graph that\nare not directly or indirectly dependent, these steps are **independent**,\nand may execute in any order or execute concurrently. A workflow is\ncomplete when all steps have been executed.\n\nDependencies between parameters are expressed using the `source`\nfield on [workflow step input parameters](#WorkflowStepInput) and\n`outputSource` field on [workflow output\nparameters](#WorkflowOutputParameter).\n\nThe `source` field on each workflow step input parameter expresses\nthe data links that contribute to the value of the step input\nparameter (the \"sink\"). A workflow step can only begin execution\nwhen every data link connected to a step has been fulfilled.\n\nThe `outputSource` field on each workflow step input parameter\nexpresses the data links that contribute to the value of the\nworkflow output parameter (the \"sink\"). Workflow execution cannot\ncomplete successfully until every data link connected to an output\nparameter has been fulfilled.\n\n## Workflow success and failure\n\nA completed step must result in one of `success`, `temporaryFailure` or\n`permanentFailure` states. An implementation may choose to retry a step\nexecution which resulted in `temporaryFailure`. An implementation may\nchoose to either continue running other steps of a workflow, or terminate\nimmediately upon `permanentFailure`.\n\n* If any step of a workflow execution results in `permanentFailure`, then\nthe workflow status is `permanentFailure`.\n\n* If one or more steps result in `temporaryFailure` and all other steps\ncomplete `success` or are not executed, then the workflow status is\n`temporaryFailure`.\n\n* If all workflow steps are executed and complete with `success`, then the\nworkflow status is `success`.\n\n# Extensions\n\n[ScatterFeatureRequirement](#ScatterFeatureRequirement) and\n[SubworkflowFeatureRequirement](#SubworkflowFeatureRequirement) are\navailable as standard [extensions](#Extensions_and_Metadata) to core\nworkflow semantics.", + "properties": { + "class": { + "const": "Workflow", + "type": "string" + }, + "cwlVersion": { + "description": "CWL document version. Always required at the document root. Not\nrequired for a Process embedded inside another Process.", + "enum": [ + "draft-2", + "draft-3", + "draft-3.dev1", + "draft-3.dev2", + "draft-3.dev3", + "draft-3.dev4", + "draft-3.dev5", + "draft-4.dev1", + "draft-4.dev2", + "draft-4.dev3", + "v1.0", + "v1.0.dev4", + "v1.1", + "v1.1.0-dev1", + "v1.2", + "v1.2.0-dev1", + "v1.2.0-dev2", + "v1.2.0-dev3", + "v1.2.0-dev4", + "v1.2.0-dev5" + ], + "type": "string" + }, + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "hints": { + "description": "Declares requirements that apply to either the runtime environment or the\nworkflow engine that must be met in order to execute this process. If\nan implementation cannot satisfy all requirements, or a requirement is\nlisted which is not recognized by the implementation, it is a fatal\nerror and the implementation must not attempt to run the process,\nunless overridden at user option.", + "oneOf": [ + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CWLImportManual" + }, + { + "$ref": "#/definitions/CWLIncludeManual" + }, + { + "$ref": "#/definitions/InlineJavascriptRequirement" + }, + { + "$ref": "#/definitions/SchemaDefRequirement" + }, + { + "$ref": "#/definitions/LoadListingRequirement" + }, + { + "$ref": "#/definitions/DockerRequirement" + }, + { + "$ref": "#/definitions/SoftwareRequirement" + }, + { + "$ref": "#/definitions/InitialWorkDirRequirement" + }, + { + "$ref": "#/definitions/EnvVarRequirement" + }, + { + "$ref": "#/definitions/ShellCommandRequirement" + }, + { + "$ref": "#/definitions/ResourceRequirement" + }, + { + "$ref": "#/definitions/WorkReuse" + }, + { + "$ref": "#/definitions/NetworkAccess" + }, + { + "$ref": "#/definitions/InplaceUpdateRequirement" + }, + { + "$ref": "#/definitions/ToolTimeLimit" + }, + { + "$ref": "#/definitions/SubworkflowFeatureRequirement" + }, + { + "$ref": "#/definitions/ScatterFeatureRequirement" + }, + { + "$ref": "#/definitions/MultipleInputFeatureRequirement" + }, + { + "$ref": "#/definitions/StepInputExpressionRequirement" + } + ] + }, + "type": "array" + }, + { + "type": "object", + "properties": { + "InlineJavascriptRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InlineJavascriptRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SchemaDefRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SchemaDefRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "LoadListingRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/LoadListingRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "DockerRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/DockerRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SoftwareRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SoftwareRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "InitialWorkDirRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InitialWorkDirRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "EnvVarRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/EnvVarRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ShellCommandRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ShellCommandRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ResourceRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ResourceRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "WorkReuse": { + "anyOf": [ + { + "$ref": "#/definitions/WorkReuseMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "NetworkAccess": { + "anyOf": [ + { + "$ref": "#/definitions/NetworkAccessMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "InplaceUpdateRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InplaceUpdateRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ToolTimeLimit": { + "anyOf": [ + { + "$ref": "#/definitions/ToolTimeLimitMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SubworkflowFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SubworkflowFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ScatterFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ScatterFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "MultipleInputFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/MultipleInputFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "StepInputExpressionRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/StepInputExpressionRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + } + }, + "additionalProperties": false + } + ] + }, + "id": { + "description": "The unique identifier for this object.\n\nOnly useful for `$graph` at `Process` level. Should not be exposed\nto users in graphical or terminal user interfaces.", + "type": "string" + }, + "inputs": { + "description": "Defines the input parameters of the process. The process is ready to\nrun when all required input parameters are associated with concrete\nvalues. Input parameters include a schema for each parameter which is\nused to validate the input object. It may also be used to build a user\ninterface for constructing the input object.\n\nWhen accepting an input object, all input parameters must have a value.\nIf an input parameter is missing from the input object, it must be\nassigned a value of `null` (or the value of `default` for that\nparameter, if provided) for the purposes of validation and evaluation\nof expressions.", + "oneOf": [ + { + "items": { + "$ref": "#/definitions/WorkflowInputParameter" + }, + "type": "array" + }, + { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "oneOf": [ + { + "$ref": "#/definitions/WorkflowInputParameter" + }, + { + "anyOf": [ + { + "$ref": "#/definitions/InputRecordSchema" + }, + { + "$ref": "#/definitions/InputEnumSchema" + }, + { + "$ref": "#/definitions/InputArraySchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/InputRecordSchema" + }, + { + "$ref": "#/definitions/InputEnumSchema" + }, + { + "$ref": "#/definitions/InputArraySchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Specify valid types of data that may be assigned to this parameter." + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/WorkflowInputParameter" + } + ] + } + } + ] + } + }, + "type": "object" + } + ] + }, + "intent": { + "description": "An identifier for the type of computational operation, of this Process.\nEspecially useful for \"class: Operation\", but can also be used for\nCommandLineTool, Workflow, or ExpressionTool.\n\nIf provided, then this must be an IRI of a concept node that\nrepresents the type of operation, preferably defined within an ontology.\n\nFor example, in the domain of bioinformatics, one can use an IRI from\nthe EDAM Ontology's [Operation concept nodes](http://edamontology.org/operation_0004),\nlike [Alignment](http://edamontology.org/operation_2928),\nor [Clustering](http://edamontology.org/operation_3432); or a more\nspecific Operation concept like\n[Split read mapping](http://edamontology.org/operation_3199).", + "items": { + "type": "string" + }, + "type": "array" + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "outputs": { + "description": "Defines the parameters representing the output of the process. May be\nused to generate and/or validate the output object.", + "oneOf": [ + { + "items": { + "$ref": "#/definitions/WorkflowOutputParameter" + }, + "type": "array" + }, + { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "oneOf": [ + { + "$ref": "#/definitions/WorkflowOutputParameter" + }, + { + "anyOf": [ + { + "$ref": "#/definitions/OutputRecordSchema" + }, + { + "$ref": "#/definitions/OutputEnumSchema" + }, + { + "$ref": "#/definitions/OutputArraySchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/OutputRecordSchema" + }, + { + "$ref": "#/definitions/OutputEnumSchema" + }, + { + "$ref": "#/definitions/OutputArraySchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Specify valid types of data that may be assigned to this parameter." + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/WorkflowOutputParameter" + } + ] + } + } + ] + } + }, + "type": "object" + } + ] + }, + "requirements": { + "description": "Declares requirements that apply to either the runtime environment or the\nworkflow engine that must be met in order to execute this process. If\nan implementation cannot satisfy all requirements, or a requirement is\nlisted which is not recognized by the implementation, it is a fatal\nerror and the implementation must not attempt to run the process,\nunless overridden at user option.", + "oneOf": [ + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CWLImportManual" + }, + { + "$ref": "#/definitions/CWLIncludeManual" + }, + { + "$ref": "#/definitions/InlineJavascriptRequirement" + }, + { + "$ref": "#/definitions/SchemaDefRequirement" + }, + { + "$ref": "#/definitions/LoadListingRequirement" + }, + { + "$ref": "#/definitions/DockerRequirement" + }, + { + "$ref": "#/definitions/SoftwareRequirement" + }, + { + "$ref": "#/definitions/InitialWorkDirRequirement" + }, + { + "$ref": "#/definitions/EnvVarRequirement" + }, + { + "$ref": "#/definitions/ShellCommandRequirement" + }, + { + "$ref": "#/definitions/ResourceRequirement" + }, + { + "$ref": "#/definitions/WorkReuse" + }, + { + "$ref": "#/definitions/NetworkAccess" + }, + { + "$ref": "#/definitions/InplaceUpdateRequirement" + }, + { + "$ref": "#/definitions/ToolTimeLimit" + }, + { + "$ref": "#/definitions/SubworkflowFeatureRequirement" + }, + { + "$ref": "#/definitions/ScatterFeatureRequirement" + }, + { + "$ref": "#/definitions/MultipleInputFeatureRequirement" + }, + { + "$ref": "#/definitions/StepInputExpressionRequirement" + } + ] + }, + "type": "array" + }, + { + "type": "object", + "properties": { + "InlineJavascriptRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InlineJavascriptRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SchemaDefRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SchemaDefRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "LoadListingRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/LoadListingRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "DockerRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/DockerRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SoftwareRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SoftwareRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "InitialWorkDirRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InitialWorkDirRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "EnvVarRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/EnvVarRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ShellCommandRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ShellCommandRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ResourceRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ResourceRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "WorkReuse": { + "anyOf": [ + { + "$ref": "#/definitions/WorkReuseMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "NetworkAccess": { + "anyOf": [ + { + "$ref": "#/definitions/NetworkAccessMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "InplaceUpdateRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InplaceUpdateRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ToolTimeLimit": { + "anyOf": [ + { + "$ref": "#/definitions/ToolTimeLimitMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SubworkflowFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SubworkflowFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ScatterFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ScatterFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "MultipleInputFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/MultipleInputFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "StepInputExpressionRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/StepInputExpressionRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + } + }, + "additionalProperties": false + } + ] + }, + "steps": { + "description": "The individual steps that make up the workflow. Each step is executed when all of its\ninput data links are fulfilled. An implementation may choose to execute\nthe steps in a different order than listed and/or execute steps\nconcurrently, provided that dependencies between steps are met.", + "oneOf": [ + { + "items": { + "$ref": "#/definitions/WorkflowStep" + }, + "type": "array" + }, + { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "$ref": "#/definitions/WorkflowStep" + } + }, + "type": "object" + } + ] + } + }, + "required": [ + "class", + "inputs", + "outputs", + "steps" + ], + "type": "object" + }, + "WorkflowInputParameter": { + "additionalProperties": false, + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#WorkflowInputParameter", + "properties": { + "default": { + "description": "The default value to use for this parameter if the parameter is missing\nfrom the input object, or if the value of the parameter in the input\nobject is `null`. Default values are applied before evaluating expressions\n(e.g. dependent `valueFrom` fields)." + }, + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "format": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nThis must be one or more IRIs of concept nodes\nthat represents file formats which are allowed as input to this\nparameter, preferably defined within an ontology. If no ontology is\navailable, file formats may be tested by exact match." + }, + "id": { + "description": "The unique identifier for this object.", + "type": "string" + }, + "inputBinding": { + "$ref": "#/definitions/InputBinding", + "description": "Deprecated. Preserved for v1.0 backwards compatibility. Will be removed in\nCWL v2.0. Use `WorkflowInputParameter.loadContents` instead." + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "loadContents": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nIf true, the file (or each file in the array) must be a UTF-8\ntext file 64 KiB or smaller, and the implementation must read\nthe entire contents of the file (or file array) and place it\nin the `contents` field of the File object for use by\nexpressions. If the size of the file is greater than 64 KiB,\nthe implementation must raise a fatal error.", + "type": "boolean" + }, + "loadListing": { + "description": "Only valid when `type: Directory` or is an array of `items: Directory`.\n\nSpecify the desired behavior for loading the `listing` field of\na Directory object for use by expressions.\n\nThe order of precedence for loadListing is:\n\n 1. `loadListing` on an individual parameter\n 2. Inherited from `LoadListingRequirement`\n 3. By default: `no_listing`", + "enum": [ + "deep_listing", + "no_listing", + "shallow_listing" + ], + "type": "string" + }, + "secondaryFiles": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFileSchema" + }, + { + "items": { + "$ref": "#/definitions/SecondaryFileSchema" + }, + "type": "array" + } + ], + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nProvides a pattern or expression specifying files or\ndirectories that should be included alongside the primary\nfile. Secondary files may be required or optional. When not\nexplicitly specified, secondary files specified for `inputs`\nare required and `outputs` are optional. An implementation\nmust include matching Files and Directories in the\n`secondaryFiles` property of the primary file. These Files\nand Directories must be transferred and staged alongside the\nprimary file. An implementation may fail workflow execution\nif a required secondary file does not exist.\n\nIf the value is an expression, the value of `self` in the expression\nmust be the primary input or output File object to which this binding\napplies. The `basename`, `nameroot` and `nameext` fields must be\npresent in `self`. For `CommandLineTool` outputs the `path` field must\nalso be present. The expression must return a filename string relative\nto the path to the primary File, a File or Directory object with either\n`path` or `location` and `basename` fields set, or an array consisting\nof strings or File or Directory objects. It is legal to reference an\nunchanged File or Directory object taken from input as a secondaryFile.\nThe expression may return \"null\" in which case there is no secondaryFile\nfrom that expression.\n\nTo work on non-filename-preserving storage systems, portable tool\ndescriptions should avoid constructing new values from `location`, but\nshould construct relative references using `basename` or `nameroot`\ninstead.\n\nIf a value in `secondaryFiles` is a string that is not an expression,\nit specifies that the following pattern should be applied to the path\nof the primary file to yield a filename relative to the primary File:\n\n 1. If string ends with `?` character, remove the last `?` and mark\n the resulting secondary file as optional.\n 2. If string begins with one or more caret `^` characters, for each\n caret, remove the last file extension from the path (the last\n period `.` and all following characters). If there are no file\n extensions, the path is unchanged.\n 3. Append the remainder of the string to the end of the file path." + }, + "streamable": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nA value of `true` indicates that the file is read or written\nsequentially without seeking. An implementation may use this flag to\nindicate whether it is valid to stream file contents using a named\npipe. Default: `false`.", + "type": "boolean" + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/InputRecordSchema" + }, + { + "$ref": "#/definitions/InputEnumSchema" + }, + { + "$ref": "#/definitions/InputArraySchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/InputRecordSchema" + }, + { + "$ref": "#/definitions/InputEnumSchema" + }, + { + "$ref": "#/definitions/InputArraySchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Specify valid types of data that may be assigned to this parameter." + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "WorkflowOutputParameter": { + "additionalProperties": false, + "description": "Describe an output parameter of a workflow. The parameter must be\nconnected to one or more parameters defined in the workflow that\nwill provide the value of the output parameter. It is legal to\nconnect a WorkflowInputParameter to a WorkflowOutputParameter.\n\nSee [WorkflowStepInput](#WorkflowStepInput) for discussion of\n`linkMerge` and `pickValue`.", + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "format": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nThis is the file format that will be assigned to the output\nFile object.", + "type": "string" + }, + "id": { + "description": "The unique identifier for this object.", + "type": "string" + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "linkMerge": { + "description": "The method to use to merge multiple sources into a single array.\nIf not specified, the default method is \"merge_nested\".", + "enum": [ + "merge_flattened", + "merge_nested" + ], + "type": "string" + }, + "outputSource": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Specifies one or more names of an output from a workflow step (in the form\n`step_name/output_name` with a `/` separator`), or a workflow input name,\nthat supply their value(s) to the output parameter.\nthe output parameter. It is valid to reference workflow level inputs\nhere." + }, + "pickValue": { + "description": "The method to use to choose non-null elements among multiple sources.", + "enum": [ + "all_non_null", + "first_non_null", + "the_only_non_null" + ], + "type": "string" + }, + "secondaryFiles": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFileSchema" + }, + { + "items": { + "$ref": "#/definitions/SecondaryFileSchema" + }, + "type": "array" + } + ], + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nProvides a pattern or expression specifying files or\ndirectories that should be included alongside the primary\nfile. Secondary files may be required or optional. When not\nexplicitly specified, secondary files specified for `inputs`\nare required and `outputs` are optional. An implementation\nmust include matching Files and Directories in the\n`secondaryFiles` property of the primary file. These Files\nand Directories must be transferred and staged alongside the\nprimary file. An implementation may fail workflow execution\nif a required secondary file does not exist.\n\nIf the value is an expression, the value of `self` in the expression\nmust be the primary input or output File object to which this binding\napplies. The `basename`, `nameroot` and `nameext` fields must be\npresent in `self`. For `CommandLineTool` outputs the `path` field must\nalso be present. The expression must return a filename string relative\nto the path to the primary File, a File or Directory object with either\n`path` or `location` and `basename` fields set, or an array consisting\nof strings or File or Directory objects. It is legal to reference an\nunchanged File or Directory object taken from input as a secondaryFile.\nThe expression may return \"null\" in which case there is no secondaryFile\nfrom that expression.\n\nTo work on non-filename-preserving storage systems, portable tool\ndescriptions should avoid constructing new values from `location`, but\nshould construct relative references using `basename` or `nameroot`\ninstead.\n\nIf a value in `secondaryFiles` is a string that is not an expression,\nit specifies that the following pattern should be applied to the path\nof the primary file to yield a filename relative to the primary File:\n\n 1. If string ends with `?` character, remove the last `?` and mark\n the resulting secondary file as optional.\n 2. If string begins with one or more caret `^` characters, for each\n caret, remove the last file extension from the path (the last\n period `.` and all following characters). If there are no file\n extensions, the path is unchanged.\n 3. Append the remainder of the string to the end of the file path." + }, + "streamable": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nA value of `true` indicates that the file is read or written\nsequentially without seeking. An implementation may use this flag to\nindicate whether it is valid to stream file contents using a named\npipe. Default: `false`.", + "type": "boolean" + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/OutputRecordSchema" + }, + { + "$ref": "#/definitions/OutputEnumSchema" + }, + { + "$ref": "#/definitions/OutputArraySchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/OutputRecordSchema" + }, + { + "$ref": "#/definitions/OutputEnumSchema" + }, + { + "$ref": "#/definitions/OutputArraySchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Specify valid types of data that may be assigned to this parameter." + } + }, + "required": [ + "type" + ], + "type": "object" + }, + "WorkflowStep": { + "additionalProperties": false, + "description": "A workflow step is an executable element of a workflow. It specifies the\nunderlying process implementation (such as `CommandLineTool` or another\n`Workflow`) in the `run` field and connects the input and output parameters\nof the underlying process to workflow parameters.\n\n# Scatter/gather\n\nTo use scatter/gather,\n[ScatterFeatureRequirement](#ScatterFeatureRequirement) must be specified\nin the workflow or workflow step requirements.\n\nA \"scatter\" operation specifies that the associated workflow step or\nsubworkflow should execute separately over a list of input elements. Each\njob making up a scatter operation is independent and may be executed\nconcurrently.\n\nThe `scatter` field specifies one or more input parameters which will be\nscattered. An input parameter may be listed more than once. The declared\ntype of each input parameter is implicitly becomes an array of items of the\ninput parameter type. If a parameter is listed more than once, it becomes\na nested array. As a result, upstream parameters which are connected to\nscattered parameters must be arrays.\n\nAll output parameter types are also implicitly wrapped in arrays. Each job\nin the scatter results in an entry in the output array.\n\nIf any scattered parameter runtime value is an empty array, all outputs are\nset to empty arrays and no work is done for the step, according to\napplicable scattering rules.\n\nIf `scatter` declares more than one input parameter, `scatterMethod`\ndescribes how to decompose the input into a discrete set of jobs.\n\n * **dotproduct** specifies that each of the input arrays are aligned and one\n element taken from each array to construct each job. It is an error\n if all input arrays are not the same length.\n\n * **nested_crossproduct** specifies the Cartesian product of the inputs,\n producing a job for every combination of the scattered inputs. The\n output must be nested arrays for each level of scattering, in the\n order that the input arrays are listed in the `scatter` field.\n\n * **flat_crossproduct** specifies the Cartesian product of the inputs,\n producing a job for every combination of the scattered inputs. The\n output arrays must be flattened to a single level, but otherwise listed in the\n order that the input arrays are listed in the `scatter` field.\n\n# Conditional execution (Optional)\n\nConditional execution makes execution of a step conditional on an\nexpression. A step that is not executed is \"skipped\". A skipped\nstep produces `null` for all output parameters.\n\nThe condition is evaluated after `scatter`, using the input object\nof each individual scatter job. This means over a set of scatter\njobs, some may be executed and some may be skipped. When the\nresults are gathered, skipped steps must be `null` in the output\narrays.\n\nThe `when` field controls conditional execution. This is an\nexpression that must be evaluated with `inputs` bound to the step\ninput object (or individual scatter job), and returns a boolean\nvalue. It is an error if this expression returns a value other\nthan `true` or `false`.\n\nConditionals in CWL are an optional feature and are not required\nto be implemented by all consumers of CWL documents. An\nimplementation that does not support conditionals must return a\nfatal error when attempting to execute a workflow that uses\nconditional constructs the implementation does not support.\n\n# Subworkflows\n\nTo specify a nested workflow as part of a workflow step,\n[SubworkflowFeatureRequirement](#SubworkflowFeatureRequirement) must be\nspecified in the workflow or workflow step requirements.\n\nIt is a fatal error if a workflow directly or indirectly invokes itself as\na subworkflow (recursive workflows are not allowed).", + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "hints": { + "description": "Declares hints applying to either the runtime environment or the\nworkflow engine that may be helpful in executing this workflow step. It is\nnot an error if an implementation cannot satisfy all hints, however\nthe implementation may report a warning.", + "items": {}, + "type": "array" + }, + "id": { + "description": "The unique identifier for this object.", + "type": "string" + }, + "in": { + "description": "Defines the input parameters of the workflow step. The process is ready to\nrun when all required input parameters are associated with concrete\nvalues. Input parameters include a schema for each parameter which is\nused to validate the input object. It may also be used build a user\ninterface for constructing the input object.", + "oneOf": [ + { + "items": { + "$ref": "#/definitions/WorkflowStepInput" + }, + "type": "array" + }, + { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "oneOf": [ + { + "$ref": "#/definitions/WorkflowStepInput" + }, + { + "type": "string" + }, + { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/WorkflowStepInput" + } + ] + } + } + ] + } + }, + "type": "object" + } + ] + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "out": { + "description": "Defines the parameters representing the output of the process. May be\nused to generate and/or validate the output object.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/WorkflowStepOutput" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + "requirements": { + "description": "Declares requirements that apply to either the runtime environment or the\nworkflow engine that must be met in order to execute this workflow step. If\nan implementation cannot satisfy all requirements, or a requirement is\nlisted which is not recognized by the implementation, it is a fatal\nerror and the implementation must not attempt to run the process,\nunless overridden at user option.", + "oneOf": [ + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CWLImportManual" + }, + { + "$ref": "#/definitions/CWLIncludeManual" + }, + { + "$ref": "#/definitions/InlineJavascriptRequirement" + }, + { + "$ref": "#/definitions/SchemaDefRequirement" + }, + { + "$ref": "#/definitions/LoadListingRequirement" + }, + { + "$ref": "#/definitions/DockerRequirement" + }, + { + "$ref": "#/definitions/SoftwareRequirement" + }, + { + "$ref": "#/definitions/InitialWorkDirRequirement" + }, + { + "$ref": "#/definitions/EnvVarRequirement" + }, + { + "$ref": "#/definitions/ShellCommandRequirement" + }, + { + "$ref": "#/definitions/ResourceRequirement" + }, + { + "$ref": "#/definitions/WorkReuse" + }, + { + "$ref": "#/definitions/NetworkAccess" + }, + { + "$ref": "#/definitions/InplaceUpdateRequirement" + }, + { + "$ref": "#/definitions/ToolTimeLimit" + }, + { + "$ref": "#/definitions/SubworkflowFeatureRequirement" + }, + { + "$ref": "#/definitions/ScatterFeatureRequirement" + }, + { + "$ref": "#/definitions/MultipleInputFeatureRequirement" + }, + { + "$ref": "#/definitions/StepInputExpressionRequirement" + } + ] + }, + "type": "array" + }, + { + "type": "object", + "properties": { + "InlineJavascriptRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InlineJavascriptRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SchemaDefRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SchemaDefRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "LoadListingRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/LoadListingRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "DockerRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/DockerRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SoftwareRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SoftwareRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "InitialWorkDirRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InitialWorkDirRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "EnvVarRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/EnvVarRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ShellCommandRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ShellCommandRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ResourceRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ResourceRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "WorkReuse": { + "anyOf": [ + { + "$ref": "#/definitions/WorkReuseMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "NetworkAccess": { + "anyOf": [ + { + "$ref": "#/definitions/NetworkAccessMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "InplaceUpdateRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/InplaceUpdateRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ToolTimeLimit": { + "anyOf": [ + { + "$ref": "#/definitions/ToolTimeLimitMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "SubworkflowFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/SubworkflowFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "ScatterFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/ScatterFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "MultipleInputFeatureRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/MultipleInputFeatureRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + }, + "StepInputExpressionRequirement": { + "anyOf": [ + { + "$ref": "#/definitions/StepInputExpressionRequirementMap" + }, + { + "type": "object", + "properties": {}, + "additionalProperties": false + } + ] + } + }, + "additionalProperties": false + } + ] + }, + "run": { + "anyOf": [ + { + "$ref": "#/definitions/CommandLineTool" + }, + { + "$ref": "#/definitions/ExpressionTool" + }, + { + "$ref": "#/definitions/Workflow" + }, + { + "$ref": "#/definitions/Operation" + }, + { + "type": "string" + } + ], + "description": "Specifies the process to run. If `run` is a string, it must be an absolute IRI\nor a relative path from the primary document." + }, + "scatter": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ] + }, + "scatterMethod": { + "description": "Required if `scatter` is an array of more than one element.", + "enum": [ + "dotproduct", + "flat_crossproduct", + "nested_crossproduct" + ], + "type": "string" + }, + "when": { + "description": "If defined, only run the step when the expression evaluates to\n`true`. If `false` the step is skipped. A skipped step\nproduces a `null` on each output.", + "type": "string" + } + }, + "required": [ + "in", + "out", + "run" + ], + "type": "object" + }, + "WorkflowStepInput": { + "additionalProperties": false, + "description": "The input of a workflow step connects an upstream parameter (from the\nworkflow inputs, or the outputs of other workflows steps) with the input\nparameters of the process specified by the `run` field. Only input parameters\ndeclared by the target process will be passed through at runtime to the process\nthough additional parameters may be specified (for use within `valueFrom`\nexpressions for instance) - unconnected or unused parameters do not represent an\nerror condition.\n\n# Input object\n\nA WorkflowStepInput object must contain an `id` field in the form\n`#fieldname` or `#prefix/fieldname`. When the `id` field contains a slash\n`/` the field name consists of the characters following the final slash\n(the prefix portion may contain one or more slashes to indicate scope).\nThis defines a field of the workflow step input object with the value of\nthe `source` parameter(s).\n\n# Merging multiple inbound data links\n\nTo merge multiple inbound data links,\n[MultipleInputFeatureRequirement](#MultipleInputFeatureRequirement) must be specified\nin the workflow or workflow step requirements.\n\nIf the sink parameter is an array, or named in a [workflow\nscatter](#WorkflowStep) operation, there may be multiple inbound\ndata links listed in the `source` field. The values from the\ninput links are merged depending on the method specified in the\n`linkMerge` field. If both `linkMerge` and `pickValue` are null\nor not specified, and there is more than one element in the\n`source` array, the default method is \"merge_nested\".\n\nIf both `linkMerge` and `pickValue` are null or not specified, and\nthere is only a single element in the `source`, then the input\nparameter takes the scalar value from the single input link (it is\n*not* wrapped in a single-list).\n\n* **merge_nested**\n\n The input must be an array consisting of exactly one entry for each\n input link. If \"merge_nested\" is specified with a single link, the value\n from the link must be wrapped in a single-item list.\n\n* **merge_flattened**\n\n 1. The source and sink parameters must be compatible types, or the source\n type must be compatible with single element from the \"items\" type of\n the destination array parameter.\n 2. Source parameters which are arrays are concatenated.\n Source parameters which are single element types are appended as\n single elements.\n\n# Picking non-null values among inbound data links\n\nIf present, `pickValue` specifies how to pick non-null values among inbound data links.\n\n`pickValue` is evaluated\n 1. Once all source values from upstream step or parameters are available.\n 2. After `linkMerge`.\n 3. Before `scatter` or `valueFrom`.\n\nThis is specifically intended to be useful in combination with\n[conditional execution](#WorkflowStep), where several upstream\nsteps may be connected to a single input (`source` is a list), and\nskipped steps produce null values.\n\nStatic type checkers should check for type consistency after inferring what the type\nwill be after `pickValue` is applied, just as they do currently for `linkMerge`.\n\n* **first_non_null**\n\n For the first level of a list input, pick the first non-null element. The result is a scalar.\n It is an error if there is no non-null element. Examples:\n * `[null, x, null, y] -> x`\n * `[null, [null], null, y] -> [null]`\n * `[null, null, null] -> Runtime Error`\n\n *Intended use case*: If-else pattern where the\n value comes either from a conditional step or from a default or\n fallback value. The conditional step(s) should be placed first in\n the list.\n\n* **the_only_non_null**\n\n For the first level of a list input, pick the single non-null element. The result is a scalar.\n It is an error if there is more than one non-null element. Examples:\n\n * `[null, x, null] -> x`\n * `[null, x, null, y] -> Runtime Error`\n * `[null, [null], null] -> [null]`\n * `[null, null, null] -> Runtime Error`\n\n *Intended use case*: Switch type patterns where developer considers\n more than one active code path as a workflow error\n (possibly indicating an error in writing `when` condition expressions).\n\n* **all_non_null**\n\n For the first level of a list input, pick all non-null values.\n The result is a list, which may be empty. Examples:\n\n * `[null, x, null] -> [x]`\n * `[x, null, y] -> [x, y]`\n * `[null, [x], [null]] -> [[x], [null]]`\n * `[null, null, null] -> []`\n\n *Intended use case*: It is valid to have more than one source, but\n sources are conditional, so null sources (from skipped steps)\n should be filtered out.", + "properties": { + "default": { + "description": "The default value for this parameter to use if either there is no\n`source` field, or the value produced by the `source` is `null`. The\ndefault must be applied prior to scattering or evaluating `valueFrom`." + }, + "id": { + "description": "The unique identifier for this object.", + "type": "string" + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "linkMerge": { + "description": "The method to use to merge multiple inbound links into a single array.\nIf not specified, the default method is \"merge_nested\".", + "enum": [ + "merge_flattened", + "merge_nested" + ], + "type": "string" + }, + "loadContents": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nIf true, the file (or each file in the array) must be a UTF-8\ntext file 64 KiB or smaller, and the implementation must read\nthe entire contents of the file (or file array) and place it\nin the `contents` field of the File object for use by\nexpressions. If the size of the file is greater than 64 KiB,\nthe implementation must raise a fatal error.", + "type": "boolean" + }, + "loadListing": { + "description": "Only valid when `type: Directory` or is an array of `items: Directory`.\n\nSpecify the desired behavior for loading the `listing` field of\na Directory object for use by expressions.\n\nThe order of precedence for loadListing is:\n\n 1. `loadListing` on an individual parameter\n 2. Inherited from `LoadListingRequirement`\n 3. By default: `no_listing`", + "enum": [ + "deep_listing", + "no_listing", + "shallow_listing" + ], + "type": "string" + }, + "pickValue": { + "description": "The method to use to choose non-null elements among multiple sources.", + "enum": [ + "all_non_null", + "first_non_null", + "the_only_non_null" + ], + "type": "string" + }, + "source": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Specifies one or more workflow parameters that will provide input to\nthe underlying step parameter." + }, + "valueFrom": { + "description": "To use valueFrom, [StepInputExpressionRequirement](#StepInputExpressionRequirement) must\nbe specified in the workflow or workflow step requirements.\n\nIf `valueFrom` is a constant string value, use this as the value for\nthis input parameter.\n\nIf `valueFrom` is a parameter reference or expression, it must be\nevaluated to yield the actual value to be assigned to the input field.\n\nThe `self` value in the parameter reference or expression must be\n1. `null` if there is no `source` field\n2. the value of the parameter(s) specified in the `source` field when this\nworkflow input parameter **is not** specified in this workflow step's `scatter` field.\n3. an element of the parameter specified in the `source` field when this workflow input\nparameter **is** specified in this workflow step's `scatter` field.\n\nThe value of `inputs` in the parameter reference or expression must be\nthe input object to the workflow step after assigning the `source`\nvalues, applying `default`, and then scattering. The order of\nevaluating `valueFrom` among step input parameters is undefined and the\nresult of evaluating `valueFrom` on a parameter must not be visible to\nevaluation of `valueFrom` on other parameters.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "WorkflowStepOutput": { + "additionalProperties": false, + "description": "Associate an output parameter of the underlying process with a workflow\nparameter. The workflow parameter (given in the `id` field) be may be used\nas a `source` to connect with input parameters of other workflow steps, or\nwith an output parameter of the process.\n\nA unique identifier for this workflow output parameter. This is\nthe identifier to use in the `source` field of `WorkflowStepInput`\nto connect the output value to downstream parameters.", + "properties": { + "id": { + "description": "The unique identifier for this object.", + "type": "string" + } + }, + "required": [], + "type": "object" + }, + "CWLImportManual": { + "description": "Represents an '$import' directive that should point toward another compatible CWL file to import where specified. The contents of the imported file should be relevant contextually where it is being imported", + "$comment": "The schema validation of the CWL will not itself perform the '$import' to resolve and validate its contents. Therefore, the complete schema will not be validated entirely, and could still be partially malformed. To ensure proper and exhaustive validation of a CWL definition with this schema, all '$import' directives should be resolved and extended beforehand", + "type": "object", + "properties": { + "$import": { + "type": "string" + } + }, + "required": [ + "$import" + ], + "additionalProperties": false + }, + "CWLIncludeManual": { + "description": "Represents an '$include' directive that should point toward another compatible CWL file to import where specified. The contents of the imported file should be relevant contextually where it is being imported", + "$comment": "The schema validation of the CWL will not itself perform the '$include' to resolve and validate its contents. Therefore, the complete schema will not be validated entirely, and could still be partially malformed. To ensure proper and exhaustive validation of a CWL definition with this schema, all '$include' directives should be resolved and extended beforehand", + "type": "object", + "properties": { + "$include": { + "type": "string" + } + }, + "required": [ + "$include" + ], + "additionalProperties": false + }, + "CWLDocumentMetadata": { + "description": "Metadata for a CWL document", + "type": "object", + "properties": { + "$namespaces": { + "description": "The namespaces used in the document", + "type": "object", + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "type": "string" + } + } + }, + "$schemas": { + "description": "The schemas used in the document", + "type": "array", + "items": { + "type": "string" + } + } + }, + "patternProperties": { + "^\\w+:.*$": { + "type": "object" + }, + "^\\w+:\\/\\/.*": { + "type": "object" + } + }, + "required": [] + }, + "CommandInputRecordFieldMap": { + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandInputRecordField", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "format": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nThis must be one or more IRIs of concept nodes\nthat represents file formats which are allowed as input to this\nparameter, preferably defined within an ontology. If no ontology is\navailable, file formats may be tested by exact match." + }, + "inputBinding": { + "$ref": "#/definitions/CommandLineBinding", + "description": "Describes how to turn this object into command line arguments." + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "loadContents": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nIf true, the file (or each file in the array) must be a UTF-8\ntext file 64 KiB or smaller, and the implementation must read\nthe entire contents of the file (or file array) and place it\nin the `contents` field of the File object for use by\nexpressions. If the size of the file is greater than 64 KiB,\nthe implementation must raise a fatal error.", + "type": "boolean" + }, + "loadListing": { + "description": "Only valid when `type: Directory` or is an array of `items: Directory`.\n\nSpecify the desired behavior for loading the `listing` field of\na Directory object for use by expressions.\n\nThe order of precedence for loadListing is:\n\n 1. `loadListing` on an individual parameter\n 2. Inherited from `LoadListingRequirement`\n 3. By default: `no_listing`", + "enum": [ + "deep_listing", + "no_listing", + "shallow_listing" + ], + "type": "string" + }, + "name": { + "description": "The name of the field", + "type": "string" + }, + "secondaryFiles": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFileSchema" + }, + { + "items": { + "$ref": "#/definitions/SecondaryFileSchema" + }, + "type": "array" + } + ], + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nProvides a pattern or expression specifying files or\ndirectories that should be included alongside the primary\nfile. Secondary files may be required or optional. When not\nexplicitly specified, secondary files specified for `inputs`\nare required and `outputs` are optional. An implementation\nmust include matching Files and Directories in the\n`secondaryFiles` property of the primary file. These Files\nand Directories must be transferred and staged alongside the\nprimary file. An implementation may fail workflow execution\nif a required secondary file does not exist.\n\nIf the value is an expression, the value of `self` in the expression\nmust be the primary input or output File object to which this binding\napplies. The `basename`, `nameroot` and `nameext` fields must be\npresent in `self`. For `CommandLineTool` outputs the `path` field must\nalso be present. The expression must return a filename string relative\nto the path to the primary File, a File or Directory object with either\n`path` or `location` and `basename` fields set, or an array consisting\nof strings or File or Directory objects. It is legal to reference an\nunchanged File or Directory object taken from input as a secondaryFile.\nThe expression may return \"null\" in which case there is no secondaryFile\nfrom that expression.\n\nTo work on non-filename-preserving storage systems, portable tool\ndescriptions should avoid constructing new values from `location`, but\nshould construct relative references using `basename` or `nameroot`\ninstead.\n\nIf a value in `secondaryFiles` is a string that is not an expression,\nit specifies that the following pattern should be applied to the path\nof the primary file to yield a filename relative to the primary File:\n\n 1. If string ends with `?` character, remove the last `?` and mark\n the resulting secondary file as optional.\n 2. If string begins with one or more caret `^` characters, for each\n caret, remove the last file extension from the path (the last\n period `.` and all following characters). If there are no file\n extensions, the path is unchanged.\n 3. Append the remainder of the string to the end of the file path." + }, + "streamable": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nA value of `true` indicates that the file is read or written\nsequentially without seeking. An implementation may use this flag to\nindicate whether it is valid to stream file contents using a named\npipe. Default: `false`.", + "type": "boolean" + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/CommandInputArraySchema" + }, + { + "$ref": "#/definitions/CommandInputRecordSchema" + }, + { + "$ref": "#/definitions/CommandInputEnumSchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CommandInputArraySchema" + }, + { + "$ref": "#/definitions/CommandInputRecordSchema" + }, + { + "$ref": "#/definitions/CommandInputEnumSchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The field type" + } + }, + "type": "object", + "required": [ + "type" + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CommandInputArraySchema" + }, + { + "$ref": "#/definitions/CommandInputRecordSchema" + }, + { + "$ref": "#/definitions/CommandInputEnumSchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CommandInputArraySchema" + }, + { + "$ref": "#/definitions/CommandInputRecordSchema" + }, + { + "$ref": "#/definitions/CommandInputEnumSchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The field type" + } + }, + { + "type": "string" + } + ] + }, + "InputRecordFieldMap": { + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#InputRecordField", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "format": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nThis must be one or more IRIs of concept nodes\nthat represents file formats which are allowed as input to this\nparameter, preferably defined within an ontology. If no ontology is\navailable, file formats may be tested by exact match." + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "loadContents": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nIf true, the file (or each file in the array) must be a UTF-8\ntext file 64 KiB or smaller, and the implementation must read\nthe entire contents of the file (or file array) and place it\nin the `contents` field of the File object for use by\nexpressions. If the size of the file is greater than 64 KiB,\nthe implementation must raise a fatal error.", + "type": "boolean" + }, + "loadListing": { + "description": "Only valid when `type: Directory` or is an array of `items: Directory`.\n\nSpecify the desired behavior for loading the `listing` field of\na Directory object for use by expressions.\n\nThe order of precedence for loadListing is:\n\n 1. `loadListing` on an individual parameter\n 2. Inherited from `LoadListingRequirement`\n 3. By default: `no_listing`", + "enum": [ + "deep_listing", + "no_listing", + "shallow_listing" + ], + "type": "string" + }, + "name": { + "description": "The name of the field", + "type": "string" + }, + "secondaryFiles": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFileSchema" + }, + { + "items": { + "$ref": "#/definitions/SecondaryFileSchema" + }, + "type": "array" + } + ], + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nProvides a pattern or expression specifying files or\ndirectories that should be included alongside the primary\nfile. Secondary files may be required or optional. When not\nexplicitly specified, secondary files specified for `inputs`\nare required and `outputs` are optional. An implementation\nmust include matching Files and Directories in the\n`secondaryFiles` property of the primary file. These Files\nand Directories must be transferred and staged alongside the\nprimary file. An implementation may fail workflow execution\nif a required secondary file does not exist.\n\nIf the value is an expression, the value of `self` in the expression\nmust be the primary input or output File object to which this binding\napplies. The `basename`, `nameroot` and `nameext` fields must be\npresent in `self`. For `CommandLineTool` outputs the `path` field must\nalso be present. The expression must return a filename string relative\nto the path to the primary File, a File or Directory object with either\n`path` or `location` and `basename` fields set, or an array consisting\nof strings or File or Directory objects. It is legal to reference an\nunchanged File or Directory object taken from input as a secondaryFile.\nThe expression may return \"null\" in which case there is no secondaryFile\nfrom that expression.\n\nTo work on non-filename-preserving storage systems, portable tool\ndescriptions should avoid constructing new values from `location`, but\nshould construct relative references using `basename` or `nameroot`\ninstead.\n\nIf a value in `secondaryFiles` is a string that is not an expression,\nit specifies that the following pattern should be applied to the path\nof the primary file to yield a filename relative to the primary File:\n\n 1. If string ends with `?` character, remove the last `?` and mark\n the resulting secondary file as optional.\n 2. If string begins with one or more caret `^` characters, for each\n caret, remove the last file extension from the path (the last\n period `.` and all following characters). If there are no file\n extensions, the path is unchanged.\n 3. Append the remainder of the string to the end of the file path." + }, + "streamable": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nA value of `true` indicates that the file is read or written\nsequentially without seeking. An implementation may use this flag to\nindicate whether it is valid to stream file contents using a named\npipe. Default: `false`.", + "type": "boolean" + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/InputRecordSchema" + }, + { + "$ref": "#/definitions/InputEnumSchema" + }, + { + "$ref": "#/definitions/InputArraySchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/InputRecordSchema" + }, + { + "$ref": "#/definitions/InputEnumSchema" + }, + { + "$ref": "#/definitions/InputArraySchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The field type" + } + }, + "type": "object", + "required": [ + "type" + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/InputRecordSchema" + }, + { + "$ref": "#/definitions/InputEnumSchema" + }, + { + "$ref": "#/definitions/InputArraySchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/InputRecordSchema" + }, + { + "$ref": "#/definitions/InputEnumSchema" + }, + { + "$ref": "#/definitions/InputArraySchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The field type" + } + }, + { + "type": "string" + } + ] + }, + "CommandOutputRecordFieldMap": { + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandOutputRecordField", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "format": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nThis is the file format that will be assigned to the output\nFile object.", + "type": "string" + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "name": { + "description": "The name of the field", + "type": "string" + }, + "outputBinding": { + "$ref": "#/definitions/CommandOutputBinding", + "description": "Describes how to generate this output object based on the files\nproduced by a CommandLineTool" + }, + "secondaryFiles": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFileSchema" + }, + { + "items": { + "$ref": "#/definitions/SecondaryFileSchema" + }, + "type": "array" + } + ], + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nProvides a pattern or expression specifying files or\ndirectories that should be included alongside the primary\nfile. Secondary files may be required or optional. When not\nexplicitly specified, secondary files specified for `inputs`\nare required and `outputs` are optional. An implementation\nmust include matching Files and Directories in the\n`secondaryFiles` property of the primary file. These Files\nand Directories must be transferred and staged alongside the\nprimary file. An implementation may fail workflow execution\nif a required secondary file does not exist.\n\nIf the value is an expression, the value of `self` in the expression\nmust be the primary input or output File object to which this binding\napplies. The `basename`, `nameroot` and `nameext` fields must be\npresent in `self`. For `CommandLineTool` outputs the `path` field must\nalso be present. The expression must return a filename string relative\nto the path to the primary File, a File or Directory object with either\n`path` or `location` and `basename` fields set, or an array consisting\nof strings or File or Directory objects. It is legal to reference an\nunchanged File or Directory object taken from input as a secondaryFile.\nThe expression may return \"null\" in which case there is no secondaryFile\nfrom that expression.\n\nTo work on non-filename-preserving storage systems, portable tool\ndescriptions should avoid constructing new values from `location`, but\nshould construct relative references using `basename` or `nameroot`\ninstead.\n\nIf a value in `secondaryFiles` is a string that is not an expression,\nit specifies that the following pattern should be applied to the path\nof the primary file to yield a filename relative to the primary File:\n\n 1. If string ends with `?` character, remove the last `?` and mark\n the resulting secondary file as optional.\n 2. If string begins with one or more caret `^` characters, for each\n caret, remove the last file extension from the path (the last\n period `.` and all following characters). If there are no file\n extensions, the path is unchanged.\n 3. Append the remainder of the string to the end of the file path." + }, + "streamable": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nA value of `true` indicates that the file is read or written\nsequentially without seeking. An implementation may use this flag to\nindicate whether it is valid to stream file contents using a named\npipe. Default: `false`.", + "type": "boolean" + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/CommandOutputArraySchema" + }, + { + "$ref": "#/definitions/CommandOutputRecordSchema" + }, + { + "$ref": "#/definitions/CommandOutputEnumSchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CommandOutputArraySchema" + }, + { + "$ref": "#/definitions/CommandOutputRecordSchema" + }, + { + "$ref": "#/definitions/CommandOutputEnumSchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The field type" + } + }, + "type": "object", + "required": [ + "type" + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CommandOutputArraySchema" + }, + { + "$ref": "#/definitions/CommandOutputRecordSchema" + }, + { + "$ref": "#/definitions/CommandOutputEnumSchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/CommandOutputArraySchema" + }, + { + "$ref": "#/definitions/CommandOutputRecordSchema" + }, + { + "$ref": "#/definitions/CommandOutputEnumSchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The field type" + } + }, + { + "type": "string" + } + ] + }, + "OutputRecordFieldMap": { + "description": "Auto-generated class implementation for https://w3id.org/cwl/cwl#OutputRecordField", + "oneOf": [ + { + "additionalProperties": false, + "properties": { + "doc": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "A documentation string for this object, or an array of strings which should be concatenated." + }, + "format": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nThis is the file format that will be assigned to the output\nFile object.", + "type": "string" + }, + "label": { + "description": "A short, human-readable label of this object.", + "type": "string" + }, + "name": { + "description": "The name of the field", + "type": "string" + }, + "secondaryFiles": { + "anyOf": [ + { + "$ref": "#/definitions/SecondaryFileSchema" + }, + { + "items": { + "$ref": "#/definitions/SecondaryFileSchema" + }, + "type": "array" + } + ], + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nProvides a pattern or expression specifying files or\ndirectories that should be included alongside the primary\nfile. Secondary files may be required or optional. When not\nexplicitly specified, secondary files specified for `inputs`\nare required and `outputs` are optional. An implementation\nmust include matching Files and Directories in the\n`secondaryFiles` property of the primary file. These Files\nand Directories must be transferred and staged alongside the\nprimary file. An implementation may fail workflow execution\nif a required secondary file does not exist.\n\nIf the value is an expression, the value of `self` in the expression\nmust be the primary input or output File object to which this binding\napplies. The `basename`, `nameroot` and `nameext` fields must be\npresent in `self`. For `CommandLineTool` outputs the `path` field must\nalso be present. The expression must return a filename string relative\nto the path to the primary File, a File or Directory object with either\n`path` or `location` and `basename` fields set, or an array consisting\nof strings or File or Directory objects. It is legal to reference an\nunchanged File or Directory object taken from input as a secondaryFile.\nThe expression may return \"null\" in which case there is no secondaryFile\nfrom that expression.\n\nTo work on non-filename-preserving storage systems, portable tool\ndescriptions should avoid constructing new values from `location`, but\nshould construct relative references using `basename` or `nameroot`\ninstead.\n\nIf a value in `secondaryFiles` is a string that is not an expression,\nit specifies that the following pattern should be applied to the path\nof the primary file to yield a filename relative to the primary File:\n\n 1. If string ends with `?` character, remove the last `?` and mark\n the resulting secondary file as optional.\n 2. If string begins with one or more caret `^` characters, for each\n caret, remove the last file extension from the path (the last\n period `.` and all following characters). If there are no file\n extensions, the path is unchanged.\n 3. Append the remainder of the string to the end of the file path." + }, + "streamable": { + "description": "Only valid when `type: File` or is an array of `items: File`.\n\nA value of `true` indicates that the file is read or written\nsequentially without seeking. An implementation may use this flag to\nindicate whether it is valid to stream file contents using a named\npipe. Default: `false`.", + "type": "boolean" + }, + "type": { + "anyOf": [ + { + "$ref": "#/definitions/OutputRecordSchema" + }, + { + "$ref": "#/definitions/OutputEnumSchema" + }, + { + "$ref": "#/definitions/OutputArraySchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/OutputRecordSchema" + }, + { + "$ref": "#/definitions/OutputEnumSchema" + }, + { + "$ref": "#/definitions/OutputArraySchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The field type" + } + }, + "type": "object", + "required": [ + "type" + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/OutputRecordSchema" + }, + { + "$ref": "#/definitions/OutputEnumSchema" + }, + { + "$ref": "#/definitions/OutputArraySchema" + }, + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/OutputRecordSchema" + }, + { + "$ref": "#/definitions/OutputEnumSchema" + }, + { + "$ref": "#/definitions/OutputArraySchema" + }, + { + "type": "string" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The field type" + } + }, + { + "type": "string" + } + ] + }, + "InlineJavascriptRequirementMap": { + "type": "object", + "properties": { + "expressionLib": { + "description": "Additional code fragments that will also be inserted\nbefore executing the expression code. Allows for function definitions that may\nbe called from CWL expressions.", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "$ref": "#/definitions/CWLImportManual" + }, + { + "$ref": "#/definitions/CWLIncludeManual" + } + ] + }, + "type": "array" + } + }, + "required": [], + "description": "Indicates that the workflow platform must support inline Javascript expressions.\nIf this requirement is not present, the workflow platform must not perform expression\ninterpolation." + }, + "SchemaDefRequirementMap": { + "type": "object", + "properties": { + "types": { + "description": "The list of type definitions.", + "items": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/CommandInputArraySchema" + }, + { + "$ref": "#/definitions/CommandInputRecordSchema" + }, + { + "$ref": "#/definitions/CommandInputEnumSchema" + } + ] + }, + { + "$ref": "#/definitions/CWLImportManual" + }, + { + "$ref": "#/definitions/CWLIncludeManual" + } + ] + }, + "type": "array" + } + }, + "required": [ + "types" + ], + "description": "This field consists of an array of type definitions which must be used when\ninterpreting the `inputs` and `outputs` fields. When a `type` field\ncontains a IRI, the implementation must check if the type is defined in\n`schemaDefs` and use that definition. If the type is not found in\n`schemaDefs`, it is an error. The entries in `schemaDefs` must be\nprocessed in the order listed such that later schema definitions may refer\nto earlier schema definitions.\n\n- **Type definitions are allowed for `enum` and `record` types only.**\n- Type definitions may be shared by defining them in a file and then\n `$include`-ing them in the `types` field.\n- A file can contain a list of type definitions" + }, + "LoadListingRequirementMap": { + "type": "object", + "properties": { + "loadListing": { + "enum": [ + "deep_listing", + "no_listing", + "shallow_listing" + ], + "type": "string" + } + }, + "required": [], + "description": "Specify the desired behavior for loading the `listing` field of\na Directory object for use by expressions." + }, + "DockerRequirementMap": { + "type": "object", + "properties": { + "dockerFile": { + "description": "Supply the contents of a Dockerfile which will be built using `docker build`.", + "type": "string" + }, + "dockerImageId": { + "description": "The image id that will be used for `docker run`. May be a\nhuman-readable image name or the image identifier hash. May be skipped\nif `dockerPull` is specified, in which case the `dockerPull` image id\nmust be used.", + "type": "string" + }, + "dockerImport": { + "description": "Provide HTTP URL to download and gunzip a Docker images using `docker import.", + "type": "string" + }, + "dockerLoad": { + "description": "Specify an HTTP URL from which to download a Docker image using `docker load`.", + "type": "string" + }, + "dockerOutputDirectory": { + "description": "Set the designated output directory to a specific location inside the\nDocker container.", + "type": "string" + }, + "dockerPull": { + "description": "Specify a Docker image to retrieve using `docker pull`. Can contain the\nimmutable digest to ensure an exact container is used:\n`dockerPull: ubuntu@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2`", + "type": "string" + } + }, + "required": [], + "description": "Indicates that a workflow component should be run in a\n[Docker](https://docker.com) or Docker-compatible (such as\n[Singularity](https://www.sylabs.io/) and [udocker](https://github.com/indigo-dc/udocker)) container environment and\nspecifies how to fetch or build the image.\n\nIf a CommandLineTool lists `DockerRequirement` under\n`hints` (or `requirements`), it may (or must) be run in the specified Docker\ncontainer.\n\nThe platform must first acquire or install the correct Docker image as\nspecified by `dockerPull`, `dockerImport`, `dockerLoad` or `dockerFile`.\n\nThe platform must execute the tool in the container using `docker run` with\nthe appropriate Docker image and tool command line.\n\nThe workflow platform may provide input files and the designated output\ndirectory through the use of volume bind mounts. The platform should rewrite\nfile paths in the input object to correspond to the Docker bind mounted\nlocations. That is, the platform should rewrite values in the parameter context\nsuch as `runtime.outdir`, `runtime.tmpdir` and others to be valid paths\nwithin the container. The platform must ensure that `runtime.outdir` and\n`runtime.tmpdir` are distinct directories.\n\nWhen running a tool contained in Docker, the workflow platform must not\nassume anything about the contents of the Docker container, such as the\npresence or absence of specific software, except to assume that the\ngenerated command line represents a valid command within the runtime\nenvironment of the container.\n\nA container image may specify an\n[ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint)\nand/or\n[CMD](https://docs.docker.com/engine/reference/builder/#cmd).\nCommand line arguments will be appended after all elements of\nENTRYPOINT, and will override all elements specified using CMD (in\nother words, CMD is only used when the CommandLineTool definition\nproduces an empty command line).\n\nUse of implicit ENTRYPOINT or CMD are discouraged due to reproducibility\nconcerns of the implicit hidden execution point (For further discussion, see\n[https://doi.org/10.12688/f1000research.15140.1](https://doi.org/10.12688/f1000research.15140.1)). Portable\nCommandLineTool wrappers in which use of a container is optional must not rely on ENTRYPOINT or CMD.\nCommandLineTools which do rely on ENTRYPOINT or CMD must list `DockerRequirement` in the\n`requirements` section.\n\n## Interaction with other requirements\n\nIf [EnvVarRequirement](#EnvVarRequirement) is specified alongside a\nDockerRequirement, the environment variables must be provided to Docker\nusing `--env` or `--env-file` and interact with the container's preexisting\nenvironment as defined by Docker." + }, + "SoftwareRequirementMap": { + "type": "object", + "properties": { + "packages": { + "description": "The list of software to be configured.", + "items": { + "anyOf": [ + { + "$ref": "#/definitions/SoftwarePackage" + }, + { + "$ref": "#/definitions/CWLImportManual" + }, + { + "$ref": "#/definitions/CWLIncludeManual" + } + ] + }, + "type": "array" + } + }, + "required": [ + "packages" + ], + "description": "A list of software packages that should be configured in the environment of\nthe defined process." + }, + "InitialWorkDirRequirementMap": { + "type": "object", + "properties": { + "listing": { + "anyOf": [ + { + "items": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/File" + }, + { + "$ref": "#/definitions/Directory" + }, + { + "items": { + "anyOf": [ + { + "anyOf": [ + { + "$ref": "#/definitions/File" + }, + { + "$ref": "#/definitions/Directory" + } + ] + }, + { + "$ref": "#/definitions/CWLImportManual" + }, + { + "$ref": "#/definitions/CWLIncludeManual" + } + ] + }, + "type": "array" + }, + { + "$ref": "#/definitions/Dirent" + }, + { + "type": "string" + } + ] + }, + { + "$ref": "#/definitions/CWLImportManual" + }, + { + "$ref": "#/definitions/CWLIncludeManual" + } + ] + }, + "type": "array" + }, + { + "type": "string" + } + ], + "description": "The list of files or subdirectories that must be staged prior\nto executing the command line tool.\n\nReturn type of each expression must validate as `[\"null\",\nFile, Directory, Dirent, {type: array, items: [File,\nDirectory]}]`.\n\nEach `File` or `Directory` that is returned by an Expression\nmust be added to the designated output directory prior to\nexecuting the tool.\n\nEach `Dirent` record that is listed or returned by an\nexpression specifies a file to be created or staged in the\ndesignated output directory prior to executing the tool.\n\nExpressions may return null, in which case they have no effect.\n\nFiles or Directories which are listed in the input parameters\nand appear in the `InitialWorkDirRequirement` listing must\nhave their `path` set to their staged location. If the same\nFile or Directory appears more than once in the\n`InitialWorkDirRequirement` listing, the implementation must\nchoose exactly one value for `path`; how this value is chosen\nis undefined." + } + }, + "required": [], + "description": "Define a list of files and subdirectories that must be staged by the workflow platform prior to executing the command line tool.\nNormally files are staged within the designated output directory. However, when running inside containers, files may be staged at arbitrary locations, see discussion for [`Dirent.entryname`](#Dirent). Together with `DockerRequirement.dockerOutputDirectory` it is possible to control the locations of both input and output files when running in containers." + }, + "EnvVarRequirementMap": { + "type": "object", + "properties": { + "envDef": { + "description": "The list of environment variables.", + "oneOf": [ + { + "items": { + "anyOf": [ + { + "$ref": "#/definitions/EnvironmentDef" + }, + { + "$ref": "#/definitions/CWLImportManual" + }, + { + "$ref": "#/definitions/CWLIncludeManual" + } + ] + }, + "type": "array" + }, + { + "patternProperties": { + "^[_a-zA-Z][a-zA-Z0-9_-]*$": { + "type": "string" + } + } + } + ] + } + }, + "required": [ + "envDef" + ], + "description": "Define a list of environment variables which will be set in the\nexecution environment of the tool. See `EnvironmentDef` for details." + }, + "ShellCommandRequirementMap": { + "type": "object", + "properties": {}, + "required": [], + "description": "Modify the behavior of CommandLineTool to generate a single string\ncontaining a shell command line. Each item in the `arguments` list must\nbe joined into a string separated by single spaces and quoted to prevent\nintepretation by the shell, unless `CommandLineBinding` for that argument\ncontains `shellQuote: false`. If `shellQuote: false` is specified, the\nargument is joined into the command string without quoting, which allows\nthe use of shell metacharacters such as `|` for pipes." + }, + "ResourceRequirementMap": { + "type": "object", + "properties": { + "coresMax": { + "description": "Maximum reserved number of CPU cores.\n\nSee `coresMin` for discussion about fractional CPU requests.", + "type": [ + "string", + "number" + ] + }, + "coresMin": { + "description": "Minimum reserved number of CPU cores (default is 1).\n\nMay be a fractional value to indicate to a scheduling\nalgorithm that one core can be allocated to multiple\njobs. For example, a value of 0.25 indicates that up to 4\njobs may run in parallel on 1 core. A value of 1.25 means\nthat up to 3 jobs can run on a 4 core system (4/1.25 \u2248 3).\n\nProcesses can only share a core allocation if the sum of each\nof their `ramMax`, `tmpdirMax`, and `outdirMax` requests also\ndo not exceed the capacity of the node.\n\nProcesses sharing a core must have the same level of isolation\n(typically a container or VM) that they would normally.\n\nThe reported number of CPU cores reserved for the process,\nwhich is available to expressions on the CommandLineTool as\n`runtime.cores`, must be a non-zero integer, and may be\ncalculated by rounding up the cores request to the next whole\nnumber.\n\nScheduling systems may allocate fractional CPU resources by\nsetting quotas or scheduling weights. Scheduling systems that\ndo not support fractional CPUs may round up the request to the\nnext whole number.", + "type": [ + "string", + "number" + ] + }, + "outdirMax": { + "description": "Maximum reserved filesystem based storage for the designated output directory, in mebibytes (2**20)\n\nSee `outdirMin` for discussion about fractional storage requests.", + "type": [ + "string", + "number" + ] + }, + "outdirMin": { + "description": "Minimum reserved filesystem based storage for the designated output directory, in mebibytes (2**20) (default is 1024)\n\nMay be a fractional value. If so, the actual storage request\nmust be rounded up to the next whole number. The reported\namount of storage reserved for the process, which is available\nto expressions on the CommandLineTool as `runtime.outdirSize`,\nmust be a non-zero integer.", + "type": [ + "string", + "number" + ] + }, + "ramMax": { + "description": "Maximum reserved RAM in mebibytes (2**20)\n\nSee `ramMin` for discussion about fractional RAM requests.", + "type": [ + "string", + "number" + ] + }, + "ramMin": { + "description": "Minimum reserved RAM in mebibytes (2**20) (default is 256)\n\nMay be a fractional value. If so, the actual RAM request must\nbe rounded up to the next whole number. The reported amount of\nRAM reserved for the process, which is available to\nexpressions on the CommandLineTool as `runtime.ram`, must be a\nnon-zero integer.", + "type": [ + "string", + "number" + ] + }, + "tmpdirMax": { + "description": "Maximum reserved filesystem based storage for the designated temporary directory, in mebibytes (2**20)\n\nSee `tmpdirMin` for discussion about fractional storage requests.", + "type": [ + "string", + "number" + ] + }, + "tmpdirMin": { + "description": "Minimum reserved filesystem based storage for the designated temporary directory, in mebibytes (2**20) (default is 1024)\n\nMay be a fractional value. If so, the actual storage request\nmust be rounded up to the next whole number. The reported\namount of storage reserved for the process, which is available\nto expressions on the CommandLineTool as `runtime.tmpdirSize`,\nmust be a non-zero integer.", + "type": [ + "string", + "number" + ] + } + }, + "required": [], + "description": "Specify basic hardware resource requirements.\n\n\"min\" is the minimum amount of a resource that must be reserved to\nschedule a job. If \"min\" cannot be satisfied, the job should not\nbe run.\n\n\"max\" is the maximum amount of a resource that the job shall be\nallocated. If a node has sufficient resources, multiple jobs may\nbe scheduled on a single node provided each job's \"max\" resource\nrequirements are met. If a job attempts to exceed its resource\nallocation, an implementation may deny additional resources, which\nmay result in job failure.\n\nIf both \"min\" and \"max\" are specified, an implementation may\nchoose to allocate any amount between \"min\" and \"max\", with the\nactual allocation provided in the `runtime` object.\n\nIf \"min\" is specified but \"max\" is not, then \"max\" == \"min\"\nIf \"max\" is specified by \"min\" is not, then \"min\" == \"max\".\n\nIt is an error if max < min.\n\nIt is an error if the value of any of these fields is negative.\n\nIf neither \"min\" nor \"max\" is specified for a resource, use the default values below." + }, + "WorkReuseMap": { + "type": "object", + "properties": { + "enableReuse": { + "type": [ + "string", + "boolean" + ] + } + }, + "required": [ + "enableReuse" + ], + "description": "For implementations that support reusing output from past work (on\nthe assumption that same code and same input produce same\nresults), control whether to enable or disable the reuse behavior\nfor a particular tool or step (to accommodate situations where that\nassumption is incorrect). A reused step is not executed but\ninstead returns the same output as the original execution.\n\nIf `WorkReuse` is not specified, correct tools should assume it\nis enabled by default." + }, + "NetworkAccessMap": { + "type": "object", + "properties": { + "networkAccess": { + "type": [ + "string", + "boolean" + ] + } + }, + "required": [ + "networkAccess" + ], + "description": "Indicate whether a process requires outgoing IPv4/IPv6 network\naccess. Choice of IPv4 or IPv6 is implementation and site\nspecific, correct tools must support both.\n\nIf `networkAccess` is false or not specified, tools must not\nassume network access, except for localhost (the loopback device).\n\nIf `networkAccess` is true, the tool must be able to make outgoing\nconnections to network resources. Resources may be on a private\nsubnet or the public Internet. However, implementations and sites\nmay apply their own security policies to restrict what is\naccessible by the tool.\n\nEnabling network access does not imply a publicly routable IP\naddress or the ability to accept inbound connections." + }, + "InplaceUpdateRequirementMap": { + "type": "object", + "properties": { + "inplaceUpdate": { + "type": "boolean" + } + }, + "required": [ + "inplaceUpdate" + ], + "description": "\nIf `inplaceUpdate` is true, then an implementation supporting this\nfeature may permit tools to directly update files with `writable:\ntrue` in InitialWorkDirRequirement. That is, as an optimization,\nfiles may be destructively modified in place as opposed to copied\nand updated.\n\nAn implementation must ensure that only one workflow step may\naccess a writable file at a time. It is an error if a file which\nis writable by one workflow step file is accessed (for reading or\nwriting) by any other workflow step running independently.\nHowever, a file which has been updated in a previous completed\nstep may be used as input to multiple steps, provided it is\nread-only in every step.\n\nWorkflow steps which modify a file must produce the modified file\nas output. Downstream steps which further process the file must\nuse the output of previous steps, and not refer to a common input\n(this is necessary for both ordering and correctness).\n\nWorkflow authors should provide this in the `hints` section. The\nintent of this feature is that workflows produce the same results\nwhether or not InplaceUpdateRequirement is supported by the\nimplementation, and this feature is primarily available as an\noptimization for particular environments.\n\nUsers and implementers should be aware that workflows that\ndestructively modify inputs may not be repeatable or reproducible.\nIn particular, enabling this feature implies that WorkReuse should\nnot be enabled." + }, + "ToolTimeLimitMap": { + "type": "object", + "properties": { + "timelimit": { + "description": "The time limit, in seconds. A time limit of zero means no\ntime limit. Negative time limits are an error.", + "type": [ + "string", + "number" + ] + } + }, + "required": [ + "timelimit" + ], + "description": "Set an upper limit on the execution time of a CommandLineTool.\nA CommandLineTool whose execution duration exceeds the time\nlimit may be preemptively terminated and considered failed.\nMay also be used by batch systems to make scheduling decisions.\nThe execution duration excludes external operations, such as\nstaging of files, pulling a docker image etc, and only counts\nwall-time for the execution of the command line itself." + }, + "SubworkflowFeatureRequirementMap": { + "type": "object", + "properties": {}, + "required": [], + "description": "Indicates that the workflow platform must support nested workflows in\nthe `run` field of [WorkflowStep](#WorkflowStep)." + }, + "ScatterFeatureRequirementMap": { + "type": "object", + "properties": {}, + "required": [], + "description": "Indicates that the workflow platform must support the `scatter` and\n`scatterMethod` fields of [WorkflowStep](#WorkflowStep)." + }, + "MultipleInputFeatureRequirementMap": { + "type": "object", + "properties": {}, + "required": [], + "description": "Indicates that the workflow platform must support multiple inbound data links\nlisted in the `source` field of [WorkflowStepInput](#WorkflowStepInput)." + }, + "StepInputExpressionRequirementMap": { + "type": "object", + "properties": {}, + "required": [], + "description": "Indicate that the workflow platform must support the `valueFrom` field\nof [WorkflowStepInput](#WorkflowStepInput)." + }, + "CWLFile": { + "type": "object", + "allOf": [ + { + "oneOf": [ + { + "$ref": "#/definitions/Workflow" + }, + { + "$ref": "#/definitions/CommandLineTool" + }, + { + "$ref": "#/definitions/ExpressionTool" + } + ] + }, + { + "oneOf": [ + { + "$ref": "#/definitions/CWLDocumentMetadata" + } + ] + } + ], + "properties": { + "permanentFailCodes": true, + "cwlVersion": true, + "$namespaces": true, + "stdout": true, + "stderr": true, + "outputs": true, + "$schemas": true, + "hints": true, + "baseCommand": true, + "id": true, + "successCodes": true, + "expression": true, + "steps": true, + "class": true, + "stdin": true, + "label": true, + "requirements": true, + "intent": true, + "temporaryFailCodes": true, + "arguments": true, + "doc": true, + "inputs": true + }, + "patternProperties": { + "^\\w+:.*$": { + "type": "object" + }, + "^\\w+:\\/\\/.*": { + "type": "object" + } + }, + "additionalProperties": false + }, + "CWLGraph": { + "type": "object", + "properties": { + "$graph": { + "type": "array", + "items": { + "$ref": "#/definitions/CWLFile" + } + }, + "cwlVersion": { + "description": "CWL document version. Always required at the document root. Not\nrequired for a Process embedded inside another Process.", + "enum": [ + "draft-2", + "draft-3", + "draft-3.dev1", + "draft-3.dev2", + "draft-3.dev3", + "draft-3.dev4", + "draft-3.dev5", + "draft-4.dev1", + "draft-4.dev2", + "draft-4.dev3", + "v1.0", + "v1.0.dev4", + "v1.1", + "v1.1.0-dev1", + "v1.2", + "v1.2.0-dev1", + "v1.2.0-dev2", + "v1.2.0-dev3", + "v1.2.0-dev4", + "v1.2.0-dev5" + ], + "type": "string" + } + }, + "required": [ + "$graph" + ] + }, + "CWLGraphOrFile": { + "type": "object", + "additionalProperties": false, + "allOf": [ + { + "oneOf": [ + { + "$ref": "#/definitions/CWLGraph" + }, + { + "$ref": "#/definitions/CWLFile" + } + ] + }, + { + "$ref": "#/definitions/CWLDocumentMetadata" + } + ], + "properties": { + "permanentFailCodes": true, + "cwlVersion": true, + "$namespaces": true, + "stdout": true, + "stderr": true, + "outputs": true, + "$schemas": true, + "hints": true, + "$graph": true, + "baseCommand": true, + "id": true, + "successCodes": true, + "expression": true, + "steps": true, + "class": true, + "stdin": true, + "label": true, + "requirements": true, + "intent": true, + "temporaryFailCodes": true, + "arguments": true, + "doc": true, + "inputs": true + }, + "patternProperties": { + "^\\w+:.*$": { + "type": "object" + }, + "^\\w+:\\/\\/.*": { + "type": "object" + } + } + } + } +} \ No newline at end of file diff --git a/json_schemas/cwl_schema.yaml b/json_schemas/cwl_schema.yaml new file mode 100644 index 0000000..75e1fc6 --- /dev/null +++ b/json_schemas/cwl_schema.yaml @@ -0,0 +1,6830 @@ +$ref: '#/definitions/CWLGraphOrFile' +$schema: http://json-schema.org/draft-07/schema# +definitions: + CommandInputArraySchema: + additionalProperties: false + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandInputArraySchema + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + inputBinding: + $ref: '#/definitions/CommandLineBinding' + description: Describes how to turn this object into command line arguments. + items: + anyOf: + - $ref: '#/definitions/CommandInputArraySchema' + - $ref: '#/definitions/CommandInputRecordSchema' + - $ref: '#/definitions/CommandInputEnumSchema' + - items: + anyOf: + - $ref: '#/definitions/CommandInputArraySchema' + - $ref: '#/definitions/CommandInputRecordSchema' + - $ref: '#/definitions/CommandInputEnumSchema' + - type: string + type: array + - type: string + description: Defines the type of the array elements. + label: + description: A short, human-readable label of this object. + type: string + name: + description: The identifier for this type + type: string + type: + const: array + description: Must be `array` + type: string + required: + - items + - type + type: object + CommandInputEnumSchema: + additionalProperties: false + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandInputEnumSchema + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + inputBinding: + $ref: '#/definitions/CommandLineBinding' + description: Describes how to turn this object into command line arguments. + label: + description: A short, human-readable label of this object. + type: string + name: + description: The identifier for this type + type: string + symbols: + description: Defines the set of valid symbols. + items: + type: string + type: array + type: + const: enum + description: Must be `enum` + type: string + required: + - symbols + - type + type: object + CommandInputParameter: + additionalProperties: false + description: An input parameter for a CommandLineTool. + properties: + default: + description: |- + The default value to use for this parameter if the parameter is missing + from the input object, or if the value of the parameter in the input + object is `null`. Default values are applied before evaluating expressions + (e.g. dependent `valueFrom` fields). + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + format: + anyOf: + - items: + type: string + type: array + - type: string + description: |- + Only valid when `type: File` or is an array of `items: File`. + + This must be one or more IRIs of concept nodes + that represents file formats which are allowed as input to this + parameter, preferably defined within an ontology. If no ontology is + available, file formats may be tested by exact match. + id: + description: The unique identifier for this object. + type: string + inputBinding: + $ref: '#/definitions/CommandLineBinding' + description: |- + Describes how to turn the input parameters of a process into + command line arguments. + label: + description: A short, human-readable label of this object. + type: string + loadContents: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + If true, the file (or each file in the array) must be a UTF-8 + text file 64 KiB or smaller, and the implementation must read + the entire contents of the file (or file array) and place it + in the `contents` field of the File object for use by + expressions. If the size of the file is greater than 64 KiB, + the implementation must raise a fatal error. + type: boolean + loadListing: + description: |- + Only valid when `type: Directory` or is an array of `items: Directory`. + + Specify the desired behavior for loading the `listing` field of + a Directory object for use by expressions. + + The order of precedence for loadListing is: + + 1. `loadListing` on an individual parameter + 2. Inherited from `LoadListingRequirement` + 3. By default: `no_listing` + enum: + - deep_listing + - no_listing + - shallow_listing + type: string + secondaryFiles: + anyOf: + - $ref: '#/definitions/SecondaryFileSchema' + - items: + $ref: '#/definitions/SecondaryFileSchema' + type: array + description: |- + Only valid when `type: File` or is an array of `items: File`. + + Provides a pattern or expression specifying files or + directories that should be included alongside the primary + file. Secondary files may be required or optional. When not + explicitly specified, secondary files specified for `inputs` + are required and `outputs` are optional. An implementation + must include matching Files and Directories in the + `secondaryFiles` property of the primary file. These Files + and Directories must be transferred and staged alongside the + primary file. An implementation may fail workflow execution + if a required secondary file does not exist. + + If the value is an expression, the value of `self` in the expression + must be the primary input or output File object to which this binding + applies. The `basename`, `nameroot` and `nameext` fields must be + present in `self`. For `CommandLineTool` outputs the `path` field must + also be present. The expression must return a filename string relative + to the path to the primary File, a File or Directory object with either + `path` or `location` and `basename` fields set, or an array consisting + of strings or File or Directory objects. It is legal to reference an + unchanged File or Directory object taken from input as a secondaryFile. + The expression may return "null" in which case there is no secondaryFile + from that expression. + + To work on non-filename-preserving storage systems, portable tool + descriptions should avoid constructing new values from `location`, but + should construct relative references using `basename` or `nameroot` + instead. + + If a value in `secondaryFiles` is a string that is not an expression, + it specifies that the following pattern should be applied to the path + of the primary file to yield a filename relative to the primary File: + + 1. If string ends with `?` character, remove the last `?` and mark + the resulting secondary file as optional. + 2. If string begins with one or more caret `^` characters, for each + caret, remove the last file extension from the path (the last + period `.` and all following characters). If there are no file + extensions, the path is unchanged. + 3. Append the remainder of the string to the end of the file path. + streamable: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + A value of `true` indicates that the file is read or written + sequentially without seeking. An implementation may use this flag to + indicate whether it is valid to stream file contents using a named + pipe. Default: `false`. + type: boolean + type: + anyOf: + - $ref: '#/definitions/CommandInputArraySchema' + - $ref: '#/definitions/CommandInputRecordSchema' + - $ref: '#/definitions/CommandInputEnumSchema' + - items: + anyOf: + - $ref: '#/definitions/CommandInputArraySchema' + - $ref: '#/definitions/CommandInputRecordSchema' + - $ref: '#/definitions/CommandInputEnumSchema' + - type: string + type: array + - type: string + description: Specify valid types of data that may be assigned to this parameter. + required: + - type + type: object + CommandInputRecordField: + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandInputRecordField + oneOf: + - additionalProperties: false + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + format: + anyOf: + - items: + type: string + type: array + - type: string + description: |- + Only valid when `type: File` or is an array of `items: File`. + + This must be one or more IRIs of concept nodes + that represents file formats which are allowed as input to this + parameter, preferably defined within an ontology. If no ontology is + available, file formats may be tested by exact match. + inputBinding: + $ref: '#/definitions/CommandLineBinding' + description: Describes how to turn this object into command line arguments. + label: + description: A short, human-readable label of this object. + type: string + loadContents: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + If true, the file (or each file in the array) must be a UTF-8 + text file 64 KiB or smaller, and the implementation must read + the entire contents of the file (or file array) and place it + in the `contents` field of the File object for use by + expressions. If the size of the file is greater than 64 KiB, + the implementation must raise a fatal error. + type: boolean + loadListing: + description: |- + Only valid when `type: Directory` or is an array of `items: Directory`. + + Specify the desired behavior for loading the `listing` field of + a Directory object for use by expressions. + + The order of precedence for loadListing is: + + 1. `loadListing` on an individual parameter + 2. Inherited from `LoadListingRequirement` + 3. By default: `no_listing` + enum: + - deep_listing + - no_listing + - shallow_listing + type: string + name: + description: The name of the field + type: string + secondaryFiles: + anyOf: + - $ref: '#/definitions/SecondaryFileSchema' + - items: + $ref: '#/definitions/SecondaryFileSchema' + type: array + description: |- + Only valid when `type: File` or is an array of `items: File`. + + Provides a pattern or expression specifying files or + directories that should be included alongside the primary + file. Secondary files may be required or optional. When not + explicitly specified, secondary files specified for `inputs` + are required and `outputs` are optional. An implementation + must include matching Files and Directories in the + `secondaryFiles` property of the primary file. These Files + and Directories must be transferred and staged alongside the + primary file. An implementation may fail workflow execution + if a required secondary file does not exist. + + If the value is an expression, the value of `self` in the expression + must be the primary input or output File object to which this binding + applies. The `basename`, `nameroot` and `nameext` fields must be + present in `self`. For `CommandLineTool` outputs the `path` field must + also be present. The expression must return a filename string relative + to the path to the primary File, a File or Directory object with either + `path` or `location` and `basename` fields set, or an array consisting + of strings or File or Directory objects. It is legal to reference an + unchanged File or Directory object taken from input as a secondaryFile. + The expression may return "null" in which case there is no secondaryFile + from that expression. + + To work on non-filename-preserving storage systems, portable tool + descriptions should avoid constructing new values from `location`, but + should construct relative references using `basename` or `nameroot` + instead. + + If a value in `secondaryFiles` is a string that is not an expression, + it specifies that the following pattern should be applied to the path + of the primary file to yield a filename relative to the primary File: + + 1. If string ends with `?` character, remove the last `?` and mark + the resulting secondary file as optional. + 2. If string begins with one or more caret `^` characters, for each + caret, remove the last file extension from the path (the last + period `.` and all following characters). If there are no file + extensions, the path is unchanged. + 3. Append the remainder of the string to the end of the file path. + streamable: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + A value of `true` indicates that the file is read or written + sequentially without seeking. An implementation may use this flag to + indicate whether it is valid to stream file contents using a named + pipe. Default: `false`. + type: boolean + type: + anyOf: + - $ref: '#/definitions/CommandInputArraySchema' + - $ref: '#/definitions/CommandInputRecordSchema' + - $ref: '#/definitions/CommandInputEnumSchema' + - items: + anyOf: + - $ref: '#/definitions/CommandInputArraySchema' + - $ref: '#/definitions/CommandInputRecordSchema' + - $ref: '#/definitions/CommandInputEnumSchema' + - type: string + type: array + - type: string + description: The field type + required: + - name + - type + type: object + - type: array + items: + anyOf: + - $ref: '#/definitions/CommandInputArraySchema' + - $ref: '#/definitions/CommandInputRecordSchema' + - $ref: '#/definitions/CommandInputEnumSchema' + - items: + anyOf: + - $ref: '#/definitions/CommandInputArraySchema' + - $ref: '#/definitions/CommandInputRecordSchema' + - $ref: '#/definitions/CommandInputEnumSchema' + - type: string + type: array + - type: string + description: The field type + CommandInputRecordSchema: + additionalProperties: false + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandInputRecordSchema + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + fields: + description: Defines the fields of the record. + oneOf: + - items: + $ref: '#/definitions/CommandInputRecordField' + type: array + - patternProperties: + ^[_a-zA-Z][a-zA-Z0-9_-]*$: + $ref: '#/definitions/CommandInputRecordFieldMap' + type: object + inputBinding: + $ref: '#/definitions/CommandLineBinding' + description: Describes how to turn this object into command line arguments. + label: + description: A short, human-readable label of this object. + type: string + name: + description: The identifier for this type + type: string + type: + const: record + description: Must be `record` + type: string + required: + - type + type: object + CommandLineBinding: + additionalProperties: false + description: |2- + When listed under `inputBinding` in the input schema, the term + "value" refers to the corresponding value in the input object. For + binding objects listed in `CommandLineTool.arguments`, the term "value" + refers to the effective value after evaluating `valueFrom`. + + The binding behavior when building the command line depends on the data + type of the value. If there is a mismatch between the type described by + the input schema and the effective value, such as resulting from an + expression evaluation, an implementation must use the data type of the + effective value. + + - **string**: Add `prefix` and the string to the command line. + + - **number**: Add `prefix` and decimal representation to command line. + + - **boolean**: If true, add `prefix` to the command line. If false, add + nothing. + + - **File**: Add `prefix` and the value of + [`File.path`](#File) to the command line. + + - **Directory**: Add `prefix` and the value of + [`Directory.path`](#Directory) to the command line. + + - **array**: If `itemSeparator` is specified, add `prefix` and the join + the array into a single string with `itemSeparator` separating the + items. Otherwise, first add `prefix`, then recursively process + individual elements. + If the array is empty, it does not add anything to command line. + + - **object**: Add `prefix` only, and recursively add object fields for + which `inputBinding` is specified. + + - **null**: Add nothing. + properties: + itemSeparator: + description: |- + Join the array elements into a single string with the elements + separated by `itemSeparator`. + type: string + loadContents: + description: |- + Use of `loadContents` in `InputBinding` is deprecated. + Preserved for v1.0 backwards compatibility. Will be removed in + CWL v2.0. Use `InputParameter.loadContents` instead. + type: boolean + position: + description: |- + The sorting key. Default position is 0. If a [CWL Parameter Reference](#Parameter_references) + or [CWL Expression](#Expressions_(Optional)) is used and if the + inputBinding is associated with an input parameter, then the value of + `self` will be the value of the input parameter. Input parameter + defaults (as specified by the `InputParameter.default` field) must be + applied before evaluating the expression. Expressions must return a + single value of type int or a null. + type: + - string + - number + prefix: + description: Command line prefix to add before the value. + type: string + separate: + description: |- + If true (default), then the prefix and value must be added as separate + command line arguments; if false, prefix and value must be concatenated + into a single command line argument. + type: boolean + shellQuote: + description: |- + If `ShellCommandRequirement` is in the requirements for the current command, + this controls whether the value is quoted on the command line (default is true). + Use `shellQuote: false` to inject metacharacters for operations such as pipes. + + If `shellQuote` is true or not provided, the implementation must not + permit interpretation of any shell metacharacters or directives. + type: boolean + valueFrom: + description: |- + If `valueFrom` is a constant string value, use this as the value and + apply the binding rules above. + + If `valueFrom` is an expression, evaluate the expression to yield the + actual value to use to build the command line and apply the binding + rules above. If the inputBinding is associated with an input + parameter, the value of `self` in the expression will be the value of + the input parameter. Input parameter defaults (as specified by the + `InputParameter.default` field) must be applied before evaluating the + expression. + + If the value of the associated input parameter is `null`, `valueFrom` is + not evaluated and nothing is added to the command line. + + When a binding is part of the `CommandLineTool.arguments` field, + the `valueFrom` field is required. + type: string + required: [] + type: object + CommandLineTool: + description: This defines the schema of the CWL Command Line Tool Description document. + properties: + arguments: + description: |- + Command line bindings which are not directly associated with input + parameters. If the value is a string, it is used as a string literal + argument. If it is an Expression, the result of the evaluation is used + as an argument. + items: + anyOf: + - $ref: '#/definitions/CommandLineBinding' + - type: string + type: array + baseCommand: + anyOf: + - items: + type: string + type: array + - type: string + description: |- + Specifies the program to execute. If an array, the first element of + the array is the command to execute, and subsequent elements are + mandatory command line arguments. The elements in `baseCommand` must + appear before any command line bindings from `inputBinding` or + `arguments`. + + If `baseCommand` is not provided or is an empty array, the first + element of the command line produced after processing `inputBinding` or + `arguments` must be used as the program to execute. + + If the program includes a path separator character it must + be an absolute path, otherwise it is an error. If the program does not + include a path separator, search the `$PATH` variable in the runtime + environment of the workflow runner find the absolute path of the + executable. + class: + const: CommandLineTool + type: string + cwlVersion: + description: |- + CWL document version. Always required at the document root. Not + required for a Process embedded inside another Process. + enum: + - draft-2 + - draft-3 + - draft-3.dev1 + - draft-3.dev2 + - draft-3.dev3 + - draft-3.dev4 + - draft-3.dev5 + - draft-4.dev1 + - draft-4.dev2 + - draft-4.dev3 + - v1.0 + - v1.0.dev4 + - v1.1 + - v1.1.0-dev1 + - v1.2 + - v1.2.0-dev1 + - v1.2.0-dev2 + - v1.2.0-dev3 + - v1.2.0-dev4 + - v1.2.0-dev5 + type: string + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + hints: + description: |- + Declares requirements that apply to either the runtime environment or the + workflow engine that must be met in order to execute this process. If + an implementation cannot satisfy all requirements, or a requirement is + listed which is not recognized by the implementation, it is a fatal + error and the implementation must not attempt to run the process, + unless overridden at user option. + oneOf: + - items: + anyOf: + - $ref: '#/definitions/CWLImportManual' + - $ref: '#/definitions/CWLIncludeManual' + - $ref: '#/definitions/InlineJavascriptRequirement' + - $ref: '#/definitions/SchemaDefRequirement' + - $ref: '#/definitions/LoadListingRequirement' + - $ref: '#/definitions/DockerRequirement' + - $ref: '#/definitions/SoftwareRequirement' + - $ref: '#/definitions/InitialWorkDirRequirement' + - $ref: '#/definitions/EnvVarRequirement' + - $ref: '#/definitions/ShellCommandRequirement' + - $ref: '#/definitions/ResourceRequirement' + - $ref: '#/definitions/WorkReuse' + - $ref: '#/definitions/NetworkAccess' + - $ref: '#/definitions/InplaceUpdateRequirement' + - $ref: '#/definitions/ToolTimeLimit' + - $ref: '#/definitions/SubworkflowFeatureRequirement' + - $ref: '#/definitions/ScatterFeatureRequirement' + - $ref: '#/definitions/MultipleInputFeatureRequirement' + - $ref: '#/definitions/StepInputExpressionRequirement' + type: array + - type: object + properties: + InlineJavascriptRequirement: + anyOf: + - $ref: '#/definitions/InlineJavascriptRequirementMap' + - type: object + properties: {} + additionalProperties: false + SchemaDefRequirement: + anyOf: + - $ref: '#/definitions/SchemaDefRequirementMap' + - type: object + properties: {} + additionalProperties: false + LoadListingRequirement: + anyOf: + - $ref: '#/definitions/LoadListingRequirementMap' + - type: object + properties: {} + additionalProperties: false + DockerRequirement: + anyOf: + - $ref: '#/definitions/DockerRequirementMap' + - type: object + properties: {} + additionalProperties: false + SoftwareRequirement: + anyOf: + - $ref: '#/definitions/SoftwareRequirementMap' + - type: object + properties: {} + additionalProperties: false + InitialWorkDirRequirement: + anyOf: + - $ref: '#/definitions/InitialWorkDirRequirementMap' + - type: object + properties: {} + additionalProperties: false + EnvVarRequirement: + anyOf: + - $ref: '#/definitions/EnvVarRequirementMap' + - type: object + properties: {} + additionalProperties: false + ShellCommandRequirement: + anyOf: + - $ref: '#/definitions/ShellCommandRequirementMap' + - type: object + properties: {} + additionalProperties: false + ResourceRequirement: + anyOf: + - $ref: '#/definitions/ResourceRequirementMap' + - type: object + properties: {} + additionalProperties: false + WorkReuse: + anyOf: + - $ref: '#/definitions/WorkReuseMap' + - type: object + properties: {} + additionalProperties: false + NetworkAccess: + anyOf: + - $ref: '#/definitions/NetworkAccessMap' + - type: object + properties: {} + additionalProperties: false + InplaceUpdateRequirement: + anyOf: + - $ref: '#/definitions/InplaceUpdateRequirementMap' + - type: object + properties: {} + additionalProperties: false + ToolTimeLimit: + anyOf: + - $ref: '#/definitions/ToolTimeLimitMap' + - type: object + properties: {} + additionalProperties: false + SubworkflowFeatureRequirement: + anyOf: + - $ref: '#/definitions/SubworkflowFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + ScatterFeatureRequirement: + anyOf: + - $ref: '#/definitions/ScatterFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + MultipleInputFeatureRequirement: + anyOf: + - $ref: '#/definitions/MultipleInputFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + StepInputExpressionRequirement: + anyOf: + - $ref: '#/definitions/StepInputExpressionRequirementMap' + - type: object + properties: {} + additionalProperties: false + additionalProperties: false + id: + description: |- + The unique identifier for this object. + + Only useful for `$graph` at `Process` level. Should not be exposed + to users in graphical or terminal user interfaces. + type: string + inputs: + description: |- + Defines the input parameters of the process. The process is ready to + run when all required input parameters are associated with concrete + values. Input parameters include a schema for each parameter which is + used to validate the input object. It may also be used to build a user + interface for constructing the input object. + + When accepting an input object, all input parameters must have a value. + If an input parameter is missing from the input object, it must be + assigned a value of `null` (or the value of `default` for that + parameter, if provided) for the purposes of validation and evaluation + of expressions. + oneOf: + - items: + $ref: '#/definitions/CommandInputParameter' + type: array + - patternProperties: + ^[_a-zA-Z][a-zA-Z0-9_-]*$: + oneOf: + - $ref: '#/definitions/CommandInputParameter' + - anyOf: + - $ref: '#/definitions/CommandInputArraySchema' + - $ref: '#/definitions/CommandInputRecordSchema' + - $ref: '#/definitions/CommandInputEnumSchema' + - items: + anyOf: + - $ref: '#/definitions/CommandInputArraySchema' + - $ref: '#/definitions/CommandInputRecordSchema' + - $ref: '#/definitions/CommandInputEnumSchema' + - type: string + type: array + - type: string + description: Specify valid types of data that may be assigned to this parameter. + - type: array + items: + oneOf: + - type: string + - $ref: '#/definitions/CommandInputParameter' + type: object + intent: + description: |- + An identifier for the type of computational operation, of this Process. + Especially useful for "class: Operation", but can also be used for + CommandLineTool, Workflow, or ExpressionTool. + + If provided, then this must be an IRI of a concept node that + represents the type of operation, preferably defined within an ontology. + + For example, in the domain of bioinformatics, one can use an IRI from + the EDAM Ontology's [Operation concept nodes](http://edamontology.org/operation_0004), + like [Alignment](http://edamontology.org/operation_2928), + or [Clustering](http://edamontology.org/operation_3432); or a more + specific Operation concept like + [Split read mapping](http://edamontology.org/operation_3199). + items: + type: string + type: array + label: + description: A short, human-readable label of this object. + type: string + outputs: + description: |- + Defines the parameters representing the output of the process. May be + used to generate and/or validate the output object. + oneOf: + - items: + $ref: '#/definitions/CommandOutputParameter' + type: array + - patternProperties: + ^[_a-zA-Z][a-zA-Z0-9_-]*$: + oneOf: + - $ref: '#/definitions/CommandOutputParameter' + - anyOf: + - $ref: '#/definitions/CommandOutputArraySchema' + - $ref: '#/definitions/CommandOutputRecordSchema' + - $ref: '#/definitions/CommandOutputEnumSchema' + - items: + anyOf: + - $ref: '#/definitions/CommandOutputArraySchema' + - $ref: '#/definitions/CommandOutputRecordSchema' + - $ref: '#/definitions/CommandOutputEnumSchema' + - type: string + type: array + - type: string + description: Specify valid types of data that may be assigned to this parameter. + - type: array + items: + oneOf: + - type: string + - $ref: '#/definitions/CommandOutputParameter' + type: object + permanentFailCodes: + description: |- + 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. + If not specified, all exit codes except 0 are considered permanent failure. + items: + type: number + type: array + requirements: + description: |- + Declares requirements that apply to either the runtime environment or the + workflow engine that must be met in order to execute this process. If + an implementation cannot satisfy all requirements, or a requirement is + listed which is not recognized by the implementation, it is a fatal + error and the implementation must not attempt to run the process, + unless overridden at user option. + oneOf: + - items: + anyOf: + - $ref: '#/definitions/CWLImportManual' + - $ref: '#/definitions/CWLIncludeManual' + - $ref: '#/definitions/InlineJavascriptRequirement' + - $ref: '#/definitions/SchemaDefRequirement' + - $ref: '#/definitions/LoadListingRequirement' + - $ref: '#/definitions/DockerRequirement' + - $ref: '#/definitions/SoftwareRequirement' + - $ref: '#/definitions/InitialWorkDirRequirement' + - $ref: '#/definitions/EnvVarRequirement' + - $ref: '#/definitions/ShellCommandRequirement' + - $ref: '#/definitions/ResourceRequirement' + - $ref: '#/definitions/WorkReuse' + - $ref: '#/definitions/NetworkAccess' + - $ref: '#/definitions/InplaceUpdateRequirement' + - $ref: '#/definitions/ToolTimeLimit' + - $ref: '#/definitions/SubworkflowFeatureRequirement' + - $ref: '#/definitions/ScatterFeatureRequirement' + - $ref: '#/definitions/MultipleInputFeatureRequirement' + - $ref: '#/definitions/StepInputExpressionRequirement' + type: array + - type: object + properties: + InlineJavascriptRequirement: + anyOf: + - $ref: '#/definitions/InlineJavascriptRequirementMap' + - type: object + properties: {} + additionalProperties: false + SchemaDefRequirement: + anyOf: + - $ref: '#/definitions/SchemaDefRequirementMap' + - type: object + properties: {} + additionalProperties: false + LoadListingRequirement: + anyOf: + - $ref: '#/definitions/LoadListingRequirementMap' + - type: object + properties: {} + additionalProperties: false + DockerRequirement: + anyOf: + - $ref: '#/definitions/DockerRequirementMap' + - type: object + properties: {} + additionalProperties: false + SoftwareRequirement: + anyOf: + - $ref: '#/definitions/SoftwareRequirementMap' + - type: object + properties: {} + additionalProperties: false + InitialWorkDirRequirement: + anyOf: + - $ref: '#/definitions/InitialWorkDirRequirementMap' + - type: object + properties: {} + additionalProperties: false + EnvVarRequirement: + anyOf: + - $ref: '#/definitions/EnvVarRequirementMap' + - type: object + properties: {} + additionalProperties: false + ShellCommandRequirement: + anyOf: + - $ref: '#/definitions/ShellCommandRequirementMap' + - type: object + properties: {} + additionalProperties: false + ResourceRequirement: + anyOf: + - $ref: '#/definitions/ResourceRequirementMap' + - type: object + properties: {} + additionalProperties: false + WorkReuse: + anyOf: + - $ref: '#/definitions/WorkReuseMap' + - type: object + properties: {} + additionalProperties: false + NetworkAccess: + anyOf: + - $ref: '#/definitions/NetworkAccessMap' + - type: object + properties: {} + additionalProperties: false + InplaceUpdateRequirement: + anyOf: + - $ref: '#/definitions/InplaceUpdateRequirementMap' + - type: object + properties: {} + additionalProperties: false + ToolTimeLimit: + anyOf: + - $ref: '#/definitions/ToolTimeLimitMap' + - type: object + properties: {} + additionalProperties: false + SubworkflowFeatureRequirement: + anyOf: + - $ref: '#/definitions/SubworkflowFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + ScatterFeatureRequirement: + anyOf: + - $ref: '#/definitions/ScatterFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + MultipleInputFeatureRequirement: + anyOf: + - $ref: '#/definitions/MultipleInputFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + StepInputExpressionRequirement: + anyOf: + - $ref: '#/definitions/StepInputExpressionRequirementMap' + - type: object + properties: {} + additionalProperties: false + additionalProperties: false + stderr: + description: |- + Capture the command's standard error stream to a file written to + the designated output directory. + + If `stderr` is a string, it specifies the file name to use. + + If `stderr` is an expression, the expression is evaluated and must + return a string with the file name to use to capture stderr. If the + return value is not a string, or the resulting path contains illegal + characters (such as the path separator `/`) it is an error. + type: string + stdin: + description: |- + A path to a file whose contents must be piped into the command's + standard input stream. + type: string + stdout: + description: |- + Capture the command's standard output stream to a file written to + the designated output directory. + + If the `CommandLineTool` contains logically chained commands + (e.g. `echo a && echo b`) `stdout` must include the output of + every command. + + If `stdout` is a string, it specifies the file name to use. + + If `stdout` is an expression, the expression is evaluated and must + return a string with the file name to use to capture stdout. If the + return value is not a string, or the resulting path contains illegal + characters (such as the path separator `/`) it is an error. + type: string + successCodes: + description: |- + Exit codes that indicate the process completed successfully. + + If not specified, only exit code 0 is considered success. + items: + type: number + type: array + temporaryFailCodes: + description: |- + Exit codes that indicate the process failed due to a possibly + temporary condition, where executing the process with the same + runtime environment and inputs may produce different results. + + If not specified, no exit codes are considered temporary failure. + items: + type: number + type: array + required: + - class + - inputs + - outputs + type: object + CommandOutputArraySchema: + additionalProperties: false + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandOutputArraySchema + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + items: + anyOf: + - $ref: '#/definitions/CommandOutputArraySchema' + - $ref: '#/definitions/CommandOutputRecordSchema' + - $ref: '#/definitions/CommandOutputEnumSchema' + - items: + anyOf: + - $ref: '#/definitions/CommandOutputArraySchema' + - $ref: '#/definitions/CommandOutputRecordSchema' + - $ref: '#/definitions/CommandOutputEnumSchema' + - type: string + type: array + - type: string + description: Defines the type of the array elements. + label: + description: A short, human-readable label of this object. + type: string + name: + description: The identifier for this type + type: string + type: + const: array + description: Must be `array` + type: string + required: + - items + - type + type: object + CommandOutputBinding: + additionalProperties: false + description: |- + Describes how to generate an output parameter based on the files produced + by a CommandLineTool. + + The output parameter value is generated by applying these operations in the + following order: + + - glob + - loadContents + - outputEval + - secondaryFiles + properties: + glob: + anyOf: + - items: + type: string + type: array + - type: string + description: |- + Find files or directories relative to the output directory, using POSIX + glob(3) pathname matching. If an array is provided, find files or + directories that match any pattern in the array. If an expression is + provided, the expression must return a string or an array of strings, + which will then be evaluated as one or more glob patterns. Must only + match and return files/directories which actually exist. + + If the value of glob is a relative path pattern (does not + begin with a slash '/') then it is resolved relative to the + output directory. If the value of the glob is an absolute + path pattern (it does begin with a slash '/') then it must + refer to a path within the output directory. It is an error + if any glob resolves to a path outside the output directory. + Specifically this means globs that resolve to paths outside the output + directory are illegal. + + A glob may match a path within the output directory which is + actually a symlink to another file. In this case, the + expected behavior is for the resulting File/Directory object to take the + `basename` (and corresponding `nameroot` and `nameext`) of the + symlink. The `location` of the File/Directory is implementation + dependent, but logically the File/Directory should have the same content + as the symlink target. Platforms may stage output files/directories to + cloud storage that lack the concept of a symlink. In + this case file content and directories may be duplicated, or (to avoid + duplication) the File/Directory `location` may refer to the symlink + target. + + It is an error if a symlink in the output directory (or any + symlink in a chain of links) refers to any file or directory + that is not under an input or output directory. + + Implementations may shut down a container before globbing + output, so globs and expressions must not assume access to the + container filesystem except for declared input and output. + loadContents: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + If true, the file (or each file in the array) must be a UTF-8 + text file 64 KiB or smaller, and the implementation must read + the entire contents of the file (or file array) and place it + in the `contents` field of the File object for use by + expressions. If the size of the file is greater than 64 KiB, + the implementation must raise a fatal error. + type: boolean + loadListing: + description: |- + Only valid when `type: Directory` or is an array of `items: Directory`. + + Specify the desired behavior for loading the `listing` field of + a Directory object for use by expressions. + + The order of precedence for loadListing is: + + 1. `loadListing` on an individual parameter + 2. Inherited from `LoadListingRequirement` + 3. By default: `no_listing` + enum: + - deep_listing + - no_listing + - shallow_listing + type: string + outputEval: + description: |- + Evaluate an expression to generate the output value. If + `glob` was specified, the value of `self` must be an array + containing file objects that were matched. If no files were + matched, `self` must be a zero length array; if a single file + was matched, the value of `self` is an array of a single + element. The exit code of the process is + available in the expression as `runtime.exitCode`. + + Additionally, if `loadContents` is true, the file must be a + UTF-8 text file 64 KiB or smaller, and the implementation must + read the entire contents of the file (or file array) and place + it in the `contents` field of the File object for use in + `outputEval`. If the size of the file is greater than 64 KiB, + the implementation must raise a fatal error. + + If a tool needs to return a large amount of structured data to + the workflow, loading the output object from `cwl.output.json` + bypasses `outputEval` and is not subject to the 64 KiB + `loadContents` limit. + type: string + required: [] + type: object + CommandOutputEnumSchema: + additionalProperties: false + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandOutputEnumSchema + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + label: + description: A short, human-readable label of this object. + type: string + name: + description: The identifier for this type + type: string + symbols: + description: Defines the set of valid symbols. + items: + type: string + type: array + type: + const: enum + description: Must be `enum` + type: string + required: + - symbols + - type + type: object + CommandOutputParameter: + additionalProperties: false + description: An output parameter for a CommandLineTool. + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + format: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + This is the file format that will be assigned to the output + File object. + type: string + id: + description: The unique identifier for this object. + type: string + label: + description: A short, human-readable label of this object. + type: string + outputBinding: + $ref: '#/definitions/CommandOutputBinding' + description: Describes how to generate this output object based on the files produced by a CommandLineTool + secondaryFiles: + anyOf: + - $ref: '#/definitions/SecondaryFileSchema' + - items: + $ref: '#/definitions/SecondaryFileSchema' + type: array + description: |- + Only valid when `type: File` or is an array of `items: File`. + + Provides a pattern or expression specifying files or + directories that should be included alongside the primary + file. Secondary files may be required or optional. When not + explicitly specified, secondary files specified for `inputs` + are required and `outputs` are optional. An implementation + must include matching Files and Directories in the + `secondaryFiles` property of the primary file. These Files + and Directories must be transferred and staged alongside the + primary file. An implementation may fail workflow execution + if a required secondary file does not exist. + + If the value is an expression, the value of `self` in the expression + must be the primary input or output File object to which this binding + applies. The `basename`, `nameroot` and `nameext` fields must be + present in `self`. For `CommandLineTool` outputs the `path` field must + also be present. The expression must return a filename string relative + to the path to the primary File, a File or Directory object with either + `path` or `location` and `basename` fields set, or an array consisting + of strings or File or Directory objects. It is legal to reference an + unchanged File or Directory object taken from input as a secondaryFile. + The expression may return "null" in which case there is no secondaryFile + from that expression. + + To work on non-filename-preserving storage systems, portable tool + descriptions should avoid constructing new values from `location`, but + should construct relative references using `basename` or `nameroot` + instead. + + If a value in `secondaryFiles` is a string that is not an expression, + it specifies that the following pattern should be applied to the path + of the primary file to yield a filename relative to the primary File: + + 1. If string ends with `?` character, remove the last `?` and mark + the resulting secondary file as optional. + 2. If string begins with one or more caret `^` characters, for each + caret, remove the last file extension from the path (the last + period `.` and all following characters). If there are no file + extensions, the path is unchanged. + 3. Append the remainder of the string to the end of the file path. + streamable: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + A value of `true` indicates that the file is read or written + sequentially without seeking. An implementation may use this flag to + indicate whether it is valid to stream file contents using a named + pipe. Default: `false`. + type: boolean + type: + anyOf: + - $ref: '#/definitions/CommandOutputArraySchema' + - $ref: '#/definitions/CommandOutputRecordSchema' + - $ref: '#/definitions/CommandOutputEnumSchema' + - items: + anyOf: + - $ref: '#/definitions/CommandOutputArraySchema' + - $ref: '#/definitions/CommandOutputRecordSchema' + - $ref: '#/definitions/CommandOutputEnumSchema' + - type: string + type: array + - type: string + description: Specify valid types of data that may be assigned to this parameter. + required: + - type + type: object + CommandOutputRecordField: + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandOutputRecordField + oneOf: + - additionalProperties: false + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + format: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + This is the file format that will be assigned to the output + File object. + type: string + label: + description: A short, human-readable label of this object. + type: string + name: + description: The name of the field + type: string + outputBinding: + $ref: '#/definitions/CommandOutputBinding' + description: |- + Describes how to generate this output object based on the files + produced by a CommandLineTool + secondaryFiles: + anyOf: + - $ref: '#/definitions/SecondaryFileSchema' + - items: + $ref: '#/definitions/SecondaryFileSchema' + type: array + description: |- + Only valid when `type: File` or is an array of `items: File`. + + Provides a pattern or expression specifying files or + directories that should be included alongside the primary + file. Secondary files may be required or optional. When not + explicitly specified, secondary files specified for `inputs` + are required and `outputs` are optional. An implementation + must include matching Files and Directories in the + `secondaryFiles` property of the primary file. These Files + and Directories must be transferred and staged alongside the + primary file. An implementation may fail workflow execution + if a required secondary file does not exist. + + If the value is an expression, the value of `self` in the expression + must be the primary input or output File object to which this binding + applies. The `basename`, `nameroot` and `nameext` fields must be + present in `self`. For `CommandLineTool` outputs the `path` field must + also be present. The expression must return a filename string relative + to the path to the primary File, a File or Directory object with either + `path` or `location` and `basename` fields set, or an array consisting + of strings or File or Directory objects. It is legal to reference an + unchanged File or Directory object taken from input as a secondaryFile. + The expression may return "null" in which case there is no secondaryFile + from that expression. + + To work on non-filename-preserving storage systems, portable tool + descriptions should avoid constructing new values from `location`, but + should construct relative references using `basename` or `nameroot` + instead. + + If a value in `secondaryFiles` is a string that is not an expression, + it specifies that the following pattern should be applied to the path + of the primary file to yield a filename relative to the primary File: + + 1. If string ends with `?` character, remove the last `?` and mark + the resulting secondary file as optional. + 2. If string begins with one or more caret `^` characters, for each + caret, remove the last file extension from the path (the last + period `.` and all following characters). If there are no file + extensions, the path is unchanged. + 3. Append the remainder of the string to the end of the file path. + streamable: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + A value of `true` indicates that the file is read or written + sequentially without seeking. An implementation may use this flag to + indicate whether it is valid to stream file contents using a named + pipe. Default: `false`. + type: boolean + type: + anyOf: + - $ref: '#/definitions/CommandOutputArraySchema' + - $ref: '#/definitions/CommandOutputRecordSchema' + - $ref: '#/definitions/CommandOutputEnumSchema' + - items: + anyOf: + - $ref: '#/definitions/CommandOutputArraySchema' + - $ref: '#/definitions/CommandOutputRecordSchema' + - $ref: '#/definitions/CommandOutputEnumSchema' + - type: string + type: array + - type: string + description: The field type + required: + - name + - type + type: object + - type: array + items: + anyOf: + - $ref: '#/definitions/CommandOutputArraySchema' + - $ref: '#/definitions/CommandOutputRecordSchema' + - $ref: '#/definitions/CommandOutputEnumSchema' + - items: + anyOf: + - $ref: '#/definitions/CommandOutputArraySchema' + - $ref: '#/definitions/CommandOutputRecordSchema' + - $ref: '#/definitions/CommandOutputEnumSchema' + - type: string + type: array + - type: string + description: The field type + CommandOutputRecordSchema: + additionalProperties: false + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandOutputRecordSchema + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + fields: + description: Defines the fields of the record. + oneOf: + - items: + $ref: '#/definitions/CommandOutputRecordField' + type: array + - patternProperties: + ^[_a-zA-Z][a-zA-Z0-9_-]*$: + $ref: '#/definitions/CommandOutputRecordFieldMap' + type: object + label: + description: A short, human-readable label of this object. + type: string + name: + description: The identifier for this type + type: string + type: + const: record + description: Must be `record` + type: string + required: + - type + type: object + DefaultFetcher: + additionalProperties: false + type: object + Dictionary: + additionalProperties: + $ref: '#/definitions/T' + type: object + Dictionary: + additionalProperties: + $ref: '#/definitions/T' + type: object + Directory: + additionalProperties: false + description: |- + Represents a directory to present to a command line tool. + + Directories are represented as objects with `class` of `Directory`. Directory objects have + a number of properties that provide metadata about the directory. + + The `location` property of a Directory is a URI that uniquely identifies + the directory. Implementations must support the file:// URI scheme and may + support other schemes such as http://. Alternately to `location`, + implementations must also accept the `path` property on Directory, which + must be a filesystem path available on the same host as the CWL runner (for + inputs) or the runtime environment of a command line tool execution (for + command line tool outputs). + + A Directory object may have a `listing` field. This is a list of File and + Directory objects that are contained in the Directory. For each entry in + `listing`, the `basename` property defines the name of the File or + Subdirectory when staged to disk. If `listing` is not provided, the + implementation must have some way of fetching the Directory listing at + runtime based on the `location` field. + + If a Directory does not have `location`, it is a Directory literal. A + Directory literal must provide `listing`. Directory literals must be + created on disk at runtime as needed. + + The resources in a Directory literal do not need to have any implied + relationship in their `location`. For example, a Directory listing may + contain two files located on different hosts. It is the responsibility of + the runtime to ensure that those files are staged to disk appropriately. + Secondary files associated with files in `listing` must also be staged to + the same Directory. + + When executing a CommandLineTool, Directories must be recursively staged + first and have local values of `path` assigned. + + Directory objects in CommandLineTool output must provide either a + `location` URI or a `path` property in the context of the tool execution + runtime (local to the compute node, or within the executing container). + + An ExpressionTool may forward file references from input to output by using + the same value for `location`. + + Name conflicts (the same `basename` appearing multiple times in `listing` + or in any entry in `secondaryFiles` in the listing) is a fatal error. + properties: + basename: + description: |- + The base name of the directory, that is, the name of the file without any + leading directory path. The base name must not contain a slash `/`. + + If not provided, the implementation must set this field based on the + `location` field by taking the final path component after parsing + `location` as an IRI. If `basename` is provided, it is not required to + match the value from `location`. + + When this file is made available to a CommandLineTool, it must be named + with `basename`, i.e. the final component of the `path` field must match + `basename`. + type: string + class: + const: Directory + description: Must be `Directory` to indicate this object describes a Directory. + type: string + listing: + description: |- + List of files or subdirectories contained in this directory. The name + of each file or subdirectory is determined by the `basename` field of + each `File` or `Directory` object. It is an error if a `File` shares a + `basename` with any other entry in `listing`. If two or more + `Directory` object share the same `basename`, this must be treated as + equivalent to a single subdirectory with the listings recursively + merged. + items: + anyOf: + - $ref: '#/definitions/File' + - $ref: '#/definitions/Directory' + type: array + location: + description: |- + An IRI that identifies the directory resource. This may be a relative + reference, in which case it must be resolved using the base IRI of the + document. The location may refer to a local or remote resource. If + the `listing` field is not set, the implementation must use the + location IRI to retrieve directory listing. If an implementation is + unable to retrieve the directory listing stored at a remote resource (due to + unsupported protocol, access denied, or other issue) it must signal an + error. + + If the `location` field is not provided, the `listing` field must be + provided. The implementation must assign a unique identifier for + the `location` field. + + If the `path` field is provided but the `location` field is not, an + implementation may assign the value of the `path` field to `location`, + then follow the rules above. + type: string + path: + description: |- + The local path where the Directory is made available prior to executing a + CommandLineTool. This must be set by the implementation. This field + must not be used in any other context. The command line tool being + executed must be able to access the directory at `path` using the POSIX + `opendir(2)` syscall. + + If the `path` contains [POSIX shell metacharacters](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02) + (`|`,`&`, `;`, `<`, `>`, `(`,`)`, `$`,`` ` ``, `\`, `"`, `'`, + ``, ``, and ``) or characters + [not allowed](http://www.iana.org/assignments/idna-tables-6.3.0/idna-tables-6.3.0.xhtml) + for [Internationalized Domain Names for Applications](https://tools.ietf.org/html/rfc6452) + then implementations may terminate the process with a + `permanentFailure`. + type: string + required: + - class + type: object + Dirent: + additionalProperties: false + description: |- + Define a file or subdirectory that must be staged to a particular + place prior to executing the command line tool. May be the result + of executing an expression, such as building a configuration file + from a template. + + Usually files are staged within the [designated output directory](#Runtime_environment). + However, under certain circumstances, files may be staged at + arbitrary locations, see discussion for `entryname`. + properties: + entry: + description: |- + If the value is a string literal or an expression which evaluates to a + string, a new text file must be created with the string as the file contents. + + If the value is an expression that evaluates to a `File` or + `Directory` object, or an array of `File` or `Directory` + objects, this indicates the referenced file or directory + should be added to the designated output directory prior to + executing the tool. + + If the value is an expression that evaluates to `null`, + nothing is added to the designated output directory, the entry + has no effect. + + If the value is an expression that evaluates to some other + array, number, or object not consisting of `File` or + `Directory` objects, a new file must be created with the value + serialized to JSON text as the file contents. The JSON + serialization behavior should match the behavior of string + interpolation of [Parameter + references](#Parameter_references). + type: string + entryname: + description: |- + The "target" name of the file or subdirectory. If `entry` is + a File or Directory, the `entryname` field overrides the value + of `basename` of the File or Directory object. + + * Required when `entry` evaluates to file contents only + * Optional when `entry` evaluates to a File or Directory object with a `basename` + * Invalid when `entry` evaluates to an array of File or Directory objects. + + If `entryname` is a relative path, it specifies a name within + the designated output directory. A relative path starting + with `../` or that resolves to location above the designated output directory is an error. + + If `entryname` is an absolute path (starts with a slash `/`) + it is an error unless the following conditions are met: + + * `DockerRequirement` is present in `requirements` + * The program is will run inside a software container + where, from the perspective of the program, the root + filesystem is not shared with any other user or + running program. + + In this case, and the above conditions are met, then + `entryname` may specify the absolute path within the container + where the file or directory must be placed. + type: string + writable: + description: |- + If true, the File or Directory (or array of Files or + Directories) declared in `entry` must be writable by the tool. + + Changes to the file or directory must be isolated and not + visible by any other CommandLineTool process. This may be + implemented by making a copy of the original file or + directory. + + Disruptive changes to the referenced file or directory must not + be allowed unless `InplaceUpdateRequirement.inplaceUpdate` is true. + + Default false (files and directories read-only by default). + + A directory marked as `writable: true` implies that all files and + subdirectories are recursively writable as well. + + If `writable` is false, the file may be made available using a + bind mount or file system link to avoid unnecessary copying of + the input file. Command line tools may receive an error on + attempting to rename or delete files or directories that are + not explicitly marked as writable. + type: boolean + required: + - entry + type: object + DockerRequirement: + additionalProperties: false + description: |- + Indicates that a workflow component should be run in a + [Docker](https://docker.com) or Docker-compatible (such as + [Singularity](https://www.sylabs.io/) and [udocker](https://github.com/indigo-dc/udocker)) container environment and + specifies how to fetch or build the image. + + If a CommandLineTool lists `DockerRequirement` under + `hints` (or `requirements`), it may (or must) be run in the specified Docker + container. + + The platform must first acquire or install the correct Docker image as + specified by `dockerPull`, `dockerImport`, `dockerLoad` or `dockerFile`. + + The platform must execute the tool in the container using `docker run` with + the appropriate Docker image and tool command line. + + The workflow platform may provide input files and the designated output + directory through the use of volume bind mounts. The platform should rewrite + file paths in the input object to correspond to the Docker bind mounted + locations. That is, the platform should rewrite values in the parameter context + such as `runtime.outdir`, `runtime.tmpdir` and others to be valid paths + within the container. The platform must ensure that `runtime.outdir` and + `runtime.tmpdir` are distinct directories. + + When running a tool contained in Docker, the workflow platform must not + assume anything about the contents of the Docker container, such as the + presence or absence of specific software, except to assume that the + generated command line represents a valid command within the runtime + environment of the container. + + A container image may specify an + [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint) + and/or + [CMD](https://docs.docker.com/engine/reference/builder/#cmd). + Command line arguments will be appended after all elements of + ENTRYPOINT, and will override all elements specified using CMD (in + other words, CMD is only used when the CommandLineTool definition + produces an empty command line). + + Use of implicit ENTRYPOINT or CMD are discouraged due to reproducibility + concerns of the implicit hidden execution point (For further discussion, see + [https://doi.org/10.12688/f1000research.15140.1](https://doi.org/10.12688/f1000research.15140.1)). Portable + CommandLineTool wrappers in which use of a container is optional must not rely on ENTRYPOINT or CMD. + CommandLineTools which do rely on ENTRYPOINT or CMD must list `DockerRequirement` in the + `requirements` section. + + ## Interaction with other requirements + + If [EnvVarRequirement](#EnvVarRequirement) is specified alongside a + DockerRequirement, the environment variables must be provided to Docker + using `--env` or `--env-file` and interact with the container's preexisting + environment as defined by Docker. + properties: + class: + const: DockerRequirement + description: Always 'DockerRequirement' + type: string + dockerFile: + description: Supply the contents of a Dockerfile which will be built using `docker build`. + type: string + dockerImageId: + description: |- + The image id that will be used for `docker run`. May be a + human-readable image name or the image identifier hash. May be skipped + if `dockerPull` is specified, in which case the `dockerPull` image id + must be used. + type: string + dockerImport: + description: Provide HTTP URL to download and gunzip a Docker images using `docker import. + type: string + dockerLoad: + description: Specify an HTTP URL from which to download a Docker image using `docker load`. + type: string + dockerOutputDirectory: + description: |- + Set the designated output directory to a specific location inside the + Docker container. + type: string + dockerPull: + description: |- + Specify a Docker image to retrieve using `docker pull`. Can contain the + immutable digest to ensure an exact container is used: + `dockerPull: ubuntu@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2` + type: string + required: + - class + type: object + EnvVarRequirement: + additionalProperties: false + description: |- + Define a list of environment variables which will be set in the + execution environment of the tool. See `EnvironmentDef` for details. + properties: + class: + const: EnvVarRequirement + description: Always 'EnvVarRequirement' + type: string + envDef: + description: The list of environment variables. + oneOf: + - items: + anyOf: + - $ref: '#/definitions/EnvironmentDef' + - $ref: '#/definitions/CWLImportManual' + - $ref: '#/definitions/CWLIncludeManual' + type: array + - patternProperties: + ^[_a-zA-Z][a-zA-Z0-9_-]*$: + type: string + required: + - class + - envDef + type: object + EnvironmentDef: + additionalProperties: false + description: |- + Define an environment variable that will be set in the runtime environment + by the workflow platform when executing the command line tool. May be the + result of executing an expression, such as getting a parameter from input. + properties: + envName: + description: The environment variable name + type: string + envValue: + description: The environment variable value + type: string + required: + - envName + - envValue + type: object + ExpressionTool: + description: |- + An ExpressionTool is a type of Process object that can be run by itself + or as a Workflow step. It executes a pure Javascript expression that has + access to the same input parameters as a workflow. It is meant to be used + sparingly as a way to isolate complex Javascript expressions that need to + operate on input data and produce some result; perhaps just a + rearrangement of the inputs. No Docker software container is required + or allowed. + properties: + class: + const: ExpressionTool + type: string + cwlVersion: + description: |- + CWL document version. Always required at the document root. Not + required for a Process embedded inside another Process. + enum: + - draft-2 + - draft-3 + - draft-3.dev1 + - draft-3.dev2 + - draft-3.dev3 + - draft-3.dev4 + - draft-3.dev5 + - draft-4.dev1 + - draft-4.dev2 + - draft-4.dev3 + - v1.0 + - v1.0.dev4 + - v1.1 + - v1.1.0-dev1 + - v1.2 + - v1.2.0-dev1 + - v1.2.0-dev2 + - v1.2.0-dev3 + - v1.2.0-dev4 + - v1.2.0-dev5 + type: string + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + expression: + description: |- + The expression to execute. The expression must return a plain + Javascript object which matches the output parameters of the + ExpressionTool. + type: string + hints: + description: |- + Declares requirements that apply to either the runtime environment or the + workflow engine that must be met in order to execute this process. If + an implementation cannot satisfy all requirements, or a requirement is + listed which is not recognized by the implementation, it is a fatal + error and the implementation must not attempt to run the process, + unless overridden at user option. + oneOf: + - items: + anyOf: + - $ref: '#/definitions/CWLImportManual' + - $ref: '#/definitions/CWLIncludeManual' + - $ref: '#/definitions/InlineJavascriptRequirement' + - $ref: '#/definitions/SchemaDefRequirement' + - $ref: '#/definitions/LoadListingRequirement' + - $ref: '#/definitions/DockerRequirement' + - $ref: '#/definitions/SoftwareRequirement' + - $ref: '#/definitions/InitialWorkDirRequirement' + - $ref: '#/definitions/EnvVarRequirement' + - $ref: '#/definitions/ShellCommandRequirement' + - $ref: '#/definitions/ResourceRequirement' + - $ref: '#/definitions/WorkReuse' + - $ref: '#/definitions/NetworkAccess' + - $ref: '#/definitions/InplaceUpdateRequirement' + - $ref: '#/definitions/ToolTimeLimit' + - $ref: '#/definitions/SubworkflowFeatureRequirement' + - $ref: '#/definitions/ScatterFeatureRequirement' + - $ref: '#/definitions/MultipleInputFeatureRequirement' + - $ref: '#/definitions/StepInputExpressionRequirement' + type: array + - type: object + properties: + InlineJavascriptRequirement: + anyOf: + - $ref: '#/definitions/InlineJavascriptRequirementMap' + - type: object + properties: {} + additionalProperties: false + SchemaDefRequirement: + anyOf: + - $ref: '#/definitions/SchemaDefRequirementMap' + - type: object + properties: {} + additionalProperties: false + LoadListingRequirement: + anyOf: + - $ref: '#/definitions/LoadListingRequirementMap' + - type: object + properties: {} + additionalProperties: false + DockerRequirement: + anyOf: + - $ref: '#/definitions/DockerRequirementMap' + - type: object + properties: {} + additionalProperties: false + SoftwareRequirement: + anyOf: + - $ref: '#/definitions/SoftwareRequirementMap' + - type: object + properties: {} + additionalProperties: false + InitialWorkDirRequirement: + anyOf: + - $ref: '#/definitions/InitialWorkDirRequirementMap' + - type: object + properties: {} + additionalProperties: false + EnvVarRequirement: + anyOf: + - $ref: '#/definitions/EnvVarRequirementMap' + - type: object + properties: {} + additionalProperties: false + ShellCommandRequirement: + anyOf: + - $ref: '#/definitions/ShellCommandRequirementMap' + - type: object + properties: {} + additionalProperties: false + ResourceRequirement: + anyOf: + - $ref: '#/definitions/ResourceRequirementMap' + - type: object + properties: {} + additionalProperties: false + WorkReuse: + anyOf: + - $ref: '#/definitions/WorkReuseMap' + - type: object + properties: {} + additionalProperties: false + NetworkAccess: + anyOf: + - $ref: '#/definitions/NetworkAccessMap' + - type: object + properties: {} + additionalProperties: false + InplaceUpdateRequirement: + anyOf: + - $ref: '#/definitions/InplaceUpdateRequirementMap' + - type: object + properties: {} + additionalProperties: false + ToolTimeLimit: + anyOf: + - $ref: '#/definitions/ToolTimeLimitMap' + - type: object + properties: {} + additionalProperties: false + SubworkflowFeatureRequirement: + anyOf: + - $ref: '#/definitions/SubworkflowFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + ScatterFeatureRequirement: + anyOf: + - $ref: '#/definitions/ScatterFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + MultipleInputFeatureRequirement: + anyOf: + - $ref: '#/definitions/MultipleInputFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + StepInputExpressionRequirement: + anyOf: + - $ref: '#/definitions/StepInputExpressionRequirementMap' + - type: object + properties: {} + additionalProperties: false + additionalProperties: false + id: + description: |- + The unique identifier for this object. + + Only useful for `$graph` at `Process` level. Should not be exposed + to users in graphical or terminal user interfaces. + type: string + inputs: + description: |- + Defines the input parameters of the process. The process is ready to + run when all required input parameters are associated with concrete + values. Input parameters include a schema for each parameter which is + used to validate the input object. It may also be used to build a user + interface for constructing the input object. + + When accepting an input object, all input parameters must have a value. + If an input parameter is missing from the input object, it must be + assigned a value of `null` (or the value of `default` for that + parameter, if provided) for the purposes of validation and evaluation + of expressions. + oneOf: + - items: + $ref: '#/definitions/WorkflowInputParameter' + type: array + - patternProperties: + ^[_a-zA-Z][a-zA-Z0-9_-]*$: + oneOf: + - $ref: '#/definitions/WorkflowInputParameter' + - anyOf: + - $ref: '#/definitions/InputRecordSchema' + - $ref: '#/definitions/InputEnumSchema' + - $ref: '#/definitions/InputArraySchema' + - items: + anyOf: + - $ref: '#/definitions/InputRecordSchema' + - $ref: '#/definitions/InputEnumSchema' + - $ref: '#/definitions/InputArraySchema' + - type: string + type: array + - type: string + description: Specify valid types of data that may be assigned to this parameter. + - type: array + items: + oneOf: + - type: string + - $ref: '#/definitions/WorkflowInputParameter' + type: object + intent: + description: |- + An identifier for the type of computational operation, of this Process. + Especially useful for "class: Operation", but can also be used for + CommandLineTool, Workflow, or ExpressionTool. + + If provided, then this must be an IRI of a concept node that + represents the type of operation, preferably defined within an ontology. + + For example, in the domain of bioinformatics, one can use an IRI from + the EDAM Ontology's [Operation concept nodes](http://edamontology.org/operation_0004), + like [Alignment](http://edamontology.org/operation_2928), + or [Clustering](http://edamontology.org/operation_3432); or a more + specific Operation concept like + [Split read mapping](http://edamontology.org/operation_3199). + items: + type: string + type: array + label: + description: A short, human-readable label of this object. + type: string + outputs: + description: |- + Defines the parameters representing the output of the process. May be + used to generate and/or validate the output object. + oneOf: + - items: + $ref: '#/definitions/ExpressionToolOutputParameter' + type: array + - patternProperties: + ^[_a-zA-Z][a-zA-Z0-9_-]*$: + oneOf: + - $ref: '#/definitions/ExpressionToolOutputParameter' + - anyOf: + - $ref: '#/definitions/OutputRecordSchema' + - $ref: '#/definitions/OutputEnumSchema' + - $ref: '#/definitions/OutputArraySchema' + - items: + anyOf: + - $ref: '#/definitions/OutputRecordSchema' + - $ref: '#/definitions/OutputEnumSchema' + - $ref: '#/definitions/OutputArraySchema' + - type: string + type: array + - type: string + description: Specify valid types of data that may be assigned to this parameter. + - type: array + items: + oneOf: + - type: string + - $ref: '#/definitions/ExpressionToolOutputParameter' + type: object + requirements: + description: |- + Declares requirements that apply to either the runtime environment or the + workflow engine that must be met in order to execute this process. If + an implementation cannot satisfy all requirements, or a requirement is + listed which is not recognized by the implementation, it is a fatal + error and the implementation must not attempt to run the process, + unless overridden at user option. + oneOf: + - items: + anyOf: + - $ref: '#/definitions/CWLImportManual' + - $ref: '#/definitions/CWLIncludeManual' + - $ref: '#/definitions/InlineJavascriptRequirement' + - $ref: '#/definitions/SchemaDefRequirement' + - $ref: '#/definitions/LoadListingRequirement' + - $ref: '#/definitions/DockerRequirement' + - $ref: '#/definitions/SoftwareRequirement' + - $ref: '#/definitions/InitialWorkDirRequirement' + - $ref: '#/definitions/EnvVarRequirement' + - $ref: '#/definitions/ShellCommandRequirement' + - $ref: '#/definitions/ResourceRequirement' + - $ref: '#/definitions/WorkReuse' + - $ref: '#/definitions/NetworkAccess' + - $ref: '#/definitions/InplaceUpdateRequirement' + - $ref: '#/definitions/ToolTimeLimit' + - $ref: '#/definitions/SubworkflowFeatureRequirement' + - $ref: '#/definitions/ScatterFeatureRequirement' + - $ref: '#/definitions/MultipleInputFeatureRequirement' + - $ref: '#/definitions/StepInputExpressionRequirement' + type: array + - type: object + properties: + InlineJavascriptRequirement: + anyOf: + - $ref: '#/definitions/InlineJavascriptRequirementMap' + - type: object + properties: {} + additionalProperties: false + SchemaDefRequirement: + anyOf: + - $ref: '#/definitions/SchemaDefRequirementMap' + - type: object + properties: {} + additionalProperties: false + LoadListingRequirement: + anyOf: + - $ref: '#/definitions/LoadListingRequirementMap' + - type: object + properties: {} + additionalProperties: false + DockerRequirement: + anyOf: + - $ref: '#/definitions/DockerRequirementMap' + - type: object + properties: {} + additionalProperties: false + SoftwareRequirement: + anyOf: + - $ref: '#/definitions/SoftwareRequirementMap' + - type: object + properties: {} + additionalProperties: false + InitialWorkDirRequirement: + anyOf: + - $ref: '#/definitions/InitialWorkDirRequirementMap' + - type: object + properties: {} + additionalProperties: false + EnvVarRequirement: + anyOf: + - $ref: '#/definitions/EnvVarRequirementMap' + - type: object + properties: {} + additionalProperties: false + ShellCommandRequirement: + anyOf: + - $ref: '#/definitions/ShellCommandRequirementMap' + - type: object + properties: {} + additionalProperties: false + ResourceRequirement: + anyOf: + - $ref: '#/definitions/ResourceRequirementMap' + - type: object + properties: {} + additionalProperties: false + WorkReuse: + anyOf: + - $ref: '#/definitions/WorkReuseMap' + - type: object + properties: {} + additionalProperties: false + NetworkAccess: + anyOf: + - $ref: '#/definitions/NetworkAccessMap' + - type: object + properties: {} + additionalProperties: false + InplaceUpdateRequirement: + anyOf: + - $ref: '#/definitions/InplaceUpdateRequirementMap' + - type: object + properties: {} + additionalProperties: false + ToolTimeLimit: + anyOf: + - $ref: '#/definitions/ToolTimeLimitMap' + - type: object + properties: {} + additionalProperties: false + SubworkflowFeatureRequirement: + anyOf: + - $ref: '#/definitions/SubworkflowFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + ScatterFeatureRequirement: + anyOf: + - $ref: '#/definitions/ScatterFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + MultipleInputFeatureRequirement: + anyOf: + - $ref: '#/definitions/MultipleInputFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + StepInputExpressionRequirement: + anyOf: + - $ref: '#/definitions/StepInputExpressionRequirementMap' + - type: object + properties: {} + additionalProperties: false + additionalProperties: false + required: + - class + - expression + - inputs + - outputs + type: object + ExpressionToolOutputParameter: + additionalProperties: false + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#ExpressionToolOutputParameter + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + format: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + This is the file format that will be assigned to the output + File object. + type: string + id: + description: The unique identifier for this object. + type: string + label: + description: A short, human-readable label of this object. + type: string + secondaryFiles: + anyOf: + - $ref: '#/definitions/SecondaryFileSchema' + - items: + $ref: '#/definitions/SecondaryFileSchema' + type: array + description: |- + Only valid when `type: File` or is an array of `items: File`. + + Provides a pattern or expression specifying files or + directories that should be included alongside the primary + file. Secondary files may be required or optional. When not + explicitly specified, secondary files specified for `inputs` + are required and `outputs` are optional. An implementation + must include matching Files and Directories in the + `secondaryFiles` property of the primary file. These Files + and Directories must be transferred and staged alongside the + primary file. An implementation may fail workflow execution + if a required secondary file does not exist. + + If the value is an expression, the value of `self` in the expression + must be the primary input or output File object to which this binding + applies. The `basename`, `nameroot` and `nameext` fields must be + present in `self`. For `CommandLineTool` outputs the `path` field must + also be present. The expression must return a filename string relative + to the path to the primary File, a File or Directory object with either + `path` or `location` and `basename` fields set, or an array consisting + of strings or File or Directory objects. It is legal to reference an + unchanged File or Directory object taken from input as a secondaryFile. + The expression may return "null" in which case there is no secondaryFile + from that expression. + + To work on non-filename-preserving storage systems, portable tool + descriptions should avoid constructing new values from `location`, but + should construct relative references using `basename` or `nameroot` + instead. + + If a value in `secondaryFiles` is a string that is not an expression, + it specifies that the following pattern should be applied to the path + of the primary file to yield a filename relative to the primary File: + + 1. If string ends with `?` character, remove the last `?` and mark + the resulting secondary file as optional. + 2. If string begins with one or more caret `^` characters, for each + caret, remove the last file extension from the path (the last + period `.` and all following characters). If there are no file + extensions, the path is unchanged. + 3. Append the remainder of the string to the end of the file path. + streamable: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + A value of `true` indicates that the file is read or written + sequentially without seeking. An implementation may use this flag to + indicate whether it is valid to stream file contents using a named + pipe. Default: `false`. + type: boolean + type: + anyOf: + - $ref: '#/definitions/OutputRecordSchema' + - $ref: '#/definitions/OutputEnumSchema' + - $ref: '#/definitions/OutputArraySchema' + - items: + anyOf: + - $ref: '#/definitions/OutputRecordSchema' + - $ref: '#/definitions/OutputEnumSchema' + - $ref: '#/definitions/OutputArraySchema' + - type: string + type: array + - type: string + description: Specify valid types of data that may be assigned to this parameter. + required: + - type + type: object + Fetcher: + oneOf: + - $ref: '#/definitions/DefaultFetcher' + File: + additionalProperties: false + description: |- + Represents a file (or group of files when `secondaryFiles` is provided) that + will be accessible by tools using standard POSIX file system call API such as + open(2) and read(2). + + Files are represented as objects with `class` of `File`. File objects have + a number of properties that provide metadata about the file. + + The `location` property of a File is a URI that uniquely identifies the + file. Implementations must support the `file://` URI scheme and may support + other schemes such as `http://` and `https://`. The value of `location` may also be a + relative reference, in which case it must be resolved relative to the URI + of the document it appears in. Alternately to `location`, implementations + must also accept the `path` property on File, which must be a filesystem + path available on the same host as the CWL runner (for inputs) or the + runtime environment of a command line tool execution (for command line tool + outputs). + + If no `location` or `path` is specified, a file object must specify + `contents` with the UTF-8 text content of the file. This is a "file + literal". File literals do not correspond to external resources, but are + created on disk with `contents` with when needed for executing a tool. + Where appropriate, expressions can return file literals to define new files + on a runtime. The maximum size of `contents` is 64 kilobytes. + + The `basename` property defines the filename on disk where the file is + staged. This may differ from the resource name. If not provided, + `basename` must be computed from the last path part of `location` and made + available to expressions. + + The `secondaryFiles` property is a list of File or Directory objects that + must be staged in the same directory as the primary file. It is an error + for file names to be duplicated in `secondaryFiles`. + + The `size` property is the size in bytes of the File. It must be computed + from the resource and made available to expressions. The `checksum` field + contains a cryptographic hash of the file content for use it verifying file + contents. Implementations may, at user option, enable or disable + computation of the `checksum` field for performance or other reasons. + However, the ability to compute output checksums is required to pass the + CWL conformance test suite. + + When executing a CommandLineTool, the files and secondary files may be + staged to an arbitrary directory, but must use the value of `basename` for + the filename. The `path` property must be file path in the context of the + tool execution runtime (local to the compute node, or within the executing + container). All computed properties should be available to expressions. + File literals also must be staged and `path` must be set. + + When collecting CommandLineTool outputs, `glob` matching returns file paths + (with the `path` property) and the derived properties. This can all be + modified by `outputEval`. Alternately, if the file `cwl.output.json` is + present in the output, `outputBinding` is ignored. + + File objects in the output must provide either a `location` URI or a `path` + property in the context of the tool execution runtime (local to the compute + node, or within the executing container). + + When evaluating an ExpressionTool, file objects must be referenced via + `location` (the expression tool does not have access to files on disk so + `path` is meaningless) or as file literals. It is legal to return a file + object with an existing `location` but a different `basename`. The + `loadContents` field of ExpressionTool inputs behaves the same as on + CommandLineTool inputs, however it is not meaningful on the outputs. + + An ExpressionTool may forward file references from input to output by using + the same value for `location`. + properties: + basename: + description: |- + The base name of the file, that is, the name of the file without any + leading directory path. The base name must not contain a slash `/`. + + If not provided, the implementation must set this field based on the + `location` field by taking the final path component after parsing + `location` as an IRI. If `basename` is provided, it is not required to + match the value from `location`. + + When this file is made available to a CommandLineTool, it must be named + with `basename`, i.e. the final component of the `path` field must match + `basename`. + type: string + checksum: + description: |- + Optional hash code for validating file integrity. Currently, must be in the form + "sha1$ + hexadecimal string" using the SHA-1 algorithm. + type: string + class: + const: File + description: Must be `File` to indicate this object describes a file. + type: string + contents: + description: |- + File contents literal. + + If neither `location` nor `path` is provided, `contents` must be + non-null. The implementation must assign a unique identifier for the + `location` field. When the file is staged as input to CommandLineTool, + the value of `contents` must be written to a file. + + If `contents` is set as a result of a Javascript expression, + an `entry` in `InitialWorkDirRequirement`, or read in from + `cwl.output.json`, there is no specified upper limit on the + size of `contents`. Implementations may have practical limits + on the size of `contents` based on memory and storage + available to the workflow runner or other factors. + + If the `loadContents` field of an `InputParameter` or + `OutputParameter` is true, and the input or output File object + `location` is valid, the file must be a UTF-8 text file 64 KiB + or smaller, and the implementation must read the entire + contents of the file and place it in the `contents` field. If + the size of the file is greater than 64 KiB, the + implementation must raise a fatal error. + type: string + dirname: + description: |- + The name of the directory containing file, that is, the path leading up + to the final slash in the path such that `dirname + '/' + basename == + path`. + + The implementation must set this field based on the value of `path` + prior to evaluating parameter references or expressions in a + CommandLineTool document. This field must not be used in any other + context. + type: string + format: + description: |- + The format of the file: this must be an IRI of a concept node that + represents the file format, preferably defined within an ontology. + If no ontology is available, file formats may be tested by exact match. + + Reasoning about format compatibility must be done by checking that an + input file format is the same, `owl:equivalentClass` or + `rdfs:subClassOf` the format required by the input parameter. + `owl:equivalentClass` is transitive with `rdfs:subClassOf`, e.g. if + ` owl:equivalentClass ` and ` owl:subclassOf ` then infer + ` owl:subclassOf `. + + File format ontologies may be provided in the "$schemas" metadata at the + root of the document. If no ontologies are specified in `$schemas`, the + runtime may perform exact file format matches. + type: string + location: + description: |- + An IRI that identifies the file resource. This may be a relative + reference, in which case it must be resolved using the base IRI of the + document. The location may refer to a local or remote resource; the + implementation must use the IRI to retrieve file content. If an + implementation is unable to retrieve the file content stored at a + remote resource (due to unsupported protocol, access denied, or other + issue) it must signal an error. + + If the `location` field is not provided, the `contents` field must be + provided. The implementation must assign a unique identifier for + the `location` field. + + If the `path` field is provided but the `location` field is not, an + implementation may assign the value of the `path` field to `location`, + then follow the rules above. + type: string + nameext: + description: |- + The basename extension such that `nameroot + nameext == basename`, and + `nameext` is empty or begins with a period and contains at most one + period. Leading periods on the basename are ignored; a basename of + `.cshrc` will have an empty `nameext`. + + The implementation must set this field automatically based on the value + of `basename` prior to evaluating parameter references or expressions. + type: string + nameroot: + description: |- + The basename root such that `nameroot + nameext == basename`, and + `nameext` is empty or begins with a period and contains at most one + period. For the purposes of path splitting leading periods on the + basename are ignored; a basename of `.cshrc` will have a nameroot of + `.cshrc`. + + The implementation must set this field automatically based on the value + of `basename` prior to evaluating parameter references or expressions. + type: string + path: + description: |- + The local host path where the File is available when a CommandLineTool is + executed. This field must be set by the implementation. The final + path component must match the value of `basename`. This field + must not be used in any other context. The command line tool being + executed must be able to access the file at `path` using the POSIX + `open(2)` syscall. + + As a special case, if the `path` field is provided but the `location` + field is not, an implementation may assign the value of the `path` + field to `location`, and remove the `path` field. + + If the `path` contains [POSIX shell metacharacters](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02) + (`|`,`&`, `;`, `<`, `>`, `(`,`)`, `$`,`` ` ``, `\`, `"`, `'`, + ``, ``, and ``) or characters + [not allowed](http://www.iana.org/assignments/idna-tables-6.3.0/idna-tables-6.3.0.xhtml) + for [Internationalized Domain Names for Applications](https://tools.ietf.org/html/rfc6452) + then implementations may terminate the process with a + `permanentFailure`. + type: string + secondaryFiles: + description: |- + A list of additional files or directories that are associated with the + primary file and must be transferred alongside the primary file. + Examples include indexes of the primary file, or external references + which must be included when loading primary document. A file object + listed in `secondaryFiles` may itself include `secondaryFiles` for + which the same rules apply. + items: + anyOf: + - $ref: '#/definitions/File' + - $ref: '#/definitions/Directory' + type: array + size: + description: Optional file size (in bytes) + type: number + required: + - class + type: object + InitialWorkDirRequirement: + additionalProperties: false + description: |- + Define a list of files and subdirectories that must be staged by the workflow platform prior to executing the command line tool. + Normally files are staged within the designated output directory. However, when running inside containers, files may be staged at arbitrary locations, see discussion for [`Dirent.entryname`](#Dirent). Together with `DockerRequirement.dockerOutputDirectory` it is possible to control the locations of both input and output files when running in containers. + properties: + class: + const: InitialWorkDirRequirement + description: InitialWorkDirRequirement + type: string + listing: + anyOf: + - items: + anyOf: + - anyOf: + - $ref: '#/definitions/File' + - $ref: '#/definitions/Directory' + - items: + anyOf: + - anyOf: + - $ref: '#/definitions/File' + - $ref: '#/definitions/Directory' + - $ref: '#/definitions/CWLImportManual' + - $ref: '#/definitions/CWLIncludeManual' + type: array + - $ref: '#/definitions/Dirent' + - type: string + - $ref: '#/definitions/CWLImportManual' + - $ref: '#/definitions/CWLIncludeManual' + type: array + - type: string + description: |- + The list of files or subdirectories that must be staged prior + to executing the command line tool. + + Return type of each expression must validate as `["null", + File, Directory, Dirent, {type: array, items: [File, + Directory]}]`. + + Each `File` or `Directory` that is returned by an Expression + must be added to the designated output directory prior to + executing the tool. + + Each `Dirent` record that is listed or returned by an + expression specifies a file to be created or staged in the + designated output directory prior to executing the tool. + + Expressions may return null, in which case they have no effect. + + Files or Directories which are listed in the input parameters + and appear in the `InitialWorkDirRequirement` listing must + have their `path` set to their staged location. If the same + File or Directory appears more than once in the + `InitialWorkDirRequirement` listing, the implementation must + choose exactly one value for `path`; how this value is chosen + is undefined. + required: + - class + type: object + InlineJavascriptRequirement: + additionalProperties: false + description: |- + Indicates that the workflow platform must support inline Javascript expressions. + If this requirement is not present, the workflow platform must not perform expression + interpolation. + properties: + class: + const: InlineJavascriptRequirement + description: Always 'InlineJavascriptRequirement' + type: string + expressionLib: + description: |- + Additional code fragments that will also be inserted + before executing the expression code. Allows for function definitions that may + be called from CWL expressions. + items: + anyOf: + - type: string + - $ref: '#/definitions/CWLImportManual' + - $ref: '#/definitions/CWLIncludeManual' + type: array + required: + - class + type: object + InplaceUpdateRequirement: + additionalProperties: false + description: |2- + If `inplaceUpdate` is true, then an implementation supporting this + feature may permit tools to directly update files with `writable: + true` in InitialWorkDirRequirement. That is, as an optimization, + files may be destructively modified in place as opposed to copied + and updated. + + An implementation must ensure that only one workflow step may + access a writable file at a time. It is an error if a file which + is writable by one workflow step file is accessed (for reading or + writing) by any other workflow step running independently. + However, a file which has been updated in a previous completed + step may be used as input to multiple steps, provided it is + read-only in every step. + + Workflow steps which modify a file must produce the modified file + as output. Downstream steps which further process the file must + use the output of previous steps, and not refer to a common input + (this is necessary for both ordering and correctness). + + Workflow authors should provide this in the `hints` section. The + intent of this feature is that workflows produce the same results + whether or not InplaceUpdateRequirement is supported by the + implementation, and this feature is primarily available as an + optimization for particular environments. + + Users and implementers should be aware that workflows that + destructively modify inputs may not be repeatable or reproducible. + In particular, enabling this feature implies that WorkReuse should + not be enabled. + properties: + class: + const: InplaceUpdateRequirement + description: Always 'InplaceUpdateRequirement' + type: string + inplaceUpdate: + type: boolean + required: + - class + - inplaceUpdate + type: object + InputArraySchema: + additionalProperties: false + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#InputArraySchema + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + items: + anyOf: + - $ref: '#/definitions/InputRecordSchema' + - $ref: '#/definitions/InputEnumSchema' + - $ref: '#/definitions/InputArraySchema' + - items: + anyOf: + - $ref: '#/definitions/InputRecordSchema' + - $ref: '#/definitions/InputEnumSchema' + - $ref: '#/definitions/InputArraySchema' + - type: string + type: array + - type: string + description: Defines the type of the array elements. + label: + description: A short, human-readable label of this object. + type: string + name: + description: The identifier for this type + type: string + type: + const: array + description: Must be `array` + type: string + required: + - items + - type + type: object + InputBinding: + additionalProperties: false + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#InputBinding + properties: + loadContents: + description: |- + Use of `loadContents` in `InputBinding` is deprecated. + Preserved for v1.0 backwards compatibility. Will be removed in + CWL v2.0. Use `InputParameter.loadContents` instead. + type: boolean + required: [] + type: object + InputEnumSchema: + additionalProperties: false + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#InputEnumSchema + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + label: + description: A short, human-readable label of this object. + type: string + name: + description: The identifier for this type + type: string + symbols: + description: Defines the set of valid symbols. + items: + type: string + type: array + type: + const: enum + description: Must be `enum` + type: string + required: + - symbols + - type + type: object + InputRecordField: + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#InputRecordField + oneOf: + - additionalProperties: false + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + format: + anyOf: + - items: + type: string + type: array + - type: string + description: |- + Only valid when `type: File` or is an array of `items: File`. + + This must be one or more IRIs of concept nodes + that represents file formats which are allowed as input to this + parameter, preferably defined within an ontology. If no ontology is + available, file formats may be tested by exact match. + label: + description: A short, human-readable label of this object. + type: string + loadContents: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + If true, the file (or each file in the array) must be a UTF-8 + text file 64 KiB or smaller, and the implementation must read + the entire contents of the file (or file array) and place it + in the `contents` field of the File object for use by + expressions. If the size of the file is greater than 64 KiB, + the implementation must raise a fatal error. + type: boolean + loadListing: + description: |- + Only valid when `type: Directory` or is an array of `items: Directory`. + + Specify the desired behavior for loading the `listing` field of + a Directory object for use by expressions. + + The order of precedence for loadListing is: + + 1. `loadListing` on an individual parameter + 2. Inherited from `LoadListingRequirement` + 3. By default: `no_listing` + enum: + - deep_listing + - no_listing + - shallow_listing + type: string + name: + description: The name of the field + type: string + secondaryFiles: + anyOf: + - $ref: '#/definitions/SecondaryFileSchema' + - items: + $ref: '#/definitions/SecondaryFileSchema' + type: array + description: |- + Only valid when `type: File` or is an array of `items: File`. + + Provides a pattern or expression specifying files or + directories that should be included alongside the primary + file. Secondary files may be required or optional. When not + explicitly specified, secondary files specified for `inputs` + are required and `outputs` are optional. An implementation + must include matching Files and Directories in the + `secondaryFiles` property of the primary file. These Files + and Directories must be transferred and staged alongside the + primary file. An implementation may fail workflow execution + if a required secondary file does not exist. + + If the value is an expression, the value of `self` in the expression + must be the primary input or output File object to which this binding + applies. The `basename`, `nameroot` and `nameext` fields must be + present in `self`. For `CommandLineTool` outputs the `path` field must + also be present. The expression must return a filename string relative + to the path to the primary File, a File or Directory object with either + `path` or `location` and `basename` fields set, or an array consisting + of strings or File or Directory objects. It is legal to reference an + unchanged File or Directory object taken from input as a secondaryFile. + The expression may return "null" in which case there is no secondaryFile + from that expression. + + To work on non-filename-preserving storage systems, portable tool + descriptions should avoid constructing new values from `location`, but + should construct relative references using `basename` or `nameroot` + instead. + + If a value in `secondaryFiles` is a string that is not an expression, + it specifies that the following pattern should be applied to the path + of the primary file to yield a filename relative to the primary File: + + 1. If string ends with `?` character, remove the last `?` and mark + the resulting secondary file as optional. + 2. If string begins with one or more caret `^` characters, for each + caret, remove the last file extension from the path (the last + period `.` and all following characters). If there are no file + extensions, the path is unchanged. + 3. Append the remainder of the string to the end of the file path. + streamable: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + A value of `true` indicates that the file is read or written + sequentially without seeking. An implementation may use this flag to + indicate whether it is valid to stream file contents using a named + pipe. Default: `false`. + type: boolean + type: + anyOf: + - $ref: '#/definitions/InputRecordSchema' + - $ref: '#/definitions/InputEnumSchema' + - $ref: '#/definitions/InputArraySchema' + - items: + anyOf: + - $ref: '#/definitions/InputRecordSchema' + - $ref: '#/definitions/InputEnumSchema' + - $ref: '#/definitions/InputArraySchema' + - type: string + type: array + - type: string + description: The field type + required: + - name + - type + type: object + - type: array + items: + anyOf: + - $ref: '#/definitions/InputRecordSchema' + - $ref: '#/definitions/InputEnumSchema' + - $ref: '#/definitions/InputArraySchema' + - items: + anyOf: + - $ref: '#/definitions/InputRecordSchema' + - $ref: '#/definitions/InputEnumSchema' + - $ref: '#/definitions/InputArraySchema' + - type: string + type: array + - type: string + description: The field type + InputRecordSchema: + additionalProperties: false + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#InputRecordSchema + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + fields: + description: Defines the fields of the record. + oneOf: + - items: + $ref: '#/definitions/InputRecordField' + type: array + - patternProperties: + ^[_a-zA-Z][a-zA-Z0-9_-]*$: + $ref: '#/definitions/InputRecordFieldMap' + type: object + label: + description: A short, human-readable label of this object. + type: string + name: + description: The identifier for this type + type: string + type: + const: record + description: Must be `record` + type: string + required: + - type + type: object + LoadListingRequirement: + additionalProperties: false + description: |- + Specify the desired behavior for loading the `listing` field of + a Directory object for use by expressions. + properties: + class: + const: LoadListingRequirement + description: Always 'LoadListingRequirement' + type: string + loadListing: + enum: + - deep_listing + - no_listing + - shallow_listing + type: string + required: + - class + type: object + LoadingOptions: + additionalProperties: false + properties: + copyFrom: + $ref: '#/definitions/LoadingOptions' + fetcher: + $ref: '#/definitions/Fetcher' + fileUri: + type: string + idx: + $ref: '#/definitions/Dictionary' + namespaces: + $ref: '#/definitions/Dictionary' + originalDoc: {} + rvocab: + $ref: '#/definitions/Dictionary' + schemas: + $ref: '#/definitions/Dictionary' + vocab: + $ref: '#/definitions/Dictionary' + required: + - fetcher + - idx + - originalDoc + - rvocab + - vocab + type: object + MultipleInputFeatureRequirement: + additionalProperties: false + description: |- + Indicates that the workflow platform must support multiple inbound data links + listed in the `source` field of [WorkflowStepInput](#WorkflowStepInput). + properties: + class: + const: MultipleInputFeatureRequirement + description: Always 'MultipleInputFeatureRequirement' + type: string + required: + - class + type: object + NetworkAccess: + additionalProperties: false + description: |- + Indicate whether a process requires outgoing IPv4/IPv6 network + access. Choice of IPv4 or IPv6 is implementation and site + specific, correct tools must support both. + + If `networkAccess` is false or not specified, tools must not + assume network access, except for localhost (the loopback device). + + If `networkAccess` is true, the tool must be able to make outgoing + connections to network resources. Resources may be on a private + subnet or the public Internet. However, implementations and sites + may apply their own security policies to restrict what is + accessible by the tool. + + Enabling network access does not imply a publicly routable IP + address or the ability to accept inbound connections. + properties: + class: + const: NetworkAccess + description: Always 'NetworkAccess' + type: string + networkAccess: + type: + - string + - boolean + required: + - class + - networkAccess + type: object + Operation: + additionalProperties: false + description: |- + This record describes an abstract operation. It is a potential + step of a workflow that has not yet been bound to a concrete + implementation. It specifies an input and output signature, but + does not provide enough information to be executed. An + implementation (or other tooling) may provide a means of binding + an Operation to a concrete process (such as Workflow, + CommandLineTool, or ExpressionTool) with a compatible signature. + properties: + class: + const: Operation + type: string + cwlVersion: + description: |- + CWL document version. Always required at the document root. Not + required for a Process embedded inside another Process. + enum: + - draft-2 + - draft-3 + - draft-3.dev1 + - draft-3.dev2 + - draft-3.dev3 + - draft-3.dev4 + - draft-3.dev5 + - draft-4.dev1 + - draft-4.dev2 + - draft-4.dev3 + - v1.0 + - v1.0.dev4 + - v1.1 + - v1.1.0-dev1 + - v1.2 + - v1.2.0-dev1 + - v1.2.0-dev2 + - v1.2.0-dev3 + - v1.2.0-dev4 + - v1.2.0-dev5 + type: string + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + hints: + description: |- + Declares requirements that apply to either the runtime environment or the + workflow engine that must be met in order to execute this process. If + an implementation cannot satisfy all requirements, or a requirement is + listed which is not recognized by the implementation, it is a fatal + error and the implementation must not attempt to run the process, + unless overridden at user option. + oneOf: + - items: + anyOf: + - $ref: '#/definitions/CWLImportManual' + - $ref: '#/definitions/CWLIncludeManual' + - $ref: '#/definitions/InlineJavascriptRequirement' + - $ref: '#/definitions/SchemaDefRequirement' + - $ref: '#/definitions/LoadListingRequirement' + - $ref: '#/definitions/DockerRequirement' + - $ref: '#/definitions/SoftwareRequirement' + - $ref: '#/definitions/InitialWorkDirRequirement' + - $ref: '#/definitions/EnvVarRequirement' + - $ref: '#/definitions/ShellCommandRequirement' + - $ref: '#/definitions/ResourceRequirement' + - $ref: '#/definitions/WorkReuse' + - $ref: '#/definitions/NetworkAccess' + - $ref: '#/definitions/InplaceUpdateRequirement' + - $ref: '#/definitions/ToolTimeLimit' + - $ref: '#/definitions/SubworkflowFeatureRequirement' + - $ref: '#/definitions/ScatterFeatureRequirement' + - $ref: '#/definitions/MultipleInputFeatureRequirement' + - $ref: '#/definitions/StepInputExpressionRequirement' + type: array + - type: object + properties: + InlineJavascriptRequirement: + anyOf: + - $ref: '#/definitions/InlineJavascriptRequirementMap' + - type: object + properties: {} + additionalProperties: false + SchemaDefRequirement: + anyOf: + - $ref: '#/definitions/SchemaDefRequirementMap' + - type: object + properties: {} + additionalProperties: false + LoadListingRequirement: + anyOf: + - $ref: '#/definitions/LoadListingRequirementMap' + - type: object + properties: {} + additionalProperties: false + DockerRequirement: + anyOf: + - $ref: '#/definitions/DockerRequirementMap' + - type: object + properties: {} + additionalProperties: false + SoftwareRequirement: + anyOf: + - $ref: '#/definitions/SoftwareRequirementMap' + - type: object + properties: {} + additionalProperties: false + InitialWorkDirRequirement: + anyOf: + - $ref: '#/definitions/InitialWorkDirRequirementMap' + - type: object + properties: {} + additionalProperties: false + EnvVarRequirement: + anyOf: + - $ref: '#/definitions/EnvVarRequirementMap' + - type: object + properties: {} + additionalProperties: false + ShellCommandRequirement: + anyOf: + - $ref: '#/definitions/ShellCommandRequirementMap' + - type: object + properties: {} + additionalProperties: false + ResourceRequirement: + anyOf: + - $ref: '#/definitions/ResourceRequirementMap' + - type: object + properties: {} + additionalProperties: false + WorkReuse: + anyOf: + - $ref: '#/definitions/WorkReuseMap' + - type: object + properties: {} + additionalProperties: false + NetworkAccess: + anyOf: + - $ref: '#/definitions/NetworkAccessMap' + - type: object + properties: {} + additionalProperties: false + InplaceUpdateRequirement: + anyOf: + - $ref: '#/definitions/InplaceUpdateRequirementMap' + - type: object + properties: {} + additionalProperties: false + ToolTimeLimit: + anyOf: + - $ref: '#/definitions/ToolTimeLimitMap' + - type: object + properties: {} + additionalProperties: false + SubworkflowFeatureRequirement: + anyOf: + - $ref: '#/definitions/SubworkflowFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + ScatterFeatureRequirement: + anyOf: + - $ref: '#/definitions/ScatterFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + MultipleInputFeatureRequirement: + anyOf: + - $ref: '#/definitions/MultipleInputFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + StepInputExpressionRequirement: + anyOf: + - $ref: '#/definitions/StepInputExpressionRequirementMap' + - type: object + properties: {} + additionalProperties: false + additionalProperties: false + id: + description: |- + The unique identifier for this object. + + Only useful for `$graph` at `Process` level. Should not be exposed + to users in graphical or terminal user interfaces. + type: string + inputs: + description: |- + Defines the input parameters of the process. The process is ready to + run when all required input parameters are associated with concrete + values. Input parameters include a schema for each parameter which is + used to validate the input object. It may also be used to build a user + interface for constructing the input object. + + When accepting an input object, all input parameters must have a value. + If an input parameter is missing from the input object, it must be + assigned a value of `null` (or the value of `default` for that + parameter, if provided) for the purposes of validation and evaluation + of expressions. + oneOf: + - items: + $ref: '#/definitions/OperationInputParameter' + type: array + - patternProperties: + ^[_a-zA-Z][a-zA-Z0-9_-]*$: + oneOf: + - $ref: '#/definitions/OperationInputParameter' + - anyOf: + - $ref: '#/definitions/InputRecordSchema' + - $ref: '#/definitions/InputEnumSchema' + - $ref: '#/definitions/InputArraySchema' + - items: + anyOf: + - $ref: '#/definitions/InputRecordSchema' + - $ref: '#/definitions/InputEnumSchema' + - $ref: '#/definitions/InputArraySchema' + - type: string + type: array + - type: string + description: Specify valid types of data that may be assigned to this parameter. + - type: array + items: + oneOf: + - type: string + - $ref: '#/definitions/OperationInputParameter' + type: object + intent: + description: |- + An identifier for the type of computational operation, of this Process. + Especially useful for "class: Operation", but can also be used for + CommandLineTool, Workflow, or ExpressionTool. + + If provided, then this must be an IRI of a concept node that + represents the type of operation, preferably defined within an ontology. + + For example, in the domain of bioinformatics, one can use an IRI from + the EDAM Ontology's [Operation concept nodes](http://edamontology.org/operation_0004), + like [Alignment](http://edamontology.org/operation_2928), + or [Clustering](http://edamontology.org/operation_3432); or a more + specific Operation concept like + [Split read mapping](http://edamontology.org/operation_3199). + items: + type: string + type: array + label: + description: A short, human-readable label of this object. + type: string + outputs: + description: |- + Defines the parameters representing the output of the process. May be + used to generate and/or validate the output object. + oneOf: + - items: + $ref: '#/definitions/OperationOutputParameter' + type: array + - patternProperties: + ^[_a-zA-Z][a-zA-Z0-9_-]*$: + oneOf: + - $ref: '#/definitions/OperationOutputParameter' + - anyOf: + - $ref: '#/definitions/OutputRecordSchema' + - $ref: '#/definitions/OutputEnumSchema' + - $ref: '#/definitions/OutputArraySchema' + - items: + anyOf: + - $ref: '#/definitions/OutputRecordSchema' + - $ref: '#/definitions/OutputEnumSchema' + - $ref: '#/definitions/OutputArraySchema' + - type: string + type: array + - type: string + description: Specify valid types of data that may be assigned to this parameter. + - type: array + items: + oneOf: + - type: string + - $ref: '#/definitions/OperationOutputParameter' + type: object + requirements: + description: |- + Declares requirements that apply to either the runtime environment or the + workflow engine that must be met in order to execute this process. If + an implementation cannot satisfy all requirements, or a requirement is + listed which is not recognized by the implementation, it is a fatal + error and the implementation must not attempt to run the process, + unless overridden at user option. + oneOf: + - items: + anyOf: + - $ref: '#/definitions/CWLImportManual' + - $ref: '#/definitions/CWLIncludeManual' + - $ref: '#/definitions/InlineJavascriptRequirement' + - $ref: '#/definitions/SchemaDefRequirement' + - $ref: '#/definitions/LoadListingRequirement' + - $ref: '#/definitions/DockerRequirement' + - $ref: '#/definitions/SoftwareRequirement' + - $ref: '#/definitions/InitialWorkDirRequirement' + - $ref: '#/definitions/EnvVarRequirement' + - $ref: '#/definitions/ShellCommandRequirement' + - $ref: '#/definitions/ResourceRequirement' + - $ref: '#/definitions/WorkReuse' + - $ref: '#/definitions/NetworkAccess' + - $ref: '#/definitions/InplaceUpdateRequirement' + - $ref: '#/definitions/ToolTimeLimit' + - $ref: '#/definitions/SubworkflowFeatureRequirement' + - $ref: '#/definitions/ScatterFeatureRequirement' + - $ref: '#/definitions/MultipleInputFeatureRequirement' + - $ref: '#/definitions/StepInputExpressionRequirement' + type: array + - type: object + properties: + InlineJavascriptRequirement: + anyOf: + - $ref: '#/definitions/InlineJavascriptRequirementMap' + - type: object + properties: {} + additionalProperties: false + SchemaDefRequirement: + anyOf: + - $ref: '#/definitions/SchemaDefRequirementMap' + - type: object + properties: {} + additionalProperties: false + LoadListingRequirement: + anyOf: + - $ref: '#/definitions/LoadListingRequirementMap' + - type: object + properties: {} + additionalProperties: false + DockerRequirement: + anyOf: + - $ref: '#/definitions/DockerRequirementMap' + - type: object + properties: {} + additionalProperties: false + SoftwareRequirement: + anyOf: + - $ref: '#/definitions/SoftwareRequirementMap' + - type: object + properties: {} + additionalProperties: false + InitialWorkDirRequirement: + anyOf: + - $ref: '#/definitions/InitialWorkDirRequirementMap' + - type: object + properties: {} + additionalProperties: false + EnvVarRequirement: + anyOf: + - $ref: '#/definitions/EnvVarRequirementMap' + - type: object + properties: {} + additionalProperties: false + ShellCommandRequirement: + anyOf: + - $ref: '#/definitions/ShellCommandRequirementMap' + - type: object + properties: {} + additionalProperties: false + ResourceRequirement: + anyOf: + - $ref: '#/definitions/ResourceRequirementMap' + - type: object + properties: {} + additionalProperties: false + WorkReuse: + anyOf: + - $ref: '#/definitions/WorkReuseMap' + - type: object + properties: {} + additionalProperties: false + NetworkAccess: + anyOf: + - $ref: '#/definitions/NetworkAccessMap' + - type: object + properties: {} + additionalProperties: false + InplaceUpdateRequirement: + anyOf: + - $ref: '#/definitions/InplaceUpdateRequirementMap' + - type: object + properties: {} + additionalProperties: false + ToolTimeLimit: + anyOf: + - $ref: '#/definitions/ToolTimeLimitMap' + - type: object + properties: {} + additionalProperties: false + SubworkflowFeatureRequirement: + anyOf: + - $ref: '#/definitions/SubworkflowFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + ScatterFeatureRequirement: + anyOf: + - $ref: '#/definitions/ScatterFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + MultipleInputFeatureRequirement: + anyOf: + - $ref: '#/definitions/MultipleInputFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + StepInputExpressionRequirement: + anyOf: + - $ref: '#/definitions/StepInputExpressionRequirementMap' + - type: object + properties: {} + additionalProperties: false + additionalProperties: false + required: + - class + - inputs + - outputs + type: object + OperationInputParameter: + additionalProperties: false + description: Describe an input parameter of an operation. + properties: + default: + description: |- + The default value to use for this parameter if the parameter is missing + from the input object, or if the value of the parameter in the input + object is `null`. Default values are applied before evaluating expressions + (e.g. dependent `valueFrom` fields). + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + format: + anyOf: + - items: + type: string + type: array + - type: string + description: |- + Only valid when `type: File` or is an array of `items: File`. + + This must be one or more IRIs of concept nodes + that represents file formats which are allowed as input to this + parameter, preferably defined within an ontology. If no ontology is + available, file formats may be tested by exact match. + id: + description: The unique identifier for this object. + type: string + label: + description: A short, human-readable label of this object. + type: string + loadContents: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + If true, the file (or each file in the array) must be a UTF-8 + text file 64 KiB or smaller, and the implementation must read + the entire contents of the file (or file array) and place it + in the `contents` field of the File object for use by + expressions. If the size of the file is greater than 64 KiB, + the implementation must raise a fatal error. + type: boolean + loadListing: + description: |- + Only valid when `type: Directory` or is an array of `items: Directory`. + + Specify the desired behavior for loading the `listing` field of + a Directory object for use by expressions. + + The order of precedence for loadListing is: + + 1. `loadListing` on an individual parameter + 2. Inherited from `LoadListingRequirement` + 3. By default: `no_listing` + enum: + - deep_listing + - no_listing + - shallow_listing + type: string + secondaryFiles: + anyOf: + - $ref: '#/definitions/SecondaryFileSchema' + - items: + $ref: '#/definitions/SecondaryFileSchema' + type: array + description: |- + Only valid when `type: File` or is an array of `items: File`. + + Provides a pattern or expression specifying files or + directories that should be included alongside the primary + file. Secondary files may be required or optional. When not + explicitly specified, secondary files specified for `inputs` + are required and `outputs` are optional. An implementation + must include matching Files and Directories in the + `secondaryFiles` property of the primary file. These Files + and Directories must be transferred and staged alongside the + primary file. An implementation may fail workflow execution + if a required secondary file does not exist. + + If the value is an expression, the value of `self` in the expression + must be the primary input or output File object to which this binding + applies. The `basename`, `nameroot` and `nameext` fields must be + present in `self`. For `CommandLineTool` outputs the `path` field must + also be present. The expression must return a filename string relative + to the path to the primary File, a File or Directory object with either + `path` or `location` and `basename` fields set, or an array consisting + of strings or File or Directory objects. It is legal to reference an + unchanged File or Directory object taken from input as a secondaryFile. + The expression may return "null" in which case there is no secondaryFile + from that expression. + + To work on non-filename-preserving storage systems, portable tool + descriptions should avoid constructing new values from `location`, but + should construct relative references using `basename` or `nameroot` + instead. + + If a value in `secondaryFiles` is a string that is not an expression, + it specifies that the following pattern should be applied to the path + of the primary file to yield a filename relative to the primary File: + + 1. If string ends with `?` character, remove the last `?` and mark + the resulting secondary file as optional. + 2. If string begins with one or more caret `^` characters, for each + caret, remove the last file extension from the path (the last + period `.` and all following characters). If there are no file + extensions, the path is unchanged. + 3. Append the remainder of the string to the end of the file path. + streamable: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + A value of `true` indicates that the file is read or written + sequentially without seeking. An implementation may use this flag to + indicate whether it is valid to stream file contents using a named + pipe. Default: `false`. + type: boolean + type: + anyOf: + - $ref: '#/definitions/InputRecordSchema' + - $ref: '#/definitions/InputEnumSchema' + - $ref: '#/definitions/InputArraySchema' + - items: + anyOf: + - $ref: '#/definitions/InputRecordSchema' + - $ref: '#/definitions/InputEnumSchema' + - $ref: '#/definitions/InputArraySchema' + - type: string + type: array + - type: string + description: Specify valid types of data that may be assigned to this parameter. + required: + - type + type: object + OperationOutputParameter: + additionalProperties: false + description: Describe an output parameter of an operation. + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + format: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + This is the file format that will be assigned to the output + File object. + type: string + id: + description: The unique identifier for this object. + type: string + label: + description: A short, human-readable label of this object. + type: string + secondaryFiles: + anyOf: + - $ref: '#/definitions/SecondaryFileSchema' + - items: + $ref: '#/definitions/SecondaryFileSchema' + type: array + description: |- + Only valid when `type: File` or is an array of `items: File`. + + Provides a pattern or expression specifying files or + directories that should be included alongside the primary + file. Secondary files may be required or optional. When not + explicitly specified, secondary files specified for `inputs` + are required and `outputs` are optional. An implementation + must include matching Files and Directories in the + `secondaryFiles` property of the primary file. These Files + and Directories must be transferred and staged alongside the + primary file. An implementation may fail workflow execution + if a required secondary file does not exist. + + If the value is an expression, the value of `self` in the expression + must be the primary input or output File object to which this binding + applies. The `basename`, `nameroot` and `nameext` fields must be + present in `self`. For `CommandLineTool` outputs the `path` field must + also be present. The expression must return a filename string relative + to the path to the primary File, a File or Directory object with either + `path` or `location` and `basename` fields set, or an array consisting + of strings or File or Directory objects. It is legal to reference an + unchanged File or Directory object taken from input as a secondaryFile. + The expression may return "null" in which case there is no secondaryFile + from that expression. + + To work on non-filename-preserving storage systems, portable tool + descriptions should avoid constructing new values from `location`, but + should construct relative references using `basename` or `nameroot` + instead. + + If a value in `secondaryFiles` is a string that is not an expression, + it specifies that the following pattern should be applied to the path + of the primary file to yield a filename relative to the primary File: + + 1. If string ends with `?` character, remove the last `?` and mark + the resulting secondary file as optional. + 2. If string begins with one or more caret `^` characters, for each + caret, remove the last file extension from the path (the last + period `.` and all following characters). If there are no file + extensions, the path is unchanged. + 3. Append the remainder of the string to the end of the file path. + streamable: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + A value of `true` indicates that the file is read or written + sequentially without seeking. An implementation may use this flag to + indicate whether it is valid to stream file contents using a named + pipe. Default: `false`. + type: boolean + type: + anyOf: + - $ref: '#/definitions/OutputRecordSchema' + - $ref: '#/definitions/OutputEnumSchema' + - $ref: '#/definitions/OutputArraySchema' + - items: + anyOf: + - $ref: '#/definitions/OutputRecordSchema' + - $ref: '#/definitions/OutputEnumSchema' + - $ref: '#/definitions/OutputArraySchema' + - type: string + type: array + - type: string + description: Specify valid types of data that may be assigned to this parameter. + required: + - type + type: object + OutputArraySchema: + additionalProperties: false + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#OutputArraySchema + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + items: + anyOf: + - $ref: '#/definitions/OutputRecordSchema' + - $ref: '#/definitions/OutputEnumSchema' + - $ref: '#/definitions/OutputArraySchema' + - items: + anyOf: + - $ref: '#/definitions/OutputRecordSchema' + - $ref: '#/definitions/OutputEnumSchema' + - $ref: '#/definitions/OutputArraySchema' + - type: string + type: array + - type: string + description: Defines the type of the array elements. + label: + description: A short, human-readable label of this object. + type: string + name: + description: The identifier for this type + type: string + type: + const: array + description: Must be `array` + type: string + required: + - items + - type + type: object + OutputEnumSchema: + additionalProperties: false + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#OutputEnumSchema + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + label: + description: A short, human-readable label of this object. + type: string + name: + description: The identifier for this type + type: string + symbols: + description: Defines the set of valid symbols. + items: + type: string + type: array + type: + const: enum + description: Must be `enum` + type: string + required: + - symbols + - type + type: object + OutputRecordField: + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#OutputRecordField + oneOf: + - additionalProperties: false + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + format: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + This is the file format that will be assigned to the output + File object. + type: string + label: + description: A short, human-readable label of this object. + type: string + name: + description: The name of the field + type: string + secondaryFiles: + anyOf: + - $ref: '#/definitions/SecondaryFileSchema' + - items: + $ref: '#/definitions/SecondaryFileSchema' + type: array + description: |- + Only valid when `type: File` or is an array of `items: File`. + + Provides a pattern or expression specifying files or + directories that should be included alongside the primary + file. Secondary files may be required or optional. When not + explicitly specified, secondary files specified for `inputs` + are required and `outputs` are optional. An implementation + must include matching Files and Directories in the + `secondaryFiles` property of the primary file. These Files + and Directories must be transferred and staged alongside the + primary file. An implementation may fail workflow execution + if a required secondary file does not exist. + + If the value is an expression, the value of `self` in the expression + must be the primary input or output File object to which this binding + applies. The `basename`, `nameroot` and `nameext` fields must be + present in `self`. For `CommandLineTool` outputs the `path` field must + also be present. The expression must return a filename string relative + to the path to the primary File, a File or Directory object with either + `path` or `location` and `basename` fields set, or an array consisting + of strings or File or Directory objects. It is legal to reference an + unchanged File or Directory object taken from input as a secondaryFile. + The expression may return "null" in which case there is no secondaryFile + from that expression. + + To work on non-filename-preserving storage systems, portable tool + descriptions should avoid constructing new values from `location`, but + should construct relative references using `basename` or `nameroot` + instead. + + If a value in `secondaryFiles` is a string that is not an expression, + it specifies that the following pattern should be applied to the path + of the primary file to yield a filename relative to the primary File: + + 1. If string ends with `?` character, remove the last `?` and mark + the resulting secondary file as optional. + 2. If string begins with one or more caret `^` characters, for each + caret, remove the last file extension from the path (the last + period `.` and all following characters). If there are no file + extensions, the path is unchanged. + 3. Append the remainder of the string to the end of the file path. + streamable: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + A value of `true` indicates that the file is read or written + sequentially without seeking. An implementation may use this flag to + indicate whether it is valid to stream file contents using a named + pipe. Default: `false`. + type: boolean + type: + anyOf: + - $ref: '#/definitions/OutputRecordSchema' + - $ref: '#/definitions/OutputEnumSchema' + - $ref: '#/definitions/OutputArraySchema' + - items: + anyOf: + - $ref: '#/definitions/OutputRecordSchema' + - $ref: '#/definitions/OutputEnumSchema' + - $ref: '#/definitions/OutputArraySchema' + - type: string + type: array + - type: string + description: The field type + required: + - name + - type + type: object + - type: array + items: + anyOf: + - $ref: '#/definitions/OutputRecordSchema' + - $ref: '#/definitions/OutputEnumSchema' + - $ref: '#/definitions/OutputArraySchema' + - items: + anyOf: + - $ref: '#/definitions/OutputRecordSchema' + - $ref: '#/definitions/OutputEnumSchema' + - $ref: '#/definitions/OutputArraySchema' + - type: string + type: array + - type: string + description: The field type + OutputRecordSchema: + additionalProperties: false + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#OutputRecordSchema + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + fields: + description: Defines the fields of the record. + oneOf: + - items: + $ref: '#/definitions/OutputRecordField' + type: array + - patternProperties: + ^[_a-zA-Z][a-zA-Z0-9_-]*$: + $ref: '#/definitions/OutputRecordFieldMap' + type: object + label: + description: A short, human-readable label of this object. + type: string + name: + description: The identifier for this type + type: string + type: + const: record + description: Must be `record` + type: string + required: + - type + type: object + ResourceRequirement: + additionalProperties: false + description: |- + Specify basic hardware resource requirements. + + "min" is the minimum amount of a resource that must be reserved to + schedule a job. If "min" cannot be satisfied, the job should not + be run. + + "max" is the maximum amount of a resource that the job shall be + allocated. If a node has sufficient resources, multiple jobs may + be scheduled on a single node provided each job's "max" resource + requirements are met. If a job attempts to exceed its resource + allocation, an implementation may deny additional resources, which + may result in job failure. + + If both "min" and "max" are specified, an implementation may + choose to allocate any amount between "min" and "max", with the + actual allocation provided in the `runtime` object. + + If "min" is specified but "max" is not, then "max" == "min" + If "max" is specified by "min" is not, then "min" == "max". + + It is an error if max < min. + + It is an error if the value of any of these fields is negative. + + If neither "min" nor "max" is specified for a resource, use the default values below. + properties: + class: + const: ResourceRequirement + description: Always 'ResourceRequirement' + type: string + coresMax: + description: |- + Maximum reserved number of CPU cores. + + See `coresMin` for discussion about fractional CPU requests. + type: + - string + - number + coresMin: + description: |- + Minimum reserved number of CPU cores (default is 1). + + May be a fractional value to indicate to a scheduling + algorithm that one core can be allocated to multiple + jobs. For example, a value of 0.25 indicates that up to 4 + jobs may run in parallel on 1 core. A value of 1.25 means + that up to 3 jobs can run on a 4 core system (4/1.25 ≈ 3). + + Processes can only share a core allocation if the sum of each + of their `ramMax`, `tmpdirMax`, and `outdirMax` requests also + do not exceed the capacity of the node. + + Processes sharing a core must have the same level of isolation + (typically a container or VM) that they would normally. + + The reported number of CPU cores reserved for the process, + which is available to expressions on the CommandLineTool as + `runtime.cores`, must be a non-zero integer, and may be + calculated by rounding up the cores request to the next whole + number. + + Scheduling systems may allocate fractional CPU resources by + setting quotas or scheduling weights. Scheduling systems that + do not support fractional CPUs may round up the request to the + next whole number. + type: + - string + - number + outdirMax: + description: |- + Maximum reserved filesystem based storage for the designated output directory, in mebibytes (2**20) + + See `outdirMin` for discussion about fractional storage requests. + type: + - string + - number + outdirMin: + description: |- + Minimum reserved filesystem based storage for the designated output directory, in mebibytes (2**20) (default is 1024) + + May be a fractional value. If so, the actual storage request + must be rounded up to the next whole number. The reported + amount of storage reserved for the process, which is available + to expressions on the CommandLineTool as `runtime.outdirSize`, + must be a non-zero integer. + type: + - string + - number + ramMax: + description: |- + Maximum reserved RAM in mebibytes (2**20) + + See `ramMin` for discussion about fractional RAM requests. + type: + - string + - number + ramMin: + description: |- + Minimum reserved RAM in mebibytes (2**20) (default is 256) + + May be a fractional value. If so, the actual RAM request must + be rounded up to the next whole number. The reported amount of + RAM reserved for the process, which is available to + expressions on the CommandLineTool as `runtime.ram`, must be a + non-zero integer. + type: + - string + - number + tmpdirMax: + description: |- + Maximum reserved filesystem based storage for the designated temporary directory, in mebibytes (2**20) + + See `tmpdirMin` for discussion about fractional storage requests. + type: + - string + - number + tmpdirMin: + description: |- + Minimum reserved filesystem based storage for the designated temporary directory, in mebibytes (2**20) (default is 1024) + + May be a fractional value. If so, the actual storage request + must be rounded up to the next whole number. The reported + amount of storage reserved for the process, which is available + to expressions on the CommandLineTool as `runtime.tmpdirSize`, + must be a non-zero integer. + type: + - string + - number + required: + - class + type: object + ScatterFeatureRequirement: + additionalProperties: false + description: |- + Indicates that the workflow platform must support the `scatter` and + `scatterMethod` fields of [WorkflowStep](#WorkflowStep). + properties: + class: + const: ScatterFeatureRequirement + description: Always 'ScatterFeatureRequirement' + type: string + required: + - class + type: object + SchemaDefRequirement: + additionalProperties: false + description: |- + This field consists of an array of type definitions which must be used when + interpreting the `inputs` and `outputs` fields. When a `type` field + contains a IRI, the implementation must check if the type is defined in + `schemaDefs` and use that definition. If the type is not found in + `schemaDefs`, it is an error. The entries in `schemaDefs` must be + processed in the order listed such that later schema definitions may refer + to earlier schema definitions. + + - **Type definitions are allowed for `enum` and `record` types only.** + - Type definitions may be shared by defining them in a file and then + `$include`-ing them in the `types` field. + - A file can contain a list of type definitions + properties: + class: + const: SchemaDefRequirement + description: Always 'SchemaDefRequirement' + type: string + types: + description: The list of type definitions. + items: + anyOf: + - anyOf: + - $ref: '#/definitions/CommandInputArraySchema' + - $ref: '#/definitions/CommandInputRecordSchema' + - $ref: '#/definitions/CommandInputEnumSchema' + - $ref: '#/definitions/CWLImportManual' + - $ref: '#/definitions/CWLIncludeManual' + type: array + required: + - class + - types + type: object + SecondaryFileSchema: + description: |- + Secondary files are specified using the following micro-DSL for secondary files: + + * If the value is a string, it is transformed to an object with two fields + `pattern` and `required` + * By default, the value of `required` is `null` + (this indicates default behavior, which may be based on the context) + * If the value ends with a question mark `?` the question mark is + stripped off and the value of the field `required` is set to `False` + * The remaining value is assigned to the field `pattern` + + For implementation details and examples, please see + [this section](SchemaSalad.html#Domain_Specific_Language_for_secondary_files) + in the Schema Salad specification. + oneOf: + - additionalProperties: false + properties: + pattern: + description: |- + Provides a pattern or expression specifying files or directories that + should be included alongside the primary file. + + If the value is an expression, the value of `self` in the + expression must be the primary input or output File object to + which this binding applies. The `basename`, `nameroot` and + `nameext` fields must be present in `self`. For + `CommandLineTool` inputs the `location` field must also be + present. For `CommandLineTool` outputs the `path` field must + also be present. If secondary files were included on an input + File object as part of the Process invocation, they must also + be present in `secondaryFiles` on `self`. + + The expression must return either: a filename string relative + to the path to the primary File, a File or Directory object + (`class: File` or `class: Directory`) with either `location` + (for inputs) or `path` (for outputs) and `basename` fields + set, or an array consisting of strings or File or Directory + objects as previously described. + + It is legal to use `location` from a File or Directory object + passed in as input, including `location` from secondary files + on `self`. If an expression returns a File object with the + same `location` but a different `basename` as a secondary file + that was passed in, the expression result takes precedence. + Setting the basename with an expression this way affects the + `path` where the secondary file will be staged to in the + CommandLineTool. + + The expression may return "null" in which case there is no + secondary file from that expression. + + To work on non-filename-preserving storage systems, portable + tool descriptions should treat `location` as an + [opaque identifier](#opaque-strings) and avoid constructing new + values from `location`, but should construct relative references + using `basename` or `nameroot` instead, or propagate `location` + from defined inputs. + + If a value in `secondaryFiles` is a string that is not an expression, + it specifies that the following pattern should be applied to the path + of the primary file to yield a filename relative to the primary File: + + 1. If string ends with `?` character, remove the last `?` and mark + the resulting secondary file as optional. + 2. If string begins with one or more caret `^` characters, for each + caret, remove the last file extension from the path (the last + period `.` and all following characters). If there are no file + extensions, the path is unchanged. + 3. Append the remainder of the string to the end of the file path. + type: string + required: + description: |- + An implementation must not fail workflow execution if `required` is + set to `false` and the expected secondary file does not exist. + Default value for `required` field is `true` for secondary files on + input and `false` for secondary files on output. + type: + - string + - boolean + required: + - pattern + type: object + - type: string + ShellCommandRequirement: + additionalProperties: false + description: |- + Modify the behavior of CommandLineTool to generate a single string + containing a shell command line. Each item in the `arguments` list must + be joined into a string separated by single spaces and quoted to prevent + intepretation by the shell, unless `CommandLineBinding` for that argument + contains `shellQuote: false`. If `shellQuote: false` is specified, the + argument is joined into the command string without quoting, which allows + the use of shell metacharacters such as `|` for pipes. + properties: + class: + const: ShellCommandRequirement + description: Always 'ShellCommandRequirement' + type: string + required: + - class + type: object + SoftwarePackage: + additionalProperties: false + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#SoftwarePackage + properties: + package: + description: |- + The name of the software to be made available. If the name is + common, inconsistent, or otherwise ambiguous it should be combined with + one or more identifiers in the `specs` field. + type: string + specs: + description: |- + One or more [IRI](https://en.wikipedia.org/wiki/Internationalized_Resource_Identifier)s + identifying resources for installing or enabling the software named in + the `package` field. Implementations may provide resolvers which map + these software identifier IRIs to some configuration action; or they can + use only the name from the `package` field on a best effort basis. + + For example, the IRI https://packages.debian.org/bowtie could + be resolved with `apt-get install bowtie`. The IRI + https://anaconda.org/bioconda/bowtie could be resolved with `conda + install -c bioconda bowtie`. + + IRIs can also be system independent and used to map to a specific + software installation or selection mechanism. + Using [RRID](https://www.identifiers.org/rrid/) as an example: + https://identifiers.org/rrid/RRID:SCR_005476 + could be fulfilled using the above-mentioned Debian or bioconda + package, a local installation managed by [Environment Modules](https://modules.sourceforge.net/), + or any other mechanism the platform chooses. IRIs can also be from + identifier sources that are discipline specific yet still system + independent. As an example, the equivalent [ELIXIR Tools and Data + Service Registry](https://bio.tools) IRI to the previous RRID example is + https://bio.tools/tool/bowtie2/version/2.2.8. + If supported by a given registry, implementations are encouraged to + query these system independent software identifier IRIs directly for + links to packaging systems. + + A site specific IRI can be listed as well. For example, an academic + computing cluster using Environment Modules could list the IRI + `https://hpc.example.edu/modules/bowtie-tbb/1.22` to indicate that + `module load bowtie-tbb/1.1.2` should be executed to make available + `bowtie` version 1.1.2 compiled with the TBB library prior to running + the accompanying Workflow or CommandLineTool. Note that the example IRI + is specific to a particular institution and computing environment as + the Environment Modules system does not have a common namespace or + standardized naming convention. + + This last example is the least portable and should only be used if + mechanisms based off of the `package` field or more generic IRIs are + unavailable or unsuitable. While harmless to other sites, site specific + software IRIs should be left out of shared CWL descriptions to avoid + clutter. + items: + type: string + type: array + version: + description: |- + The (optional) versions of the software that are known to be + compatible. + items: + type: string + type: array + required: + - package + type: object + SoftwareRequirement: + additionalProperties: false + description: |- + A list of software packages that should be configured in the environment of + the defined process. + properties: + class: + const: SoftwareRequirement + description: Always 'SoftwareRequirement' + type: string + packages: + description: The list of software to be configured. + items: + anyOf: + - $ref: '#/definitions/SoftwarePackage' + - $ref: '#/definitions/CWLImportManual' + - $ref: '#/definitions/CWLIncludeManual' + type: array + required: + - class + - packages + type: object + StepInputExpressionRequirement: + additionalProperties: false + description: |- + Indicate that the workflow platform must support the `valueFrom` field + of [WorkflowStepInput](#WorkflowStepInput). + properties: + class: + const: StepInputExpressionRequirement + description: Always 'StepInputExpressionRequirement' + type: string + required: + - class + type: object + SubworkflowFeatureRequirement: + additionalProperties: false + description: |- + Indicates that the workflow platform must support nested workflows in + the `run` field of [WorkflowStep](#WorkflowStep). + properties: + class: + const: SubworkflowFeatureRequirement + description: Always 'SubworkflowFeatureRequirement' + type: string + required: + - class + type: object + T: + additionalProperties: false + type: object + ToolTimeLimit: + additionalProperties: false + description: |- + Set an upper limit on the execution time of a CommandLineTool. + A CommandLineTool whose execution duration exceeds the time + limit may be preemptively terminated and considered failed. + May also be used by batch systems to make scheduling decisions. + The execution duration excludes external operations, such as + staging of files, pulling a docker image etc, and only counts + wall-time for the execution of the command line itself. + properties: + class: + const: ToolTimeLimit + description: Always 'ToolTimeLimit' + type: string + timelimit: + description: |- + The time limit, in seconds. A time limit of zero means no + time limit. Negative time limits are an error. + type: + - string + - number + required: + - class + - timelimit + type: object + WorkReuse: + additionalProperties: false + description: |- + For implementations that support reusing output from past work (on + the assumption that same code and same input produce same + results), control whether to enable or disable the reuse behavior + for a particular tool or step (to accommodate situations where that + assumption is incorrect). A reused step is not executed but + instead returns the same output as the original execution. + + If `WorkReuse` is not specified, correct tools should assume it + is enabled by default. + properties: + class: + const: WorkReuse + description: Always 'WorkReuse' + type: string + enableReuse: + type: + - string + - boolean + required: + - class + - enableReuse + type: object + Workflow: + description: |- + A workflow describes a set of **steps** and the **dependencies** between + those steps. When a step produces output that will be consumed by a + second step, the first step is a dependency of the second step. + + When there is a dependency, the workflow engine must execute the preceding + step and wait for it to successfully produce output before executing the + dependent step. If two steps are defined in the workflow graph that + are not directly or indirectly dependent, these steps are **independent**, + and may execute in any order or execute concurrently. A workflow is + complete when all steps have been executed. + + Dependencies between parameters are expressed using the `source` + field on [workflow step input parameters](#WorkflowStepInput) and + `outputSource` field on [workflow output + parameters](#WorkflowOutputParameter). + + The `source` field on each workflow step input parameter expresses + the data links that contribute to the value of the step input + parameter (the "sink"). A workflow step can only begin execution + when every data link connected to a step has been fulfilled. + + The `outputSource` field on each workflow step input parameter + expresses the data links that contribute to the value of the + workflow output parameter (the "sink"). Workflow execution cannot + complete successfully until every data link connected to an output + parameter has been fulfilled. + + ## Workflow success and failure + + A completed step must result in one of `success`, `temporaryFailure` or + `permanentFailure` states. An implementation may choose to retry a step + execution which resulted in `temporaryFailure`. An implementation may + choose to either continue running other steps of a workflow, or terminate + immediately upon `permanentFailure`. + + * If any step of a workflow execution results in `permanentFailure`, then + the workflow status is `permanentFailure`. + + * If one or more steps result in `temporaryFailure` and all other steps + complete `success` or are not executed, then the workflow status is + `temporaryFailure`. + + * If all workflow steps are executed and complete with `success`, then the + workflow status is `success`. + + # Extensions + + [ScatterFeatureRequirement](#ScatterFeatureRequirement) and + [SubworkflowFeatureRequirement](#SubworkflowFeatureRequirement) are + available as standard [extensions](#Extensions_and_Metadata) to core + workflow semantics. + properties: + class: + const: Workflow + type: string + cwlVersion: + description: |- + CWL document version. Always required at the document root. Not + required for a Process embedded inside another Process. + enum: + - draft-2 + - draft-3 + - draft-3.dev1 + - draft-3.dev2 + - draft-3.dev3 + - draft-3.dev4 + - draft-3.dev5 + - draft-4.dev1 + - draft-4.dev2 + - draft-4.dev3 + - v1.0 + - v1.0.dev4 + - v1.1 + - v1.1.0-dev1 + - v1.2 + - v1.2.0-dev1 + - v1.2.0-dev2 + - v1.2.0-dev3 + - v1.2.0-dev4 + - v1.2.0-dev5 + type: string + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + hints: + description: |- + Declares requirements that apply to either the runtime environment or the + workflow engine that must be met in order to execute this process. If + an implementation cannot satisfy all requirements, or a requirement is + listed which is not recognized by the implementation, it is a fatal + error and the implementation must not attempt to run the process, + unless overridden at user option. + oneOf: + - items: + anyOf: + - $ref: '#/definitions/CWLImportManual' + - $ref: '#/definitions/CWLIncludeManual' + - $ref: '#/definitions/InlineJavascriptRequirement' + - $ref: '#/definitions/SchemaDefRequirement' + - $ref: '#/definitions/LoadListingRequirement' + - $ref: '#/definitions/DockerRequirement' + - $ref: '#/definitions/SoftwareRequirement' + - $ref: '#/definitions/InitialWorkDirRequirement' + - $ref: '#/definitions/EnvVarRequirement' + - $ref: '#/definitions/ShellCommandRequirement' + - $ref: '#/definitions/ResourceRequirement' + - $ref: '#/definitions/WorkReuse' + - $ref: '#/definitions/NetworkAccess' + - $ref: '#/definitions/InplaceUpdateRequirement' + - $ref: '#/definitions/ToolTimeLimit' + - $ref: '#/definitions/SubworkflowFeatureRequirement' + - $ref: '#/definitions/ScatterFeatureRequirement' + - $ref: '#/definitions/MultipleInputFeatureRequirement' + - $ref: '#/definitions/StepInputExpressionRequirement' + type: array + - type: object + properties: + InlineJavascriptRequirement: + anyOf: + - $ref: '#/definitions/InlineJavascriptRequirementMap' + - type: object + properties: {} + additionalProperties: false + SchemaDefRequirement: + anyOf: + - $ref: '#/definitions/SchemaDefRequirementMap' + - type: object + properties: {} + additionalProperties: false + LoadListingRequirement: + anyOf: + - $ref: '#/definitions/LoadListingRequirementMap' + - type: object + properties: {} + additionalProperties: false + DockerRequirement: + anyOf: + - $ref: '#/definitions/DockerRequirementMap' + - type: object + properties: {} + additionalProperties: false + SoftwareRequirement: + anyOf: + - $ref: '#/definitions/SoftwareRequirementMap' + - type: object + properties: {} + additionalProperties: false + InitialWorkDirRequirement: + anyOf: + - $ref: '#/definitions/InitialWorkDirRequirementMap' + - type: object + properties: {} + additionalProperties: false + EnvVarRequirement: + anyOf: + - $ref: '#/definitions/EnvVarRequirementMap' + - type: object + properties: {} + additionalProperties: false + ShellCommandRequirement: + anyOf: + - $ref: '#/definitions/ShellCommandRequirementMap' + - type: object + properties: {} + additionalProperties: false + ResourceRequirement: + anyOf: + - $ref: '#/definitions/ResourceRequirementMap' + - type: object + properties: {} + additionalProperties: false + WorkReuse: + anyOf: + - $ref: '#/definitions/WorkReuseMap' + - type: object + properties: {} + additionalProperties: false + NetworkAccess: + anyOf: + - $ref: '#/definitions/NetworkAccessMap' + - type: object + properties: {} + additionalProperties: false + InplaceUpdateRequirement: + anyOf: + - $ref: '#/definitions/InplaceUpdateRequirementMap' + - type: object + properties: {} + additionalProperties: false + ToolTimeLimit: + anyOf: + - $ref: '#/definitions/ToolTimeLimitMap' + - type: object + properties: {} + additionalProperties: false + SubworkflowFeatureRequirement: + anyOf: + - $ref: '#/definitions/SubworkflowFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + ScatterFeatureRequirement: + anyOf: + - $ref: '#/definitions/ScatterFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + MultipleInputFeatureRequirement: + anyOf: + - $ref: '#/definitions/MultipleInputFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + StepInputExpressionRequirement: + anyOf: + - $ref: '#/definitions/StepInputExpressionRequirementMap' + - type: object + properties: {} + additionalProperties: false + additionalProperties: false + id: + description: |- + The unique identifier for this object. + + Only useful for `$graph` at `Process` level. Should not be exposed + to users in graphical or terminal user interfaces. + type: string + inputs: + description: |- + Defines the input parameters of the process. The process is ready to + run when all required input parameters are associated with concrete + values. Input parameters include a schema for each parameter which is + used to validate the input object. It may also be used to build a user + interface for constructing the input object. + + When accepting an input object, all input parameters must have a value. + If an input parameter is missing from the input object, it must be + assigned a value of `null` (or the value of `default` for that + parameter, if provided) for the purposes of validation and evaluation + of expressions. + oneOf: + - items: + $ref: '#/definitions/WorkflowInputParameter' + type: array + - patternProperties: + ^[_a-zA-Z][a-zA-Z0-9_-]*$: + oneOf: + - $ref: '#/definitions/WorkflowInputParameter' + - anyOf: + - $ref: '#/definitions/InputRecordSchema' + - $ref: '#/definitions/InputEnumSchema' + - $ref: '#/definitions/InputArraySchema' + - items: + anyOf: + - $ref: '#/definitions/InputRecordSchema' + - $ref: '#/definitions/InputEnumSchema' + - $ref: '#/definitions/InputArraySchema' + - type: string + type: array + - type: string + description: Specify valid types of data that may be assigned to this parameter. + - type: array + items: + oneOf: + - type: string + - $ref: '#/definitions/WorkflowInputParameter' + type: object + intent: + description: |- + An identifier for the type of computational operation, of this Process. + Especially useful for "class: Operation", but can also be used for + CommandLineTool, Workflow, or ExpressionTool. + + If provided, then this must be an IRI of a concept node that + represents the type of operation, preferably defined within an ontology. + + For example, in the domain of bioinformatics, one can use an IRI from + the EDAM Ontology's [Operation concept nodes](http://edamontology.org/operation_0004), + like [Alignment](http://edamontology.org/operation_2928), + or [Clustering](http://edamontology.org/operation_3432); or a more + specific Operation concept like + [Split read mapping](http://edamontology.org/operation_3199). + items: + type: string + type: array + label: + description: A short, human-readable label of this object. + type: string + outputs: + description: |- + Defines the parameters representing the output of the process. May be + used to generate and/or validate the output object. + oneOf: + - items: + $ref: '#/definitions/WorkflowOutputParameter' + type: array + - patternProperties: + ^[_a-zA-Z][a-zA-Z0-9_-]*$: + oneOf: + - $ref: '#/definitions/WorkflowOutputParameter' + - anyOf: + - $ref: '#/definitions/OutputRecordSchema' + - $ref: '#/definitions/OutputEnumSchema' + - $ref: '#/definitions/OutputArraySchema' + - items: + anyOf: + - $ref: '#/definitions/OutputRecordSchema' + - $ref: '#/definitions/OutputEnumSchema' + - $ref: '#/definitions/OutputArraySchema' + - type: string + type: array + - type: string + description: Specify valid types of data that may be assigned to this parameter. + - type: array + items: + oneOf: + - type: string + - $ref: '#/definitions/WorkflowOutputParameter' + type: object + requirements: + description: |- + Declares requirements that apply to either the runtime environment or the + workflow engine that must be met in order to execute this process. If + an implementation cannot satisfy all requirements, or a requirement is + listed which is not recognized by the implementation, it is a fatal + error and the implementation must not attempt to run the process, + unless overridden at user option. + oneOf: + - items: + anyOf: + - $ref: '#/definitions/CWLImportManual' + - $ref: '#/definitions/CWLIncludeManual' + - $ref: '#/definitions/InlineJavascriptRequirement' + - $ref: '#/definitions/SchemaDefRequirement' + - $ref: '#/definitions/LoadListingRequirement' + - $ref: '#/definitions/DockerRequirement' + - $ref: '#/definitions/SoftwareRequirement' + - $ref: '#/definitions/InitialWorkDirRequirement' + - $ref: '#/definitions/EnvVarRequirement' + - $ref: '#/definitions/ShellCommandRequirement' + - $ref: '#/definitions/ResourceRequirement' + - $ref: '#/definitions/WorkReuse' + - $ref: '#/definitions/NetworkAccess' + - $ref: '#/definitions/InplaceUpdateRequirement' + - $ref: '#/definitions/ToolTimeLimit' + - $ref: '#/definitions/SubworkflowFeatureRequirement' + - $ref: '#/definitions/ScatterFeatureRequirement' + - $ref: '#/definitions/MultipleInputFeatureRequirement' + - $ref: '#/definitions/StepInputExpressionRequirement' + type: array + - type: object + properties: + InlineJavascriptRequirement: + anyOf: + - $ref: '#/definitions/InlineJavascriptRequirementMap' + - type: object + properties: {} + additionalProperties: false + SchemaDefRequirement: + anyOf: + - $ref: '#/definitions/SchemaDefRequirementMap' + - type: object + properties: {} + additionalProperties: false + LoadListingRequirement: + anyOf: + - $ref: '#/definitions/LoadListingRequirementMap' + - type: object + properties: {} + additionalProperties: false + DockerRequirement: + anyOf: + - $ref: '#/definitions/DockerRequirementMap' + - type: object + properties: {} + additionalProperties: false + SoftwareRequirement: + anyOf: + - $ref: '#/definitions/SoftwareRequirementMap' + - type: object + properties: {} + additionalProperties: false + InitialWorkDirRequirement: + anyOf: + - $ref: '#/definitions/InitialWorkDirRequirementMap' + - type: object + properties: {} + additionalProperties: false + EnvVarRequirement: + anyOf: + - $ref: '#/definitions/EnvVarRequirementMap' + - type: object + properties: {} + additionalProperties: false + ShellCommandRequirement: + anyOf: + - $ref: '#/definitions/ShellCommandRequirementMap' + - type: object + properties: {} + additionalProperties: false + ResourceRequirement: + anyOf: + - $ref: '#/definitions/ResourceRequirementMap' + - type: object + properties: {} + additionalProperties: false + WorkReuse: + anyOf: + - $ref: '#/definitions/WorkReuseMap' + - type: object + properties: {} + additionalProperties: false + NetworkAccess: + anyOf: + - $ref: '#/definitions/NetworkAccessMap' + - type: object + properties: {} + additionalProperties: false + InplaceUpdateRequirement: + anyOf: + - $ref: '#/definitions/InplaceUpdateRequirementMap' + - type: object + properties: {} + additionalProperties: false + ToolTimeLimit: + anyOf: + - $ref: '#/definitions/ToolTimeLimitMap' + - type: object + properties: {} + additionalProperties: false + SubworkflowFeatureRequirement: + anyOf: + - $ref: '#/definitions/SubworkflowFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + ScatterFeatureRequirement: + anyOf: + - $ref: '#/definitions/ScatterFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + MultipleInputFeatureRequirement: + anyOf: + - $ref: '#/definitions/MultipleInputFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + StepInputExpressionRequirement: + anyOf: + - $ref: '#/definitions/StepInputExpressionRequirementMap' + - type: object + properties: {} + additionalProperties: false + additionalProperties: false + steps: + description: |- + The individual steps that make up the workflow. Each step is executed when all of its + input data links are fulfilled. An implementation may choose to execute + the steps in a different order than listed and/or execute steps + concurrently, provided that dependencies between steps are met. + oneOf: + - items: + $ref: '#/definitions/WorkflowStep' + type: array + - patternProperties: + ^[_a-zA-Z][a-zA-Z0-9_-]*$: + $ref: '#/definitions/WorkflowStep' + type: object + required: + - class + - inputs + - outputs + - steps + type: object + WorkflowInputParameter: + additionalProperties: false + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#WorkflowInputParameter + properties: + default: + description: |- + The default value to use for this parameter if the parameter is missing + from the input object, or if the value of the parameter in the input + object is `null`. Default values are applied before evaluating expressions + (e.g. dependent `valueFrom` fields). + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + format: + anyOf: + - items: + type: string + type: array + - type: string + description: |- + Only valid when `type: File` or is an array of `items: File`. + + This must be one or more IRIs of concept nodes + that represents file formats which are allowed as input to this + parameter, preferably defined within an ontology. If no ontology is + available, file formats may be tested by exact match. + id: + description: The unique identifier for this object. + type: string + inputBinding: + $ref: '#/definitions/InputBinding' + description: |- + Deprecated. Preserved for v1.0 backwards compatibility. Will be removed in + CWL v2.0. Use `WorkflowInputParameter.loadContents` instead. + label: + description: A short, human-readable label of this object. + type: string + loadContents: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + If true, the file (or each file in the array) must be a UTF-8 + text file 64 KiB or smaller, and the implementation must read + the entire contents of the file (or file array) and place it + in the `contents` field of the File object for use by + expressions. If the size of the file is greater than 64 KiB, + the implementation must raise a fatal error. + type: boolean + loadListing: + description: |- + Only valid when `type: Directory` or is an array of `items: Directory`. + + Specify the desired behavior for loading the `listing` field of + a Directory object for use by expressions. + + The order of precedence for loadListing is: + + 1. `loadListing` on an individual parameter + 2. Inherited from `LoadListingRequirement` + 3. By default: `no_listing` + enum: + - deep_listing + - no_listing + - shallow_listing + type: string + secondaryFiles: + anyOf: + - $ref: '#/definitions/SecondaryFileSchema' + - items: + $ref: '#/definitions/SecondaryFileSchema' + type: array + description: |- + Only valid when `type: File` or is an array of `items: File`. + + Provides a pattern or expression specifying files or + directories that should be included alongside the primary + file. Secondary files may be required or optional. When not + explicitly specified, secondary files specified for `inputs` + are required and `outputs` are optional. An implementation + must include matching Files and Directories in the + `secondaryFiles` property of the primary file. These Files + and Directories must be transferred and staged alongside the + primary file. An implementation may fail workflow execution + if a required secondary file does not exist. + + If the value is an expression, the value of `self` in the expression + must be the primary input or output File object to which this binding + applies. The `basename`, `nameroot` and `nameext` fields must be + present in `self`. For `CommandLineTool` outputs the `path` field must + also be present. The expression must return a filename string relative + to the path to the primary File, a File or Directory object with either + `path` or `location` and `basename` fields set, or an array consisting + of strings or File or Directory objects. It is legal to reference an + unchanged File or Directory object taken from input as a secondaryFile. + The expression may return "null" in which case there is no secondaryFile + from that expression. + + To work on non-filename-preserving storage systems, portable tool + descriptions should avoid constructing new values from `location`, but + should construct relative references using `basename` or `nameroot` + instead. + + If a value in `secondaryFiles` is a string that is not an expression, + it specifies that the following pattern should be applied to the path + of the primary file to yield a filename relative to the primary File: + + 1. If string ends with `?` character, remove the last `?` and mark + the resulting secondary file as optional. + 2. If string begins with one or more caret `^` characters, for each + caret, remove the last file extension from the path (the last + period `.` and all following characters). If there are no file + extensions, the path is unchanged. + 3. Append the remainder of the string to the end of the file path. + streamable: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + A value of `true` indicates that the file is read or written + sequentially without seeking. An implementation may use this flag to + indicate whether it is valid to stream file contents using a named + pipe. Default: `false`. + type: boolean + type: + anyOf: + - $ref: '#/definitions/InputRecordSchema' + - $ref: '#/definitions/InputEnumSchema' + - $ref: '#/definitions/InputArraySchema' + - items: + anyOf: + - $ref: '#/definitions/InputRecordSchema' + - $ref: '#/definitions/InputEnumSchema' + - $ref: '#/definitions/InputArraySchema' + - type: string + type: array + - type: string + description: Specify valid types of data that may be assigned to this parameter. + required: + - type + type: object + WorkflowOutputParameter: + additionalProperties: false + description: |- + Describe an output parameter of a workflow. The parameter must be + connected to one or more parameters defined in the workflow that + will provide the value of the output parameter. It is legal to + connect a WorkflowInputParameter to a WorkflowOutputParameter. + + See [WorkflowStepInput](#WorkflowStepInput) for discussion of + `linkMerge` and `pickValue`. + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + format: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + This is the file format that will be assigned to the output + File object. + type: string + id: + description: The unique identifier for this object. + type: string + label: + description: A short, human-readable label of this object. + type: string + linkMerge: + description: |- + The method to use to merge multiple sources into a single array. + If not specified, the default method is "merge_nested". + enum: + - merge_flattened + - merge_nested + type: string + outputSource: + anyOf: + - items: + type: string + type: array + - type: string + description: |- + Specifies one or more names of an output from a workflow step (in the form + `step_name/output_name` with a `/` separator`), or a workflow input name, + that supply their value(s) to the output parameter. + the output parameter. It is valid to reference workflow level inputs + here. + pickValue: + description: The method to use to choose non-null elements among multiple sources. + enum: + - all_non_null + - first_non_null + - the_only_non_null + type: string + secondaryFiles: + anyOf: + - $ref: '#/definitions/SecondaryFileSchema' + - items: + $ref: '#/definitions/SecondaryFileSchema' + type: array + description: |- + Only valid when `type: File` or is an array of `items: File`. + + Provides a pattern or expression specifying files or + directories that should be included alongside the primary + file. Secondary files may be required or optional. When not + explicitly specified, secondary files specified for `inputs` + are required and `outputs` are optional. An implementation + must include matching Files and Directories in the + `secondaryFiles` property of the primary file. These Files + and Directories must be transferred and staged alongside the + primary file. An implementation may fail workflow execution + if a required secondary file does not exist. + + If the value is an expression, the value of `self` in the expression + must be the primary input or output File object to which this binding + applies. The `basename`, `nameroot` and `nameext` fields must be + present in `self`. For `CommandLineTool` outputs the `path` field must + also be present. The expression must return a filename string relative + to the path to the primary File, a File or Directory object with either + `path` or `location` and `basename` fields set, or an array consisting + of strings or File or Directory objects. It is legal to reference an + unchanged File or Directory object taken from input as a secondaryFile. + The expression may return "null" in which case there is no secondaryFile + from that expression. + + To work on non-filename-preserving storage systems, portable tool + descriptions should avoid constructing new values from `location`, but + should construct relative references using `basename` or `nameroot` + instead. + + If a value in `secondaryFiles` is a string that is not an expression, + it specifies that the following pattern should be applied to the path + of the primary file to yield a filename relative to the primary File: + + 1. If string ends with `?` character, remove the last `?` and mark + the resulting secondary file as optional. + 2. If string begins with one or more caret `^` characters, for each + caret, remove the last file extension from the path (the last + period `.` and all following characters). If there are no file + extensions, the path is unchanged. + 3. Append the remainder of the string to the end of the file path. + streamable: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + A value of `true` indicates that the file is read or written + sequentially without seeking. An implementation may use this flag to + indicate whether it is valid to stream file contents using a named + pipe. Default: `false`. + type: boolean + type: + anyOf: + - $ref: '#/definitions/OutputRecordSchema' + - $ref: '#/definitions/OutputEnumSchema' + - $ref: '#/definitions/OutputArraySchema' + - items: + anyOf: + - $ref: '#/definitions/OutputRecordSchema' + - $ref: '#/definitions/OutputEnumSchema' + - $ref: '#/definitions/OutputArraySchema' + - type: string + type: array + - type: string + description: Specify valid types of data that may be assigned to this parameter. + required: + - type + type: object + WorkflowStep: + additionalProperties: false + description: |- + A workflow step is an executable element of a workflow. It specifies the + underlying process implementation (such as `CommandLineTool` or another + `Workflow`) in the `run` field and connects the input and output parameters + of the underlying process to workflow parameters. + + # Scatter/gather + + To use scatter/gather, + [ScatterFeatureRequirement](#ScatterFeatureRequirement) must be specified + in the workflow or workflow step requirements. + + A "scatter" operation specifies that the associated workflow step or + subworkflow should execute separately over a list of input elements. Each + job making up a scatter operation is independent and may be executed + concurrently. + + The `scatter` field specifies one or more input parameters which will be + scattered. An input parameter may be listed more than once. The declared + type of each input parameter is implicitly becomes an array of items of the + input parameter type. If a parameter is listed more than once, it becomes + a nested array. As a result, upstream parameters which are connected to + scattered parameters must be arrays. + + All output parameter types are also implicitly wrapped in arrays. Each job + in the scatter results in an entry in the output array. + + If any scattered parameter runtime value is an empty array, all outputs are + set to empty arrays and no work is done for the step, according to + applicable scattering rules. + + If `scatter` declares more than one input parameter, `scatterMethod` + describes how to decompose the input into a discrete set of jobs. + + * **dotproduct** specifies that each of the input arrays are aligned and one + element taken from each array to construct each job. It is an error + if all input arrays are not the same length. + + * **nested_crossproduct** specifies the Cartesian product of the inputs, + producing a job for every combination of the scattered inputs. The + output must be nested arrays for each level of scattering, in the + order that the input arrays are listed in the `scatter` field. + + * **flat_crossproduct** specifies the Cartesian product of the inputs, + producing a job for every combination of the scattered inputs. The + output arrays must be flattened to a single level, but otherwise listed in the + order that the input arrays are listed in the `scatter` field. + + # Conditional execution (Optional) + + Conditional execution makes execution of a step conditional on an + expression. A step that is not executed is "skipped". A skipped + step produces `null` for all output parameters. + + The condition is evaluated after `scatter`, using the input object + of each individual scatter job. This means over a set of scatter + jobs, some may be executed and some may be skipped. When the + results are gathered, skipped steps must be `null` in the output + arrays. + + The `when` field controls conditional execution. This is an + expression that must be evaluated with `inputs` bound to the step + input object (or individual scatter job), and returns a boolean + value. It is an error if this expression returns a value other + than `true` or `false`. + + Conditionals in CWL are an optional feature and are not required + to be implemented by all consumers of CWL documents. An + implementation that does not support conditionals must return a + fatal error when attempting to execute a workflow that uses + conditional constructs the implementation does not support. + + # Subworkflows + + To specify a nested workflow as part of a workflow step, + [SubworkflowFeatureRequirement](#SubworkflowFeatureRequirement) must be + specified in the workflow or workflow step requirements. + + It is a fatal error if a workflow directly or indirectly invokes itself as + a subworkflow (recursive workflows are not allowed). + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + hints: + description: |- + Declares hints applying to either the runtime environment or the + workflow engine that may be helpful in executing this workflow step. It is + not an error if an implementation cannot satisfy all hints, however + the implementation may report a warning. + items: {} + type: array + id: + description: The unique identifier for this object. + type: string + in: + description: |- + Defines the input parameters of the workflow step. The process is ready to + run when all required input parameters are associated with concrete + values. Input parameters include a schema for each parameter which is + used to validate the input object. It may also be used build a user + interface for constructing the input object. + oneOf: + - items: + $ref: '#/definitions/WorkflowStepInput' + type: array + - patternProperties: + ^[_a-zA-Z][a-zA-Z0-9_-]*$: + oneOf: + - $ref: '#/definitions/WorkflowStepInput' + - type: string + - type: array + items: + oneOf: + - type: string + - $ref: '#/definitions/WorkflowStepInput' + type: object + label: + description: A short, human-readable label of this object. + type: string + out: + description: |- + Defines the parameters representing the output of the process. May be + used to generate and/or validate the output object. + items: + anyOf: + - $ref: '#/definitions/WorkflowStepOutput' + - type: string + type: array + requirements: + description: |- + Declares requirements that apply to either the runtime environment or the + workflow engine that must be met in order to execute this workflow step. If + an implementation cannot satisfy all requirements, or a requirement is + listed which is not recognized by the implementation, it is a fatal + error and the implementation must not attempt to run the process, + unless overridden at user option. + oneOf: + - items: + anyOf: + - $ref: '#/definitions/CWLImportManual' + - $ref: '#/definitions/CWLIncludeManual' + - $ref: '#/definitions/InlineJavascriptRequirement' + - $ref: '#/definitions/SchemaDefRequirement' + - $ref: '#/definitions/LoadListingRequirement' + - $ref: '#/definitions/DockerRequirement' + - $ref: '#/definitions/SoftwareRequirement' + - $ref: '#/definitions/InitialWorkDirRequirement' + - $ref: '#/definitions/EnvVarRequirement' + - $ref: '#/definitions/ShellCommandRequirement' + - $ref: '#/definitions/ResourceRequirement' + - $ref: '#/definitions/WorkReuse' + - $ref: '#/definitions/NetworkAccess' + - $ref: '#/definitions/InplaceUpdateRequirement' + - $ref: '#/definitions/ToolTimeLimit' + - $ref: '#/definitions/SubworkflowFeatureRequirement' + - $ref: '#/definitions/ScatterFeatureRequirement' + - $ref: '#/definitions/MultipleInputFeatureRequirement' + - $ref: '#/definitions/StepInputExpressionRequirement' + type: array + - type: object + properties: + InlineJavascriptRequirement: + anyOf: + - $ref: '#/definitions/InlineJavascriptRequirementMap' + - type: object + properties: {} + additionalProperties: false + SchemaDefRequirement: + anyOf: + - $ref: '#/definitions/SchemaDefRequirementMap' + - type: object + properties: {} + additionalProperties: false + LoadListingRequirement: + anyOf: + - $ref: '#/definitions/LoadListingRequirementMap' + - type: object + properties: {} + additionalProperties: false + DockerRequirement: + anyOf: + - $ref: '#/definitions/DockerRequirementMap' + - type: object + properties: {} + additionalProperties: false + SoftwareRequirement: + anyOf: + - $ref: '#/definitions/SoftwareRequirementMap' + - type: object + properties: {} + additionalProperties: false + InitialWorkDirRequirement: + anyOf: + - $ref: '#/definitions/InitialWorkDirRequirementMap' + - type: object + properties: {} + additionalProperties: false + EnvVarRequirement: + anyOf: + - $ref: '#/definitions/EnvVarRequirementMap' + - type: object + properties: {} + additionalProperties: false + ShellCommandRequirement: + anyOf: + - $ref: '#/definitions/ShellCommandRequirementMap' + - type: object + properties: {} + additionalProperties: false + ResourceRequirement: + anyOf: + - $ref: '#/definitions/ResourceRequirementMap' + - type: object + properties: {} + additionalProperties: false + WorkReuse: + anyOf: + - $ref: '#/definitions/WorkReuseMap' + - type: object + properties: {} + additionalProperties: false + NetworkAccess: + anyOf: + - $ref: '#/definitions/NetworkAccessMap' + - type: object + properties: {} + additionalProperties: false + InplaceUpdateRequirement: + anyOf: + - $ref: '#/definitions/InplaceUpdateRequirementMap' + - type: object + properties: {} + additionalProperties: false + ToolTimeLimit: + anyOf: + - $ref: '#/definitions/ToolTimeLimitMap' + - type: object + properties: {} + additionalProperties: false + SubworkflowFeatureRequirement: + anyOf: + - $ref: '#/definitions/SubworkflowFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + ScatterFeatureRequirement: + anyOf: + - $ref: '#/definitions/ScatterFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + MultipleInputFeatureRequirement: + anyOf: + - $ref: '#/definitions/MultipleInputFeatureRequirementMap' + - type: object + properties: {} + additionalProperties: false + StepInputExpressionRequirement: + anyOf: + - $ref: '#/definitions/StepInputExpressionRequirementMap' + - type: object + properties: {} + additionalProperties: false + additionalProperties: false + run: + anyOf: + - $ref: '#/definitions/CommandLineTool' + - $ref: '#/definitions/ExpressionTool' + - $ref: '#/definitions/Workflow' + - $ref: '#/definitions/Operation' + - type: string + description: |- + Specifies the process to run. If `run` is a string, it must be an absolute IRI + or a relative path from the primary document. + scatter: + anyOf: + - items: + type: string + type: array + - type: string + scatterMethod: + description: Required if `scatter` is an array of more than one element. + enum: + - dotproduct + - flat_crossproduct + - nested_crossproduct + type: string + when: + description: |- + If defined, only run the step when the expression evaluates to + `true`. If `false` the step is skipped. A skipped step + produces a `null` on each output. + type: string + required: + - in + - out + - run + type: object + WorkflowStepInput: + additionalProperties: false + description: |- + The input of a workflow step connects an upstream parameter (from the + workflow inputs, or the outputs of other workflows steps) with the input + parameters of the process specified by the `run` field. Only input parameters + declared by the target process will be passed through at runtime to the process + though additional parameters may be specified (for use within `valueFrom` + expressions for instance) - unconnected or unused parameters do not represent an + error condition. + + # Input object + + A WorkflowStepInput object must contain an `id` field in the form + `#fieldname` or `#prefix/fieldname`. When the `id` field contains a slash + `/` the field name consists of the characters following the final slash + (the prefix portion may contain one or more slashes to indicate scope). + This defines a field of the workflow step input object with the value of + the `source` parameter(s). + + # Merging multiple inbound data links + + To merge multiple inbound data links, + [MultipleInputFeatureRequirement](#MultipleInputFeatureRequirement) must be specified + in the workflow or workflow step requirements. + + If the sink parameter is an array, or named in a [workflow + scatter](#WorkflowStep) operation, there may be multiple inbound + data links listed in the `source` field. The values from the + input links are merged depending on the method specified in the + `linkMerge` field. If both `linkMerge` and `pickValue` are null + or not specified, and there is more than one element in the + `source` array, the default method is "merge_nested". + + If both `linkMerge` and `pickValue` are null or not specified, and + there is only a single element in the `source`, then the input + parameter takes the scalar value from the single input link (it is + *not* wrapped in a single-list). + + * **merge_nested** + + The input must be an array consisting of exactly one entry for each + input link. If "merge_nested" is specified with a single link, the value + from the link must be wrapped in a single-item list. + + * **merge_flattened** + + 1. The source and sink parameters must be compatible types, or the source + type must be compatible with single element from the "items" type of + the destination array parameter. + 2. Source parameters which are arrays are concatenated. + Source parameters which are single element types are appended as + single elements. + + # Picking non-null values among inbound data links + + If present, `pickValue` specifies how to pick non-null values among inbound data links. + + `pickValue` is evaluated + 1. Once all source values from upstream step or parameters are available. + 2. After `linkMerge`. + 3. Before `scatter` or `valueFrom`. + + This is specifically intended to be useful in combination with + [conditional execution](#WorkflowStep), where several upstream + steps may be connected to a single input (`source` is a list), and + skipped steps produce null values. + + Static type checkers should check for type consistency after inferring what the type + will be after `pickValue` is applied, just as they do currently for `linkMerge`. + + * **first_non_null** + + For the first level of a list input, pick the first non-null element. The result is a scalar. + It is an error if there is no non-null element. Examples: + * `[null, x, null, y] -> x` + * `[null, [null], null, y] -> [null]` + * `[null, null, null] -> Runtime Error` + + *Intended use case*: If-else pattern where the + value comes either from a conditional step or from a default or + fallback value. The conditional step(s) should be placed first in + the list. + + * **the_only_non_null** + + For the first level of a list input, pick the single non-null element. The result is a scalar. + It is an error if there is more than one non-null element. Examples: + + * `[null, x, null] -> x` + * `[null, x, null, y] -> Runtime Error` + * `[null, [null], null] -> [null]` + * `[null, null, null] -> Runtime Error` + + *Intended use case*: Switch type patterns where developer considers + more than one active code path as a workflow error + (possibly indicating an error in writing `when` condition expressions). + + * **all_non_null** + + For the first level of a list input, pick all non-null values. + The result is a list, which may be empty. Examples: + + * `[null, x, null] -> [x]` + * `[x, null, y] -> [x, y]` + * `[null, [x], [null]] -> [[x], [null]]` + * `[null, null, null] -> []` + + *Intended use case*: It is valid to have more than one source, but + sources are conditional, so null sources (from skipped steps) + should be filtered out. + properties: + default: + description: |- + The default value for this parameter to use if either there is no + `source` field, or the value produced by the `source` is `null`. The + default must be applied prior to scattering or evaluating `valueFrom`. + id: + description: The unique identifier for this object. + type: string + label: + description: A short, human-readable label of this object. + type: string + linkMerge: + description: |- + The method to use to merge multiple inbound links into a single array. + If not specified, the default method is "merge_nested". + enum: + - merge_flattened + - merge_nested + type: string + loadContents: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + If true, the file (or each file in the array) must be a UTF-8 + text file 64 KiB or smaller, and the implementation must read + the entire contents of the file (or file array) and place it + in the `contents` field of the File object for use by + expressions. If the size of the file is greater than 64 KiB, + the implementation must raise a fatal error. + type: boolean + loadListing: + description: |- + Only valid when `type: Directory` or is an array of `items: Directory`. + + Specify the desired behavior for loading the `listing` field of + a Directory object for use by expressions. + + The order of precedence for loadListing is: + + 1. `loadListing` on an individual parameter + 2. Inherited from `LoadListingRequirement` + 3. By default: `no_listing` + enum: + - deep_listing + - no_listing + - shallow_listing + type: string + pickValue: + description: The method to use to choose non-null elements among multiple sources. + enum: + - all_non_null + - first_non_null + - the_only_non_null + type: string + source: + anyOf: + - items: + type: string + type: array + - type: string + description: |- + Specifies one or more workflow parameters that will provide input to + the underlying step parameter. + valueFrom: + description: |- + To use valueFrom, [StepInputExpressionRequirement](#StepInputExpressionRequirement) must + be specified in the workflow or workflow step requirements. + + If `valueFrom` is a constant string value, use this as the value for + this input parameter. + + If `valueFrom` is a parameter reference or expression, it must be + evaluated to yield the actual value to be assigned to the input field. + + The `self` value in the parameter reference or expression must be + 1. `null` if there is no `source` field + 2. the value of the parameter(s) specified in the `source` field when this + workflow input parameter **is not** specified in this workflow step's `scatter` field. + 3. an element of the parameter specified in the `source` field when this workflow input + parameter **is** specified in this workflow step's `scatter` field. + + The value of `inputs` in the parameter reference or expression must be + the input object to the workflow step after assigning the `source` + values, applying `default`, and then scattering. The order of + evaluating `valueFrom` among step input parameters is undefined and the + result of evaluating `valueFrom` on a parameter must not be visible to + evaluation of `valueFrom` on other parameters. + type: string + required: [] + type: object + WorkflowStepOutput: + additionalProperties: false + description: |- + Associate an output parameter of the underlying process with a workflow + parameter. The workflow parameter (given in the `id` field) be may be used + as a `source` to connect with input parameters of other workflow steps, or + with an output parameter of the process. + + A unique identifier for this workflow output parameter. This is + the identifier to use in the `source` field of `WorkflowStepInput` + to connect the output value to downstream parameters. + properties: + id: + description: The unique identifier for this object. + type: string + required: [] + type: object + CWLImportManual: + description: Represents an '$import' directive that should point toward another compatible CWL file to import where specified. The contents of the imported file should be relevant contextually where it is being imported + $comment: The schema validation of the CWL will not itself perform the '$import' to resolve and validate its contents. Therefore, the complete schema will not be validated entirely, and could still be partially malformed. To ensure proper and exhaustive validation of a CWL definition with this schema, all '$import' directives should be resolved and extended beforehand + type: object + properties: + $import: + type: string + required: + - $import + additionalProperties: false + CWLIncludeManual: + description: Represents an '$include' directive that should point toward another compatible CWL file to import where specified. The contents of the imported file should be relevant contextually where it is being imported + $comment: The schema validation of the CWL will not itself perform the '$include' to resolve and validate its contents. Therefore, the complete schema will not be validated entirely, and could still be partially malformed. To ensure proper and exhaustive validation of a CWL definition with this schema, all '$include' directives should be resolved and extended beforehand + type: object + properties: + $include: + type: string + required: + - $include + additionalProperties: false + CWLDocumentMetadata: + description: Metadata for a CWL document + type: object + properties: + $namespaces: + description: The namespaces used in the document + type: object + patternProperties: + ^[_a-zA-Z][a-zA-Z0-9_-]*$: + type: string + $schemas: + description: The schemas used in the document + type: array + items: + type: string + patternProperties: + ^\w+:.*$: + type: object + ^\w+:\/\/.*: + type: object + required: [] + CommandInputRecordFieldMap: + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandInputRecordField + oneOf: + - additionalProperties: false + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + format: + anyOf: + - items: + type: string + type: array + - type: string + description: |- + Only valid when `type: File` or is an array of `items: File`. + + This must be one or more IRIs of concept nodes + that represents file formats which are allowed as input to this + parameter, preferably defined within an ontology. If no ontology is + available, file formats may be tested by exact match. + inputBinding: + $ref: '#/definitions/CommandLineBinding' + description: Describes how to turn this object into command line arguments. + label: + description: A short, human-readable label of this object. + type: string + loadContents: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + If true, the file (or each file in the array) must be a UTF-8 + text file 64 KiB or smaller, and the implementation must read + the entire contents of the file (or file array) and place it + in the `contents` field of the File object for use by + expressions. If the size of the file is greater than 64 KiB, + the implementation must raise a fatal error. + type: boolean + loadListing: + description: |- + Only valid when `type: Directory` or is an array of `items: Directory`. + + Specify the desired behavior for loading the `listing` field of + a Directory object for use by expressions. + + The order of precedence for loadListing is: + + 1. `loadListing` on an individual parameter + 2. Inherited from `LoadListingRequirement` + 3. By default: `no_listing` + enum: + - deep_listing + - no_listing + - shallow_listing + type: string + name: + description: The name of the field + type: string + secondaryFiles: + anyOf: + - $ref: '#/definitions/SecondaryFileSchema' + - items: + $ref: '#/definitions/SecondaryFileSchema' + type: array + description: |- + Only valid when `type: File` or is an array of `items: File`. + + Provides a pattern or expression specifying files or + directories that should be included alongside the primary + file. Secondary files may be required or optional. When not + explicitly specified, secondary files specified for `inputs` + are required and `outputs` are optional. An implementation + must include matching Files and Directories in the + `secondaryFiles` property of the primary file. These Files + and Directories must be transferred and staged alongside the + primary file. An implementation may fail workflow execution + if a required secondary file does not exist. + + If the value is an expression, the value of `self` in the expression + must be the primary input or output File object to which this binding + applies. The `basename`, `nameroot` and `nameext` fields must be + present in `self`. For `CommandLineTool` outputs the `path` field must + also be present. The expression must return a filename string relative + to the path to the primary File, a File or Directory object with either + `path` or `location` and `basename` fields set, or an array consisting + of strings or File or Directory objects. It is legal to reference an + unchanged File or Directory object taken from input as a secondaryFile. + The expression may return "null" in which case there is no secondaryFile + from that expression. + + To work on non-filename-preserving storage systems, portable tool + descriptions should avoid constructing new values from `location`, but + should construct relative references using `basename` or `nameroot` + instead. + + If a value in `secondaryFiles` is a string that is not an expression, + it specifies that the following pattern should be applied to the path + of the primary file to yield a filename relative to the primary File: + + 1. If string ends with `?` character, remove the last `?` and mark + the resulting secondary file as optional. + 2. If string begins with one or more caret `^` characters, for each + caret, remove the last file extension from the path (the last + period `.` and all following characters). If there are no file + extensions, the path is unchanged. + 3. Append the remainder of the string to the end of the file path. + streamable: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + A value of `true` indicates that the file is read or written + sequentially without seeking. An implementation may use this flag to + indicate whether it is valid to stream file contents using a named + pipe. Default: `false`. + type: boolean + type: + anyOf: + - $ref: '#/definitions/CommandInputArraySchema' + - $ref: '#/definitions/CommandInputRecordSchema' + - $ref: '#/definitions/CommandInputEnumSchema' + - items: + anyOf: + - $ref: '#/definitions/CommandInputArraySchema' + - $ref: '#/definitions/CommandInputRecordSchema' + - $ref: '#/definitions/CommandInputEnumSchema' + - type: string + type: array + - type: string + description: The field type + type: object + required: + - type + - type: array + items: + anyOf: + - $ref: '#/definitions/CommandInputArraySchema' + - $ref: '#/definitions/CommandInputRecordSchema' + - $ref: '#/definitions/CommandInputEnumSchema' + - items: + anyOf: + - $ref: '#/definitions/CommandInputArraySchema' + - $ref: '#/definitions/CommandInputRecordSchema' + - $ref: '#/definitions/CommandInputEnumSchema' + - type: string + type: array + - type: string + description: The field type + - type: string + InputRecordFieldMap: + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#InputRecordField + oneOf: + - additionalProperties: false + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + format: + anyOf: + - items: + type: string + type: array + - type: string + description: |- + Only valid when `type: File` or is an array of `items: File`. + + This must be one or more IRIs of concept nodes + that represents file formats which are allowed as input to this + parameter, preferably defined within an ontology. If no ontology is + available, file formats may be tested by exact match. + label: + description: A short, human-readable label of this object. + type: string + loadContents: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + If true, the file (or each file in the array) must be a UTF-8 + text file 64 KiB or smaller, and the implementation must read + the entire contents of the file (or file array) and place it + in the `contents` field of the File object for use by + expressions. If the size of the file is greater than 64 KiB, + the implementation must raise a fatal error. + type: boolean + loadListing: + description: |- + Only valid when `type: Directory` or is an array of `items: Directory`. + + Specify the desired behavior for loading the `listing` field of + a Directory object for use by expressions. + + The order of precedence for loadListing is: + + 1. `loadListing` on an individual parameter + 2. Inherited from `LoadListingRequirement` + 3. By default: `no_listing` + enum: + - deep_listing + - no_listing + - shallow_listing + type: string + name: + description: The name of the field + type: string + secondaryFiles: + anyOf: + - $ref: '#/definitions/SecondaryFileSchema' + - items: + $ref: '#/definitions/SecondaryFileSchema' + type: array + description: |- + Only valid when `type: File` or is an array of `items: File`. + + Provides a pattern or expression specifying files or + directories that should be included alongside the primary + file. Secondary files may be required or optional. When not + explicitly specified, secondary files specified for `inputs` + are required and `outputs` are optional. An implementation + must include matching Files and Directories in the + `secondaryFiles` property of the primary file. These Files + and Directories must be transferred and staged alongside the + primary file. An implementation may fail workflow execution + if a required secondary file does not exist. + + If the value is an expression, the value of `self` in the expression + must be the primary input or output File object to which this binding + applies. The `basename`, `nameroot` and `nameext` fields must be + present in `self`. For `CommandLineTool` outputs the `path` field must + also be present. The expression must return a filename string relative + to the path to the primary File, a File or Directory object with either + `path` or `location` and `basename` fields set, or an array consisting + of strings or File or Directory objects. It is legal to reference an + unchanged File or Directory object taken from input as a secondaryFile. + The expression may return "null" in which case there is no secondaryFile + from that expression. + + To work on non-filename-preserving storage systems, portable tool + descriptions should avoid constructing new values from `location`, but + should construct relative references using `basename` or `nameroot` + instead. + + If a value in `secondaryFiles` is a string that is not an expression, + it specifies that the following pattern should be applied to the path + of the primary file to yield a filename relative to the primary File: + + 1. If string ends with `?` character, remove the last `?` and mark + the resulting secondary file as optional. + 2. If string begins with one or more caret `^` characters, for each + caret, remove the last file extension from the path (the last + period `.` and all following characters). If there are no file + extensions, the path is unchanged. + 3. Append the remainder of the string to the end of the file path. + streamable: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + A value of `true` indicates that the file is read or written + sequentially without seeking. An implementation may use this flag to + indicate whether it is valid to stream file contents using a named + pipe. Default: `false`. + type: boolean + type: + anyOf: + - $ref: '#/definitions/InputRecordSchema' + - $ref: '#/definitions/InputEnumSchema' + - $ref: '#/definitions/InputArraySchema' + - items: + anyOf: + - $ref: '#/definitions/InputRecordSchema' + - $ref: '#/definitions/InputEnumSchema' + - $ref: '#/definitions/InputArraySchema' + - type: string + type: array + - type: string + description: The field type + type: object + required: + - type + - type: array + items: + anyOf: + - $ref: '#/definitions/InputRecordSchema' + - $ref: '#/definitions/InputEnumSchema' + - $ref: '#/definitions/InputArraySchema' + - items: + anyOf: + - $ref: '#/definitions/InputRecordSchema' + - $ref: '#/definitions/InputEnumSchema' + - $ref: '#/definitions/InputArraySchema' + - type: string + type: array + - type: string + description: The field type + - type: string + CommandOutputRecordFieldMap: + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#CommandOutputRecordField + oneOf: + - additionalProperties: false + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + format: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + This is the file format that will be assigned to the output + File object. + type: string + label: + description: A short, human-readable label of this object. + type: string + name: + description: The name of the field + type: string + outputBinding: + $ref: '#/definitions/CommandOutputBinding' + description: |- + Describes how to generate this output object based on the files + produced by a CommandLineTool + secondaryFiles: + anyOf: + - $ref: '#/definitions/SecondaryFileSchema' + - items: + $ref: '#/definitions/SecondaryFileSchema' + type: array + description: |- + Only valid when `type: File` or is an array of `items: File`. + + Provides a pattern or expression specifying files or + directories that should be included alongside the primary + file. Secondary files may be required or optional. When not + explicitly specified, secondary files specified for `inputs` + are required and `outputs` are optional. An implementation + must include matching Files and Directories in the + `secondaryFiles` property of the primary file. These Files + and Directories must be transferred and staged alongside the + primary file. An implementation may fail workflow execution + if a required secondary file does not exist. + + If the value is an expression, the value of `self` in the expression + must be the primary input or output File object to which this binding + applies. The `basename`, `nameroot` and `nameext` fields must be + present in `self`. For `CommandLineTool` outputs the `path` field must + also be present. The expression must return a filename string relative + to the path to the primary File, a File or Directory object with either + `path` or `location` and `basename` fields set, or an array consisting + of strings or File or Directory objects. It is legal to reference an + unchanged File or Directory object taken from input as a secondaryFile. + The expression may return "null" in which case there is no secondaryFile + from that expression. + + To work on non-filename-preserving storage systems, portable tool + descriptions should avoid constructing new values from `location`, but + should construct relative references using `basename` or `nameroot` + instead. + + If a value in `secondaryFiles` is a string that is not an expression, + it specifies that the following pattern should be applied to the path + of the primary file to yield a filename relative to the primary File: + + 1. If string ends with `?` character, remove the last `?` and mark + the resulting secondary file as optional. + 2. If string begins with one or more caret `^` characters, for each + caret, remove the last file extension from the path (the last + period `.` and all following characters). If there are no file + extensions, the path is unchanged. + 3. Append the remainder of the string to the end of the file path. + streamable: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + A value of `true` indicates that the file is read or written + sequentially without seeking. An implementation may use this flag to + indicate whether it is valid to stream file contents using a named + pipe. Default: `false`. + type: boolean + type: + anyOf: + - $ref: '#/definitions/CommandOutputArraySchema' + - $ref: '#/definitions/CommandOutputRecordSchema' + - $ref: '#/definitions/CommandOutputEnumSchema' + - items: + anyOf: + - $ref: '#/definitions/CommandOutputArraySchema' + - $ref: '#/definitions/CommandOutputRecordSchema' + - $ref: '#/definitions/CommandOutputEnumSchema' + - type: string + type: array + - type: string + description: The field type + type: object + required: + - type + - type: array + items: + anyOf: + - $ref: '#/definitions/CommandOutputArraySchema' + - $ref: '#/definitions/CommandOutputRecordSchema' + - $ref: '#/definitions/CommandOutputEnumSchema' + - items: + anyOf: + - $ref: '#/definitions/CommandOutputArraySchema' + - $ref: '#/definitions/CommandOutputRecordSchema' + - $ref: '#/definitions/CommandOutputEnumSchema' + - type: string + type: array + - type: string + description: The field type + - type: string + OutputRecordFieldMap: + description: Auto-generated class implementation for https://w3id.org/cwl/cwl#OutputRecordField + oneOf: + - additionalProperties: false + properties: + doc: + anyOf: + - items: + type: string + type: array + - type: string + description: A documentation string for this object, or an array of strings which should be concatenated. + format: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + This is the file format that will be assigned to the output + File object. + type: string + label: + description: A short, human-readable label of this object. + type: string + name: + description: The name of the field + type: string + secondaryFiles: + anyOf: + - $ref: '#/definitions/SecondaryFileSchema' + - items: + $ref: '#/definitions/SecondaryFileSchema' + type: array + description: |- + Only valid when `type: File` or is an array of `items: File`. + + Provides a pattern or expression specifying files or + directories that should be included alongside the primary + file. Secondary files may be required or optional. When not + explicitly specified, secondary files specified for `inputs` + are required and `outputs` are optional. An implementation + must include matching Files and Directories in the + `secondaryFiles` property of the primary file. These Files + and Directories must be transferred and staged alongside the + primary file. An implementation may fail workflow execution + if a required secondary file does not exist. + + If the value is an expression, the value of `self` in the expression + must be the primary input or output File object to which this binding + applies. The `basename`, `nameroot` and `nameext` fields must be + present in `self`. For `CommandLineTool` outputs the `path` field must + also be present. The expression must return a filename string relative + to the path to the primary File, a File or Directory object with either + `path` or `location` and `basename` fields set, or an array consisting + of strings or File or Directory objects. It is legal to reference an + unchanged File or Directory object taken from input as a secondaryFile. + The expression may return "null" in which case there is no secondaryFile + from that expression. + + To work on non-filename-preserving storage systems, portable tool + descriptions should avoid constructing new values from `location`, but + should construct relative references using `basename` or `nameroot` + instead. + + If a value in `secondaryFiles` is a string that is not an expression, + it specifies that the following pattern should be applied to the path + of the primary file to yield a filename relative to the primary File: + + 1. If string ends with `?` character, remove the last `?` and mark + the resulting secondary file as optional. + 2. If string begins with one or more caret `^` characters, for each + caret, remove the last file extension from the path (the last + period `.` and all following characters). If there are no file + extensions, the path is unchanged. + 3. Append the remainder of the string to the end of the file path. + streamable: + description: |- + Only valid when `type: File` or is an array of `items: File`. + + A value of `true` indicates that the file is read or written + sequentially without seeking. An implementation may use this flag to + indicate whether it is valid to stream file contents using a named + pipe. Default: `false`. + type: boolean + type: + anyOf: + - $ref: '#/definitions/OutputRecordSchema' + - $ref: '#/definitions/OutputEnumSchema' + - $ref: '#/definitions/OutputArraySchema' + - items: + anyOf: + - $ref: '#/definitions/OutputRecordSchema' + - $ref: '#/definitions/OutputEnumSchema' + - $ref: '#/definitions/OutputArraySchema' + - type: string + type: array + - type: string + description: The field type + type: object + required: + - type + - type: array + items: + anyOf: + - $ref: '#/definitions/OutputRecordSchema' + - $ref: '#/definitions/OutputEnumSchema' + - $ref: '#/definitions/OutputArraySchema' + - items: + anyOf: + - $ref: '#/definitions/OutputRecordSchema' + - $ref: '#/definitions/OutputEnumSchema' + - $ref: '#/definitions/OutputArraySchema' + - type: string + type: array + - type: string + description: The field type + - type: string + InlineJavascriptRequirementMap: + type: object + properties: + expressionLib: + description: |- + Additional code fragments that will also be inserted + before executing the expression code. Allows for function definitions that may + be called from CWL expressions. + items: + anyOf: + - type: string + - $ref: '#/definitions/CWLImportManual' + - $ref: '#/definitions/CWLIncludeManual' + type: array + required: [] + description: |- + Indicates that the workflow platform must support inline Javascript expressions. + If this requirement is not present, the workflow platform must not perform expression + interpolation. + SchemaDefRequirementMap: + type: object + properties: + types: + description: The list of type definitions. + items: + anyOf: + - anyOf: + - $ref: '#/definitions/CommandInputArraySchema' + - $ref: '#/definitions/CommandInputRecordSchema' + - $ref: '#/definitions/CommandInputEnumSchema' + - $ref: '#/definitions/CWLImportManual' + - $ref: '#/definitions/CWLIncludeManual' + type: array + required: + - types + description: |- + This field consists of an array of type definitions which must be used when + interpreting the `inputs` and `outputs` fields. When a `type` field + contains a IRI, the implementation must check if the type is defined in + `schemaDefs` and use that definition. If the type is not found in + `schemaDefs`, it is an error. The entries in `schemaDefs` must be + processed in the order listed such that later schema definitions may refer + to earlier schema definitions. + + - **Type definitions are allowed for `enum` and `record` types only.** + - Type definitions may be shared by defining them in a file and then + `$include`-ing them in the `types` field. + - A file can contain a list of type definitions + LoadListingRequirementMap: + type: object + properties: + loadListing: + enum: + - deep_listing + - no_listing + - shallow_listing + type: string + required: [] + description: |- + Specify the desired behavior for loading the `listing` field of + a Directory object for use by expressions. + DockerRequirementMap: + type: object + properties: + dockerFile: + description: Supply the contents of a Dockerfile which will be built using `docker build`. + type: string + dockerImageId: + description: |- + The image id that will be used for `docker run`. May be a + human-readable image name or the image identifier hash. May be skipped + if `dockerPull` is specified, in which case the `dockerPull` image id + must be used. + type: string + dockerImport: + description: Provide HTTP URL to download and gunzip a Docker images using `docker import. + type: string + dockerLoad: + description: Specify an HTTP URL from which to download a Docker image using `docker load`. + type: string + dockerOutputDirectory: + description: |- + Set the designated output directory to a specific location inside the + Docker container. + type: string + dockerPull: + description: |- + Specify a Docker image to retrieve using `docker pull`. Can contain the + immutable digest to ensure an exact container is used: + `dockerPull: ubuntu@sha256:45b23dee08af5e43a7fea6c4cf9c25ccf269ee113168c19722f87876677c5cb2` + type: string + required: [] + description: |- + Indicates that a workflow component should be run in a + [Docker](https://docker.com) or Docker-compatible (such as + [Singularity](https://www.sylabs.io/) and [udocker](https://github.com/indigo-dc/udocker)) container environment and + specifies how to fetch or build the image. + + If a CommandLineTool lists `DockerRequirement` under + `hints` (or `requirements`), it may (or must) be run in the specified Docker + container. + + The platform must first acquire or install the correct Docker image as + specified by `dockerPull`, `dockerImport`, `dockerLoad` or `dockerFile`. + + The platform must execute the tool in the container using `docker run` with + the appropriate Docker image and tool command line. + + The workflow platform may provide input files and the designated output + directory through the use of volume bind mounts. The platform should rewrite + file paths in the input object to correspond to the Docker bind mounted + locations. That is, the platform should rewrite values in the parameter context + such as `runtime.outdir`, `runtime.tmpdir` and others to be valid paths + within the container. The platform must ensure that `runtime.outdir` and + `runtime.tmpdir` are distinct directories. + + When running a tool contained in Docker, the workflow platform must not + assume anything about the contents of the Docker container, such as the + presence or absence of specific software, except to assume that the + generated command line represents a valid command within the runtime + environment of the container. + + A container image may specify an + [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#entrypoint) + and/or + [CMD](https://docs.docker.com/engine/reference/builder/#cmd). + Command line arguments will be appended after all elements of + ENTRYPOINT, and will override all elements specified using CMD (in + other words, CMD is only used when the CommandLineTool definition + produces an empty command line). + + Use of implicit ENTRYPOINT or CMD are discouraged due to reproducibility + concerns of the implicit hidden execution point (For further discussion, see + [https://doi.org/10.12688/f1000research.15140.1](https://doi.org/10.12688/f1000research.15140.1)). Portable + CommandLineTool wrappers in which use of a container is optional must not rely on ENTRYPOINT or CMD. + CommandLineTools which do rely on ENTRYPOINT or CMD must list `DockerRequirement` in the + `requirements` section. + + ## Interaction with other requirements + + If [EnvVarRequirement](#EnvVarRequirement) is specified alongside a + DockerRequirement, the environment variables must be provided to Docker + using `--env` or `--env-file` and interact with the container's preexisting + environment as defined by Docker. + SoftwareRequirementMap: + type: object + properties: + packages: + description: The list of software to be configured. + items: + anyOf: + - $ref: '#/definitions/SoftwarePackage' + - $ref: '#/definitions/CWLImportManual' + - $ref: '#/definitions/CWLIncludeManual' + type: array + required: + - packages + description: |- + A list of software packages that should be configured in the environment of + the defined process. + InitialWorkDirRequirementMap: + type: object + properties: + listing: + anyOf: + - items: + anyOf: + - anyOf: + - $ref: '#/definitions/File' + - $ref: '#/definitions/Directory' + - items: + anyOf: + - anyOf: + - $ref: '#/definitions/File' + - $ref: '#/definitions/Directory' + - $ref: '#/definitions/CWLImportManual' + - $ref: '#/definitions/CWLIncludeManual' + type: array + - $ref: '#/definitions/Dirent' + - type: string + - $ref: '#/definitions/CWLImportManual' + - $ref: '#/definitions/CWLIncludeManual' + type: array + - type: string + description: |- + The list of files or subdirectories that must be staged prior + to executing the command line tool. + + Return type of each expression must validate as `["null", + File, Directory, Dirent, {type: array, items: [File, + Directory]}]`. + + Each `File` or `Directory` that is returned by an Expression + must be added to the designated output directory prior to + executing the tool. + + Each `Dirent` record that is listed or returned by an + expression specifies a file to be created or staged in the + designated output directory prior to executing the tool. + + Expressions may return null, in which case they have no effect. + + Files or Directories which are listed in the input parameters + and appear in the `InitialWorkDirRequirement` listing must + have their `path` set to their staged location. If the same + File or Directory appears more than once in the + `InitialWorkDirRequirement` listing, the implementation must + choose exactly one value for `path`; how this value is chosen + is undefined. + required: [] + description: |- + Define a list of files and subdirectories that must be staged by the workflow platform prior to executing the command line tool. + Normally files are staged within the designated output directory. However, when running inside containers, files may be staged at arbitrary locations, see discussion for [`Dirent.entryname`](#Dirent). Together with `DockerRequirement.dockerOutputDirectory` it is possible to control the locations of both input and output files when running in containers. + EnvVarRequirementMap: + type: object + properties: + envDef: + description: The list of environment variables. + oneOf: + - items: + anyOf: + - $ref: '#/definitions/EnvironmentDef' + - $ref: '#/definitions/CWLImportManual' + - $ref: '#/definitions/CWLIncludeManual' + type: array + - patternProperties: + ^[_a-zA-Z][a-zA-Z0-9_-]*$: + type: string + required: + - envDef + description: |- + Define a list of environment variables which will be set in the + execution environment of the tool. See `EnvironmentDef` for details. + ShellCommandRequirementMap: + type: object + properties: {} + required: [] + description: |- + Modify the behavior of CommandLineTool to generate a single string + containing a shell command line. Each item in the `arguments` list must + be joined into a string separated by single spaces and quoted to prevent + intepretation by the shell, unless `CommandLineBinding` for that argument + contains `shellQuote: false`. If `shellQuote: false` is specified, the + argument is joined into the command string without quoting, which allows + the use of shell metacharacters such as `|` for pipes. + ResourceRequirementMap: + type: object + properties: + coresMax: + description: |- + Maximum reserved number of CPU cores. + + See `coresMin` for discussion about fractional CPU requests. + type: + - string + - number + coresMin: + description: |- + Minimum reserved number of CPU cores (default is 1). + + May be a fractional value to indicate to a scheduling + algorithm that one core can be allocated to multiple + jobs. For example, a value of 0.25 indicates that up to 4 + jobs may run in parallel on 1 core. A value of 1.25 means + that up to 3 jobs can run on a 4 core system (4/1.25 ≈ 3). + + Processes can only share a core allocation if the sum of each + of their `ramMax`, `tmpdirMax`, and `outdirMax` requests also + do not exceed the capacity of the node. + + Processes sharing a core must have the same level of isolation + (typically a container or VM) that they would normally. + + The reported number of CPU cores reserved for the process, + which is available to expressions on the CommandLineTool as + `runtime.cores`, must be a non-zero integer, and may be + calculated by rounding up the cores request to the next whole + number. + + Scheduling systems may allocate fractional CPU resources by + setting quotas or scheduling weights. Scheduling systems that + do not support fractional CPUs may round up the request to the + next whole number. + type: + - string + - number + outdirMax: + description: |- + Maximum reserved filesystem based storage for the designated output directory, in mebibytes (2**20) + + See `outdirMin` for discussion about fractional storage requests. + type: + - string + - number + outdirMin: + description: |- + Minimum reserved filesystem based storage for the designated output directory, in mebibytes (2**20) (default is 1024) + + May be a fractional value. If so, the actual storage request + must be rounded up to the next whole number. The reported + amount of storage reserved for the process, which is available + to expressions on the CommandLineTool as `runtime.outdirSize`, + must be a non-zero integer. + type: + - string + - number + ramMax: + description: |- + Maximum reserved RAM in mebibytes (2**20) + + See `ramMin` for discussion about fractional RAM requests. + type: + - string + - number + ramMin: + description: |- + Minimum reserved RAM in mebibytes (2**20) (default is 256) + + May be a fractional value. If so, the actual RAM request must + be rounded up to the next whole number. The reported amount of + RAM reserved for the process, which is available to + expressions on the CommandLineTool as `runtime.ram`, must be a + non-zero integer. + type: + - string + - number + tmpdirMax: + description: |- + Maximum reserved filesystem based storage for the designated temporary directory, in mebibytes (2**20) + + See `tmpdirMin` for discussion about fractional storage requests. + type: + - string + - number + tmpdirMin: + description: |- + Minimum reserved filesystem based storage for the designated temporary directory, in mebibytes (2**20) (default is 1024) + + May be a fractional value. If so, the actual storage request + must be rounded up to the next whole number. The reported + amount of storage reserved for the process, which is available + to expressions on the CommandLineTool as `runtime.tmpdirSize`, + must be a non-zero integer. + type: + - string + - number + required: [] + description: |- + Specify basic hardware resource requirements. + + "min" is the minimum amount of a resource that must be reserved to + schedule a job. If "min" cannot be satisfied, the job should not + be run. + + "max" is the maximum amount of a resource that the job shall be + allocated. If a node has sufficient resources, multiple jobs may + be scheduled on a single node provided each job's "max" resource + requirements are met. If a job attempts to exceed its resource + allocation, an implementation may deny additional resources, which + may result in job failure. + + If both "min" and "max" are specified, an implementation may + choose to allocate any amount between "min" and "max", with the + actual allocation provided in the `runtime` object. + + If "min" is specified but "max" is not, then "max" == "min" + If "max" is specified by "min" is not, then "min" == "max". + + It is an error if max < min. + + It is an error if the value of any of these fields is negative. + + If neither "min" nor "max" is specified for a resource, use the default values below. + WorkReuseMap: + type: object + properties: + enableReuse: + type: + - string + - boolean + required: + - enableReuse + description: |- + For implementations that support reusing output from past work (on + the assumption that same code and same input produce same + results), control whether to enable or disable the reuse behavior + for a particular tool or step (to accommodate situations where that + assumption is incorrect). A reused step is not executed but + instead returns the same output as the original execution. + + If `WorkReuse` is not specified, correct tools should assume it + is enabled by default. + NetworkAccessMap: + type: object + properties: + networkAccess: + type: + - string + - boolean + required: + - networkAccess + description: |- + Indicate whether a process requires outgoing IPv4/IPv6 network + access. Choice of IPv4 or IPv6 is implementation and site + specific, correct tools must support both. + + If `networkAccess` is false or not specified, tools must not + assume network access, except for localhost (the loopback device). + + If `networkAccess` is true, the tool must be able to make outgoing + connections to network resources. Resources may be on a private + subnet or the public Internet. However, implementations and sites + may apply their own security policies to restrict what is + accessible by the tool. + + Enabling network access does not imply a publicly routable IP + address or the ability to accept inbound connections. + InplaceUpdateRequirementMap: + type: object + properties: + inplaceUpdate: + type: boolean + required: + - inplaceUpdate + description: |2- + If `inplaceUpdate` is true, then an implementation supporting this + feature may permit tools to directly update files with `writable: + true` in InitialWorkDirRequirement. That is, as an optimization, + files may be destructively modified in place as opposed to copied + and updated. + + An implementation must ensure that only one workflow step may + access a writable file at a time. It is an error if a file which + is writable by one workflow step file is accessed (for reading or + writing) by any other workflow step running independently. + However, a file which has been updated in a previous completed + step may be used as input to multiple steps, provided it is + read-only in every step. + + Workflow steps which modify a file must produce the modified file + as output. Downstream steps which further process the file must + use the output of previous steps, and not refer to a common input + (this is necessary for both ordering and correctness). + + Workflow authors should provide this in the `hints` section. The + intent of this feature is that workflows produce the same results + whether or not InplaceUpdateRequirement is supported by the + implementation, and this feature is primarily available as an + optimization for particular environments. + + Users and implementers should be aware that workflows that + destructively modify inputs may not be repeatable or reproducible. + In particular, enabling this feature implies that WorkReuse should + not be enabled. + ToolTimeLimitMap: + type: object + properties: + timelimit: + description: |- + The time limit, in seconds. A time limit of zero means no + time limit. Negative time limits are an error. + type: + - string + - number + required: + - timelimit + description: |- + Set an upper limit on the execution time of a CommandLineTool. + A CommandLineTool whose execution duration exceeds the time + limit may be preemptively terminated and considered failed. + May also be used by batch systems to make scheduling decisions. + The execution duration excludes external operations, such as + staging of files, pulling a docker image etc, and only counts + wall-time for the execution of the command line itself. + SubworkflowFeatureRequirementMap: + type: object + properties: {} + required: [] + description: |- + Indicates that the workflow platform must support nested workflows in + the `run` field of [WorkflowStep](#WorkflowStep). + ScatterFeatureRequirementMap: + type: object + properties: {} + required: [] + description: |- + Indicates that the workflow platform must support the `scatter` and + `scatterMethod` fields of [WorkflowStep](#WorkflowStep). + MultipleInputFeatureRequirementMap: + type: object + properties: {} + required: [] + description: |- + Indicates that the workflow platform must support multiple inbound data links + listed in the `source` field of [WorkflowStepInput](#WorkflowStepInput). + StepInputExpressionRequirementMap: + type: object + properties: {} + required: [] + description: |- + Indicate that the workflow platform must support the `valueFrom` field + of [WorkflowStepInput](#WorkflowStepInput). + CWLFile: + type: object + allOf: + - oneOf: + - $ref: '#/definitions/Workflow' + - $ref: '#/definitions/CommandLineTool' + - $ref: '#/definitions/ExpressionTool' + - oneOf: + - $ref: '#/definitions/CWLDocumentMetadata' + properties: + permanentFailCodes: true + cwlVersion: true + $namespaces: true + stdout: true + stderr: true + outputs: true + $schemas: true + hints: true + baseCommand: true + id: true + successCodes: true + expression: true + steps: true + class: true + stdin: true + label: true + requirements: true + intent: true + temporaryFailCodes: true + arguments: true + doc: true + inputs: true + patternProperties: + ^\w+:.*$: + type: object + ^\w+:\/\/.*: + type: object + additionalProperties: false + CWLGraph: + type: object + properties: + $graph: + type: array + items: + $ref: '#/definitions/CWLFile' + cwlVersion: + description: |- + CWL document version. Always required at the document root. Not + required for a Process embedded inside another Process. + enum: + - draft-2 + - draft-3 + - draft-3.dev1 + - draft-3.dev2 + - draft-3.dev3 + - draft-3.dev4 + - draft-3.dev5 + - draft-4.dev1 + - draft-4.dev2 + - draft-4.dev3 + - v1.0 + - v1.0.dev4 + - v1.1 + - v1.1.0-dev1 + - v1.2 + - v1.2.0-dev1 + - v1.2.0-dev2 + - v1.2.0-dev3 + - v1.2.0-dev4 + - v1.2.0-dev5 + type: string + required: + - $graph + CWLGraphOrFile: + type: object + additionalProperties: false + allOf: + - oneOf: + - $ref: '#/definitions/CWLGraph' + - $ref: '#/definitions/CWLFile' + - $ref: '#/definitions/CWLDocumentMetadata' + properties: + permanentFailCodes: true + cwlVersion: true + $namespaces: true + stdout: true + stderr: true + outputs: true + $schemas: true + hints: true + $graph: true + baseCommand: true + id: true + successCodes: true + expression: true + steps: true + class: true + stdin: true + label: true + requirements: true + intent: true + temporaryFailCodes: true + arguments: true + doc: true + inputs: true + patternProperties: + ^\w+:.*$: + type: object + ^\w+:\/\/.*: + type: object