arctrl 3.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- arctrl/__init__.py +23 -0
- arctrl/cwl.py +12 -0
- arctrl/py/CWL/__init__.py +0 -0
- arctrl/py/CWL/cwlprocessing_unit.py +221 -0
- arctrl/py/CWL/cwltypes.py +364 -0
- arctrl/py/CWL/decode.py +3532 -0
- arctrl/py/CWL/encode.py +1905 -0
- arctrl/py/CWL/expression_tool_description.py +192 -0
- arctrl/py/CWL/hash_helpers.py +60 -0
- arctrl/py/CWL/inputs.py +122 -0
- arctrl/py/CWL/operation_description.py +169 -0
- arctrl/py/CWL/outputs.py +171 -0
- arctrl/py/CWL/parameter_reference.py +74 -0
- arctrl/py/CWL/requirements.py +350 -0
- arctrl/py/CWL/tool_description.py +192 -0
- arctrl/py/CWL/workflow_description.py +181 -0
- arctrl/py/CWL/workflow_steps.py +354 -0
- arctrl/py/Contract/__init__.py +0 -0
- arctrl/py/Contract/arc.py +89 -0
- arctrl/py/Contract/arc_assay.py +125 -0
- arctrl/py/Contract/arc_investigation.py +88 -0
- arctrl/py/Contract/arc_run.py +291 -0
- arctrl/py/Contract/arc_study.py +126 -0
- arctrl/py/Contract/arc_workflow.py +213 -0
- arctrl/py/Contract/contract.py +153 -0
- arctrl/py/Contract/datamap.py +396 -0
- arctrl/py/Contract/git.py +116 -0
- arctrl/py/Contract/license.py +58 -0
- arctrl/py/Contract/validation_packages_config.py +107 -0
- arctrl/py/ContractIO/__init__.py +0 -0
- arctrl/py/ContractIO/contract_io.py +350 -0
- arctrl/py/ContractIO/file_system_helper.py +264 -0
- arctrl/py/Conversion/__init__.py +0 -0
- arctrl/py/Conversion/assay.py +151 -0
- arctrl/py/Conversion/basic.py +559 -0
- arctrl/py/Conversion/column_index.py +91 -0
- arctrl/py/Conversion/datamap.py +36 -0
- arctrl/py/Conversion/date_time.py +32 -0
- arctrl/py/Conversion/investigation.py +171 -0
- arctrl/py/Conversion/person.py +148 -0
- arctrl/py/Conversion/process.py +828 -0
- arctrl/py/Conversion/run.py +367 -0
- arctrl/py/Conversion/scholarly_article.py +163 -0
- arctrl/py/Conversion/study.py +99 -0
- arctrl/py/Conversion/table.py +229 -0
- arctrl/py/Conversion/workflow.py +680 -0
- arctrl/py/Core/Helper/__init__.py +0 -0
- arctrl/py/Core/Helper/collections_.py +512 -0
- arctrl/py/Core/Helper/date_time.py +26 -0
- arctrl/py/Core/Helper/hash_codes.py +60 -0
- arctrl/py/Core/Helper/identifier.py +290 -0
- arctrl/py/Core/Helper/orcid.py +42 -0
- arctrl/py/Core/Helper/printer.py +13 -0
- arctrl/py/Core/Helper/regex.py +554 -0
- arctrl/py/Core/Helper/sem_ver.py +71 -0
- arctrl/py/Core/Helper/url.py +148 -0
- arctrl/py/Core/Process/__init__.py +0 -0
- arctrl/py/Core/Process/column_index.py +280 -0
- arctrl/py/Core/Process/component.py +200 -0
- arctrl/py/Core/Process/factor.py +151 -0
- arctrl/py/Core/Process/factor_value.py +182 -0
- arctrl/py/Core/Process/material.py +74 -0
- arctrl/py/Core/Process/material_attribute.py +95 -0
- arctrl/py/Core/Process/material_attribute_value.py +184 -0
- arctrl/py/Core/Process/material_type.py +45 -0
- arctrl/py/Core/Process/process.py +477 -0
- arctrl/py/Core/Process/process_input.py +265 -0
- arctrl/py/Core/Process/process_output.py +235 -0
- arctrl/py/Core/Process/process_parameter_value.py +200 -0
- arctrl/py/Core/Process/process_sequence.py +435 -0
- arctrl/py/Core/Process/protocol.py +175 -0
- arctrl/py/Core/Process/protocol_parameter.py +98 -0
- arctrl/py/Core/Process/sample.py +82 -0
- arctrl/py/Core/Process/source.py +62 -0
- arctrl/py/Core/Table/__init__.py +0 -0
- arctrl/py/Core/Table/arc_table.py +1206 -0
- arctrl/py/Core/Table/arc_table_aux.py +1308 -0
- arctrl/py/Core/Table/arc_tables.py +574 -0
- arctrl/py/Core/Table/composite_cell.py +319 -0
- arctrl/py/Core/Table/composite_column.py +73 -0
- arctrl/py/Core/Table/composite_header.py +739 -0
- arctrl/py/Core/__init__.py +0 -0
- arctrl/py/Core/arc_types.py +5312 -0
- arctrl/py/Core/comment.py +128 -0
- arctrl/py/Core/comment_list.py +127 -0
- arctrl/py/Core/conversion.py +1375 -0
- arctrl/py/Core/data.py +247 -0
- arctrl/py/Core/data_context.py +157 -0
- arctrl/py/Core/data_file.py +112 -0
- arctrl/py/Core/datamap.py +217 -0
- arctrl/py/Core/identifier_setters.py +43 -0
- arctrl/py/Core/iproperty_value.py +36 -0
- arctrl/py/Core/ontology_annotation.py +298 -0
- arctrl/py/Core/ontology_source_reference.py +114 -0
- arctrl/py/Core/person.py +259 -0
- arctrl/py/Core/publication.py +161 -0
- arctrl/py/Core/template.py +231 -0
- arctrl/py/Core/templates.py +148 -0
- arctrl/py/Core/uri.py +11 -0
- arctrl/py/Core/value.py +188 -0
- arctrl/py/FileSystem/__init__.py +0 -0
- arctrl/py/FileSystem/commit.py +21 -0
- arctrl/py/FileSystem/default_gitattributes.py +1 -0
- arctrl/py/FileSystem/default_gitignore.py +1 -0
- arctrl/py/FileSystem/default_license.py +1 -0
- arctrl/py/FileSystem/file_system.py +58 -0
- arctrl/py/FileSystem/file_system_tree.py +483 -0
- arctrl/py/FileSystem/path.py +266 -0
- arctrl/py/Json/Datamap/__init__.py +0 -0
- arctrl/py/Json/Datamap/data_context.py +101 -0
- arctrl/py/Json/Datamap/datamap.py +53 -0
- arctrl/py/Json/Process/__init__.py +0 -0
- arctrl/py/Json/Process/assay_materials.py +46 -0
- arctrl/py/Json/Process/component.py +125 -0
- arctrl/py/Json/Process/factor.py +107 -0
- arctrl/py/Json/Process/factor_value.py +101 -0
- arctrl/py/Json/Process/material.py +226 -0
- arctrl/py/Json/Process/material_attribute.py +79 -0
- arctrl/py/Json/Process/material_attribute_value.py +101 -0
- arctrl/py/Json/Process/material_type.py +53 -0
- arctrl/py/Json/Process/process.py +296 -0
- arctrl/py/Json/Process/process_input.py +83 -0
- arctrl/py/Json/Process/process_output.py +67 -0
- arctrl/py/Json/Process/process_parameter_value.py +81 -0
- arctrl/py/Json/Process/protocol.py +354 -0
- arctrl/py/Json/Process/protocol_parameter.py +91 -0
- arctrl/py/Json/Process/sample.py +277 -0
- arctrl/py/Json/Process/source.py +214 -0
- arctrl/py/Json/Process/study_materials.py +52 -0
- arctrl/py/Json/Process/value.py +56 -0
- arctrl/py/Json/ROCrate/__init__.py +0 -0
- arctrl/py/Json/ROCrate/ldcontext.py +143 -0
- arctrl/py/Json/ROCrate/ldgraph.py +117 -0
- arctrl/py/Json/ROCrate/ldnode.py +304 -0
- arctrl/py/Json/ROCrate/ldref.py +44 -0
- arctrl/py/Json/ROCrate/ldvalue.py +102 -0
- arctrl/py/Json/Table/__init__.py +0 -0
- arctrl/py/Json/Table/arc_table.py +375 -0
- arctrl/py/Json/Table/cell_table.py +83 -0
- arctrl/py/Json/Table/composite_cell.py +136 -0
- arctrl/py/Json/Table/composite_header.py +67 -0
- arctrl/py/Json/Table/iotype.py +24 -0
- arctrl/py/Json/Table/oatable.py +82 -0
- arctrl/py/Json/Table/templates.py +281 -0
- arctrl/py/Json/__init__.py +0 -0
- arctrl/py/Json/assay.py +600 -0
- arctrl/py/Json/comment.py +206 -0
- arctrl/py/Json/context/rocrate/__init__.py +0 -0
- arctrl/py/Json/context/rocrate/isa_assay_context.py +101 -0
- arctrl/py/Json/context/rocrate/isa_comment_context.py +60 -0
- arctrl/py/Json/context/rocrate/isa_component_context.py +77 -0
- arctrl/py/Json/context/rocrate/isa_data_context.py +74 -0
- arctrl/py/Json/context/rocrate/isa_factor_context.py +74 -0
- arctrl/py/Json/context/rocrate/isa_factor_value_context.py +84 -0
- arctrl/py/Json/context/rocrate/isa_investigation_context.py +110 -0
- arctrl/py/Json/context/rocrate/isa_material_attribute_context.py +64 -0
- arctrl/py/Json/context/rocrate/isa_material_attribute_value_context.py +80 -0
- arctrl/py/Json/context/rocrate/isa_material_context.py +71 -0
- arctrl/py/Json/context/rocrate/isa_ontology_annotation_context.py +68 -0
- arctrl/py/Json/context/rocrate/isa_ontology_source_reference_context.py +75 -0
- arctrl/py/Json/context/rocrate/isa_organization_context.py +55 -0
- arctrl/py/Json/context/rocrate/isa_person_context.py +131 -0
- arctrl/py/Json/context/rocrate/isa_process_context.py +94 -0
- arctrl/py/Json/context/rocrate/isa_process_parameter_value_context.py +80 -0
- arctrl/py/Json/context/rocrate/isa_protocol_context.py +97 -0
- arctrl/py/Json/context/rocrate/isa_protocol_parameter_context.py +64 -0
- arctrl/py/Json/context/rocrate/isa_publication_context.py +78 -0
- arctrl/py/Json/context/rocrate/isa_sample_context.py +65 -0
- arctrl/py/Json/context/rocrate/isa_source_context.py +66 -0
- arctrl/py/Json/context/rocrate/isa_study_context.py +125 -0
- arctrl/py/Json/context/rocrate/property_value_context.py +73 -0
- arctrl/py/Json/context/rocrate/rocrate_context.py +81 -0
- arctrl/py/Json/converter_options.py +23 -0
- arctrl/py/Json/data.py +356 -0
- arctrl/py/Json/data_file.py +63 -0
- arctrl/py/Json/decode.py +271 -0
- arctrl/py/Json/encode.py +140 -0
- arctrl/py/Json/idtable.py +44 -0
- arctrl/py/Json/investigation.py +695 -0
- arctrl/py/Json/ontology_annotation.py +404 -0
- arctrl/py/Json/ontology_source_reference.py +255 -0
- arctrl/py/Json/person.py +658 -0
- arctrl/py/Json/property_value.py +359 -0
- arctrl/py/Json/publication.py +279 -0
- arctrl/py/Json/run.py +275 -0
- arctrl/py/Json/string_table.py +87 -0
- arctrl/py/Json/study.py +793 -0
- arctrl/py/Json/workflow.py +307 -0
- arctrl/py/JsonIO/Process/__init__.py +0 -0
- arctrl/py/JsonIO/Process/component.py +60 -0
- arctrl/py/JsonIO/Process/factor.py +36 -0
- arctrl/py/JsonIO/Process/factor_value.py +38 -0
- arctrl/py/JsonIO/Process/material.py +60 -0
- arctrl/py/JsonIO/Process/material_attribute.py +38 -0
- arctrl/py/JsonIO/Process/material_attribute_value.py +60 -0
- arctrl/py/JsonIO/Process/material_type.py +36 -0
- arctrl/py/JsonIO/Process/process.py +60 -0
- arctrl/py/JsonIO/Process/process_input.py +38 -0
- arctrl/py/JsonIO/Process/process_output.py +60 -0
- arctrl/py/JsonIO/Process/process_parameter_value.py +60 -0
- arctrl/py/JsonIO/Process/process_sequence.py +71 -0
- arctrl/py/JsonIO/Process/protocol.py +60 -0
- arctrl/py/JsonIO/Process/protocol_parameter.py +36 -0
- arctrl/py/JsonIO/Process/sample.py +60 -0
- arctrl/py/JsonIO/Process/source.py +60 -0
- arctrl/py/JsonIO/Process/study_materials.py +52 -0
- arctrl/py/JsonIO/Process/value.py +32 -0
- arctrl/py/JsonIO/Table/__init__.py +0 -0
- arctrl/py/JsonIO/Table/arc_table.py +103 -0
- arctrl/py/JsonIO/Table/composite_cell.py +36 -0
- arctrl/py/JsonIO/Table/composite_header.py +36 -0
- arctrl/py/JsonIO/Table/compression.py +67 -0
- arctrl/py/JsonIO/Table/iotype.py +36 -0
- arctrl/py/JsonIO/Table/templates.py +113 -0
- arctrl/py/JsonIO/__init__.py +0 -0
- arctrl/py/JsonIO/assay.py +113 -0
- arctrl/py/JsonIO/comment.py +80 -0
- arctrl/py/JsonIO/data.py +60 -0
- arctrl/py/JsonIO/data_file.py +58 -0
- arctrl/py/JsonIO/datamap.py +36 -0
- arctrl/py/JsonIO/decode.py +9 -0
- arctrl/py/JsonIO/encode.py +1 -0
- arctrl/py/JsonIO/investigation.py +91 -0
- arctrl/py/JsonIO/ldobject.py +106 -0
- arctrl/py/JsonIO/ontology_annotation.py +80 -0
- arctrl/py/JsonIO/ontology_source_reference.py +80 -0
- arctrl/py/JsonIO/person.py +82 -0
- arctrl/py/JsonIO/publication.py +82 -0
- arctrl/py/JsonIO/run.py +68 -0
- arctrl/py/JsonIO/study.py +114 -0
- arctrl/py/JsonIO/workflow.py +68 -0
- arctrl/py/ROCrate/ISAProfile/__init__.py +0 -0
- arctrl/py/ROCrate/ISAProfile/assay.py +70 -0
- arctrl/py/ROCrate/ISAProfile/data.py +65 -0
- arctrl/py/ROCrate/ISAProfile/dataset.py +24 -0
- arctrl/py/ROCrate/ISAProfile/investigation.py +73 -0
- arctrl/py/ROCrate/ISAProfile/lab_process.py +162 -0
- arctrl/py/ROCrate/ISAProfile/lab_protocol.py +37 -0
- arctrl/py/ROCrate/ISAProfile/person.py +72 -0
- arctrl/py/ROCrate/ISAProfile/property_value.py +98 -0
- arctrl/py/ROCrate/ISAProfile/sample.py +64 -0
- arctrl/py/ROCrate/ISAProfile/scholarly_article.py +98 -0
- arctrl/py/ROCrate/ISAProfile/study.py +74 -0
- arctrl/py/ROCrate/LDTypes/__init__.py +0 -0
- arctrl/py/ROCrate/LDTypes/comment.py +131 -0
- arctrl/py/ROCrate/LDTypes/computational_workflow.py +455 -0
- arctrl/py/ROCrate/LDTypes/computer_language.py +269 -0
- arctrl/py/ROCrate/LDTypes/create_action.py +303 -0
- arctrl/py/ROCrate/LDTypes/creative_work.py +566 -0
- arctrl/py/ROCrate/LDTypes/dataset.py +943 -0
- arctrl/py/ROCrate/LDTypes/defined_term.py +131 -0
- arctrl/py/ROCrate/LDTypes/file.py +281 -0
- arctrl/py/ROCrate/LDTypes/formal_parameter.py +431 -0
- arctrl/py/ROCrate/LDTypes/lab_process.py +352 -0
- arctrl/py/ROCrate/LDTypes/lab_protocol.py +395 -0
- arctrl/py/ROCrate/LDTypes/organization.py +83 -0
- arctrl/py/ROCrate/LDTypes/person.py +484 -0
- arctrl/py/ROCrate/LDTypes/postal_address.py +195 -0
- arctrl/py/ROCrate/LDTypes/property_value.py +952 -0
- arctrl/py/ROCrate/LDTypes/sample.py +202 -0
- arctrl/py/ROCrate/LDTypes/scholarly_article.py +229 -0
- arctrl/py/ROCrate/LDTypes/software_source_code.py +310 -0
- arctrl/py/ROCrate/LDTypes/workflow_invocation.py +48 -0
- arctrl/py/ROCrate/LDTypes/workflow_protocol.py +52 -0
- arctrl/py/ROCrate/__init__.py +0 -0
- arctrl/py/ROCrate/arc_rocrate_metadata.py +39 -0
- arctrl/py/ROCrate/dyn_obj_extensions.py +1 -0
- arctrl/py/ROCrate/helper.py +8 -0
- arctrl/py/ROCrate/ldcontext.py +406 -0
- arctrl/py/ROCrate/ldobject.py +1247 -0
- arctrl/py/ROCrate/rocrate_context.py +51 -0
- arctrl/py/Spreadsheet/AnnotationTable/__init__.py +0 -0
- arctrl/py/Spreadsheet/AnnotationTable/arc_table.py +203 -0
- arctrl/py/Spreadsheet/AnnotationTable/composite_cell.py +78 -0
- arctrl/py/Spreadsheet/AnnotationTable/composite_column.py +305 -0
- arctrl/py/Spreadsheet/AnnotationTable/composite_header.py +623 -0
- arctrl/py/Spreadsheet/DatamapTable/__init__.py +0 -0
- arctrl/py/Spreadsheet/DatamapTable/datamap_column.py +114 -0
- arctrl/py/Spreadsheet/DatamapTable/datamap_header.py +621 -0
- arctrl/py/Spreadsheet/DatamapTable/datamap_table.py +118 -0
- arctrl/py/Spreadsheet/Metadata/__init__.py +0 -0
- arctrl/py/Spreadsheet/Metadata/assays.py +125 -0
- arctrl/py/Spreadsheet/Metadata/comment.py +77 -0
- arctrl/py/Spreadsheet/Metadata/contacts.py +134 -0
- arctrl/py/Spreadsheet/Metadata/conversions.py +190 -0
- arctrl/py/Spreadsheet/Metadata/design_descriptors.py +34 -0
- arctrl/py/Spreadsheet/Metadata/factors.py +107 -0
- arctrl/py/Spreadsheet/Metadata/ontology_annotation.py +88 -0
- arctrl/py/Spreadsheet/Metadata/ontology_source_reference.py +96 -0
- arctrl/py/Spreadsheet/Metadata/protocols.py +146 -0
- arctrl/py/Spreadsheet/Metadata/publication.py +122 -0
- arctrl/py/Spreadsheet/Metadata/run.py +122 -0
- arctrl/py/Spreadsheet/Metadata/sparse_table.py +499 -0
- arctrl/py/Spreadsheet/Metadata/study.py +312 -0
- arctrl/py/Spreadsheet/Metadata/workflow.py +159 -0
- arctrl/py/Spreadsheet/__init__.py +0 -0
- arctrl/py/Spreadsheet/arc_assay.py +233 -0
- arctrl/py/Spreadsheet/arc_investigation.py +435 -0
- arctrl/py/Spreadsheet/arc_run.py +190 -0
- arctrl/py/Spreadsheet/arc_study.py +144 -0
- arctrl/py/Spreadsheet/arc_workflow.py +177 -0
- arctrl/py/Spreadsheet/assembly_info.py +1 -0
- arctrl/py/Spreadsheet/collection_aux.py +167 -0
- arctrl/py/Spreadsheet/datamap.py +43 -0
- arctrl/py/Spreadsheet/template.py +460 -0
- arctrl/py/ValidationPackages/__init__.py +0 -0
- arctrl/py/ValidationPackages/validation_package.py +82 -0
- arctrl/py/ValidationPackages/validation_packages_config.py +132 -0
- arctrl/py/WebRequest/__init__.py +0 -0
- arctrl/py/WebRequest/web_request.py +9 -0
- arctrl/py/WebRequest/web_request_py.py +135 -0
- arctrl/py/WorkflowGraph/__init__.py +0 -0
- arctrl/py/WorkflowGraph/adapters.py +141 -0
- arctrl/py/WorkflowGraph/build_options.py +45 -0
- arctrl/py/WorkflowGraph/builder.py +720 -0
- arctrl/py/WorkflowGraph/graph_types.py +260 -0
- arctrl/py/WorkflowGraph/query_helpers.py +76 -0
- arctrl/py/WorkflowGraph/reference_parsing.py +59 -0
- arctrl/py/WorkflowGraph/visualization_siren.py +574 -0
- arctrl/py/WorkflowGraph/workflow_graph.py +119 -0
- arctrl/py/Yaml/__init__.py +0 -0
- arctrl/py/Yaml/decode.py +1 -0
- arctrl/py/Yaml/encode.py +10 -0
- arctrl/py/Yaml/validation_package.py +77 -0
- arctrl/py/Yaml/validation_packages_config.py +86 -0
- arctrl/py/__init__.py +0 -0
- arctrl/py/arc.py +1891 -0
- arctrl/py/column_index.py +280 -0
- arctrl/py/conversion.py +142 -0
- arctrl/py/cross_async.py +76 -0
- arctrl/py/cwlrun_resolver.py +228 -0
- arctrl/py/fable_modules/dynamic_obj/__init__.py +0 -0
- arctrl/py/fable_modules/dynamic_obj/dyn_obj.py +136 -0
- arctrl/py/fable_modules/dynamic_obj/dynamic_obj.py +415 -0
- arctrl/py/fable_modules/dynamic_obj/fable_js.py +1 -0
- arctrl/py/fable_modules/dynamic_obj/fable_py.py +288 -0
- arctrl/py/fable_modules/dynamic_obj/hash_codes.py +82 -0
- arctrl/py/fable_modules/dynamic_obj/property_helper.py +25 -0
- arctrl/py/fable_modules/dynamic_obj/reflection_utils.py +87 -0
- arctrl/py/fable_modules/fable_library/__init__.py +0 -0
- arctrl/py/fable_modules/fable_library/array_.py +1528 -0
- arctrl/py/fable_modules/fable_library/async_.py +377 -0
- arctrl/py/fable_modules/fable_library/async_builder.py +379 -0
- arctrl/py/fable_modules/fable_library/big_int.py +330 -0
- arctrl/py/fable_modules/fable_library/bit_converter.py +131 -0
- arctrl/py/fable_modules/fable_library/boolean.py +26 -0
- arctrl/py/fable_modules/fable_library/char.py +237 -0
- arctrl/py/fable_modules/fable_library/choice.py +212 -0
- arctrl/py/fable_modules/fable_library/date.py +779 -0
- arctrl/py/fable_modules/fable_library/date_offset.py +79 -0
- arctrl/py/fable_modules/fable_library/decimal_.py +190 -0
- arctrl/py/fable_modules/fable_library/diagnostics.py +54 -0
- arctrl/py/fable_modules/fable_library/double.py +87 -0
- arctrl/py/fable_modules/fable_library/encoding.py +41 -0
- arctrl/py/fable_modules/fable_library/event.py +206 -0
- arctrl/py/fable_modules/fable_library/file.py +107 -0
- arctrl/py/fable_modules/fable_library/fsharp_collections.py +52 -0
- arctrl/py/fable_modules/fable_library/fsharp_core.py +123 -0
- arctrl/py/fable_modules/fable_library/global_.py +63 -0
- arctrl/py/fable_modules/fable_library/guid.py +41 -0
- arctrl/py/fable_modules/fable_library/int32.py +73 -0
- arctrl/py/fable_modules/fable_library/list.py +1788 -0
- arctrl/py/fable_modules/fable_library/long.py +240 -0
- arctrl/py/fable_modules/fable_library/mailbox_processor.py +179 -0
- arctrl/py/fable_modules/fable_library/map.py +1854 -0
- arctrl/py/fable_modules/fable_library/map_util.py +148 -0
- arctrl/py/fable_modules/fable_library/mutable_map.py +397 -0
- arctrl/py/fable_modules/fable_library/mutable_set.py +279 -0
- arctrl/py/fable_modules/fable_library/native.py +45 -0
- arctrl/py/fable_modules/fable_library/numeric.py +46 -0
- arctrl/py/fable_modules/fable_library/observable.py +222 -0
- arctrl/py/fable_modules/fable_library/option.py +128 -0
- arctrl/py/fable_modules/fable_library/path.py +62 -0
- arctrl/py/fable_modules/fable_library/range.py +117 -0
- arctrl/py/fable_modules/fable_library/reflection.py +463 -0
- arctrl/py/fable_modules/fable_library/reg_exp.py +137 -0
- arctrl/py/fable_modules/fable_library/resize_array.py +31 -0
- arctrl/py/fable_modules/fable_library/result.py +212 -0
- arctrl/py/fable_modules/fable_library/seq.py +1979 -0
- arctrl/py/fable_modules/fable_library/seq2.py +221 -0
- arctrl/py/fable_modules/fable_library/set.py +2414 -0
- arctrl/py/fable_modules/fable_library/singleton_local_time_zone.py +36 -0
- arctrl/py/fable_modules/fable_library/string_.py +573 -0
- arctrl/py/fable_modules/fable_library/system_collections_generic.py +462 -0
- arctrl/py/fable_modules/fable_library/system_text.py +237 -0
- arctrl/py/fable_modules/fable_library/task.py +116 -0
- arctrl/py/fable_modules/fable_library/task_builder.py +122 -0
- arctrl/py/fable_modules/fable_library/thread.py +5 -0
- arctrl/py/fable_modules/fable_library/time_span.py +283 -0
- arctrl/py/fable_modules/fable_library/timer.py +24 -0
- arctrl/py/fable_modules/fable_library/types.py +401 -0
- arctrl/py/fable_modules/fable_library/uri.py +109 -0
- arctrl/py/fable_modules/fable_library/util.py +2735 -0
- arctrl/py/fable_modules/fable_openpyxl/__init__.py +0 -0
- arctrl/py/fable_modules/fable_openpyxl/openpyxl.py +362 -0
- arctrl/py/fable_modules/fable_python/cognite-sdk/__init__.py +0 -0
- arctrl/py/fable_modules/fable_python/cognite-sdk/cognite_sdk.py +22 -0
- arctrl/py/fable_modules/fable_python/flask/__init__.py +0 -0
- arctrl/py/fable_modules/fable_python/flask/flask.py +34 -0
- arctrl/py/fable_modules/fable_python/jupyter/__init__.py +0 -0
- arctrl/py/fable_modules/fable_python/jupyter/ipy_widgets.py +47 -0
- arctrl/py/fable_modules/fable_python/jupyter/ipython.py +13 -0
- arctrl/py/fable_modules/fable_python/stdlib/__init__.py +0 -0
- arctrl/py/fable_modules/fable_python/stdlib/ast.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/asyncio/__init__.py +0 -0
- arctrl/py/fable_modules/fable_python/stdlib/asyncio/events.py +17 -0
- arctrl/py/fable_modules/fable_python/stdlib/asyncio/futures.py +52 -0
- arctrl/py/fable_modules/fable_python/stdlib/asyncio/tasks.py +38 -0
- arctrl/py/fable_modules/fable_python/stdlib/base64_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/builtins_.py +38 -0
- arctrl/py/fable_modules/fable_python/stdlib/html.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/json.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/math_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/os_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/queue_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/string_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/sys_.py +30 -0
- arctrl/py/fable_modules/fable_python/stdlib/time_.py +1 -0
- arctrl/py/fable_modules/fable_python/stdlib/tk_inter.py +1 -0
- arctrl/py/fable_modules/fs_spreadsheet/Cells/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/Cells/fs_cell.py +340 -0
- arctrl/py/fable_modules/fs_spreadsheet/Cells/fs_cells_collection.py +466 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/cell_builder.py +214 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/column_builder.py +139 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/dsl.py +50 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/expression.py +65 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/operators.py +9 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/row_builder.py +139 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/sheet_builder.py +118 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/table_builder.py +122 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/transform.py +463 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/types.py +314 -0
- arctrl/py/fable_modules/fs_spreadsheet/DSL/workbook_builder.py +106 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/cell.py +103 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/column.py +70 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/row.py +70 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/table.py +54 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/value.py +93 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/workbook.py +71 -0
- arctrl/py/fable_modules/fs_spreadsheet/Json/worksheet.py +216 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range.py +43 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_address.py +190 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_base.py +92 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_column.py +77 -0
- arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_row.py +48 -0
- arctrl/py/fable_modules/fs_spreadsheet/Tables/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table.py +461 -0
- arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table_field.py +117 -0
- arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table_row.py +23 -0
- arctrl/py/fable_modules/fs_spreadsheet/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet/fs_address.py +236 -0
- arctrl/py/fable_modules/fs_spreadsheet/fs_column.py +172 -0
- arctrl/py/fable_modules/fs_spreadsheet/fs_row.py +183 -0
- arctrl/py/fable_modules/fs_spreadsheet/fs_workbook.py +192 -0
- arctrl/py/fable_modules/fs_spreadsheet/fs_worksheet.py +610 -0
- arctrl/py/fable_modules/fs_spreadsheet/hash_codes.py +60 -0
- arctrl/py/fable_modules/fs_spreadsheet/sheet_builder.py +329 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/__init__.py +0 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/cell.py +60 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/cell_type.py +50 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/fs_extension.py +60 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/json.py +47 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/table.py +54 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/workbook.py +41 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/worksheet.py +52 -0
- arctrl/py/fable_modules/fs_spreadsheet_py/xlsx.py +37 -0
- arctrl/py/fable_modules/siren/__init__.py +0 -0
- arctrl/py/fable_modules/siren/config.py +1038 -0
- arctrl/py/fable_modules/siren/formatting.py +1121 -0
- arctrl/py/fable_modules/siren/siren.py +1941 -0
- arctrl/py/fable_modules/siren/siren_types.py +1229 -0
- arctrl/py/fable_modules/siren/theme_variables.py +517 -0
- arctrl/py/fable_modules/siren/util.py +37 -0
- arctrl/py/fable_modules/siren/yaml.py +101 -0
- arctrl/py/fable_modules/thoth_json_core/__init__.py +0 -0
- arctrl/py/fable_modules/thoth_json_core/decode.py +1614 -0
- arctrl/py/fable_modules/thoth_json_core/encode.py +305 -0
- arctrl/py/fable_modules/thoth_json_core/types.py +181 -0
- arctrl/py/fable_modules/thoth_json_python/__init__.py +0 -0
- arctrl/py/fable_modules/thoth_json_python/decode.py +112 -0
- arctrl/py/fable_modules/thoth_json_python/encode.py +72 -0
- arctrl/py/fable_modules/thoth_json_python/python.py +1 -0
- arctrl/py/fable_modules/yamlicious/Interop/__init__.py +0 -0
- arctrl/py/fable_modules/yamlicious/Interop/js_interop.py +1 -0
- arctrl/py/fable_modules/yamlicious/Interop/py_interop.py +7 -0
- arctrl/py/fable_modules/yamlicious/__init__.py +0 -0
- arctrl/py/fable_modules/yamlicious/decode.py +1784 -0
- arctrl/py/fable_modules/yamlicious/encode.py +84 -0
- arctrl/py/fable_modules/yamlicious/flow_to_block.py +994 -0
- arctrl/py/fable_modules/yamlicious/library.py +10 -0
- arctrl/py/fable_modules/yamlicious/persil.py +57 -0
- arctrl/py/fable_modules/yamlicious/preprocessing.py +99 -0
- arctrl/py/fable_modules/yamlicious/reader.py +739 -0
- arctrl/py/fable_modules/yamlicious/regex.py +29 -0
- arctrl/py/fable_modules/yamlicious/regex_active_patterns.py +265 -0
- arctrl/py/fable_modules/yamlicious/writer.py +175 -0
- arctrl/py/fable_modules/yamlicious/yamlicious_types.py +128 -0
- arctrl/py/json.py +389 -0
- arctrl/py/license.py +169 -0
- arctrl/py/rocrate_io.py +242 -0
- arctrl/py/template_web.py +23 -0
- arctrl/py/xlsx.py +212 -0
- arctrl/py/yaml.py +79 -0
- arctrl/rocrate.py +21 -0
- arctrl-3.0.0.dist-info/METADATA +157 -0
- arctrl-3.0.0.dist-info/RECORD +511 -0
- arctrl-3.0.0.dist-info/WHEEL +4 -0
- arctrl-3.0.0.dist-info/licenses/LICENSE +21 -0
arctrl/py/CWL/decode.py
ADDED
|
@@ -0,0 +1,3532 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from collections.abc import Callable
|
|
3
|
+
from typing import (Any, TypeVar)
|
|
4
|
+
from ..fable_modules.dynamic_obj.dynamic_obj import DynamicObj
|
|
5
|
+
from ..fable_modules.dynamic_obj.dyn_obj import (set_property, set_optional_property)
|
|
6
|
+
from ..fable_modules.fable_library.array_ import filter
|
|
7
|
+
from ..fable_modules.fable_library.double import try_parse as try_parse_1
|
|
8
|
+
from ..fable_modules.fable_library.list import (choose, is_empty, iterate, map, empty, head, tail, FSharpList, exists, try_pick, singleton as singleton_1, cons, of_array, try_head)
|
|
9
|
+
from ..fable_modules.fable_library.long import try_parse
|
|
10
|
+
from ..fable_modules.fable_library.map_util import get_item_from_dict
|
|
11
|
+
from ..fable_modules.fable_library.option import (map as map_1, default_arg, some, bind)
|
|
12
|
+
from ..fable_modules.fable_library.seq import (to_array, delay, collect, append, empty as empty_1, singleton, head as head_1, map as map_2, length)
|
|
13
|
+
from ..fable_modules.fable_library.string_ import (replace, trim_end, join, starts_with_exact, trim_start, to_text, printf, interpolate, ends_with_exact, substring, trim)
|
|
14
|
+
from ..fable_modules.fable_library.types import (Array, int64, FSharpRef)
|
|
15
|
+
from ..fable_modules.fable_library.util import (get_enumerator, dispose, ignore, Lazy, IEnumerable_1)
|
|
16
|
+
from ..fable_modules.yamlicious.decode import (read, object, IGetters, IOptionalGetter, string, IRequiredGetter, bool_1, resizearray, int_1)
|
|
17
|
+
from ..fable_modules.yamlicious.yamlicious_types import (YAMLElement, YAMLContent)
|
|
18
|
+
from .cwlprocessing_unit import (CWLProcessingUnit, WorkflowStepRunOps_fromWorkflow, WorkflowStepRunOps_fromExpressionTool, WorkflowStepRunOps_fromOperation, WorkflowStepRunOps_fromTool)
|
|
19
|
+
from .cwltypes import (SchemaSaladString, SchemaSaladStringModule_toDirectiveString, DirentInstance, CWLType, FileInstance__ctor, FileInstance, DirectoryInstance__ctor, DirectoryInstance, InputArraySchema, InputRecordField, InputRecordSchema, InputEnumSchema, SoftwarePackage, SchemaDefRequirementType)
|
|
20
|
+
from .expression_tool_description import CWLExpressionToolDescription
|
|
21
|
+
from .inputs import (InputBinding, CWLInput)
|
|
22
|
+
from .operation_description import CWLOperationDescription
|
|
23
|
+
from .outputs import (OutputBinding, CWLOutput, OutputSource)
|
|
24
|
+
from .parameter_reference import CWLParameterReference
|
|
25
|
+
from .requirements import (InitialWorkDirEntry, DockerRequirement_create_Z14898805, DockerRequirement, EnvironmentDef, LoadListingEnum_tryParse_Z721C83C5, LoadListingEnum, LoadListingRequirementValue, ResourceRequirementInstance__ctor_D76FC00, ResourceRequirementInstance, Requirement, WorkReuseRequirementValue, NetworkAccessRequirementValue, InplaceUpdateRequirementValue, ToolTimeLimitValue, InlineJavascriptRequirementValue, HintUnknownValue, HintEntry)
|
|
26
|
+
from .tool_description import CWLToolDescription
|
|
27
|
+
from .workflow_description import CWLWorkflowDescription
|
|
28
|
+
from .workflow_steps import (LinkMergeMethod, PickValueMethod, ScatterMethod, StepInput, StepOutput, StepOutputParameter, WorkflowStepRun, WorkflowStep)
|
|
29
|
+
|
|
30
|
+
__B = TypeVar("__B")
|
|
31
|
+
|
|
32
|
+
__A = TypeVar("__A")
|
|
33
|
+
|
|
34
|
+
def ResizeArray_map(f: Callable[[__A], __B], a: Array[Any]) -> Array[Any]:
|
|
35
|
+
b: Array[__B] = []
|
|
36
|
+
enumerator: Any = get_enumerator(a)
|
|
37
|
+
try:
|
|
38
|
+
while enumerator.System_Collections_IEnumerator_MoveNext():
|
|
39
|
+
i: __A = enumerator.System_Collections_Generic_IEnumerator_1_get_Current()
|
|
40
|
+
(b.append(f(i)))
|
|
41
|
+
|
|
42
|
+
finally:
|
|
43
|
+
dispose(enumerator)
|
|
44
|
+
|
|
45
|
+
return b
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def Decode_normalizeYamlInput(yaml: str) -> str:
|
|
49
|
+
normalized: str = "" if (yaml is None) else replace(yaml, "\r\n", "\n")
|
|
50
|
+
lines: Array[str] = normalized.split("\n")
|
|
51
|
+
return trim_end(join("\n", lines[1:len(lines)] if (starts_with_exact(lines[0], "#!") if (len(lines) > 0) else False) else lines))
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def Decode_removeFullLineComments(yaml: str) -> str:
|
|
55
|
+
def predicate(line: str, yaml: Any=yaml) -> bool:
|
|
56
|
+
return not starts_with_exact(trim_start(line), "#")
|
|
57
|
+
|
|
58
|
+
return join("\n", filter(predicate, yaml.split("\n")))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def Decode_removeYamlComments(yaml_element: YAMLElement) -> YAMLElement:
|
|
62
|
+
if yaml_element.tag == 3:
|
|
63
|
+
def chooser(element: YAMLElement, yaml_element: Any=yaml_element) -> YAMLElement | None:
|
|
64
|
+
if element.tag == 4:
|
|
65
|
+
return None
|
|
66
|
+
|
|
67
|
+
else:
|
|
68
|
+
return Decode_removeYamlComments(element)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
return YAMLElement(3, choose(chooser, yaml_element.fields[0]))
|
|
72
|
+
|
|
73
|
+
elif yaml_element.tag == 2:
|
|
74
|
+
def chooser_1(element_1: YAMLElement, yaml_element: Any=yaml_element) -> YAMLElement | None:
|
|
75
|
+
match_value: YAMLElement = Decode_removeYamlComments(element_1)
|
|
76
|
+
(pattern_matching_result, other_1) = (None, None)
|
|
77
|
+
if match_value.tag == 4:
|
|
78
|
+
pattern_matching_result = 0
|
|
79
|
+
|
|
80
|
+
elif match_value.tag == 3:
|
|
81
|
+
if is_empty(match_value.fields[0]):
|
|
82
|
+
pattern_matching_result = 1
|
|
83
|
+
|
|
84
|
+
else:
|
|
85
|
+
pattern_matching_result = 2
|
|
86
|
+
other_1 = match_value
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
else:
|
|
90
|
+
pattern_matching_result = 2
|
|
91
|
+
other_1 = match_value
|
|
92
|
+
|
|
93
|
+
if pattern_matching_result == 0:
|
|
94
|
+
return None
|
|
95
|
+
|
|
96
|
+
elif pattern_matching_result == 1:
|
|
97
|
+
return None
|
|
98
|
+
|
|
99
|
+
elif pattern_matching_result == 2:
|
|
100
|
+
return other_1
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
return YAMLElement(2, choose(chooser_1, yaml_element.fields[0]))
|
|
104
|
+
|
|
105
|
+
elif yaml_element.tag == 0:
|
|
106
|
+
return YAMLElement(0, yaml_element.fields[0], Decode_removeYamlComments(yaml_element.fields[1]))
|
|
107
|
+
|
|
108
|
+
else:
|
|
109
|
+
return yaml_element
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def Decode_isRecoverableDecodingError(ex: Exception) -> bool:
|
|
114
|
+
(pattern_matching_result,) = (None,)
|
|
115
|
+
pattern_matching_result = 0
|
|
116
|
+
if pattern_matching_result == 0:
|
|
117
|
+
return True
|
|
118
|
+
|
|
119
|
+
elif pattern_matching_result == 1:
|
|
120
|
+
return True
|
|
121
|
+
|
|
122
|
+
elif pattern_matching_result == 2:
|
|
123
|
+
return True
|
|
124
|
+
|
|
125
|
+
elif pattern_matching_result == 3:
|
|
126
|
+
return True
|
|
127
|
+
|
|
128
|
+
elif pattern_matching_result == 4:
|
|
129
|
+
return True
|
|
130
|
+
|
|
131
|
+
elif pattern_matching_result == 5:
|
|
132
|
+
return True
|
|
133
|
+
|
|
134
|
+
elif pattern_matching_result == 6:
|
|
135
|
+
return False
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
def Decode_readSanitizedYaml(yaml: str) -> YAMLElement:
|
|
140
|
+
normalized: str = Decode_normalizeYamlInput(yaml)
|
|
141
|
+
def try_read(text: str, yaml: Any=yaml) -> YAMLElement:
|
|
142
|
+
return Decode_removeYamlComments(read(text))
|
|
143
|
+
|
|
144
|
+
try:
|
|
145
|
+
return try_read(normalized)
|
|
146
|
+
|
|
147
|
+
except Exception as match_value:
|
|
148
|
+
if Decode_isRecoverableDecodingError(match_value):
|
|
149
|
+
return try_read(Decode_removeFullLineComments(normalized))
|
|
150
|
+
|
|
151
|
+
else:
|
|
152
|
+
raise match_value
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def Decode_overflowDecoder(dyn_obj: DynamicObj, dict_1: Any) -> DynamicObj:
|
|
158
|
+
enumerator: Any = get_enumerator(dict_1)
|
|
159
|
+
try:
|
|
160
|
+
while enumerator.System_Collections_IEnumerator_MoveNext():
|
|
161
|
+
e: Any = enumerator.System_Collections_Generic_IEnumerator_1_get_Current()
|
|
162
|
+
match_value: YAMLElement = e[1]
|
|
163
|
+
(pattern_matching_result, v, s) = (None, None, None)
|
|
164
|
+
if match_value.tag == 3:
|
|
165
|
+
if not is_empty(match_value.fields[0]):
|
|
166
|
+
if head(match_value.fields[0]).tag == 1:
|
|
167
|
+
if is_empty(tail(match_value.fields[0])):
|
|
168
|
+
pattern_matching_result = 0
|
|
169
|
+
v = head(match_value.fields[0]).fields[0]
|
|
170
|
+
|
|
171
|
+
else:
|
|
172
|
+
pattern_matching_result = 2
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
elif head(match_value.fields[0]).tag == 2:
|
|
176
|
+
if is_empty(tail(match_value.fields[0])):
|
|
177
|
+
pattern_matching_result = 1
|
|
178
|
+
s = head(match_value.fields[0]).fields[0]
|
|
179
|
+
|
|
180
|
+
else:
|
|
181
|
+
pattern_matching_result = 2
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
else:
|
|
185
|
+
pattern_matching_result = 2
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
else:
|
|
189
|
+
pattern_matching_result = 2
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
else:
|
|
193
|
+
pattern_matching_result = 2
|
|
194
|
+
|
|
195
|
+
if pattern_matching_result == 0:
|
|
196
|
+
set_property(e[0], v.Value, dyn_obj)
|
|
197
|
+
|
|
198
|
+
elif pattern_matching_result == 1:
|
|
199
|
+
new_dyn_obj: DynamicObj = DynamicObj()
|
|
200
|
+
def action(x: DynamicObj) -> None:
|
|
201
|
+
set_property(e[0], x, dyn_obj)
|
|
202
|
+
|
|
203
|
+
def mapping(arg: YAMLElement) -> DynamicObj:
|
|
204
|
+
def getter(get: IGetters, arg: Any=arg) -> Any:
|
|
205
|
+
return get.Overflow.FieldList(empty())
|
|
206
|
+
|
|
207
|
+
return Decode_overflowDecoder(new_dyn_obj, object(getter, arg))
|
|
208
|
+
|
|
209
|
+
iterate(action, map(mapping, s))
|
|
210
|
+
|
|
211
|
+
elif pattern_matching_result == 2:
|
|
212
|
+
set_property(e[0], e[1], dyn_obj)
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
finally:
|
|
216
|
+
dispose(enumerator)
|
|
217
|
+
|
|
218
|
+
return dyn_obj
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
def Decode_decodeSchemaSaladString(y_ele: YAMLElement) -> SchemaSaladString:
|
|
222
|
+
(pattern_matching_result, v, c, v_1) = (None, None, None, None)
|
|
223
|
+
if y_ele.tag == 1:
|
|
224
|
+
pattern_matching_result = 0
|
|
225
|
+
v = y_ele.fields[0]
|
|
226
|
+
|
|
227
|
+
elif y_ele.tag == 3:
|
|
228
|
+
if not is_empty(y_ele.fields[0]):
|
|
229
|
+
if head(y_ele.fields[0]).tag == 1:
|
|
230
|
+
if is_empty(tail(y_ele.fields[0])):
|
|
231
|
+
pattern_matching_result = 0
|
|
232
|
+
v = head(y_ele.fields[0]).fields[0]
|
|
233
|
+
|
|
234
|
+
else:
|
|
235
|
+
pattern_matching_result = 2
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
elif head(y_ele.fields[0]).tag == 0:
|
|
239
|
+
if head(y_ele.fields[0]).fields[1].tag == 1:
|
|
240
|
+
if is_empty(tail(y_ele.fields[0])):
|
|
241
|
+
pattern_matching_result = 1
|
|
242
|
+
c = head(y_ele.fields[0]).fields[0]
|
|
243
|
+
v_1 = head(y_ele.fields[0]).fields[1].fields[0]
|
|
244
|
+
|
|
245
|
+
else:
|
|
246
|
+
pattern_matching_result = 2
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
elif head(y_ele.fields[0]).fields[1].tag == 3:
|
|
250
|
+
if not is_empty(head(y_ele.fields[0]).fields[1].fields[0]):
|
|
251
|
+
if head(head(y_ele.fields[0]).fields[1].fields[0]).tag == 1:
|
|
252
|
+
if is_empty(tail(head(y_ele.fields[0]).fields[1].fields[0])):
|
|
253
|
+
if is_empty(tail(y_ele.fields[0])):
|
|
254
|
+
pattern_matching_result = 1
|
|
255
|
+
c = head(y_ele.fields[0]).fields[0]
|
|
256
|
+
v_1 = head(head(y_ele.fields[0]).fields[1].fields[0]).fields[0]
|
|
257
|
+
|
|
258
|
+
else:
|
|
259
|
+
pattern_matching_result = 2
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
else:
|
|
263
|
+
pattern_matching_result = 2
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
else:
|
|
267
|
+
pattern_matching_result = 2
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
else:
|
|
271
|
+
pattern_matching_result = 2
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
else:
|
|
275
|
+
pattern_matching_result = 2
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
else:
|
|
279
|
+
pattern_matching_result = 2
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
else:
|
|
283
|
+
pattern_matching_result = 2
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
else:
|
|
287
|
+
pattern_matching_result = 2
|
|
288
|
+
|
|
289
|
+
if pattern_matching_result == 0:
|
|
290
|
+
return SchemaSaladString(0, v.Value)
|
|
291
|
+
|
|
292
|
+
elif pattern_matching_result == 1:
|
|
293
|
+
match_value: str = c.Value
|
|
294
|
+
if match_value == "$include":
|
|
295
|
+
return SchemaSaladString(1, v_1.Value)
|
|
296
|
+
|
|
297
|
+
elif match_value == "$import":
|
|
298
|
+
return SchemaSaladString(2, v_1.Value)
|
|
299
|
+
|
|
300
|
+
else:
|
|
301
|
+
return SchemaSaladString(0, to_text(printf("%s: %s"))(c.Value)(v_1.Value))
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
elif pattern_matching_result == 2:
|
|
305
|
+
raise Exception(to_text(interpolate("Unexpected YAMLElement format in decodeSchemaSaladString: %A%P()", [y_ele])))
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
def Decode_decodeStringOrExpression(y_ele: YAMLElement) -> str:
|
|
310
|
+
return SchemaSaladStringModule_toDirectiveString(Decode_decodeSchemaSaladString(y_ele))
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
def _arrow819(value_1: YAMLElement) -> OutputBinding:
|
|
314
|
+
def getter(get: IGetters) -> OutputBinding:
|
|
315
|
+
def _arrow818(__unit: None=None, get: Any=get) -> str | None:
|
|
316
|
+
object_arg: IOptionalGetter = get.Optional
|
|
317
|
+
return object_arg.Field("glob", string)
|
|
318
|
+
|
|
319
|
+
return OutputBinding(_arrow818())
|
|
320
|
+
|
|
321
|
+
return object(getter, value_1)
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
Decode_outputBindingGlobDecoder: Callable[[YAMLElement], OutputBinding] = _arrow819
|
|
325
|
+
|
|
326
|
+
def _arrow820(value: YAMLElement) -> OutputBinding | None:
|
|
327
|
+
def getter(get: IGetters) -> OutputBinding | None:
|
|
328
|
+
object_arg: IOptionalGetter = get.Optional
|
|
329
|
+
return object_arg.Field("outputBinding", Decode_outputBindingGlobDecoder)
|
|
330
|
+
|
|
331
|
+
return object(getter, value)
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
Decode_outputBindingDecoder: Callable[[YAMLElement], OutputBinding | None] = _arrow820
|
|
335
|
+
|
|
336
|
+
def Decode_decodeStringArrayOrScalar(value: YAMLElement) -> Array[str]:
|
|
337
|
+
(pattern_matching_result, items) = (None, None)
|
|
338
|
+
if value.tag == 3:
|
|
339
|
+
if not is_empty(value.fields[0]):
|
|
340
|
+
if head(value.fields[0]).tag == 2:
|
|
341
|
+
if is_empty(tail(value.fields[0])):
|
|
342
|
+
pattern_matching_result = 0
|
|
343
|
+
items = head(value.fields[0]).fields[0]
|
|
344
|
+
|
|
345
|
+
else:
|
|
346
|
+
pattern_matching_result = 1
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
else:
|
|
350
|
+
pattern_matching_result = 1
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
else:
|
|
354
|
+
pattern_matching_result = 1
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
elif value.tag == 2:
|
|
358
|
+
pattern_matching_result = 0
|
|
359
|
+
items = value.fields[0]
|
|
360
|
+
|
|
361
|
+
else:
|
|
362
|
+
pattern_matching_result = 1
|
|
363
|
+
|
|
364
|
+
if pattern_matching_result == 0:
|
|
365
|
+
def _arrow821(y_ele: YAMLElement, value: Any=value) -> str:
|
|
366
|
+
return Decode_decodeStringOrExpression(y_ele)
|
|
367
|
+
|
|
368
|
+
return list(map(_arrow821, items))
|
|
369
|
+
|
|
370
|
+
elif pattern_matching_result == 1:
|
|
371
|
+
return [Decode_decodeStringOrExpression(value)]
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
def _arrow822(value_1: YAMLElement) -> Array[str] | None:
|
|
376
|
+
def getter(get: IGetters) -> Array[str] | None:
|
|
377
|
+
object_arg: IOptionalGetter = get.Optional
|
|
378
|
+
def arg_1(value: YAMLElement, get: Any=get) -> Array[str]:
|
|
379
|
+
return Decode_decodeStringArrayOrScalar(value)
|
|
380
|
+
|
|
381
|
+
return object_arg.Field("outputSource", arg_1)
|
|
382
|
+
|
|
383
|
+
return object(getter, value_1)
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
Decode_outputSourceDecoder: Callable[[YAMLElement], Array[str] | None] = _arrow822
|
|
387
|
+
|
|
388
|
+
def _arrow826(value_1: YAMLElement) -> CWLType:
|
|
389
|
+
def getter(get: IGetters) -> CWLType:
|
|
390
|
+
def _arrow823(__unit: None=None, get: Any=get) -> SchemaSaladString:
|
|
391
|
+
object_arg: IRequiredGetter = get.Required
|
|
392
|
+
return object_arg.Field("entry", Decode_decodeSchemaSaladString)
|
|
393
|
+
|
|
394
|
+
def _arrow824(__unit: None=None, get: Any=get) -> SchemaSaladString | None:
|
|
395
|
+
object_arg_1: IOptionalGetter = get.Optional
|
|
396
|
+
return object_arg_1.Field("entryname", Decode_decodeSchemaSaladString)
|
|
397
|
+
|
|
398
|
+
def _arrow825(__unit: None=None, get: Any=get) -> bool | None:
|
|
399
|
+
object_arg_2: IOptionalGetter = get.Optional
|
|
400
|
+
return object_arg_2.Field("writable", bool_1)
|
|
401
|
+
|
|
402
|
+
return CWLType(2, DirentInstance(_arrow823(), _arrow824(), _arrow825()))
|
|
403
|
+
|
|
404
|
+
return object(getter, value_1)
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
Decode_direntDecoder: Callable[[YAMLElement], CWLType] = _arrow826
|
|
408
|
+
|
|
409
|
+
def Decode_initialWorkDirEntryDecoder(value: YAMLElement) -> InitialWorkDirEntry:
|
|
410
|
+
if value.tag == 3:
|
|
411
|
+
mappings: FSharpList[YAMLElement] = value.fields[0]
|
|
412
|
+
def predicate(_arg: YAMLElement, value: Any=value) -> bool:
|
|
413
|
+
(pattern_matching_result,) = (None,)
|
|
414
|
+
if _arg.tag == 0:
|
|
415
|
+
if _arg.fields[0].Value == "entry":
|
|
416
|
+
pattern_matching_result = 0
|
|
417
|
+
|
|
418
|
+
else:
|
|
419
|
+
pattern_matching_result = 1
|
|
420
|
+
|
|
421
|
+
|
|
422
|
+
else:
|
|
423
|
+
pattern_matching_result = 1
|
|
424
|
+
|
|
425
|
+
if pattern_matching_result == 0:
|
|
426
|
+
return True
|
|
427
|
+
|
|
428
|
+
elif pattern_matching_result == 1:
|
|
429
|
+
return False
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
if exists(predicate, mappings):
|
|
433
|
+
match_value: CWLType = Decode_direntDecoder(value)
|
|
434
|
+
if match_value.tag == 2:
|
|
435
|
+
return InitialWorkDirEntry(0, match_value.fields[0])
|
|
436
|
+
|
|
437
|
+
else:
|
|
438
|
+
raise Exception("Unexpected InitialWorkDir Dirent decoding result.")
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
else:
|
|
442
|
+
def chooser(_arg_1: YAMLElement, value: Any=value) -> str | None:
|
|
443
|
+
(pattern_matching_result_1, k_4, v_2, k_5, v_3) = (None, None, None, None, None)
|
|
444
|
+
if _arg_1.tag == 0:
|
|
445
|
+
if _arg_1.fields[1].tag == 3:
|
|
446
|
+
if not is_empty(_arg_1.fields[1].fields[0]):
|
|
447
|
+
if head(_arg_1.fields[1].fields[0]).tag == 1:
|
|
448
|
+
if is_empty(tail(_arg_1.fields[1].fields[0])):
|
|
449
|
+
if _arg_1.fields[0].Value == "class":
|
|
450
|
+
pattern_matching_result_1 = 0
|
|
451
|
+
k_4 = _arg_1.fields[0]
|
|
452
|
+
v_2 = head(_arg_1.fields[1].fields[0]).fields[0]
|
|
453
|
+
|
|
454
|
+
else:
|
|
455
|
+
pattern_matching_result_1 = 2
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
else:
|
|
459
|
+
pattern_matching_result_1 = 2
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
else:
|
|
463
|
+
pattern_matching_result_1 = 2
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
else:
|
|
467
|
+
pattern_matching_result_1 = 2
|
|
468
|
+
|
|
469
|
+
|
|
470
|
+
elif _arg_1.fields[1].tag == 1:
|
|
471
|
+
if _arg_1.fields[0].Value == "class":
|
|
472
|
+
pattern_matching_result_1 = 1
|
|
473
|
+
k_5 = _arg_1.fields[0]
|
|
474
|
+
v_3 = _arg_1.fields[1].fields[0]
|
|
475
|
+
|
|
476
|
+
else:
|
|
477
|
+
pattern_matching_result_1 = 2
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
else:
|
|
481
|
+
pattern_matching_result_1 = 2
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
else:
|
|
485
|
+
pattern_matching_result_1 = 2
|
|
486
|
+
|
|
487
|
+
if pattern_matching_result_1 == 0:
|
|
488
|
+
return v_2.Value
|
|
489
|
+
|
|
490
|
+
elif pattern_matching_result_1 == 1:
|
|
491
|
+
return v_3.Value
|
|
492
|
+
|
|
493
|
+
elif pattern_matching_result_1 == 2:
|
|
494
|
+
return None
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
class_value: str | None = try_pick(chooser, mappings)
|
|
498
|
+
(pattern_matching_result_2,) = (None,)
|
|
499
|
+
if class_value is not None:
|
|
500
|
+
if class_value == "File":
|
|
501
|
+
pattern_matching_result_2 = 0
|
|
502
|
+
|
|
503
|
+
elif class_value == "Directory":
|
|
504
|
+
pattern_matching_result_2 = 1
|
|
505
|
+
|
|
506
|
+
else:
|
|
507
|
+
pattern_matching_result_2 = 2
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
else:
|
|
511
|
+
pattern_matching_result_2 = 2
|
|
512
|
+
|
|
513
|
+
if pattern_matching_result_2 == 0:
|
|
514
|
+
def _arrow827(__unit: None=None, value: Any=value) -> FileInstance:
|
|
515
|
+
file_instance: FileInstance = FileInstance__ctor()
|
|
516
|
+
def getter(get: IGetters) -> DynamicObj:
|
|
517
|
+
return Decode_overflowDecoder(file_instance, get.Overflow.FieldList(empty()))
|
|
518
|
+
|
|
519
|
+
ignore(object(getter, value))
|
|
520
|
+
return file_instance
|
|
521
|
+
|
|
522
|
+
return InitialWorkDirEntry(2, _arrow827())
|
|
523
|
+
|
|
524
|
+
elif pattern_matching_result_2 == 1:
|
|
525
|
+
def _arrow828(__unit: None=None, value: Any=value) -> DirectoryInstance:
|
|
526
|
+
directory_instance: DirectoryInstance = DirectoryInstance__ctor()
|
|
527
|
+
def getter_1(get_1: IGetters) -> DynamicObj:
|
|
528
|
+
return Decode_overflowDecoder(directory_instance, get_1.Overflow.FieldList(empty()))
|
|
529
|
+
|
|
530
|
+
ignore(object(getter_1, value))
|
|
531
|
+
return directory_instance
|
|
532
|
+
|
|
533
|
+
return InitialWorkDirEntry(3, _arrow828())
|
|
534
|
+
|
|
535
|
+
elif pattern_matching_result_2 == 2:
|
|
536
|
+
return InitialWorkDirEntry(1, Decode_decodeSchemaSaladString(value))
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
elif value.tag == 1:
|
|
541
|
+
return InitialWorkDirEntry(1, Decode_decodeSchemaSaladString(value))
|
|
542
|
+
|
|
543
|
+
else:
|
|
544
|
+
raise Exception(to_text(interpolate("Invalid InitialWorkDir listing entry: %A%P()", [value])))
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
def Decode_cwlSimpleTypeFromString(s: str) -> CWLType:
|
|
549
|
+
if s == "File":
|
|
550
|
+
return CWLType(0, FileInstance__ctor())
|
|
551
|
+
|
|
552
|
+
elif s == "Directory":
|
|
553
|
+
return CWLType(1, DirectoryInstance__ctor())
|
|
554
|
+
|
|
555
|
+
elif s == "string":
|
|
556
|
+
return CWLType(3)
|
|
557
|
+
|
|
558
|
+
elif s == "int":
|
|
559
|
+
return CWLType(4)
|
|
560
|
+
|
|
561
|
+
elif s == "long":
|
|
562
|
+
return CWLType(5)
|
|
563
|
+
|
|
564
|
+
elif s == "float":
|
|
565
|
+
return CWLType(6)
|
|
566
|
+
|
|
567
|
+
elif s == "double":
|
|
568
|
+
return CWLType(7)
|
|
569
|
+
|
|
570
|
+
elif s == "boolean":
|
|
571
|
+
return CWLType(8)
|
|
572
|
+
|
|
573
|
+
elif s == "stdout":
|
|
574
|
+
return CWLType(9)
|
|
575
|
+
|
|
576
|
+
elif s == "null":
|
|
577
|
+
return CWLType(10)
|
|
578
|
+
|
|
579
|
+
else:
|
|
580
|
+
raise Exception(("Invalid CWL simple type: " + s) + "")
|
|
581
|
+
|
|
582
|
+
|
|
583
|
+
|
|
584
|
+
def Decode_parseArrayShorthand(type_str: str) -> CWLType | None:
|
|
585
|
+
if ends_with_exact(type_str, "[]"):
|
|
586
|
+
inner_type: str = substring(type_str, 0, len(type_str) - 2)
|
|
587
|
+
match_value: CWLType | None = Decode_parseArrayShorthand(inner_type)
|
|
588
|
+
if match_value is None:
|
|
589
|
+
try:
|
|
590
|
+
return CWLType(11, InputArraySchema(Decode_cwlSimpleTypeFromString(inner_type), None, None, None))
|
|
591
|
+
|
|
592
|
+
except Exception as match_value_1:
|
|
593
|
+
if Decode_isRecoverableDecodingError(match_value_1):
|
|
594
|
+
return None
|
|
595
|
+
|
|
596
|
+
else:
|
|
597
|
+
raise match_value_1
|
|
598
|
+
|
|
599
|
+
|
|
600
|
+
|
|
601
|
+
else:
|
|
602
|
+
return CWLType(11, InputArraySchema(match_value, None, None, None))
|
|
603
|
+
|
|
604
|
+
|
|
605
|
+
else:
|
|
606
|
+
return None
|
|
607
|
+
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
def input_array_schema_decoder_0040261(__unit: None=None) -> Callable[[YAMLElement], InputArraySchema]:
|
|
611
|
+
def _arrow833(value_3: YAMLElement) -> InputArraySchema:
|
|
612
|
+
def getter(get: IGetters) -> InputArraySchema:
|
|
613
|
+
def _arrow829(__unit: None=None, get: Any=get) -> YAMLElement:
|
|
614
|
+
object_arg: IRequiredGetter = get.Required
|
|
615
|
+
def arg_1(x: YAMLElement) -> YAMLElement:
|
|
616
|
+
return x
|
|
617
|
+
|
|
618
|
+
return object_arg.Field("items", arg_1)
|
|
619
|
+
|
|
620
|
+
def _arrow830(__unit: None=None, get: Any=get) -> str | None:
|
|
621
|
+
object_arg_1: IOptionalGetter = get.Optional
|
|
622
|
+
return object_arg_1.Field("label", string)
|
|
623
|
+
|
|
624
|
+
def _arrow831(__unit: None=None, get: Any=get) -> str | None:
|
|
625
|
+
object_arg_2: IOptionalGetter = get.Optional
|
|
626
|
+
return object_arg_2.Field("doc", string)
|
|
627
|
+
|
|
628
|
+
def _arrow832(__unit: None=None, get: Any=get) -> str | None:
|
|
629
|
+
object_arg_3: IOptionalGetter = get.Optional
|
|
630
|
+
return object_arg_3.Field("name", string)
|
|
631
|
+
|
|
632
|
+
return InputArraySchema(Decode_cwlTypeDecoder_0027(_arrow829()), _arrow830(), _arrow831(), _arrow832())
|
|
633
|
+
|
|
634
|
+
return object(getter, value_3)
|
|
635
|
+
|
|
636
|
+
return _arrow833
|
|
637
|
+
|
|
638
|
+
|
|
639
|
+
input_array_schema_decoder_0040261_002d1: Any = Lazy(input_array_schema_decoder_0040261)
|
|
640
|
+
|
|
641
|
+
def input_record_field_decoder_0040275(__unit: None=None) -> Callable[[YAMLElement], InputRecordField]:
|
|
642
|
+
def _arrow838(value_3: YAMLElement) -> InputRecordField:
|
|
643
|
+
def getter(get: IGetters) -> InputRecordField:
|
|
644
|
+
def _arrow834(__unit: None=None, get: Any=get) -> str:
|
|
645
|
+
object_arg: IRequiredGetter = get.Required
|
|
646
|
+
return object_arg.Field("name", string)
|
|
647
|
+
|
|
648
|
+
def _arrow835(__unit: None=None, get: Any=get) -> YAMLElement:
|
|
649
|
+
object_arg_1: IRequiredGetter = get.Required
|
|
650
|
+
def arg_3(x: YAMLElement) -> YAMLElement:
|
|
651
|
+
return x
|
|
652
|
+
|
|
653
|
+
return object_arg_1.Field("type", arg_3)
|
|
654
|
+
|
|
655
|
+
def _arrow836(__unit: None=None, get: Any=get) -> str | None:
|
|
656
|
+
object_arg_2: IOptionalGetter = get.Optional
|
|
657
|
+
return object_arg_2.Field("doc", string)
|
|
658
|
+
|
|
659
|
+
def _arrow837(__unit: None=None, get: Any=get) -> str | None:
|
|
660
|
+
object_arg_3: IOptionalGetter = get.Optional
|
|
661
|
+
return object_arg_3.Field("label", string)
|
|
662
|
+
|
|
663
|
+
return InputRecordField(_arrow834(), Decode_cwlTypeDecoder_0027(_arrow835()), _arrow836(), _arrow837())
|
|
664
|
+
|
|
665
|
+
return object(getter, value_3)
|
|
666
|
+
|
|
667
|
+
return _arrow838
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
input_record_field_decoder_0040275_002d1: Any = Lazy(input_record_field_decoder_0040275)
|
|
671
|
+
|
|
672
|
+
def input_record_schema_decoder_0040314(__unit: None=None) -> Callable[[YAMLElement], InputRecordSchema]:
|
|
673
|
+
def _arrow844(value_3: YAMLElement) -> InputRecordSchema:
|
|
674
|
+
def getter(get: IGetters) -> InputRecordSchema:
|
|
675
|
+
def _arrow839(__unit: None=None, get: Any=get) -> Array[InputRecordField] | None:
|
|
676
|
+
fields_element: YAMLElement | None
|
|
677
|
+
object_arg: IOptionalGetter = get.Optional
|
|
678
|
+
def arg_1(x: YAMLElement) -> YAMLElement:
|
|
679
|
+
return x
|
|
680
|
+
|
|
681
|
+
fields_element = object_arg.Field("fields", arg_1)
|
|
682
|
+
(pattern_matching_result, element) = (None, None)
|
|
683
|
+
if fields_element is None:
|
|
684
|
+
pattern_matching_result = 2
|
|
685
|
+
|
|
686
|
+
elif fields_element.tag == 3:
|
|
687
|
+
if is_empty(fields_element.fields[0]):
|
|
688
|
+
pattern_matching_result = 0
|
|
689
|
+
|
|
690
|
+
else:
|
|
691
|
+
pattern_matching_result = 1
|
|
692
|
+
element = fields_element
|
|
693
|
+
|
|
694
|
+
|
|
695
|
+
else:
|
|
696
|
+
pattern_matching_result = 1
|
|
697
|
+
element = fields_element
|
|
698
|
+
|
|
699
|
+
if pattern_matching_result == 0:
|
|
700
|
+
return []
|
|
701
|
+
|
|
702
|
+
elif pattern_matching_result == 1:
|
|
703
|
+
match_value: Array[InputRecordField] | None = Decode_tryDecodeFieldsAsArray(element)
|
|
704
|
+
return Decode_tryDecodeFieldsAsMap(element) if (match_value is None) else match_value
|
|
705
|
+
|
|
706
|
+
elif pattern_matching_result == 2:
|
|
707
|
+
return None
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
def _arrow840(__unit: None=None, get: Any=get) -> str | None:
|
|
711
|
+
object_arg_1: IOptionalGetter = get.Optional
|
|
712
|
+
return object_arg_1.Field("label", string)
|
|
713
|
+
|
|
714
|
+
def _arrow842(__unit: None=None, get: Any=get) -> str | None:
|
|
715
|
+
object_arg_2: IOptionalGetter = get.Optional
|
|
716
|
+
return object_arg_2.Field("doc", string)
|
|
717
|
+
|
|
718
|
+
def _arrow843(__unit: None=None, get: Any=get) -> str | None:
|
|
719
|
+
object_arg_3: IOptionalGetter = get.Optional
|
|
720
|
+
return object_arg_3.Field("name", string)
|
|
721
|
+
|
|
722
|
+
return InputRecordSchema(_arrow839(), _arrow840(), _arrow842(), _arrow843())
|
|
723
|
+
|
|
724
|
+
return object(getter, value_3)
|
|
725
|
+
|
|
726
|
+
return _arrow844
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
input_record_schema_decoder_0040314_002d1: Any = Lazy(input_record_schema_decoder_0040314)
|
|
730
|
+
|
|
731
|
+
def input_enum_schema_decoder_0040341(__unit: None=None) -> Callable[[YAMLElement], InputEnumSchema]:
|
|
732
|
+
def _arrow852(value_5: YAMLElement) -> InputEnumSchema:
|
|
733
|
+
def getter(get: IGetters) -> InputEnumSchema:
|
|
734
|
+
def _arrow846(__unit: None=None, get: Any=get) -> Array[str]:
|
|
735
|
+
object_arg: IRequiredGetter = get.Required
|
|
736
|
+
def arg_1(value: YAMLElement) -> Array[str]:
|
|
737
|
+
def _arrow845(value_1: YAMLElement, value: Any=value) -> str:
|
|
738
|
+
return string(value_1)
|
|
739
|
+
|
|
740
|
+
return resizearray(_arrow845, value)
|
|
741
|
+
|
|
742
|
+
return object_arg.Field("symbols", arg_1)
|
|
743
|
+
|
|
744
|
+
def _arrow847(__unit: None=None, get: Any=get) -> str | None:
|
|
745
|
+
object_arg_1: IOptionalGetter = get.Optional
|
|
746
|
+
return object_arg_1.Field("label", string)
|
|
747
|
+
|
|
748
|
+
def _arrow849(__unit: None=None, get: Any=get) -> str | None:
|
|
749
|
+
object_arg_2: IOptionalGetter = get.Optional
|
|
750
|
+
return object_arg_2.Field("doc", string)
|
|
751
|
+
|
|
752
|
+
def _arrow851(__unit: None=None, get: Any=get) -> str | None:
|
|
753
|
+
object_arg_3: IOptionalGetter = get.Optional
|
|
754
|
+
return object_arg_3.Field("name", string)
|
|
755
|
+
|
|
756
|
+
return InputEnumSchema(_arrow846(), _arrow847(), _arrow849(), _arrow851())
|
|
757
|
+
|
|
758
|
+
return object(getter, value_5)
|
|
759
|
+
|
|
760
|
+
return _arrow852
|
|
761
|
+
|
|
762
|
+
|
|
763
|
+
input_enum_schema_decoder_0040341_002d1: Any = Lazy(input_enum_schema_decoder_0040341)
|
|
764
|
+
|
|
765
|
+
Decode_inputArraySchemaDecoder: Callable[[YAMLElement], InputArraySchema] = input_array_schema_decoder_0040261_002d1.Value
|
|
766
|
+
|
|
767
|
+
Decode_inputRecordFieldDecoder: Callable[[YAMLElement], InputRecordField] = input_record_field_decoder_0040275_002d1.Value
|
|
768
|
+
|
|
769
|
+
def Decode_tryDecodeFieldsAsArray(element: YAMLElement) -> Array[InputRecordField] | None:
|
|
770
|
+
try:
|
|
771
|
+
return resizearray(input_record_field_decoder_0040275_002d1.Value, element)
|
|
772
|
+
|
|
773
|
+
except Exception as match_value:
|
|
774
|
+
if Decode_isRecoverableDecodingError(match_value):
|
|
775
|
+
return None
|
|
776
|
+
|
|
777
|
+
else:
|
|
778
|
+
raise match_value
|
|
779
|
+
|
|
780
|
+
|
|
781
|
+
|
|
782
|
+
|
|
783
|
+
def Decode_tryDecodeFieldsAsMap(element: YAMLElement) -> Array[InputRecordField] | None:
|
|
784
|
+
try:
|
|
785
|
+
fields: Array[InputRecordField] = []
|
|
786
|
+
def _arrow853(get2: IGetters) -> Any:
|
|
787
|
+
return get2.Overflow.FieldList(empty())
|
|
788
|
+
|
|
789
|
+
enumerator: Any = get_enumerator(object(_arrow853, element))
|
|
790
|
+
try:
|
|
791
|
+
while enumerator.System_Collections_IEnumerator_MoveNext():
|
|
792
|
+
kvp: Any = enumerator.System_Collections_Generic_IEnumerator_1_get_Current()
|
|
793
|
+
field_type: CWLType = Decode_cwlTypeDecoder_0027(kvp[1])
|
|
794
|
+
(fields.append(InputRecordField(kvp[0], field_type, None, None)))
|
|
795
|
+
|
|
796
|
+
finally:
|
|
797
|
+
dispose(enumerator)
|
|
798
|
+
|
|
799
|
+
return fields
|
|
800
|
+
|
|
801
|
+
except Exception as match_value:
|
|
802
|
+
if Decode_isRecoverableDecodingError(match_value):
|
|
803
|
+
return None
|
|
804
|
+
|
|
805
|
+
else:
|
|
806
|
+
raise match_value
|
|
807
|
+
|
|
808
|
+
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
Decode_inputRecordSchemaDecoder: Callable[[YAMLElement], InputRecordSchema] = input_record_schema_decoder_0040314_002d1.Value
|
|
812
|
+
|
|
813
|
+
Decode_inputEnumSchemaDecoder: Callable[[YAMLElement], InputEnumSchema] = input_enum_schema_decoder_0040341_002d1.Value
|
|
814
|
+
|
|
815
|
+
def Decode_cwlTypeDecoder_0027(element: YAMLElement) -> CWLType:
|
|
816
|
+
def parse_type_string(type_str: str, element: Any=element) -> CWLType:
|
|
817
|
+
pattern_input: tuple[str, bool] = ((replace(type_str, "?", ""), True)) if ends_with_exact(type_str, "?") else ((type_str, False))
|
|
818
|
+
stripped: str = pattern_input[0]
|
|
819
|
+
base_type: CWLType
|
|
820
|
+
match_value: CWLType | None = Decode_parseArrayShorthand(stripped)
|
|
821
|
+
base_type = Decode_cwlSimpleTypeFromString(stripped) if (match_value is None) else match_value
|
|
822
|
+
if pattern_input[1]:
|
|
823
|
+
return CWLType(14, [CWLType(10), base_type])
|
|
824
|
+
|
|
825
|
+
else:
|
|
826
|
+
return base_type
|
|
827
|
+
|
|
828
|
+
|
|
829
|
+
(pattern_matching_result, v, items) = (None, None, None)
|
|
830
|
+
if element.tag == 1:
|
|
831
|
+
pattern_matching_result = 0
|
|
832
|
+
v = element.fields[0]
|
|
833
|
+
|
|
834
|
+
elif element.tag == 3:
|
|
835
|
+
if not is_empty(element.fields[0]):
|
|
836
|
+
if head(element.fields[0]).tag == 1:
|
|
837
|
+
if is_empty(tail(element.fields[0])):
|
|
838
|
+
pattern_matching_result = 0
|
|
839
|
+
v = head(element.fields[0]).fields[0]
|
|
840
|
+
|
|
841
|
+
else:
|
|
842
|
+
pattern_matching_result = 2
|
|
843
|
+
|
|
844
|
+
|
|
845
|
+
else:
|
|
846
|
+
pattern_matching_result = 2
|
|
847
|
+
|
|
848
|
+
|
|
849
|
+
else:
|
|
850
|
+
pattern_matching_result = 2
|
|
851
|
+
|
|
852
|
+
|
|
853
|
+
elif element.tag == 2:
|
|
854
|
+
pattern_matching_result = 1
|
|
855
|
+
items = element.fields[0]
|
|
856
|
+
|
|
857
|
+
else:
|
|
858
|
+
pattern_matching_result = 3
|
|
859
|
+
|
|
860
|
+
if pattern_matching_result == 0:
|
|
861
|
+
return parse_type_string(v.Value)
|
|
862
|
+
|
|
863
|
+
elif pattern_matching_result == 1:
|
|
864
|
+
def mapping(element_1: YAMLElement, element: Any=element) -> CWLType:
|
|
865
|
+
return Decode_cwlTypeDecoder_0027(element_1)
|
|
866
|
+
|
|
867
|
+
return CWLType(14, list(map(mapping, items)))
|
|
868
|
+
|
|
869
|
+
elif pattern_matching_result == 2:
|
|
870
|
+
def _arrow855(get: IGetters, element: Any=element) -> CWLType:
|
|
871
|
+
type_field: YAMLElement | None
|
|
872
|
+
object_arg: IOptionalGetter = get.Optional
|
|
873
|
+
def arg_1(x: YAMLElement) -> YAMLElement:
|
|
874
|
+
return x
|
|
875
|
+
|
|
876
|
+
type_field = object_arg.Field("type", arg_1)
|
|
877
|
+
(pattern_matching_result_1, v_1) = (None, None)
|
|
878
|
+
if type_field is not None:
|
|
879
|
+
if type_field.tag == 3:
|
|
880
|
+
if not is_empty(type_field.fields[0]):
|
|
881
|
+
if head(type_field.fields[0]).tag == 1:
|
|
882
|
+
if is_empty(tail(type_field.fields[0])):
|
|
883
|
+
pattern_matching_result_1 = 0
|
|
884
|
+
v_1 = head(type_field.fields[0]).fields[0]
|
|
885
|
+
|
|
886
|
+
else:
|
|
887
|
+
pattern_matching_result_1 = 1
|
|
888
|
+
|
|
889
|
+
|
|
890
|
+
else:
|
|
891
|
+
pattern_matching_result_1 = 1
|
|
892
|
+
|
|
893
|
+
|
|
894
|
+
else:
|
|
895
|
+
pattern_matching_result_1 = 1
|
|
896
|
+
|
|
897
|
+
|
|
898
|
+
else:
|
|
899
|
+
pattern_matching_result_1 = 2
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
else:
|
|
903
|
+
pattern_matching_result_1 = 2
|
|
904
|
+
|
|
905
|
+
if pattern_matching_result_1 == 0:
|
|
906
|
+
match_value_1: str = v_1.Value
|
|
907
|
+
return CWLType(12, input_record_schema_decoder_0040314_002d1.Value(element)) if (match_value_1 == "record") else (CWLType(13, input_enum_schema_decoder_0040341_002d1.Value(element)) if (match_value_1 == "enum") else (CWLType(11, input_array_schema_decoder_0040261_002d1.Value(element)) if (match_value_1 == "array") else parse_type_string(match_value_1)))
|
|
908
|
+
|
|
909
|
+
elif pattern_matching_result_1 == 1:
|
|
910
|
+
def _arrow854(__unit: None=None) -> YAMLElement:
|
|
911
|
+
object_arg_1: IRequiredGetter = get.Required
|
|
912
|
+
def arg_3(x_1: YAMLElement) -> YAMLElement:
|
|
913
|
+
return x_1
|
|
914
|
+
|
|
915
|
+
return object_arg_1.Field("type", arg_3)
|
|
916
|
+
|
|
917
|
+
return Decode_cwlTypeDecoder_0027(_arrow854())
|
|
918
|
+
|
|
919
|
+
elif pattern_matching_result_1 == 2:
|
|
920
|
+
raise Exception("Unexpected type format in cwlTypeDecoder\'")
|
|
921
|
+
|
|
922
|
+
|
|
923
|
+
return object(_arrow855, element)
|
|
924
|
+
|
|
925
|
+
elif pattern_matching_result == 3:
|
|
926
|
+
raise Exception("Unexpected YAMLElement in cwlTypeDecoder\'")
|
|
927
|
+
|
|
928
|
+
|
|
929
|
+
|
|
930
|
+
def Decode_cwlTypeStringMatcher(t: str, get: IGetters) -> tuple[CWLType, bool]:
|
|
931
|
+
pattern_input: tuple[bool, str] = ((True, replace(t, "?", ""))) if ends_with_exact(t, "?") else ((False, t))
|
|
932
|
+
optional: bool = pattern_input[0]
|
|
933
|
+
new_t: str = pattern_input[1]
|
|
934
|
+
cwl_type: CWLType
|
|
935
|
+
match_value: CWLType | None = Decode_parseArrayShorthand(new_t)
|
|
936
|
+
if match_value is None:
|
|
937
|
+
if new_t == "File":
|
|
938
|
+
cwl_type = CWLType(0, FileInstance__ctor())
|
|
939
|
+
|
|
940
|
+
elif new_t == "Directory":
|
|
941
|
+
cwl_type = CWLType(1, DirectoryInstance__ctor())
|
|
942
|
+
|
|
943
|
+
elif new_t == "Dirent":
|
|
944
|
+
object_arg: IRequiredGetter = get.Required
|
|
945
|
+
cwl_type = object_arg.Field("listing", Decode_direntDecoder)
|
|
946
|
+
|
|
947
|
+
elif new_t == "string":
|
|
948
|
+
cwl_type = CWLType(3)
|
|
949
|
+
|
|
950
|
+
elif new_t == "int":
|
|
951
|
+
cwl_type = CWLType(4)
|
|
952
|
+
|
|
953
|
+
elif new_t == "long":
|
|
954
|
+
cwl_type = CWLType(5)
|
|
955
|
+
|
|
956
|
+
elif new_t == "float":
|
|
957
|
+
cwl_type = CWLType(6)
|
|
958
|
+
|
|
959
|
+
elif new_t == "double":
|
|
960
|
+
cwl_type = CWLType(7)
|
|
961
|
+
|
|
962
|
+
elif new_t == "boolean":
|
|
963
|
+
cwl_type = CWLType(8)
|
|
964
|
+
|
|
965
|
+
elif new_t == "stdout":
|
|
966
|
+
cwl_type = CWLType(9)
|
|
967
|
+
|
|
968
|
+
elif new_t == "null":
|
|
969
|
+
cwl_type = CWLType(10)
|
|
970
|
+
|
|
971
|
+
else:
|
|
972
|
+
raise Exception("Invalid CWL type")
|
|
973
|
+
|
|
974
|
+
|
|
975
|
+
else:
|
|
976
|
+
cwl_type = match_value
|
|
977
|
+
|
|
978
|
+
return (CWLType(14, [CWLType(10), cwl_type]) if optional else cwl_type, optional)
|
|
979
|
+
|
|
980
|
+
|
|
981
|
+
def _arrow857(value_1: YAMLElement) -> tuple[CWLType, bool]:
|
|
982
|
+
def getter(get: IGetters) -> tuple[CWLType, bool]:
|
|
983
|
+
cwl_type: str | None
|
|
984
|
+
object_arg: IRequiredGetter = get.Required
|
|
985
|
+
def arg_1(value: YAMLElement, get: Any=get) -> str | None:
|
|
986
|
+
(pattern_matching_result, v) = (None, None)
|
|
987
|
+
if value.tag == 1:
|
|
988
|
+
pattern_matching_result = 0
|
|
989
|
+
v = value.fields[0]
|
|
990
|
+
|
|
991
|
+
elif value.tag == 3:
|
|
992
|
+
if not is_empty(value.fields[0]):
|
|
993
|
+
if head(value.fields[0]).tag == 1:
|
|
994
|
+
if is_empty(tail(value.fields[0])):
|
|
995
|
+
pattern_matching_result = 0
|
|
996
|
+
v = head(value.fields[0]).fields[0]
|
|
997
|
+
|
|
998
|
+
else:
|
|
999
|
+
pattern_matching_result = 1
|
|
1000
|
+
|
|
1001
|
+
|
|
1002
|
+
else:
|
|
1003
|
+
pattern_matching_result = 1
|
|
1004
|
+
|
|
1005
|
+
|
|
1006
|
+
else:
|
|
1007
|
+
pattern_matching_result = 1
|
|
1008
|
+
|
|
1009
|
+
|
|
1010
|
+
else:
|
|
1011
|
+
pattern_matching_result = 2
|
|
1012
|
+
|
|
1013
|
+
if pattern_matching_result == 0:
|
|
1014
|
+
return v.Value
|
|
1015
|
+
|
|
1016
|
+
elif pattern_matching_result == 1:
|
|
1017
|
+
return None
|
|
1018
|
+
|
|
1019
|
+
elif pattern_matching_result == 2:
|
|
1020
|
+
raise Exception("Unexpected YAMLElement in cwlTypeDecoder")
|
|
1021
|
+
|
|
1022
|
+
|
|
1023
|
+
cwl_type = object_arg.Field("type", arg_1)
|
|
1024
|
+
if cwl_type is None:
|
|
1025
|
+
def _arrow856(__unit: None=None, get: Any=get) -> CWLType:
|
|
1026
|
+
object_arg_1: IRequiredGetter = get.Required
|
|
1027
|
+
return object_arg_1.Field("type", Decode_cwlTypeDecoder_0027)
|
|
1028
|
+
|
|
1029
|
+
return (_arrow856(), False)
|
|
1030
|
+
|
|
1031
|
+
else:
|
|
1032
|
+
return Decode_cwlTypeStringMatcher(cwl_type, get)
|
|
1033
|
+
|
|
1034
|
+
|
|
1035
|
+
return object(getter, value_1)
|
|
1036
|
+
|
|
1037
|
+
|
|
1038
|
+
Decode_cwlTypeDecoder: Callable[[YAMLElement], tuple[CWLType, bool]] = _arrow857
|
|
1039
|
+
|
|
1040
|
+
def _arrow864(value_1: YAMLElement) -> Array[CWLOutput]:
|
|
1041
|
+
def getter(get: IGetters) -> Array[CWLOutput]:
|
|
1042
|
+
dict_1: Any = get.Overflow.FieldList(empty())
|
|
1043
|
+
def _arrow863(__unit: None=None, get: Any=get) -> IEnumerable_1[CWLOutput]:
|
|
1044
|
+
def _arrow862(key: str) -> IEnumerable_1[CWLOutput]:
|
|
1045
|
+
value: YAMLElement = get_item_from_dict(dict_1, key)
|
|
1046
|
+
output_binding: OutputBinding | None = Decode_outputBindingDecoder(value)
|
|
1047
|
+
output_source_values: Array[str] | None = Decode_outputSourceDecoder(value)
|
|
1048
|
+
output: CWLOutput = CWLOutput(key, (((Decode_cwlTypeStringMatcher(head(value.fields[0]).fields[0].Value, get)[0] if is_empty(tail(value.fields[0])) else Decode_cwlTypeDecoder(value)[0]) if (head(value.fields[0]).tag == 1) else Decode_cwlTypeDecoder(value)[0]) if (not is_empty(value.fields[0])) else Decode_cwlTypeDecoder(value)[0]) if (value.tag == 3) else Decode_cwlTypeDecoder(value)[0])
|
|
1049
|
+
def _expr858():
|
|
1050
|
+
set_optional_property("outputBinding", output_binding, output)
|
|
1051
|
+
return empty_1()
|
|
1052
|
+
|
|
1053
|
+
def _arrow861(__unit: None=None) -> IEnumerable_1[CWLOutput]:
|
|
1054
|
+
def _arrow859(__unit: None=None) -> IEnumerable_1[CWLOutput]:
|
|
1055
|
+
match_value: Array[str] | None = output_source_values
|
|
1056
|
+
(pattern_matching_result, values_2, values_3) = (None, None, None)
|
|
1057
|
+
if match_value is not None:
|
|
1058
|
+
if len(match_value) > 1:
|
|
1059
|
+
pattern_matching_result = 0
|
|
1060
|
+
values_2 = match_value
|
|
1061
|
+
|
|
1062
|
+
elif len(match_value) == 1:
|
|
1063
|
+
pattern_matching_result = 1
|
|
1064
|
+
values_3 = match_value
|
|
1065
|
+
|
|
1066
|
+
else:
|
|
1067
|
+
pattern_matching_result = 2
|
|
1068
|
+
|
|
1069
|
+
|
|
1070
|
+
else:
|
|
1071
|
+
pattern_matching_result = 2
|
|
1072
|
+
|
|
1073
|
+
if pattern_matching_result == 0:
|
|
1074
|
+
output.OutputSource = OutputSource(1, values_2)
|
|
1075
|
+
return empty_1()
|
|
1076
|
+
|
|
1077
|
+
elif pattern_matching_result == 1:
|
|
1078
|
+
output.OutputSource = OutputSource(0, values_3[0])
|
|
1079
|
+
return empty_1()
|
|
1080
|
+
|
|
1081
|
+
elif pattern_matching_result == 2:
|
|
1082
|
+
return empty_1()
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
def _arrow860(__unit: None=None) -> IEnumerable_1[CWLOutput]:
|
|
1086
|
+
return singleton(output)
|
|
1087
|
+
|
|
1088
|
+
return append(_arrow859(), delay(_arrow860))
|
|
1089
|
+
|
|
1090
|
+
return append(_expr858() if (output_binding is not None) else empty_1(), delay(_arrow861))
|
|
1091
|
+
|
|
1092
|
+
return collect(_arrow862, dict_1.keys())
|
|
1093
|
+
|
|
1094
|
+
return list(to_array(delay(_arrow863)))
|
|
1095
|
+
|
|
1096
|
+
return object(getter, value_1)
|
|
1097
|
+
|
|
1098
|
+
|
|
1099
|
+
Decode_outputArrayDecoder: Callable[[YAMLElement], Array[CWLOutput]] = _arrow864
|
|
1100
|
+
|
|
1101
|
+
def _arrow865(value: YAMLElement) -> Array[CWLOutput]:
|
|
1102
|
+
def getter(get: IGetters) -> Array[CWLOutput]:
|
|
1103
|
+
object_arg: IRequiredGetter = get.Required
|
|
1104
|
+
return object_arg.Field("outputs", Decode_outputArrayDecoder)
|
|
1105
|
+
|
|
1106
|
+
return object(getter, value)
|
|
1107
|
+
|
|
1108
|
+
|
|
1109
|
+
Decode_outputsDecoder: Callable[[YAMLElement], Array[CWLOutput]] = _arrow865
|
|
1110
|
+
|
|
1111
|
+
def Decode_dockerRequirementDecoder(get: IGetters) -> DockerRequirement:
|
|
1112
|
+
def _arrow866(y_ele: YAMLElement, get: Any=get) -> SchemaSaladString:
|
|
1113
|
+
return Decode_decodeSchemaSaladString(y_ele)
|
|
1114
|
+
|
|
1115
|
+
def _arrow867(__unit: None=None, get: Any=get) -> YAMLElement | None:
|
|
1116
|
+
object_arg: IOptionalGetter = get.Optional
|
|
1117
|
+
def arg_1(x: YAMLElement) -> YAMLElement:
|
|
1118
|
+
return x
|
|
1119
|
+
|
|
1120
|
+
return object_arg.Field("dockerFile", arg_1)
|
|
1121
|
+
|
|
1122
|
+
docker_file: SchemaSaladString | None = map_1(_arrow866, _arrow867())
|
|
1123
|
+
def _arrow868(__unit: None=None, get: Any=get) -> str | None:
|
|
1124
|
+
object_arg_1: IOptionalGetter = get.Optional
|
|
1125
|
+
return object_arg_1.Field("dockerPull", string)
|
|
1126
|
+
|
|
1127
|
+
def _arrow869(__unit: None=None, get: Any=get) -> str | None:
|
|
1128
|
+
object_arg_2: IOptionalGetter = get.Optional
|
|
1129
|
+
return object_arg_2.Field("dockerImageId", string)
|
|
1130
|
+
|
|
1131
|
+
def _arrow870(__unit: None=None, get: Any=get) -> str | None:
|
|
1132
|
+
object_arg_3: IOptionalGetter = get.Optional
|
|
1133
|
+
return object_arg_3.Field("dockerLoad", string)
|
|
1134
|
+
|
|
1135
|
+
def _arrow871(__unit: None=None, get: Any=get) -> str | None:
|
|
1136
|
+
object_arg_4: IOptionalGetter = get.Optional
|
|
1137
|
+
return object_arg_4.Field("dockerImport", string)
|
|
1138
|
+
|
|
1139
|
+
def _arrow872(__unit: None=None, get: Any=get) -> str | None:
|
|
1140
|
+
object_arg_5: IOptionalGetter = get.Optional
|
|
1141
|
+
return object_arg_5.Field("dockerOutputDirectory", string)
|
|
1142
|
+
|
|
1143
|
+
return DockerRequirement_create_Z14898805(_arrow868(), None, docker_file, _arrow869(), _arrow870(), _arrow871(), _arrow872())
|
|
1144
|
+
|
|
1145
|
+
|
|
1146
|
+
def Decode_envVarRequirementDecoder(get: IGetters) -> Array[EnvironmentDef]:
|
|
1147
|
+
env_def_element: YAMLElement
|
|
1148
|
+
_arg: YAMLElement
|
|
1149
|
+
object_arg: IRequiredGetter = get.Required
|
|
1150
|
+
def arg_1(x: YAMLElement, get: Any=get) -> YAMLElement:
|
|
1151
|
+
return x
|
|
1152
|
+
|
|
1153
|
+
_arg = object_arg.Field("envDef", arg_1)
|
|
1154
|
+
(pattern_matching_result, sequence, mappings, other) = (None, None, None, None)
|
|
1155
|
+
if _arg.tag == 3:
|
|
1156
|
+
if not is_empty(_arg.fields[0]):
|
|
1157
|
+
if head(_arg.fields[0]).tag == 2:
|
|
1158
|
+
if is_empty(tail(_arg.fields[0])):
|
|
1159
|
+
pattern_matching_result = 0
|
|
1160
|
+
sequence = head(_arg.fields[0]).fields[0]
|
|
1161
|
+
|
|
1162
|
+
else:
|
|
1163
|
+
pattern_matching_result = 2
|
|
1164
|
+
other = _arg
|
|
1165
|
+
|
|
1166
|
+
|
|
1167
|
+
elif head(_arg.fields[0]).tag == 3:
|
|
1168
|
+
if is_empty(tail(_arg.fields[0])):
|
|
1169
|
+
pattern_matching_result = 1
|
|
1170
|
+
mappings = head(_arg.fields[0]).fields[0]
|
|
1171
|
+
|
|
1172
|
+
else:
|
|
1173
|
+
pattern_matching_result = 2
|
|
1174
|
+
other = _arg
|
|
1175
|
+
|
|
1176
|
+
|
|
1177
|
+
else:
|
|
1178
|
+
pattern_matching_result = 2
|
|
1179
|
+
other = _arg
|
|
1180
|
+
|
|
1181
|
+
|
|
1182
|
+
else:
|
|
1183
|
+
pattern_matching_result = 2
|
|
1184
|
+
other = _arg
|
|
1185
|
+
|
|
1186
|
+
|
|
1187
|
+
else:
|
|
1188
|
+
pattern_matching_result = 2
|
|
1189
|
+
other = _arg
|
|
1190
|
+
|
|
1191
|
+
if pattern_matching_result == 0:
|
|
1192
|
+
env_def_element = YAMLElement(2, sequence)
|
|
1193
|
+
|
|
1194
|
+
elif pattern_matching_result == 1:
|
|
1195
|
+
env_def_element = YAMLElement(3, mappings)
|
|
1196
|
+
|
|
1197
|
+
elif pattern_matching_result == 2:
|
|
1198
|
+
env_def_element = other
|
|
1199
|
+
|
|
1200
|
+
if env_def_element.tag == 2:
|
|
1201
|
+
def _arrow875(value_3: YAMLElement, get: Any=get) -> EnvironmentDef:
|
|
1202
|
+
def getter(get2: IGetters) -> EnvironmentDef:
|
|
1203
|
+
def _arrow873(__unit: None=None, get2: Any=get2) -> str:
|
|
1204
|
+
object_arg_1: IRequiredGetter = get2.Required
|
|
1205
|
+
return object_arg_1.Field("envName", string)
|
|
1206
|
+
|
|
1207
|
+
def _arrow874(__unit: None=None, get2: Any=get2) -> str:
|
|
1208
|
+
object_arg_2: IRequiredGetter = get2.Required
|
|
1209
|
+
return object_arg_2.Field("envValue", string)
|
|
1210
|
+
|
|
1211
|
+
return EnvironmentDef(_arrow873(), _arrow874())
|
|
1212
|
+
|
|
1213
|
+
return object(getter, value_3)
|
|
1214
|
+
|
|
1215
|
+
return resizearray(_arrow875, env_def_element)
|
|
1216
|
+
|
|
1217
|
+
elif env_def_element.tag == 3:
|
|
1218
|
+
def chooser(_arg_2: YAMLElement, get: Any=get) -> EnvironmentDef | None:
|
|
1219
|
+
if _arg_2.tag == 0:
|
|
1220
|
+
def _arrow876(__unit: None=None, _arg_2: Any=_arg_2) -> str:
|
|
1221
|
+
_arg_1: YAMLElement = _arg_2.fields[1]
|
|
1222
|
+
(pattern_matching_result_1, value, other_1) = (None, None, None)
|
|
1223
|
+
if _arg_1.tag == 1:
|
|
1224
|
+
pattern_matching_result_1 = 0
|
|
1225
|
+
value = _arg_1.fields[0]
|
|
1226
|
+
|
|
1227
|
+
elif _arg_1.tag == 3:
|
|
1228
|
+
if not is_empty(_arg_1.fields[0]):
|
|
1229
|
+
if head(_arg_1.fields[0]).tag == 1:
|
|
1230
|
+
if is_empty(tail(_arg_1.fields[0])):
|
|
1231
|
+
pattern_matching_result_1 = 0
|
|
1232
|
+
value = head(_arg_1.fields[0]).fields[0]
|
|
1233
|
+
|
|
1234
|
+
else:
|
|
1235
|
+
pattern_matching_result_1 = 1
|
|
1236
|
+
other_1 = _arg_1
|
|
1237
|
+
|
|
1238
|
+
|
|
1239
|
+
else:
|
|
1240
|
+
pattern_matching_result_1 = 1
|
|
1241
|
+
other_1 = _arg_1
|
|
1242
|
+
|
|
1243
|
+
|
|
1244
|
+
else:
|
|
1245
|
+
pattern_matching_result_1 = 1
|
|
1246
|
+
other_1 = _arg_1
|
|
1247
|
+
|
|
1248
|
+
|
|
1249
|
+
else:
|
|
1250
|
+
pattern_matching_result_1 = 1
|
|
1251
|
+
other_1 = _arg_1
|
|
1252
|
+
|
|
1253
|
+
if pattern_matching_result_1 == 0:
|
|
1254
|
+
return trim(value.Value, "\"")
|
|
1255
|
+
|
|
1256
|
+
elif pattern_matching_result_1 == 1:
|
|
1257
|
+
return Decode_decodeStringOrExpression(other_1)
|
|
1258
|
+
|
|
1259
|
+
|
|
1260
|
+
return EnvironmentDef(_arg_2.fields[0].Value, _arrow876())
|
|
1261
|
+
|
|
1262
|
+
else:
|
|
1263
|
+
return None
|
|
1264
|
+
|
|
1265
|
+
|
|
1266
|
+
return list(choose(chooser, env_def_element.fields[0]))
|
|
1267
|
+
|
|
1268
|
+
else:
|
|
1269
|
+
raise Exception("Invalid envDef format. Expected array or map.")
|
|
1270
|
+
|
|
1271
|
+
|
|
1272
|
+
|
|
1273
|
+
def Decode_softwareRequirementDecoder(get: IGetters) -> Array[SoftwarePackage]:
|
|
1274
|
+
def normalize_collection_element(_arg: YAMLElement, get: Any=get) -> YAMLElement:
|
|
1275
|
+
(pattern_matching_result, sequence, mappings, other) = (None, None, None, None)
|
|
1276
|
+
if _arg.tag == 3:
|
|
1277
|
+
if not is_empty(_arg.fields[0]):
|
|
1278
|
+
if head(_arg.fields[0]).tag == 2:
|
|
1279
|
+
if is_empty(tail(_arg.fields[0])):
|
|
1280
|
+
pattern_matching_result = 0
|
|
1281
|
+
sequence = head(_arg.fields[0]).fields[0]
|
|
1282
|
+
|
|
1283
|
+
else:
|
|
1284
|
+
pattern_matching_result = 2
|
|
1285
|
+
other = _arg
|
|
1286
|
+
|
|
1287
|
+
|
|
1288
|
+
elif head(_arg.fields[0]).tag == 3:
|
|
1289
|
+
if is_empty(tail(_arg.fields[0])):
|
|
1290
|
+
pattern_matching_result = 1
|
|
1291
|
+
mappings = head(_arg.fields[0]).fields[0]
|
|
1292
|
+
|
|
1293
|
+
else:
|
|
1294
|
+
pattern_matching_result = 2
|
|
1295
|
+
other = _arg
|
|
1296
|
+
|
|
1297
|
+
|
|
1298
|
+
else:
|
|
1299
|
+
pattern_matching_result = 2
|
|
1300
|
+
other = _arg
|
|
1301
|
+
|
|
1302
|
+
|
|
1303
|
+
else:
|
|
1304
|
+
pattern_matching_result = 2
|
|
1305
|
+
other = _arg
|
|
1306
|
+
|
|
1307
|
+
|
|
1308
|
+
else:
|
|
1309
|
+
pattern_matching_result = 2
|
|
1310
|
+
other = _arg
|
|
1311
|
+
|
|
1312
|
+
if pattern_matching_result == 0:
|
|
1313
|
+
return YAMLElement(2, sequence)
|
|
1314
|
+
|
|
1315
|
+
elif pattern_matching_result == 1:
|
|
1316
|
+
return YAMLElement(3, mappings)
|
|
1317
|
+
|
|
1318
|
+
elif pattern_matching_result == 2:
|
|
1319
|
+
return other
|
|
1320
|
+
|
|
1321
|
+
|
|
1322
|
+
def _arrow877(__unit: None=None, get: Any=get) -> YAMLElement:
|
|
1323
|
+
object_arg: IRequiredGetter = get.Required
|
|
1324
|
+
def arg_1(x: YAMLElement) -> YAMLElement:
|
|
1325
|
+
return x
|
|
1326
|
+
|
|
1327
|
+
return object_arg.Field("packages", arg_1)
|
|
1328
|
+
|
|
1329
|
+
packages_element: YAMLElement = normalize_collection_element(_arrow877())
|
|
1330
|
+
def decode_specs_array(element: YAMLElement, get: Any=get) -> Array[str]:
|
|
1331
|
+
def _arrow878(y_ele: YAMLElement, element: Any=element) -> str:
|
|
1332
|
+
return Decode_decodeStringOrExpression(y_ele)
|
|
1333
|
+
|
|
1334
|
+
return resizearray(_arrow878, normalize_collection_element(element))
|
|
1335
|
+
|
|
1336
|
+
if packages_element.tag == 2:
|
|
1337
|
+
def _arrow884(value_5: YAMLElement, get: Any=get) -> SoftwarePackage:
|
|
1338
|
+
def getter(get2: IGetters) -> SoftwarePackage:
|
|
1339
|
+
def _arrow879(__unit: None=None, get2: Any=get2) -> str:
|
|
1340
|
+
object_arg_1: IRequiredGetter = get2.Required
|
|
1341
|
+
return object_arg_1.Field("package", string)
|
|
1342
|
+
|
|
1343
|
+
def _arrow881(__unit: None=None, get2: Any=get2) -> Array[str] | None:
|
|
1344
|
+
object_arg_2: IOptionalGetter = get2.Optional
|
|
1345
|
+
def arg_5(value_1: YAMLElement) -> Array[str]:
|
|
1346
|
+
def _arrow880(value_2: YAMLElement, value_1: Any=value_1) -> str:
|
|
1347
|
+
return string(value_2)
|
|
1348
|
+
|
|
1349
|
+
return resizearray(_arrow880, value_1)
|
|
1350
|
+
|
|
1351
|
+
return object_arg_2.Field("version", arg_5)
|
|
1352
|
+
|
|
1353
|
+
def _arrow883(__unit: None=None, get2: Any=get2) -> Array[str] | None:
|
|
1354
|
+
object_arg_3: IOptionalGetter = get2.Optional
|
|
1355
|
+
def arg_7(value_3: YAMLElement) -> Array[str]:
|
|
1356
|
+
def _arrow882(value_4: YAMLElement, value_3: Any=value_3) -> str:
|
|
1357
|
+
return string(value_4)
|
|
1358
|
+
|
|
1359
|
+
return resizearray(_arrow882, value_3)
|
|
1360
|
+
|
|
1361
|
+
return object_arg_3.Field("specs", arg_7)
|
|
1362
|
+
|
|
1363
|
+
return SoftwarePackage(_arrow879(), _arrow881(), _arrow883())
|
|
1364
|
+
|
|
1365
|
+
return object(getter, value_5)
|
|
1366
|
+
|
|
1367
|
+
return resizearray(_arrow884, packages_element)
|
|
1368
|
+
|
|
1369
|
+
elif packages_element.tag == 3:
|
|
1370
|
+
def chooser_2(_arg_3: YAMLElement, get: Any=get) -> SoftwarePackage | None:
|
|
1371
|
+
if _arg_3.tag == 0:
|
|
1372
|
+
def _arrow885(__unit: None=None, _arg_3: Any=_arg_3) -> SoftwarePackage:
|
|
1373
|
+
package_name: str = _arg_3.fields[0].Value
|
|
1374
|
+
package_value: YAMLElement = _arg_3.fields[1]
|
|
1375
|
+
normalized_package_value: YAMLElement = normalize_collection_element(package_value)
|
|
1376
|
+
def chooser(_arg_1: YAMLElement) -> Array[str] | None:
|
|
1377
|
+
(pattern_matching_result_1, k_1, v_1) = (None, None, None)
|
|
1378
|
+
if _arg_1.tag == 0:
|
|
1379
|
+
if _arg_1.fields[0].Value == "version":
|
|
1380
|
+
pattern_matching_result_1 = 0
|
|
1381
|
+
k_1 = _arg_1.fields[0]
|
|
1382
|
+
v_1 = _arg_1.fields[1]
|
|
1383
|
+
|
|
1384
|
+
else:
|
|
1385
|
+
pattern_matching_result_1 = 1
|
|
1386
|
+
|
|
1387
|
+
|
|
1388
|
+
else:
|
|
1389
|
+
pattern_matching_result_1 = 1
|
|
1390
|
+
|
|
1391
|
+
if pattern_matching_result_1 == 0:
|
|
1392
|
+
return decode_specs_array(v_1)
|
|
1393
|
+
|
|
1394
|
+
elif pattern_matching_result_1 == 1:
|
|
1395
|
+
return None
|
|
1396
|
+
|
|
1397
|
+
|
|
1398
|
+
def chooser_1(_arg_2: YAMLElement) -> Array[str] | None:
|
|
1399
|
+
(pattern_matching_result_2, k_3, v_3) = (None, None, None)
|
|
1400
|
+
if _arg_2.tag == 0:
|
|
1401
|
+
if _arg_2.fields[0].Value == "specs":
|
|
1402
|
+
pattern_matching_result_2 = 0
|
|
1403
|
+
k_3 = _arg_2.fields[0]
|
|
1404
|
+
v_3 = _arg_2.fields[1]
|
|
1405
|
+
|
|
1406
|
+
else:
|
|
1407
|
+
pattern_matching_result_2 = 1
|
|
1408
|
+
|
|
1409
|
+
|
|
1410
|
+
else:
|
|
1411
|
+
pattern_matching_result_2 = 1
|
|
1412
|
+
|
|
1413
|
+
if pattern_matching_result_2 == 0:
|
|
1414
|
+
return decode_specs_array(v_3)
|
|
1415
|
+
|
|
1416
|
+
elif pattern_matching_result_2 == 1:
|
|
1417
|
+
return None
|
|
1418
|
+
|
|
1419
|
+
|
|
1420
|
+
return (SoftwarePackage(package_name, None, None) if is_empty(normalized_package_value.fields[0]) else SoftwarePackage(package_name, try_pick(chooser, normalized_package_value.fields[0]), try_pick(chooser_1, normalized_package_value.fields[0]))) if (normalized_package_value.tag == 3) else (SoftwarePackage(package_name, None, decode_specs_array(normalized_package_value)) if (normalized_package_value.tag == 2) else SoftwarePackage(package_name, None, [Decode_decodeStringOrExpression(package_value)]))
|
|
1421
|
+
|
|
1422
|
+
return _arrow885()
|
|
1423
|
+
|
|
1424
|
+
else:
|
|
1425
|
+
return None
|
|
1426
|
+
|
|
1427
|
+
|
|
1428
|
+
return list(choose(chooser_2, packages_element.fields[0]))
|
|
1429
|
+
|
|
1430
|
+
else:
|
|
1431
|
+
raise Exception("Invalid packages format. Expected array or map.")
|
|
1432
|
+
|
|
1433
|
+
|
|
1434
|
+
|
|
1435
|
+
def Decode_initialWorkDirRequirementDecoder(get: IGetters) -> Array[InitialWorkDirEntry]:
|
|
1436
|
+
listing_element: YAMLElement
|
|
1437
|
+
object_arg: IRequiredGetter = get.Required
|
|
1438
|
+
def arg_1(x: YAMLElement, get: Any=get) -> YAMLElement:
|
|
1439
|
+
return x
|
|
1440
|
+
|
|
1441
|
+
listing_element = object_arg.Field("listing", arg_1)
|
|
1442
|
+
(pattern_matching_result,) = (None,)
|
|
1443
|
+
if listing_element.tag == 3:
|
|
1444
|
+
if not is_empty(listing_element.fields[0]):
|
|
1445
|
+
if head(listing_element.fields[0]).tag == 2:
|
|
1446
|
+
if is_empty(tail(listing_element.fields[0])):
|
|
1447
|
+
pattern_matching_result = 0
|
|
1448
|
+
|
|
1449
|
+
else:
|
|
1450
|
+
pattern_matching_result = 1
|
|
1451
|
+
|
|
1452
|
+
|
|
1453
|
+
else:
|
|
1454
|
+
pattern_matching_result = 1
|
|
1455
|
+
|
|
1456
|
+
|
|
1457
|
+
else:
|
|
1458
|
+
pattern_matching_result = 1
|
|
1459
|
+
|
|
1460
|
+
|
|
1461
|
+
elif listing_element.tag == 2:
|
|
1462
|
+
pattern_matching_result = 0
|
|
1463
|
+
|
|
1464
|
+
else:
|
|
1465
|
+
pattern_matching_result = 1
|
|
1466
|
+
|
|
1467
|
+
if pattern_matching_result == 0:
|
|
1468
|
+
def _arrow886(value: YAMLElement, get: Any=get) -> InitialWorkDirEntry:
|
|
1469
|
+
return Decode_initialWorkDirEntryDecoder(value)
|
|
1470
|
+
|
|
1471
|
+
return resizearray(_arrow886, listing_element)
|
|
1472
|
+
|
|
1473
|
+
elif pattern_matching_result == 1:
|
|
1474
|
+
return [Decode_initialWorkDirEntryDecoder(listing_element)]
|
|
1475
|
+
|
|
1476
|
+
|
|
1477
|
+
|
|
1478
|
+
def Decode_loadListingRequirementDecoder(get: IGetters) -> LoadListingRequirementValue:
|
|
1479
|
+
def _arrow887(__unit: None=None, get: Any=get) -> str | None:
|
|
1480
|
+
object_arg: IOptionalGetter = get.Optional
|
|
1481
|
+
return object_arg.Field("loadListing", string)
|
|
1482
|
+
|
|
1483
|
+
load_listing_value: str = default_arg(_arrow887(), "no_listing")
|
|
1484
|
+
def _arrow888(__unit: None=None, get: Any=get) -> LoadListingEnum:
|
|
1485
|
+
match_value: LoadListingEnum | None = LoadListingEnum_tryParse_Z721C83C5(load_listing_value)
|
|
1486
|
+
if match_value is None:
|
|
1487
|
+
raise Exception(("Invalid loadListing value \'" + load_listing_value) + "\'. Expected one of: no_listing, shallow_listing, deep_listing.")
|
|
1488
|
+
|
|
1489
|
+
else:
|
|
1490
|
+
return match_value
|
|
1491
|
+
|
|
1492
|
+
|
|
1493
|
+
return LoadListingRequirementValue(_arrow888())
|
|
1494
|
+
|
|
1495
|
+
|
|
1496
|
+
def Decode_decodeResourceScalar(element: YAMLElement) -> Any:
|
|
1497
|
+
match_value: str | None
|
|
1498
|
+
_arg: YAMLElement = element
|
|
1499
|
+
(pattern_matching_result, value) = (None, None)
|
|
1500
|
+
if _arg.tag == 1:
|
|
1501
|
+
pattern_matching_result = 0
|
|
1502
|
+
value = _arg.fields[0]
|
|
1503
|
+
|
|
1504
|
+
elif _arg.tag == 3:
|
|
1505
|
+
if not is_empty(_arg.fields[0]):
|
|
1506
|
+
if head(_arg.fields[0]).tag == 1:
|
|
1507
|
+
if is_empty(tail(_arg.fields[0])):
|
|
1508
|
+
pattern_matching_result = 0
|
|
1509
|
+
value = head(_arg.fields[0]).fields[0]
|
|
1510
|
+
|
|
1511
|
+
else:
|
|
1512
|
+
pattern_matching_result = 1
|
|
1513
|
+
|
|
1514
|
+
|
|
1515
|
+
else:
|
|
1516
|
+
pattern_matching_result = 1
|
|
1517
|
+
|
|
1518
|
+
|
|
1519
|
+
else:
|
|
1520
|
+
pattern_matching_result = 1
|
|
1521
|
+
|
|
1522
|
+
|
|
1523
|
+
else:
|
|
1524
|
+
pattern_matching_result = 1
|
|
1525
|
+
|
|
1526
|
+
if pattern_matching_result == 0:
|
|
1527
|
+
match_value = value.Value
|
|
1528
|
+
|
|
1529
|
+
elif pattern_matching_result == 1:
|
|
1530
|
+
match_value = None
|
|
1531
|
+
|
|
1532
|
+
if match_value is None:
|
|
1533
|
+
return Decode_decodeStringOrExpression(element)
|
|
1534
|
+
|
|
1535
|
+
else:
|
|
1536
|
+
scalar_value: str = match_value
|
|
1537
|
+
match_value_1: tuple[bool, int64]
|
|
1538
|
+
out_arg: int64 = int64(0)
|
|
1539
|
+
def _arrow889(__unit: None=None, element: Any=element) -> int64:
|
|
1540
|
+
return out_arg
|
|
1541
|
+
|
|
1542
|
+
def _arrow890(v: int64, element: Any=element) -> None:
|
|
1543
|
+
nonlocal out_arg
|
|
1544
|
+
out_arg = v
|
|
1545
|
+
|
|
1546
|
+
match_value_1 = (try_parse(scalar_value, 7, False, 64, FSharpRef(_arrow889, _arrow890)), out_arg)
|
|
1547
|
+
if match_value_1[0]:
|
|
1548
|
+
return match_value_1[1]
|
|
1549
|
+
|
|
1550
|
+
else:
|
|
1551
|
+
match_value_2: tuple[bool, float]
|
|
1552
|
+
out_arg_1: float = 0.0
|
|
1553
|
+
def _arrow891(__unit: None=None, element: Any=element) -> float:
|
|
1554
|
+
return out_arg_1
|
|
1555
|
+
|
|
1556
|
+
def _arrow892(v_1: float, element: Any=element) -> None:
|
|
1557
|
+
nonlocal out_arg_1
|
|
1558
|
+
out_arg_1 = v_1
|
|
1559
|
+
|
|
1560
|
+
match_value_2 = (try_parse_1(scalar_value, FSharpRef(_arrow891, _arrow892)), out_arg_1)
|
|
1561
|
+
if match_value_2[0]:
|
|
1562
|
+
return match_value_2[1]
|
|
1563
|
+
|
|
1564
|
+
else:
|
|
1565
|
+
return Decode_decodeStringOrExpression(element)
|
|
1566
|
+
|
|
1567
|
+
|
|
1568
|
+
|
|
1569
|
+
|
|
1570
|
+
|
|
1571
|
+
def Decode_optionalResourceField(get: IGetters, field_name: str) -> Any | None:
|
|
1572
|
+
def _arrow893(element: YAMLElement, get: Any=get, field_name: Any=field_name) -> Any:
|
|
1573
|
+
return Decode_decodeResourceScalar(element)
|
|
1574
|
+
|
|
1575
|
+
def _arrow894(__unit: None=None, get: Any=get, field_name: Any=field_name) -> YAMLElement | None:
|
|
1576
|
+
object_arg: IOptionalGetter = get.Optional
|
|
1577
|
+
def arg_1(x: YAMLElement) -> YAMLElement:
|
|
1578
|
+
return x
|
|
1579
|
+
|
|
1580
|
+
return object_arg.Field(field_name, arg_1)
|
|
1581
|
+
|
|
1582
|
+
return map_1(_arrow893, _arrow894())
|
|
1583
|
+
|
|
1584
|
+
|
|
1585
|
+
def Decode_resourceRequirementDecoder(get: IGetters) -> ResourceRequirementInstance:
|
|
1586
|
+
return ResourceRequirementInstance__ctor_D76FC00(some(Decode_optionalResourceField(get, "coresMin")), some(Decode_optionalResourceField(get, "coresMax")), some(Decode_optionalResourceField(get, "ramMin")), some(Decode_optionalResourceField(get, "ramMax")), some(Decode_optionalResourceField(get, "tmpdirMin")), some(Decode_optionalResourceField(get, "tmpdirMax")), some(Decode_optionalResourceField(get, "outdirMin")), some(Decode_optionalResourceField(get, "outdirMax")))
|
|
1587
|
+
|
|
1588
|
+
|
|
1589
|
+
def Decode_schemaDefRequirementTypeDecoder(value: YAMLElement) -> SchemaDefRequirementType:
|
|
1590
|
+
def _arrow895(get: IGetters, value: Any=value) -> Any:
|
|
1591
|
+
return get.Overflow.FieldList(empty())
|
|
1592
|
+
|
|
1593
|
+
dict_1: Any = object(_arrow895, value)
|
|
1594
|
+
if "name" in dict_1:
|
|
1595
|
+
return SchemaDefRequirementType(Decode_decodeStringOrExpression(get_item_from_dict(dict_1, "name")), Decode_cwlTypeDecoder_0027(value))
|
|
1596
|
+
|
|
1597
|
+
else:
|
|
1598
|
+
if len(dict_1) == 0:
|
|
1599
|
+
raise Exception("SchemaDefRequirement entry cannot be empty.")
|
|
1600
|
+
|
|
1601
|
+
kv: Any = head_1(dict_1)
|
|
1602
|
+
return SchemaDefRequirementType(kv[0], Decode_cwlTypeDecoder_0027(kv[1]))
|
|
1603
|
+
|
|
1604
|
+
|
|
1605
|
+
|
|
1606
|
+
def Decode_schemaDefRequirementDecoder(get: IGetters) -> Array[SchemaDefRequirementType]:
|
|
1607
|
+
object_arg: IRequiredGetter = get.Required
|
|
1608
|
+
def arg_1(value: YAMLElement, get: Any=get) -> Array[SchemaDefRequirementType]:
|
|
1609
|
+
def _arrow896(value_1: YAMLElement, value: Any=value) -> SchemaDefRequirementType:
|
|
1610
|
+
return Decode_schemaDefRequirementTypeDecoder(value_1)
|
|
1611
|
+
|
|
1612
|
+
return resizearray(_arrow896, value)
|
|
1613
|
+
|
|
1614
|
+
return object_arg.Field("types", arg_1)
|
|
1615
|
+
|
|
1616
|
+
|
|
1617
|
+
def Decode_tryDecodeBoolScalar(element: YAMLElement) -> bool | None:
|
|
1618
|
+
(pattern_matching_result, value) = (None, None)
|
|
1619
|
+
if element.tag == 1:
|
|
1620
|
+
pattern_matching_result = 0
|
|
1621
|
+
value = element.fields[0]
|
|
1622
|
+
|
|
1623
|
+
elif element.tag == 3:
|
|
1624
|
+
if not is_empty(element.fields[0]):
|
|
1625
|
+
if head(element.fields[0]).tag == 1:
|
|
1626
|
+
if is_empty(tail(element.fields[0])):
|
|
1627
|
+
pattern_matching_result = 0
|
|
1628
|
+
value = head(element.fields[0]).fields[0]
|
|
1629
|
+
|
|
1630
|
+
else:
|
|
1631
|
+
pattern_matching_result = 1
|
|
1632
|
+
|
|
1633
|
+
|
|
1634
|
+
else:
|
|
1635
|
+
pattern_matching_result = 1
|
|
1636
|
+
|
|
1637
|
+
|
|
1638
|
+
else:
|
|
1639
|
+
pattern_matching_result = 1
|
|
1640
|
+
|
|
1641
|
+
|
|
1642
|
+
else:
|
|
1643
|
+
pattern_matching_result = 1
|
|
1644
|
+
|
|
1645
|
+
if pattern_matching_result == 0:
|
|
1646
|
+
match_value: str = value.Value.strip().lower()
|
|
1647
|
+
if match_value == "true":
|
|
1648
|
+
return True
|
|
1649
|
+
|
|
1650
|
+
elif match_value == "false":
|
|
1651
|
+
return False
|
|
1652
|
+
|
|
1653
|
+
else:
|
|
1654
|
+
return None
|
|
1655
|
+
|
|
1656
|
+
|
|
1657
|
+
elif pattern_matching_result == 1:
|
|
1658
|
+
return None
|
|
1659
|
+
|
|
1660
|
+
|
|
1661
|
+
|
|
1662
|
+
def Decode_workReuseRequirementDecoder(get: IGetters) -> Requirement:
|
|
1663
|
+
match_value: YAMLElement | None
|
|
1664
|
+
object_arg: IOptionalGetter = get.Optional
|
|
1665
|
+
def arg_1(x: YAMLElement, get: Any=get) -> YAMLElement:
|
|
1666
|
+
return x
|
|
1667
|
+
|
|
1668
|
+
match_value = object_arg.Field("enableReuse", arg_1)
|
|
1669
|
+
if match_value is not None:
|
|
1670
|
+
value: YAMLElement = match_value
|
|
1671
|
+
match_value_1: bool | None = Decode_tryDecodeBoolScalar(value)
|
|
1672
|
+
if match_value_1 is None:
|
|
1673
|
+
return Requirement(10, Decode_decodeStringOrExpression(value))
|
|
1674
|
+
|
|
1675
|
+
else:
|
|
1676
|
+
return Requirement(9, WorkReuseRequirementValue(match_value_1))
|
|
1677
|
+
|
|
1678
|
+
|
|
1679
|
+
else:
|
|
1680
|
+
return Requirement(9, WorkReuseRequirementValue(True))
|
|
1681
|
+
|
|
1682
|
+
|
|
1683
|
+
|
|
1684
|
+
def Decode_networkAccessRequirementDecoder(get: IGetters) -> Requirement:
|
|
1685
|
+
match_value: YAMLElement | None
|
|
1686
|
+
object_arg: IOptionalGetter = get.Optional
|
|
1687
|
+
def arg_1(x: YAMLElement, get: Any=get) -> YAMLElement:
|
|
1688
|
+
return x
|
|
1689
|
+
|
|
1690
|
+
match_value = object_arg.Field("networkAccess", arg_1)
|
|
1691
|
+
if match_value is not None:
|
|
1692
|
+
value: YAMLElement = match_value
|
|
1693
|
+
match_value_1: bool | None = Decode_tryDecodeBoolScalar(value)
|
|
1694
|
+
if match_value_1 is None:
|
|
1695
|
+
return Requirement(12, Decode_decodeStringOrExpression(value))
|
|
1696
|
+
|
|
1697
|
+
else:
|
|
1698
|
+
return Requirement(11, NetworkAccessRequirementValue(match_value_1))
|
|
1699
|
+
|
|
1700
|
+
|
|
1701
|
+
else:
|
|
1702
|
+
return Requirement(11, NetworkAccessRequirementValue(True))
|
|
1703
|
+
|
|
1704
|
+
|
|
1705
|
+
|
|
1706
|
+
def Decode_inplaceUpdateRequirementDecoder(get: IGetters) -> InplaceUpdateRequirementValue:
|
|
1707
|
+
def _arrow897(__unit: None=None, get: Any=get) -> bool | None:
|
|
1708
|
+
object_arg: IOptionalGetter = get.Optional
|
|
1709
|
+
return object_arg.Field("inplaceUpdate", bool_1)
|
|
1710
|
+
|
|
1711
|
+
return InplaceUpdateRequirementValue(default_arg(_arrow897(), True))
|
|
1712
|
+
|
|
1713
|
+
|
|
1714
|
+
def Decode_toolTimeLimitRequirementDecoder(get: IGetters) -> ToolTimeLimitValue:
|
|
1715
|
+
time_limit_element: YAMLElement
|
|
1716
|
+
object_arg: IRequiredGetter = get.Required
|
|
1717
|
+
def arg_1(x: YAMLElement, get: Any=get) -> YAMLElement:
|
|
1718
|
+
return x
|
|
1719
|
+
|
|
1720
|
+
time_limit_element = object_arg.Field("timelimit", arg_1)
|
|
1721
|
+
try_get_scalar_string: str | None = time_limit_element.fields[0].Value if (time_limit_element.tag == 1) else ((((head(time_limit_element.fields[0]).fields[0].Value if is_empty(tail(time_limit_element.fields[0])) else None) if (head(time_limit_element.fields[0]).tag == 1) else None) if (not is_empty(time_limit_element.fields[0])) else None) if (time_limit_element.tag == 3) else None)
|
|
1722
|
+
if try_get_scalar_string is None:
|
|
1723
|
+
return ToolTimeLimitValue(1, Decode_decodeStringOrExpression(time_limit_element))
|
|
1724
|
+
|
|
1725
|
+
else:
|
|
1726
|
+
match_value: tuple[bool, int64]
|
|
1727
|
+
out_arg: int64 = int64(0)
|
|
1728
|
+
def _arrow898(__unit: None=None, get: Any=get) -> int64:
|
|
1729
|
+
return out_arg
|
|
1730
|
+
|
|
1731
|
+
def _arrow899(v: int64, get: Any=get) -> None:
|
|
1732
|
+
nonlocal out_arg
|
|
1733
|
+
out_arg = v
|
|
1734
|
+
|
|
1735
|
+
match_value = (try_parse(try_get_scalar_string, 7, False, 64, FSharpRef(_arrow898, _arrow899)), out_arg)
|
|
1736
|
+
if match_value[0]:
|
|
1737
|
+
if match_value[1] >= int64(0):
|
|
1738
|
+
return ToolTimeLimitValue(0, match_value[1])
|
|
1739
|
+
|
|
1740
|
+
else:
|
|
1741
|
+
raise Exception("ToolTimeLimit timelimit must be non-negative.")
|
|
1742
|
+
|
|
1743
|
+
|
|
1744
|
+
else:
|
|
1745
|
+
return ToolTimeLimitValue(1, Decode_decodeStringOrExpression(time_limit_element))
|
|
1746
|
+
|
|
1747
|
+
|
|
1748
|
+
|
|
1749
|
+
|
|
1750
|
+
def Decode_inlineJavascriptRequirementDecoder(get: IGetters) -> InlineJavascriptRequirementValue:
|
|
1751
|
+
def _arrow900(__unit: None=None, get: Any=get) -> Array[str] | None:
|
|
1752
|
+
object_arg: IOptionalGetter = get.Optional
|
|
1753
|
+
return object_arg.Field("expressionLib", Decode_decodeStringArrayOrScalar)
|
|
1754
|
+
|
|
1755
|
+
return InlineJavascriptRequirementValue(_arrow900())
|
|
1756
|
+
|
|
1757
|
+
|
|
1758
|
+
def Decode_requirementFromTypeName(cls: str, get: IGetters) -> Requirement:
|
|
1759
|
+
(pattern_matching_result,) = (None,)
|
|
1760
|
+
if cls == "InlineJavascriptRequirement":
|
|
1761
|
+
pattern_matching_result = 0
|
|
1762
|
+
|
|
1763
|
+
elif cls == "SchemaDefRequirement":
|
|
1764
|
+
pattern_matching_result = 1
|
|
1765
|
+
|
|
1766
|
+
elif cls == "DockerRequirement":
|
|
1767
|
+
pattern_matching_result = 2
|
|
1768
|
+
|
|
1769
|
+
elif cls == "SoftwareRequirement":
|
|
1770
|
+
pattern_matching_result = 3
|
|
1771
|
+
|
|
1772
|
+
elif cls == "LoadListingRequirement":
|
|
1773
|
+
pattern_matching_result = 4
|
|
1774
|
+
|
|
1775
|
+
elif cls == "InitialWorkDirRequirement":
|
|
1776
|
+
pattern_matching_result = 5
|
|
1777
|
+
|
|
1778
|
+
elif cls == "EnvVarRequirement":
|
|
1779
|
+
pattern_matching_result = 6
|
|
1780
|
+
|
|
1781
|
+
elif cls == "ShellCommandRequirement":
|
|
1782
|
+
pattern_matching_result = 7
|
|
1783
|
+
|
|
1784
|
+
elif cls == "ResourceRequirement":
|
|
1785
|
+
pattern_matching_result = 8
|
|
1786
|
+
|
|
1787
|
+
elif cls == "WorkReuse":
|
|
1788
|
+
pattern_matching_result = 9
|
|
1789
|
+
|
|
1790
|
+
elif cls == "WorkReuseRequirement":
|
|
1791
|
+
pattern_matching_result = 9
|
|
1792
|
+
|
|
1793
|
+
elif cls == "NetworkAccess":
|
|
1794
|
+
pattern_matching_result = 10
|
|
1795
|
+
|
|
1796
|
+
elif cls == "NetworkAccessRequirement":
|
|
1797
|
+
pattern_matching_result = 10
|
|
1798
|
+
|
|
1799
|
+
elif cls == "InplaceUpdateRequirement":
|
|
1800
|
+
pattern_matching_result = 11
|
|
1801
|
+
|
|
1802
|
+
elif cls == "InplaceUpdate":
|
|
1803
|
+
pattern_matching_result = 11
|
|
1804
|
+
|
|
1805
|
+
elif cls == "ToolTimeLimit":
|
|
1806
|
+
pattern_matching_result = 12
|
|
1807
|
+
|
|
1808
|
+
elif cls == "ToolTimeLimitRequirement":
|
|
1809
|
+
pattern_matching_result = 12
|
|
1810
|
+
|
|
1811
|
+
elif cls == "SubworkflowFeatureRequirement":
|
|
1812
|
+
pattern_matching_result = 13
|
|
1813
|
+
|
|
1814
|
+
elif cls == "ScatterFeatureRequirement":
|
|
1815
|
+
pattern_matching_result = 14
|
|
1816
|
+
|
|
1817
|
+
elif cls == "MultipleInputFeatureRequirement":
|
|
1818
|
+
pattern_matching_result = 15
|
|
1819
|
+
|
|
1820
|
+
elif cls == "StepInputExpressionRequirement":
|
|
1821
|
+
pattern_matching_result = 16
|
|
1822
|
+
|
|
1823
|
+
else:
|
|
1824
|
+
pattern_matching_result = 17
|
|
1825
|
+
|
|
1826
|
+
if pattern_matching_result == 0:
|
|
1827
|
+
return Requirement(0, Decode_inlineJavascriptRequirementDecoder(get))
|
|
1828
|
+
|
|
1829
|
+
elif pattern_matching_result == 1:
|
|
1830
|
+
return Requirement(1, Decode_schemaDefRequirementDecoder(get))
|
|
1831
|
+
|
|
1832
|
+
elif pattern_matching_result == 2:
|
|
1833
|
+
return Requirement(2, Decode_dockerRequirementDecoder(get))
|
|
1834
|
+
|
|
1835
|
+
elif pattern_matching_result == 3:
|
|
1836
|
+
return Requirement(3, Decode_softwareRequirementDecoder(get))
|
|
1837
|
+
|
|
1838
|
+
elif pattern_matching_result == 4:
|
|
1839
|
+
return Requirement(4, Decode_loadListingRequirementDecoder(get))
|
|
1840
|
+
|
|
1841
|
+
elif pattern_matching_result == 5:
|
|
1842
|
+
return Requirement(5, Decode_initialWorkDirRequirementDecoder(get))
|
|
1843
|
+
|
|
1844
|
+
elif pattern_matching_result == 6:
|
|
1845
|
+
return Requirement(6, Decode_envVarRequirementDecoder(get))
|
|
1846
|
+
|
|
1847
|
+
elif pattern_matching_result == 7:
|
|
1848
|
+
return Requirement(7)
|
|
1849
|
+
|
|
1850
|
+
elif pattern_matching_result == 8:
|
|
1851
|
+
return Requirement(8, Decode_resourceRequirementDecoder(get))
|
|
1852
|
+
|
|
1853
|
+
elif pattern_matching_result == 9:
|
|
1854
|
+
return Decode_workReuseRequirementDecoder(get)
|
|
1855
|
+
|
|
1856
|
+
elif pattern_matching_result == 10:
|
|
1857
|
+
return Decode_networkAccessRequirementDecoder(get)
|
|
1858
|
+
|
|
1859
|
+
elif pattern_matching_result == 11:
|
|
1860
|
+
return Requirement(13, Decode_inplaceUpdateRequirementDecoder(get))
|
|
1861
|
+
|
|
1862
|
+
elif pattern_matching_result == 12:
|
|
1863
|
+
return Requirement(14, Decode_toolTimeLimitRequirementDecoder(get))
|
|
1864
|
+
|
|
1865
|
+
elif pattern_matching_result == 13:
|
|
1866
|
+
return Requirement(15)
|
|
1867
|
+
|
|
1868
|
+
elif pattern_matching_result == 14:
|
|
1869
|
+
return Requirement(16)
|
|
1870
|
+
|
|
1871
|
+
elif pattern_matching_result == 15:
|
|
1872
|
+
return Requirement(17)
|
|
1873
|
+
|
|
1874
|
+
elif pattern_matching_result == 16:
|
|
1875
|
+
return Requirement(18)
|
|
1876
|
+
|
|
1877
|
+
elif pattern_matching_result == 17:
|
|
1878
|
+
raise Exception(("Invalid or unsupported requirement class: " + cls) + "")
|
|
1879
|
+
|
|
1880
|
+
|
|
1881
|
+
|
|
1882
|
+
def Decode_requirementArrayDecoder(y_ele: YAMLElement) -> Array[Requirement]:
|
|
1883
|
+
(pattern_matching_result, items, other) = (None, None, None)
|
|
1884
|
+
if y_ele.tag == 3:
|
|
1885
|
+
if not is_empty(y_ele.fields[0]):
|
|
1886
|
+
if head(y_ele.fields[0]).tag == 2:
|
|
1887
|
+
if is_empty(tail(y_ele.fields[0])):
|
|
1888
|
+
pattern_matching_result = 0
|
|
1889
|
+
items = head(y_ele.fields[0]).fields[0]
|
|
1890
|
+
|
|
1891
|
+
else:
|
|
1892
|
+
pattern_matching_result = 1
|
|
1893
|
+
|
|
1894
|
+
|
|
1895
|
+
else:
|
|
1896
|
+
pattern_matching_result = 1
|
|
1897
|
+
|
|
1898
|
+
|
|
1899
|
+
else:
|
|
1900
|
+
pattern_matching_result = 1
|
|
1901
|
+
|
|
1902
|
+
|
|
1903
|
+
else:
|
|
1904
|
+
pattern_matching_result = 2
|
|
1905
|
+
other = y_ele
|
|
1906
|
+
|
|
1907
|
+
if pattern_matching_result == 0:
|
|
1908
|
+
def decode_single_requirement_object(ele: YAMLElement, y_ele: Any=y_ele) -> Requirement:
|
|
1909
|
+
def _arrow902(get: IGetters, ele: Any=ele) -> Requirement:
|
|
1910
|
+
def _arrow901(__unit: None=None) -> str:
|
|
1911
|
+
object_arg: IRequiredGetter = get.Required
|
|
1912
|
+
return object_arg.Field("class", string)
|
|
1913
|
+
|
|
1914
|
+
return Decode_requirementFromTypeName(_arrow901(), get)
|
|
1915
|
+
|
|
1916
|
+
return object(_arrow902, ele)
|
|
1917
|
+
|
|
1918
|
+
return list(map(decode_single_requirement_object, items))
|
|
1919
|
+
|
|
1920
|
+
elif pattern_matching_result == 1:
|
|
1921
|
+
def _arrow904(get_1: IGetters, y_ele: Any=y_ele) -> Array[Requirement]:
|
|
1922
|
+
def mapping(kv: Any) -> Requirement:
|
|
1923
|
+
def _arrow903(get_2: IGetters, kv: Any=kv) -> Requirement:
|
|
1924
|
+
return Decode_requirementFromTypeName(kv[0], get_2)
|
|
1925
|
+
|
|
1926
|
+
return object(_arrow903, kv[1])
|
|
1927
|
+
|
|
1928
|
+
return list(map_2(mapping, get_1.Overflow.FieldList(empty())))
|
|
1929
|
+
|
|
1930
|
+
return object(_arrow904, y_ele)
|
|
1931
|
+
|
|
1932
|
+
elif pattern_matching_result == 2:
|
|
1933
|
+
raise Exception(("Invalid CWL requirements syntax: " + str(other)) + "")
|
|
1934
|
+
|
|
1935
|
+
|
|
1936
|
+
|
|
1937
|
+
def Decode_tryDecodeKnownRequirementFromElement(element: YAMLElement) -> Requirement | None:
|
|
1938
|
+
try:
|
|
1939
|
+
def _arrow907(get: IGetters) -> Requirement:
|
|
1940
|
+
def _arrow906(__unit: None=None) -> str:
|
|
1941
|
+
object_arg: IRequiredGetter = get.Required
|
|
1942
|
+
return object_arg.Field("class", string)
|
|
1943
|
+
|
|
1944
|
+
return Decode_requirementFromTypeName(_arrow906(), get)
|
|
1945
|
+
|
|
1946
|
+
return object(_arrow907, element)
|
|
1947
|
+
|
|
1948
|
+
except Exception as ex:
|
|
1949
|
+
hint_class: str | None
|
|
1950
|
+
try:
|
|
1951
|
+
def _arrow905(get_1: IGetters) -> str | None:
|
|
1952
|
+
object_arg_1: IOptionalGetter = get_1.Optional
|
|
1953
|
+
return object_arg_1.Field("class", string)
|
|
1954
|
+
|
|
1955
|
+
hint_class = object(_arrow905, element)
|
|
1956
|
+
|
|
1957
|
+
except Exception as match_value:
|
|
1958
|
+
hint_class = None
|
|
1959
|
+
|
|
1960
|
+
if hint_class is None:
|
|
1961
|
+
pass
|
|
1962
|
+
|
|
1963
|
+
else:
|
|
1964
|
+
known_class: str = hint_class
|
|
1965
|
+
|
|
1966
|
+
return None
|
|
1967
|
+
|
|
1968
|
+
|
|
1969
|
+
|
|
1970
|
+
def Decode_decodeHintElement(element: YAMLElement) -> HintEntry:
|
|
1971
|
+
match_value: Requirement | None = Decode_tryDecodeKnownRequirementFromElement(element)
|
|
1972
|
+
if match_value is None:
|
|
1973
|
+
def _arrow909(__unit: None=None, element: Any=element) -> str | None:
|
|
1974
|
+
try:
|
|
1975
|
+
def _arrow908(get: IGetters) -> str | None:
|
|
1976
|
+
object_arg: IOptionalGetter = get.Optional
|
|
1977
|
+
return object_arg.Field("class", string)
|
|
1978
|
+
|
|
1979
|
+
return object(_arrow908, element)
|
|
1980
|
+
|
|
1981
|
+
except Exception as match_value_1:
|
|
1982
|
+
return None
|
|
1983
|
+
|
|
1984
|
+
|
|
1985
|
+
return HintEntry(1, HintUnknownValue(_arrow909(), element))
|
|
1986
|
+
|
|
1987
|
+
else:
|
|
1988
|
+
return HintEntry(0, match_value)
|
|
1989
|
+
|
|
1990
|
+
|
|
1991
|
+
|
|
1992
|
+
def Decode_hintArrayDecoder(y_ele: YAMLElement) -> Array[HintEntry]:
|
|
1993
|
+
(pattern_matching_result, items, other_1) = (None, None, None)
|
|
1994
|
+
if y_ele.tag == 3:
|
|
1995
|
+
if not is_empty(y_ele.fields[0]):
|
|
1996
|
+
if head(y_ele.fields[0]).tag == 2:
|
|
1997
|
+
if is_empty(tail(y_ele.fields[0])):
|
|
1998
|
+
pattern_matching_result = 0
|
|
1999
|
+
items = head(y_ele.fields[0]).fields[0]
|
|
2000
|
+
|
|
2001
|
+
else:
|
|
2002
|
+
pattern_matching_result = 1
|
|
2003
|
+
|
|
2004
|
+
|
|
2005
|
+
else:
|
|
2006
|
+
pattern_matching_result = 1
|
|
2007
|
+
|
|
2008
|
+
|
|
2009
|
+
else:
|
|
2010
|
+
pattern_matching_result = 1
|
|
2011
|
+
|
|
2012
|
+
|
|
2013
|
+
elif y_ele.tag == 2:
|
|
2014
|
+
pattern_matching_result = 0
|
|
2015
|
+
items = y_ele.fields[0]
|
|
2016
|
+
|
|
2017
|
+
else:
|
|
2018
|
+
pattern_matching_result = 2
|
|
2019
|
+
other_1 = y_ele
|
|
2020
|
+
|
|
2021
|
+
if pattern_matching_result == 0:
|
|
2022
|
+
def _arrow910(element: YAMLElement, y_ele: Any=y_ele) -> HintEntry:
|
|
2023
|
+
return Decode_decodeHintElement(element)
|
|
2024
|
+
|
|
2025
|
+
return list(map(_arrow910, items))
|
|
2026
|
+
|
|
2027
|
+
elif pattern_matching_result == 1:
|
|
2028
|
+
def _arrow912(get: IGetters, y_ele: Any=y_ele) -> Array[HintEntry]:
|
|
2029
|
+
def mapping(kv: Any) -> HintEntry:
|
|
2030
|
+
def _arrow911(__unit: None=None, kv: Any=kv) -> YAMLElement:
|
|
2031
|
+
match_value: YAMLElement = kv[1]
|
|
2032
|
+
if match_value.tag == 3:
|
|
2033
|
+
mappings: FSharpList[YAMLElement] = match_value.fields[0]
|
|
2034
|
+
def predicate(_arg: YAMLElement) -> bool:
|
|
2035
|
+
(pattern_matching_result_1,) = (None,)
|
|
2036
|
+
if _arg.tag == 0:
|
|
2037
|
+
if _arg.fields[0].Value == "class":
|
|
2038
|
+
pattern_matching_result_1 = 0
|
|
2039
|
+
|
|
2040
|
+
else:
|
|
2041
|
+
pattern_matching_result_1 = 1
|
|
2042
|
+
|
|
2043
|
+
|
|
2044
|
+
else:
|
|
2045
|
+
pattern_matching_result_1 = 1
|
|
2046
|
+
|
|
2047
|
+
if pattern_matching_result_1 == 0:
|
|
2048
|
+
return True
|
|
2049
|
+
|
|
2050
|
+
elif pattern_matching_result_1 == 1:
|
|
2051
|
+
return False
|
|
2052
|
+
|
|
2053
|
+
|
|
2054
|
+
return kv[1] if exists(predicate, mappings) else YAMLElement(3, cons(YAMLElement(0, YAMLContent("class", None), YAMLElement(3, singleton_1(YAMLElement(1, YAMLContent(kv[0], None))))), mappings))
|
|
2055
|
+
|
|
2056
|
+
else:
|
|
2057
|
+
return YAMLElement(3, of_array([YAMLElement(0, YAMLContent("class", None), YAMLElement(3, singleton_1(YAMLElement(1, YAMLContent(kv[0], None))))), YAMLElement(0, YAMLContent("value", None), match_value)]))
|
|
2058
|
+
|
|
2059
|
+
|
|
2060
|
+
return Decode_decodeHintElement(_arrow911())
|
|
2061
|
+
|
|
2062
|
+
return list(map_2(mapping, get.Overflow.FieldList(empty())))
|
|
2063
|
+
|
|
2064
|
+
return object(_arrow912, y_ele)
|
|
2065
|
+
|
|
2066
|
+
elif pattern_matching_result == 2:
|
|
2067
|
+
raise Exception(("Invalid CWL hints syntax: " + str(other_1)) + "")
|
|
2068
|
+
|
|
2069
|
+
|
|
2070
|
+
|
|
2071
|
+
def _arrow913(value: YAMLElement) -> Array[Requirement] | None:
|
|
2072
|
+
def getter(get: IGetters) -> Array[Requirement] | None:
|
|
2073
|
+
object_arg: IOptionalGetter = get.Optional
|
|
2074
|
+
def arg_1(y_ele: YAMLElement, get: Any=get) -> Array[Requirement]:
|
|
2075
|
+
return Decode_requirementArrayDecoder(y_ele)
|
|
2076
|
+
|
|
2077
|
+
return object_arg.Field("requirements", arg_1)
|
|
2078
|
+
|
|
2079
|
+
return object(getter, value)
|
|
2080
|
+
|
|
2081
|
+
|
|
2082
|
+
Decode_requirementsDecoder: Callable[[YAMLElement], Array[Requirement] | None] = _arrow913
|
|
2083
|
+
|
|
2084
|
+
def _arrow914(value: YAMLElement) -> Array[HintEntry] | None:
|
|
2085
|
+
def getter(get: IGetters) -> Array[HintEntry] | None:
|
|
2086
|
+
object_arg: IOptionalGetter = get.Optional
|
|
2087
|
+
def arg_1(y_ele: YAMLElement, get: Any=get) -> Array[HintEntry]:
|
|
2088
|
+
return Decode_hintArrayDecoder(y_ele)
|
|
2089
|
+
|
|
2090
|
+
return object_arg.Field("hints", arg_1)
|
|
2091
|
+
|
|
2092
|
+
return object(getter, value)
|
|
2093
|
+
|
|
2094
|
+
|
|
2095
|
+
Decode_hintsDecoder: Callable[[YAMLElement], Array[HintEntry] | None] = _arrow914
|
|
2096
|
+
|
|
2097
|
+
def _arrow919(value_5: YAMLElement) -> InputBinding | None:
|
|
2098
|
+
def getter_1(get: IGetters) -> InputBinding | None:
|
|
2099
|
+
object_arg: IOptionalGetter = get.Optional
|
|
2100
|
+
def arg_1(value_4: YAMLElement, get: Any=get) -> InputBinding:
|
|
2101
|
+
def getter(get_0027: IGetters, value_4: Any=value_4) -> InputBinding:
|
|
2102
|
+
def _arrow915(__unit: None=None, get_0027: Any=get_0027) -> str | None:
|
|
2103
|
+
object_arg_1: IOptionalGetter = get_0027.Optional
|
|
2104
|
+
return object_arg_1.Field("prefix", string)
|
|
2105
|
+
|
|
2106
|
+
def _arrow916(__unit: None=None, get_0027: Any=get_0027) -> int | None:
|
|
2107
|
+
object_arg_2: IOptionalGetter = get_0027.Optional
|
|
2108
|
+
return object_arg_2.Field("position", int_1)
|
|
2109
|
+
|
|
2110
|
+
def _arrow917(__unit: None=None, get_0027: Any=get_0027) -> str | None:
|
|
2111
|
+
object_arg_3: IOptionalGetter = get_0027.Optional
|
|
2112
|
+
return object_arg_3.Field("itemSeparator", string)
|
|
2113
|
+
|
|
2114
|
+
def _arrow918(__unit: None=None, get_0027: Any=get_0027) -> bool | None:
|
|
2115
|
+
object_arg_4: IOptionalGetter = get_0027.Optional
|
|
2116
|
+
return object_arg_4.Field("separate", bool_1)
|
|
2117
|
+
|
|
2118
|
+
return InputBinding(_arrow915(), _arrow916(), _arrow917(), _arrow918())
|
|
2119
|
+
|
|
2120
|
+
return object(getter, value_4)
|
|
2121
|
+
|
|
2122
|
+
return object_arg.Field("inputBinding", arg_1)
|
|
2123
|
+
|
|
2124
|
+
return object(getter_1, value_5)
|
|
2125
|
+
|
|
2126
|
+
|
|
2127
|
+
Decode_inputBindingDecoder: Callable[[YAMLElement], InputBinding | None] = _arrow919
|
|
2128
|
+
|
|
2129
|
+
def _arrow926(value_1: YAMLElement) -> Array[CWLInput]:
|
|
2130
|
+
def getter(get: IGetters) -> Array[CWLInput]:
|
|
2131
|
+
dict_1: Any = get.Overflow.FieldList(empty())
|
|
2132
|
+
def _arrow925(__unit: None=None, get: Any=get) -> IEnumerable_1[CWLInput]:
|
|
2133
|
+
def _arrow924(key: str) -> IEnumerable_1[CWLInput]:
|
|
2134
|
+
value: YAMLElement = get_item_from_dict(dict_1, key)
|
|
2135
|
+
input_binding: InputBinding | None = Decode_inputBindingDecoder(value)
|
|
2136
|
+
pattern_input: tuple[CWLType, bool]
|
|
2137
|
+
(pattern_matching_result, v, mappings) = (None, None, None)
|
|
2138
|
+
if value.tag == 3:
|
|
2139
|
+
if not is_empty(value.fields[0]):
|
|
2140
|
+
if head(value.fields[0]).tag == 1:
|
|
2141
|
+
if is_empty(tail(value.fields[0])):
|
|
2142
|
+
pattern_matching_result = 0
|
|
2143
|
+
v = head(value.fields[0]).fields[0]
|
|
2144
|
+
|
|
2145
|
+
else:
|
|
2146
|
+
pattern_matching_result = 1
|
|
2147
|
+
mappings = value.fields[0]
|
|
2148
|
+
|
|
2149
|
+
|
|
2150
|
+
else:
|
|
2151
|
+
pattern_matching_result = 1
|
|
2152
|
+
mappings = value.fields[0]
|
|
2153
|
+
|
|
2154
|
+
|
|
2155
|
+
else:
|
|
2156
|
+
pattern_matching_result = 1
|
|
2157
|
+
mappings = value.fields[0]
|
|
2158
|
+
|
|
2159
|
+
|
|
2160
|
+
else:
|
|
2161
|
+
pattern_matching_result = 2
|
|
2162
|
+
|
|
2163
|
+
if pattern_matching_result == 0:
|
|
2164
|
+
pattern_input = Decode_cwlTypeStringMatcher(v.Value, get)
|
|
2165
|
+
|
|
2166
|
+
elif pattern_matching_result == 1:
|
|
2167
|
+
def predicate(m: YAMLElement) -> bool:
|
|
2168
|
+
(pattern_matching_result_1,) = (None,)
|
|
2169
|
+
if m.tag == 0:
|
|
2170
|
+
if m.fields[0].Value == "type":
|
|
2171
|
+
pattern_matching_result_1 = 0
|
|
2172
|
+
|
|
2173
|
+
else:
|
|
2174
|
+
pattern_matching_result_1 = 1
|
|
2175
|
+
|
|
2176
|
+
|
|
2177
|
+
else:
|
|
2178
|
+
pattern_matching_result_1 = 1
|
|
2179
|
+
|
|
2180
|
+
if pattern_matching_result_1 == 0:
|
|
2181
|
+
return True
|
|
2182
|
+
|
|
2183
|
+
elif pattern_matching_result_1 == 1:
|
|
2184
|
+
return False
|
|
2185
|
+
|
|
2186
|
+
|
|
2187
|
+
if exists(predicate, mappings):
|
|
2188
|
+
pattern_input = Decode_cwlTypeDecoder(value)
|
|
2189
|
+
|
|
2190
|
+
else:
|
|
2191
|
+
(pattern_matching_result_2, v_1) = (None, None)
|
|
2192
|
+
if value.tag == 3:
|
|
2193
|
+
if not is_empty(value.fields[0]):
|
|
2194
|
+
if head(value.fields[0]).tag == 1:
|
|
2195
|
+
if is_empty(tail(value.fields[0])):
|
|
2196
|
+
pattern_matching_result_2 = 0
|
|
2197
|
+
v_1 = head(value.fields[0]).fields[0]
|
|
2198
|
+
|
|
2199
|
+
else:
|
|
2200
|
+
pattern_matching_result_2 = 1
|
|
2201
|
+
|
|
2202
|
+
|
|
2203
|
+
else:
|
|
2204
|
+
pattern_matching_result_2 = 1
|
|
2205
|
+
|
|
2206
|
+
|
|
2207
|
+
else:
|
|
2208
|
+
pattern_matching_result_2 = 1
|
|
2209
|
+
|
|
2210
|
+
|
|
2211
|
+
else:
|
|
2212
|
+
pattern_matching_result_2 = 1
|
|
2213
|
+
|
|
2214
|
+
if pattern_matching_result_2 == 0:
|
|
2215
|
+
pattern_input = Decode_cwlTypeStringMatcher(v_1.Value, get)
|
|
2216
|
+
|
|
2217
|
+
elif pattern_matching_result_2 == 1:
|
|
2218
|
+
raise Exception("Unexpected input format without type field")
|
|
2219
|
+
|
|
2220
|
+
|
|
2221
|
+
|
|
2222
|
+
elif pattern_matching_result == 2:
|
|
2223
|
+
raise Exception("Unexpected input format in inputArrayDecoder")
|
|
2224
|
+
|
|
2225
|
+
input: CWLInput = CWLInput(key, pattern_input[0])
|
|
2226
|
+
def _expr920():
|
|
2227
|
+
set_optional_property("optional", True, input)
|
|
2228
|
+
return empty_1()
|
|
2229
|
+
|
|
2230
|
+
def _arrow923(__unit: None=None) -> IEnumerable_1[CWLInput]:
|
|
2231
|
+
def _expr921():
|
|
2232
|
+
set_optional_property("inputBinding", input_binding, input)
|
|
2233
|
+
return empty_1()
|
|
2234
|
+
|
|
2235
|
+
def _arrow922(__unit: None=None) -> IEnumerable_1[CWLInput]:
|
|
2236
|
+
return singleton(input)
|
|
2237
|
+
|
|
2238
|
+
return append(_expr921() if (input_binding is not None) else empty_1(), delay(_arrow922))
|
|
2239
|
+
|
|
2240
|
+
return append(_expr920() if pattern_input[1] else empty_1(), delay(_arrow923))
|
|
2241
|
+
|
|
2242
|
+
return collect(_arrow924, dict_1.keys())
|
|
2243
|
+
|
|
2244
|
+
return list(to_array(delay(_arrow925)))
|
|
2245
|
+
|
|
2246
|
+
return object(getter, value_1)
|
|
2247
|
+
|
|
2248
|
+
|
|
2249
|
+
Decode_inputArrayDecoder: Callable[[YAMLElement], Array[CWLInput]] = _arrow926
|
|
2250
|
+
|
|
2251
|
+
def _arrow927(value: YAMLElement) -> Array[CWLInput] | None:
|
|
2252
|
+
def getter(get: IGetters) -> Array[CWLInput] | None:
|
|
2253
|
+
object_arg: IOptionalGetter = get.Optional
|
|
2254
|
+
return object_arg.Field("inputs", Decode_inputArrayDecoder)
|
|
2255
|
+
|
|
2256
|
+
return object(getter, value)
|
|
2257
|
+
|
|
2258
|
+
|
|
2259
|
+
Decode_inputsDecoder: Callable[[YAMLElement], Array[CWLInput] | None] = _arrow927
|
|
2260
|
+
|
|
2261
|
+
def _arrow930(value_2: YAMLElement) -> Array[str] | None:
|
|
2262
|
+
def getter(get: IGetters) -> Array[str] | None:
|
|
2263
|
+
base_command_field: YAMLElement | None
|
|
2264
|
+
object_arg: IOptionalGetter = get.Optional
|
|
2265
|
+
def arg_1(x: YAMLElement, get: Any=get) -> YAMLElement:
|
|
2266
|
+
return x
|
|
2267
|
+
|
|
2268
|
+
base_command_field = object_arg.Field("baseCommand", arg_1)
|
|
2269
|
+
(pattern_matching_result, v, v_1, s, s_1) = (None, None, None, None, None)
|
|
2270
|
+
if base_command_field is None:
|
|
2271
|
+
pattern_matching_result = 4
|
|
2272
|
+
|
|
2273
|
+
elif base_command_field.tag == 3:
|
|
2274
|
+
if not is_empty(base_command_field.fields[0]):
|
|
2275
|
+
if head(base_command_field.fields[0]).tag == 1:
|
|
2276
|
+
if is_empty(tail(base_command_field.fields[0])):
|
|
2277
|
+
pattern_matching_result = 0
|
|
2278
|
+
v = head(base_command_field.fields[0]).fields[0]
|
|
2279
|
+
|
|
2280
|
+
else:
|
|
2281
|
+
pattern_matching_result = 5
|
|
2282
|
+
|
|
2283
|
+
|
|
2284
|
+
elif head(base_command_field.fields[0]).tag == 2:
|
|
2285
|
+
if is_empty(tail(base_command_field.fields[0])):
|
|
2286
|
+
pattern_matching_result = 2
|
|
2287
|
+
s = head(base_command_field.fields[0]).fields[0]
|
|
2288
|
+
|
|
2289
|
+
else:
|
|
2290
|
+
pattern_matching_result = 5
|
|
2291
|
+
|
|
2292
|
+
|
|
2293
|
+
else:
|
|
2294
|
+
pattern_matching_result = 5
|
|
2295
|
+
|
|
2296
|
+
|
|
2297
|
+
else:
|
|
2298
|
+
pattern_matching_result = 5
|
|
2299
|
+
|
|
2300
|
+
|
|
2301
|
+
elif base_command_field.tag == 1:
|
|
2302
|
+
pattern_matching_result = 1
|
|
2303
|
+
v_1 = base_command_field.fields[0]
|
|
2304
|
+
|
|
2305
|
+
elif base_command_field.tag == 2:
|
|
2306
|
+
pattern_matching_result = 3
|
|
2307
|
+
s_1 = base_command_field.fields[0]
|
|
2308
|
+
|
|
2309
|
+
else:
|
|
2310
|
+
pattern_matching_result = 5
|
|
2311
|
+
|
|
2312
|
+
if pattern_matching_result == 0:
|
|
2313
|
+
return [v.Value]
|
|
2314
|
+
|
|
2315
|
+
elif pattern_matching_result == 1:
|
|
2316
|
+
return [v_1.Value]
|
|
2317
|
+
|
|
2318
|
+
elif pattern_matching_result == 2:
|
|
2319
|
+
def _arrow928(value: YAMLElement, get: Any=get) -> str:
|
|
2320
|
+
return string(value)
|
|
2321
|
+
|
|
2322
|
+
return resizearray(_arrow928, YAMLElement(2, s))
|
|
2323
|
+
|
|
2324
|
+
elif pattern_matching_result == 3:
|
|
2325
|
+
def _arrow929(value_1: YAMLElement, get: Any=get) -> str:
|
|
2326
|
+
return string(value_1)
|
|
2327
|
+
|
|
2328
|
+
return resizearray(_arrow929, YAMLElement(2, s_1))
|
|
2329
|
+
|
|
2330
|
+
elif pattern_matching_result == 4:
|
|
2331
|
+
return None
|
|
2332
|
+
|
|
2333
|
+
elif pattern_matching_result == 5:
|
|
2334
|
+
return None
|
|
2335
|
+
|
|
2336
|
+
|
|
2337
|
+
return object(getter, value_2)
|
|
2338
|
+
|
|
2339
|
+
|
|
2340
|
+
Decode_baseCommandDecoder: Callable[[YAMLElement], Array[str] | None] = _arrow930
|
|
2341
|
+
|
|
2342
|
+
def _arrow931(value_1: YAMLElement) -> str:
|
|
2343
|
+
def getter(get: IGetters) -> str:
|
|
2344
|
+
object_arg: IRequiredGetter = get.Required
|
|
2345
|
+
def arg_1(value: YAMLElement, get: Any=get) -> str:
|
|
2346
|
+
return string(value)
|
|
2347
|
+
|
|
2348
|
+
return object_arg.Field("cwlVersion", arg_1)
|
|
2349
|
+
|
|
2350
|
+
return object(getter, value_1)
|
|
2351
|
+
|
|
2352
|
+
|
|
2353
|
+
Decode_versionDecoder: Callable[[YAMLElement], str] = _arrow931
|
|
2354
|
+
|
|
2355
|
+
def _arrow932(value_1: YAMLElement) -> str:
|
|
2356
|
+
def getter(get: IGetters) -> str:
|
|
2357
|
+
object_arg: IRequiredGetter = get.Required
|
|
2358
|
+
def arg_1(value: YAMLElement, get: Any=get) -> str:
|
|
2359
|
+
return string(value)
|
|
2360
|
+
|
|
2361
|
+
return object_arg.Field("class", arg_1)
|
|
2362
|
+
|
|
2363
|
+
return object(getter, value_1)
|
|
2364
|
+
|
|
2365
|
+
|
|
2366
|
+
Decode_classDecoder: Callable[[YAMLElement], str] = _arrow932
|
|
2367
|
+
|
|
2368
|
+
def Decode_stringOptionFieldDecoder(field: str) -> Callable[[YAMLElement], str | None]:
|
|
2369
|
+
def _arrow933(value_1: YAMLElement, field: Any=field) -> str | None:
|
|
2370
|
+
def getter(get: IGetters) -> str | None:
|
|
2371
|
+
object_arg: IOptionalGetter = get.Optional
|
|
2372
|
+
def arg_1(value: YAMLElement, get: Any=get) -> str:
|
|
2373
|
+
return string(value)
|
|
2374
|
+
|
|
2375
|
+
return object_arg.Field(field, arg_1)
|
|
2376
|
+
|
|
2377
|
+
return object(getter, value_1)
|
|
2378
|
+
|
|
2379
|
+
return _arrow933
|
|
2380
|
+
|
|
2381
|
+
|
|
2382
|
+
def Decode_boolOptionFieldDecoder(field: str) -> Callable[[YAMLElement], bool | None]:
|
|
2383
|
+
def _arrow934(value_1: YAMLElement, field: Any=field) -> bool | None:
|
|
2384
|
+
def getter(get: IGetters) -> bool | None:
|
|
2385
|
+
object_arg: IOptionalGetter = get.Optional
|
|
2386
|
+
def arg_1(value: YAMLElement, get: Any=get) -> bool:
|
|
2387
|
+
return bool_1(value)
|
|
2388
|
+
|
|
2389
|
+
return object_arg.Field(field, arg_1)
|
|
2390
|
+
|
|
2391
|
+
return object(getter, value_1)
|
|
2392
|
+
|
|
2393
|
+
return _arrow934
|
|
2394
|
+
|
|
2395
|
+
|
|
2396
|
+
def Decode_yamlElementOptionFieldDecoder(field: str) -> Callable[[YAMLElement], YAMLElement | None]:
|
|
2397
|
+
def _arrow935(value: YAMLElement, field: Any=field) -> YAMLElement | None:
|
|
2398
|
+
def getter(get: IGetters) -> YAMLElement | None:
|
|
2399
|
+
object_arg: IOptionalGetter = get.Optional
|
|
2400
|
+
def arg_1(x: YAMLElement, get: Any=get) -> YAMLElement:
|
|
2401
|
+
return x
|
|
2402
|
+
|
|
2403
|
+
return object_arg.Field(field, arg_1)
|
|
2404
|
+
|
|
2405
|
+
return object(getter, value)
|
|
2406
|
+
|
|
2407
|
+
return _arrow935
|
|
2408
|
+
|
|
2409
|
+
|
|
2410
|
+
def Decode_stringFieldDecoder(field: str) -> Callable[[YAMLElement], str]:
|
|
2411
|
+
def _arrow936(value_1: YAMLElement, field: Any=field) -> str:
|
|
2412
|
+
def getter(get: IGetters) -> str:
|
|
2413
|
+
object_arg: IRequiredGetter = get.Required
|
|
2414
|
+
def arg_1(value: YAMLElement, get: Any=get) -> str:
|
|
2415
|
+
return string(value)
|
|
2416
|
+
|
|
2417
|
+
return object_arg.Field(field, arg_1)
|
|
2418
|
+
|
|
2419
|
+
return object(getter, value_1)
|
|
2420
|
+
|
|
2421
|
+
return _arrow936
|
|
2422
|
+
|
|
2423
|
+
|
|
2424
|
+
def Decode_stringOrStringArrayDecoder(value: YAMLElement) -> Array[str] | None:
|
|
2425
|
+
(pattern_matching_result, v, s) = (None, None, None)
|
|
2426
|
+
if value.tag == 3:
|
|
2427
|
+
if not is_empty(value.fields[0]):
|
|
2428
|
+
if head(value.fields[0]).tag == 1:
|
|
2429
|
+
if is_empty(tail(value.fields[0])):
|
|
2430
|
+
pattern_matching_result = 0
|
|
2431
|
+
v = head(value.fields[0]).fields[0]
|
|
2432
|
+
|
|
2433
|
+
else:
|
|
2434
|
+
pattern_matching_result = 2
|
|
2435
|
+
|
|
2436
|
+
|
|
2437
|
+
elif head(value.fields[0]).tag == 2:
|
|
2438
|
+
if is_empty(tail(value.fields[0])):
|
|
2439
|
+
pattern_matching_result = 1
|
|
2440
|
+
s = head(value.fields[0]).fields[0]
|
|
2441
|
+
|
|
2442
|
+
else:
|
|
2443
|
+
pattern_matching_result = 2
|
|
2444
|
+
|
|
2445
|
+
|
|
2446
|
+
else:
|
|
2447
|
+
pattern_matching_result = 2
|
|
2448
|
+
|
|
2449
|
+
|
|
2450
|
+
else:
|
|
2451
|
+
pattern_matching_result = 2
|
|
2452
|
+
|
|
2453
|
+
|
|
2454
|
+
elif value.tag == 1:
|
|
2455
|
+
pattern_matching_result = 0
|
|
2456
|
+
v = value.fields[0]
|
|
2457
|
+
|
|
2458
|
+
elif value.tag == 2:
|
|
2459
|
+
pattern_matching_result = 1
|
|
2460
|
+
s = value.fields[0]
|
|
2461
|
+
|
|
2462
|
+
else:
|
|
2463
|
+
pattern_matching_result = 2
|
|
2464
|
+
|
|
2465
|
+
if pattern_matching_result == 0:
|
|
2466
|
+
return [v.Value]
|
|
2467
|
+
|
|
2468
|
+
elif pattern_matching_result == 1:
|
|
2469
|
+
def _arrow937(value_1: YAMLElement, value: Any=value) -> str:
|
|
2470
|
+
return string(value_1)
|
|
2471
|
+
|
|
2472
|
+
return resizearray(_arrow937, YAMLElement(2, s))
|
|
2473
|
+
|
|
2474
|
+
elif pattern_matching_result == 2:
|
|
2475
|
+
return None
|
|
2476
|
+
|
|
2477
|
+
|
|
2478
|
+
|
|
2479
|
+
def Decode_sourceArrayFieldDecoder(field: str) -> Callable[[YAMLElement], Array[str] | None]:
|
|
2480
|
+
def _arrow940(value_1: YAMLElement, field: Any=field) -> Array[str] | None:
|
|
2481
|
+
def getter(get: IGetters) -> Array[str] | None:
|
|
2482
|
+
def _arrow938(value: YAMLElement, get: Any=get) -> Array[str] | None:
|
|
2483
|
+
return Decode_stringOrStringArrayDecoder(value)
|
|
2484
|
+
|
|
2485
|
+
def _arrow939(__unit: None=None, get: Any=get) -> YAMLElement | None:
|
|
2486
|
+
object_arg: IOptionalGetter = get.Optional
|
|
2487
|
+
def arg_1(x: YAMLElement) -> YAMLElement:
|
|
2488
|
+
return x
|
|
2489
|
+
|
|
2490
|
+
return object_arg.Field(field, arg_1)
|
|
2491
|
+
|
|
2492
|
+
return bind(_arrow938, _arrow939())
|
|
2493
|
+
|
|
2494
|
+
return object(getter, value_1)
|
|
2495
|
+
|
|
2496
|
+
return _arrow940
|
|
2497
|
+
|
|
2498
|
+
|
|
2499
|
+
def Decode_linkMergeFieldDecoder(field: str) -> Callable[[YAMLElement], LinkMergeMethod | None]:
|
|
2500
|
+
def _arrow941(value_1: YAMLElement, field: Any=field) -> LinkMergeMethod | None:
|
|
2501
|
+
def getter(get: IGetters) -> LinkMergeMethod | None:
|
|
2502
|
+
link_merge_field: str | None
|
|
2503
|
+
object_arg: IOptionalGetter = get.Optional
|
|
2504
|
+
def arg_1(value: YAMLElement, get: Any=get) -> str:
|
|
2505
|
+
return string(value)
|
|
2506
|
+
|
|
2507
|
+
link_merge_field = object_arg.Field(field, arg_1)
|
|
2508
|
+
if link_merge_field is None:
|
|
2509
|
+
return None
|
|
2510
|
+
|
|
2511
|
+
else:
|
|
2512
|
+
link_merge_string: str = link_merge_field
|
|
2513
|
+
match_value: LinkMergeMethod | None = LinkMergeMethod.try_parse(link_merge_string)
|
|
2514
|
+
if match_value is None:
|
|
2515
|
+
raise Exception(("Invalid linkMerge value: " + link_merge_string) + "")
|
|
2516
|
+
|
|
2517
|
+
else:
|
|
2518
|
+
return match_value
|
|
2519
|
+
|
|
2520
|
+
|
|
2521
|
+
|
|
2522
|
+
return object(getter, value_1)
|
|
2523
|
+
|
|
2524
|
+
return _arrow941
|
|
2525
|
+
|
|
2526
|
+
|
|
2527
|
+
def Decode_pickValueFieldDecoder(field: str) -> Callable[[YAMLElement], PickValueMethod | None]:
|
|
2528
|
+
def _arrow942(value_1: YAMLElement, field: Any=field) -> PickValueMethod | None:
|
|
2529
|
+
def getter(get: IGetters) -> PickValueMethod | None:
|
|
2530
|
+
pick_value_field: str | None
|
|
2531
|
+
object_arg: IOptionalGetter = get.Optional
|
|
2532
|
+
def arg_1(value: YAMLElement, get: Any=get) -> str:
|
|
2533
|
+
return string(value)
|
|
2534
|
+
|
|
2535
|
+
pick_value_field = object_arg.Field(field, arg_1)
|
|
2536
|
+
if pick_value_field is None:
|
|
2537
|
+
return None
|
|
2538
|
+
|
|
2539
|
+
else:
|
|
2540
|
+
pick_value_string: str = pick_value_field
|
|
2541
|
+
match_value: PickValueMethod | None = PickValueMethod.try_parse(pick_value_string)
|
|
2542
|
+
if match_value is None:
|
|
2543
|
+
raise Exception(("Invalid pickValue value: " + pick_value_string) + "")
|
|
2544
|
+
|
|
2545
|
+
else:
|
|
2546
|
+
return match_value
|
|
2547
|
+
|
|
2548
|
+
|
|
2549
|
+
|
|
2550
|
+
return object(getter, value_1)
|
|
2551
|
+
|
|
2552
|
+
return _arrow942
|
|
2553
|
+
|
|
2554
|
+
|
|
2555
|
+
def Decode_scatterFieldDecoder(field: str) -> Callable[[YAMLElement], Array[str] | None]:
|
|
2556
|
+
def _arrow945(value_1: YAMLElement, field: Any=field) -> Array[str] | None:
|
|
2557
|
+
def getter(get: IGetters) -> Array[str] | None:
|
|
2558
|
+
def _arrow943(value: YAMLElement, get: Any=get) -> Array[str] | None:
|
|
2559
|
+
return Decode_stringOrStringArrayDecoder(value)
|
|
2560
|
+
|
|
2561
|
+
def _arrow944(__unit: None=None, get: Any=get) -> YAMLElement | None:
|
|
2562
|
+
object_arg: IOptionalGetter = get.Optional
|
|
2563
|
+
def arg_1(x: YAMLElement) -> YAMLElement:
|
|
2564
|
+
return x
|
|
2565
|
+
|
|
2566
|
+
return object_arg.Field(field, arg_1)
|
|
2567
|
+
|
|
2568
|
+
return bind(_arrow943, _arrow944())
|
|
2569
|
+
|
|
2570
|
+
return object(getter, value_1)
|
|
2571
|
+
|
|
2572
|
+
return _arrow945
|
|
2573
|
+
|
|
2574
|
+
|
|
2575
|
+
def Decode_scatterMethodFieldDecoder(field: str) -> Callable[[YAMLElement], ScatterMethod | None]:
|
|
2576
|
+
def _arrow946(value_1: YAMLElement, field: Any=field) -> ScatterMethod | None:
|
|
2577
|
+
def getter(get: IGetters) -> ScatterMethod | None:
|
|
2578
|
+
scatter_method_field: str | None
|
|
2579
|
+
object_arg: IOptionalGetter = get.Optional
|
|
2580
|
+
def arg_1(value: YAMLElement, get: Any=get) -> str:
|
|
2581
|
+
return string(value)
|
|
2582
|
+
|
|
2583
|
+
scatter_method_field = object_arg.Field(field, arg_1)
|
|
2584
|
+
if scatter_method_field is None:
|
|
2585
|
+
return None
|
|
2586
|
+
|
|
2587
|
+
else:
|
|
2588
|
+
scatter_method_string: str = scatter_method_field
|
|
2589
|
+
match_value: ScatterMethod | None = ScatterMethod.try_parse(scatter_method_string)
|
|
2590
|
+
if match_value is None:
|
|
2591
|
+
raise Exception(("Invalid scatterMethod value: " + scatter_method_string) + "")
|
|
2592
|
+
|
|
2593
|
+
else:
|
|
2594
|
+
return match_value
|
|
2595
|
+
|
|
2596
|
+
|
|
2597
|
+
|
|
2598
|
+
return object(getter, value_1)
|
|
2599
|
+
|
|
2600
|
+
return _arrow946
|
|
2601
|
+
|
|
2602
|
+
|
|
2603
|
+
def Decode_expressionStringOptionFieldDecoder(field: str) -> Callable[[YAMLElement], str | None]:
|
|
2604
|
+
def _arrow949(value: YAMLElement, field: Any=field) -> str | None:
|
|
2605
|
+
def getter(get: IGetters) -> str | None:
|
|
2606
|
+
def _arrow947(y_ele: YAMLElement, get: Any=get) -> str:
|
|
2607
|
+
return Decode_decodeStringOrExpression(y_ele)
|
|
2608
|
+
|
|
2609
|
+
def _arrow948(__unit: None=None, get: Any=get) -> YAMLElement | None:
|
|
2610
|
+
object_arg: IOptionalGetter = get.Optional
|
|
2611
|
+
def arg_1(x: YAMLElement) -> YAMLElement:
|
|
2612
|
+
return x
|
|
2613
|
+
|
|
2614
|
+
return object_arg.Field(field, arg_1)
|
|
2615
|
+
|
|
2616
|
+
return map_1(_arrow947, _arrow948())
|
|
2617
|
+
|
|
2618
|
+
return object(getter, value)
|
|
2619
|
+
|
|
2620
|
+
return _arrow949
|
|
2621
|
+
|
|
2622
|
+
|
|
2623
|
+
def Decode_decodeStepInputFromValue(id: str, value: YAMLElement, allow_scalar_source: bool) -> StepInput:
|
|
2624
|
+
scalar_source: Array[str] | None = Decode_stringOrStringArrayDecoder(value) if allow_scalar_source else None
|
|
2625
|
+
field_source: Array[str] | None = Decode_sourceArrayFieldDecoder("source")(value)
|
|
2626
|
+
return StepInput(id, scalar_source if (scalar_source is not None) else (field_source if (field_source is not None) else None), Decode_yamlElementOptionFieldDecoder("default")(value), Decode_stringOptionFieldDecoder("valueFrom")(value), Decode_linkMergeFieldDecoder("linkMerge")(value), Decode_pickValueFieldDecoder("pickValue")(value), Decode_stringOptionFieldDecoder("doc")(value), Decode_boolOptionFieldDecoder("loadContents")(value), Decode_stringOptionFieldDecoder("loadListing")(value), Decode_stringOptionFieldDecoder("label")(value))
|
|
2627
|
+
|
|
2628
|
+
|
|
2629
|
+
def Decode_decodeStepInputsFromMap(value: YAMLElement) -> Array[StepInput]:
|
|
2630
|
+
def _arrow950(get: IGetters, value: Any=value) -> Any:
|
|
2631
|
+
return get.Overflow.FieldList(empty())
|
|
2632
|
+
|
|
2633
|
+
dict_1: Any = object(_arrow950, value)
|
|
2634
|
+
def _arrow952(__unit: None=None, value: Any=value) -> IEnumerable_1[StepInput]:
|
|
2635
|
+
def _arrow951(key: str) -> StepInput:
|
|
2636
|
+
return Decode_decodeStepInputFromValue(key, get_item_from_dict(dict_1, key), True)
|
|
2637
|
+
|
|
2638
|
+
return map_2(_arrow951, dict_1.keys())
|
|
2639
|
+
|
|
2640
|
+
return list(to_array(delay(_arrow952)))
|
|
2641
|
+
|
|
2642
|
+
|
|
2643
|
+
def Decode_decodeStepInputFromArrayItem(item: YAMLElement) -> StepInput:
|
|
2644
|
+
return Decode_decodeStepInputFromValue(Decode_stringFieldDecoder("id")(item), item, False)
|
|
2645
|
+
|
|
2646
|
+
|
|
2647
|
+
def Decode_decodeStepInputsFromArray(items: FSharpList[YAMLElement]) -> Array[StepInput]:
|
|
2648
|
+
def _arrow953(item: YAMLElement, items: Any=items) -> StepInput:
|
|
2649
|
+
return Decode_decodeStepInputFromArrayItem(item)
|
|
2650
|
+
|
|
2651
|
+
return list(map(_arrow953, items))
|
|
2652
|
+
|
|
2653
|
+
|
|
2654
|
+
def Decode_inputStepDecoder(value: YAMLElement) -> Array[StepInput]:
|
|
2655
|
+
(pattern_matching_result, items) = (None, None)
|
|
2656
|
+
if value.tag == 3:
|
|
2657
|
+
if not is_empty(value.fields[0]):
|
|
2658
|
+
if head(value.fields[0]).tag == 2:
|
|
2659
|
+
if is_empty(tail(value.fields[0])):
|
|
2660
|
+
pattern_matching_result = 0
|
|
2661
|
+
items = head(value.fields[0]).fields[0]
|
|
2662
|
+
|
|
2663
|
+
else:
|
|
2664
|
+
pattern_matching_result = 1
|
|
2665
|
+
|
|
2666
|
+
|
|
2667
|
+
else:
|
|
2668
|
+
pattern_matching_result = 1
|
|
2669
|
+
|
|
2670
|
+
|
|
2671
|
+
else:
|
|
2672
|
+
pattern_matching_result = 1
|
|
2673
|
+
|
|
2674
|
+
|
|
2675
|
+
elif value.tag == 2:
|
|
2676
|
+
pattern_matching_result = 0
|
|
2677
|
+
items = value.fields[0]
|
|
2678
|
+
|
|
2679
|
+
else:
|
|
2680
|
+
pattern_matching_result = 1
|
|
2681
|
+
|
|
2682
|
+
if pattern_matching_result == 0:
|
|
2683
|
+
return Decode_decodeStepInputsFromArray(items)
|
|
2684
|
+
|
|
2685
|
+
elif pattern_matching_result == 1:
|
|
2686
|
+
return Decode_decodeStepInputsFromMap(value)
|
|
2687
|
+
|
|
2688
|
+
|
|
2689
|
+
|
|
2690
|
+
def Decode_decodeStepOutputItem(value: YAMLElement) -> StepOutput:
|
|
2691
|
+
(pattern_matching_result, v) = (None, None)
|
|
2692
|
+
if value.tag == 3:
|
|
2693
|
+
if not is_empty(value.fields[0]):
|
|
2694
|
+
if head(value.fields[0]).tag == 1:
|
|
2695
|
+
if is_empty(tail(value.fields[0])):
|
|
2696
|
+
pattern_matching_result = 0
|
|
2697
|
+
v = head(value.fields[0]).fields[0]
|
|
2698
|
+
|
|
2699
|
+
else:
|
|
2700
|
+
pattern_matching_result = 1
|
|
2701
|
+
|
|
2702
|
+
|
|
2703
|
+
else:
|
|
2704
|
+
pattern_matching_result = 1
|
|
2705
|
+
|
|
2706
|
+
|
|
2707
|
+
else:
|
|
2708
|
+
pattern_matching_result = 1
|
|
2709
|
+
|
|
2710
|
+
|
|
2711
|
+
elif value.tag == 1:
|
|
2712
|
+
pattern_matching_result = 0
|
|
2713
|
+
v = value.fields[0]
|
|
2714
|
+
|
|
2715
|
+
else:
|
|
2716
|
+
pattern_matching_result = 1
|
|
2717
|
+
|
|
2718
|
+
if pattern_matching_result == 0:
|
|
2719
|
+
return StepOutput(0, v.Value)
|
|
2720
|
+
|
|
2721
|
+
elif pattern_matching_result == 1:
|
|
2722
|
+
return StepOutput(1, StepOutputParameter(Decode_stringFieldDecoder("id")(value)))
|
|
2723
|
+
|
|
2724
|
+
|
|
2725
|
+
|
|
2726
|
+
def _arrow956(value_2: YAMLElement) -> Array[StepOutput]:
|
|
2727
|
+
def getter(get: IGetters) -> Array[StepOutput]:
|
|
2728
|
+
out_field: YAMLElement
|
|
2729
|
+
object_arg: IRequiredGetter = get.Required
|
|
2730
|
+
def arg_1(x: YAMLElement, get: Any=get) -> YAMLElement:
|
|
2731
|
+
return x
|
|
2732
|
+
|
|
2733
|
+
out_field = object_arg.Field("out", arg_1)
|
|
2734
|
+
(pattern_matching_result, outputs, value_1) = (None, None, None)
|
|
2735
|
+
if out_field.tag == 3:
|
|
2736
|
+
if not is_empty(out_field.fields[0]):
|
|
2737
|
+
if head(out_field.fields[0]).tag == 1:
|
|
2738
|
+
if is_empty(tail(out_field.fields[0])):
|
|
2739
|
+
if head(out_field.fields[0]).fields[0].Value == "[]":
|
|
2740
|
+
pattern_matching_result = 1
|
|
2741
|
+
|
|
2742
|
+
else:
|
|
2743
|
+
pattern_matching_result = 4
|
|
2744
|
+
value_1 = out_field
|
|
2745
|
+
|
|
2746
|
+
|
|
2747
|
+
else:
|
|
2748
|
+
pattern_matching_result = 4
|
|
2749
|
+
value_1 = out_field
|
|
2750
|
+
|
|
2751
|
+
|
|
2752
|
+
elif head(out_field.fields[0]).tag == 2:
|
|
2753
|
+
if is_empty(head(out_field.fields[0]).fields[0]):
|
|
2754
|
+
if is_empty(tail(out_field.fields[0])):
|
|
2755
|
+
pattern_matching_result = 2
|
|
2756
|
+
|
|
2757
|
+
else:
|
|
2758
|
+
pattern_matching_result = 4
|
|
2759
|
+
value_1 = out_field
|
|
2760
|
+
|
|
2761
|
+
|
|
2762
|
+
elif is_empty(tail(out_field.fields[0])):
|
|
2763
|
+
pattern_matching_result = 3
|
|
2764
|
+
outputs = head(out_field.fields[0]).fields[0]
|
|
2765
|
+
|
|
2766
|
+
else:
|
|
2767
|
+
pattern_matching_result = 4
|
|
2768
|
+
value_1 = out_field
|
|
2769
|
+
|
|
2770
|
+
|
|
2771
|
+
else:
|
|
2772
|
+
pattern_matching_result = 4
|
|
2773
|
+
value_1 = out_field
|
|
2774
|
+
|
|
2775
|
+
|
|
2776
|
+
else:
|
|
2777
|
+
pattern_matching_result = 0
|
|
2778
|
+
|
|
2779
|
+
|
|
2780
|
+
elif out_field.tag == 2:
|
|
2781
|
+
if is_empty(out_field.fields[0]):
|
|
2782
|
+
pattern_matching_result = 2
|
|
2783
|
+
|
|
2784
|
+
else:
|
|
2785
|
+
pattern_matching_result = 3
|
|
2786
|
+
outputs = out_field.fields[0]
|
|
2787
|
+
|
|
2788
|
+
|
|
2789
|
+
else:
|
|
2790
|
+
pattern_matching_result = 4
|
|
2791
|
+
value_1 = out_field
|
|
2792
|
+
|
|
2793
|
+
if pattern_matching_result == 0:
|
|
2794
|
+
return []
|
|
2795
|
+
|
|
2796
|
+
elif pattern_matching_result == 1:
|
|
2797
|
+
return []
|
|
2798
|
+
|
|
2799
|
+
elif pattern_matching_result == 2:
|
|
2800
|
+
return []
|
|
2801
|
+
|
|
2802
|
+
elif pattern_matching_result == 3:
|
|
2803
|
+
def _arrow955(value: YAMLElement, get: Any=get) -> StepOutput:
|
|
2804
|
+
return Decode_decodeStepOutputItem(value)
|
|
2805
|
+
|
|
2806
|
+
return list(map(_arrow955, outputs))
|
|
2807
|
+
|
|
2808
|
+
elif pattern_matching_result == 4:
|
|
2809
|
+
return [Decode_decodeStepOutputItem(value_1)]
|
|
2810
|
+
|
|
2811
|
+
|
|
2812
|
+
return object(getter, value_2)
|
|
2813
|
+
|
|
2814
|
+
|
|
2815
|
+
Decode_outputStepsDecoder: Callable[[YAMLElement], Array[StepOutput]] = _arrow956
|
|
2816
|
+
|
|
2817
|
+
def _arrow957(value_1: YAMLElement) -> str | None:
|
|
2818
|
+
def getter(get: IGetters) -> str | None:
|
|
2819
|
+
object_arg: IOptionalGetter = get.Optional
|
|
2820
|
+
def arg_1(value: YAMLElement, get: Any=get) -> str:
|
|
2821
|
+
return string(value)
|
|
2822
|
+
|
|
2823
|
+
return object_arg.Field("doc", arg_1)
|
|
2824
|
+
|
|
2825
|
+
return object(getter, value_1)
|
|
2826
|
+
|
|
2827
|
+
|
|
2828
|
+
Decode_docDecoder: Callable[[YAMLElement], str | None] = _arrow957
|
|
2829
|
+
|
|
2830
|
+
def _arrow958(value_1: YAMLElement) -> str | None:
|
|
2831
|
+
def getter(get: IGetters) -> str | None:
|
|
2832
|
+
object_arg: IOptionalGetter = get.Optional
|
|
2833
|
+
def arg_1(value: YAMLElement, get: Any=get) -> str:
|
|
2834
|
+
return string(value)
|
|
2835
|
+
|
|
2836
|
+
return object_arg.Field("label", arg_1)
|
|
2837
|
+
|
|
2838
|
+
return object(getter, value_1)
|
|
2839
|
+
|
|
2840
|
+
|
|
2841
|
+
Decode_labelDecoder: Callable[[YAMLElement], str | None] = _arrow958
|
|
2842
|
+
|
|
2843
|
+
def _arrow961(value_1: YAMLElement) -> Array[str] | None:
|
|
2844
|
+
def getter(get: IGetters) -> Array[str] | None:
|
|
2845
|
+
def _arrow959(value: YAMLElement, get: Any=get) -> Array[str] | None:
|
|
2846
|
+
return Decode_stringOrStringArrayDecoder(value)
|
|
2847
|
+
|
|
2848
|
+
def _arrow960(__unit: None=None, get: Any=get) -> YAMLElement | None:
|
|
2849
|
+
object_arg: IOptionalGetter = get.Optional
|
|
2850
|
+
def arg_1(x: YAMLElement) -> YAMLElement:
|
|
2851
|
+
return x
|
|
2852
|
+
|
|
2853
|
+
return object_arg.Field("intent", arg_1)
|
|
2854
|
+
|
|
2855
|
+
return bind(_arrow959, _arrow960())
|
|
2856
|
+
|
|
2857
|
+
return object(getter, value_1)
|
|
2858
|
+
|
|
2859
|
+
|
|
2860
|
+
Decode_intentDecoder: Callable[[YAMLElement], Array[str] | None] = _arrow961
|
|
2861
|
+
|
|
2862
|
+
def Decode_hasField(field_name: str, yaml_element: YAMLElement) -> bool:
|
|
2863
|
+
if yaml_element.tag == 3:
|
|
2864
|
+
def predicate(_arg: YAMLElement, field_name: Any=field_name, yaml_element: Any=yaml_element) -> bool:
|
|
2865
|
+
(pattern_matching_result,) = (None,)
|
|
2866
|
+
if _arg.tag == 0:
|
|
2867
|
+
if _arg.fields[0].Value == field_name:
|
|
2868
|
+
pattern_matching_result = 0
|
|
2869
|
+
|
|
2870
|
+
else:
|
|
2871
|
+
pattern_matching_result = 1
|
|
2872
|
+
|
|
2873
|
+
|
|
2874
|
+
else:
|
|
2875
|
+
pattern_matching_result = 1
|
|
2876
|
+
|
|
2877
|
+
if pattern_matching_result == 0:
|
|
2878
|
+
return True
|
|
2879
|
+
|
|
2880
|
+
elif pattern_matching_result == 1:
|
|
2881
|
+
return False
|
|
2882
|
+
|
|
2883
|
+
|
|
2884
|
+
return exists(predicate, yaml_element.fields[0])
|
|
2885
|
+
|
|
2886
|
+
else:
|
|
2887
|
+
return False
|
|
2888
|
+
|
|
2889
|
+
|
|
2890
|
+
|
|
2891
|
+
def Decode_withDefaultCwlVersion(default_cwl_version: str, yaml_element: YAMLElement) -> YAMLElement:
|
|
2892
|
+
if yaml_element.tag == 3:
|
|
2893
|
+
if Decode_hasField("cwlVersion", yaml_element):
|
|
2894
|
+
return yaml_element
|
|
2895
|
+
|
|
2896
|
+
else:
|
|
2897
|
+
return YAMLElement(3, cons(YAMLElement(0, YAMLContent("cwlVersion", None), YAMLElement(3, singleton_1(YAMLElement(1, YAMLContent(default_cwl_version, None))))), yaml_element.fields[0]))
|
|
2898
|
+
|
|
2899
|
+
|
|
2900
|
+
else:
|
|
2901
|
+
return yaml_element
|
|
2902
|
+
|
|
2903
|
+
|
|
2904
|
+
|
|
2905
|
+
def Decode_workflowStepRunDecoder(default_cwl_version: str, run_value: YAMLElement) -> WorkflowStepRun:
|
|
2906
|
+
(pattern_matching_result, v) = (None, None)
|
|
2907
|
+
if run_value.tag == 3:
|
|
2908
|
+
if not is_empty(run_value.fields[0]):
|
|
2909
|
+
if head(run_value.fields[0]).tag == 1:
|
|
2910
|
+
if is_empty(tail(run_value.fields[0])):
|
|
2911
|
+
pattern_matching_result = 0
|
|
2912
|
+
v = head(run_value.fields[0]).fields[0]
|
|
2913
|
+
|
|
2914
|
+
else:
|
|
2915
|
+
pattern_matching_result = 1
|
|
2916
|
+
|
|
2917
|
+
|
|
2918
|
+
else:
|
|
2919
|
+
pattern_matching_result = 1
|
|
2920
|
+
|
|
2921
|
+
|
|
2922
|
+
else:
|
|
2923
|
+
pattern_matching_result = 1
|
|
2924
|
+
|
|
2925
|
+
|
|
2926
|
+
elif run_value.tag == 1:
|
|
2927
|
+
pattern_matching_result = 0
|
|
2928
|
+
v = run_value.fields[0]
|
|
2929
|
+
|
|
2930
|
+
else:
|
|
2931
|
+
pattern_matching_result = 2
|
|
2932
|
+
|
|
2933
|
+
if pattern_matching_result == 0:
|
|
2934
|
+
return WorkflowStepRun(0, v.Value)
|
|
2935
|
+
|
|
2936
|
+
elif pattern_matching_result == 1:
|
|
2937
|
+
match_value: CWLProcessingUnit = Decode_decodeCWLProcessingUnitElement(Decode_withDefaultCwlVersion(default_cwl_version, run_value))
|
|
2938
|
+
if match_value.tag == 1:
|
|
2939
|
+
return WorkflowStepRunOps_fromWorkflow(match_value.fields[0])
|
|
2940
|
+
|
|
2941
|
+
elif match_value.tag == 2:
|
|
2942
|
+
return WorkflowStepRunOps_fromExpressionTool(match_value.fields[0])
|
|
2943
|
+
|
|
2944
|
+
elif match_value.tag == 3:
|
|
2945
|
+
return WorkflowStepRunOps_fromOperation(match_value.fields[0])
|
|
2946
|
+
|
|
2947
|
+
else:
|
|
2948
|
+
return WorkflowStepRunOps_fromTool(match_value.fields[0])
|
|
2949
|
+
|
|
2950
|
+
|
|
2951
|
+
elif pattern_matching_result == 2:
|
|
2952
|
+
raise Exception(to_text(interpolate("Unsupported run value for workflow step: %A%P()", [run_value])))
|
|
2953
|
+
|
|
2954
|
+
|
|
2955
|
+
|
|
2956
|
+
def Decode_decodeWorkflowStepFromValueWithId(default_cwl_version: str, step_id: str, value: YAMLElement) -> WorkflowStep:
|
|
2957
|
+
def _arrow962(get_0027: IGetters, default_cwl_version: Any=default_cwl_version, step_id: Any=step_id, value: Any=value) -> YAMLElement:
|
|
2958
|
+
object_arg: IRequiredGetter = get_0027.Required
|
|
2959
|
+
def arg_1(x: YAMLElement) -> YAMLElement:
|
|
2960
|
+
return x
|
|
2961
|
+
|
|
2962
|
+
return object_arg.Field("run", arg_1)
|
|
2963
|
+
|
|
2964
|
+
run: WorkflowStepRun = Decode_workflowStepRunDecoder(default_cwl_version, object(_arrow962, value))
|
|
2965
|
+
def _arrow963(get_0027_1: IGetters, default_cwl_version: Any=default_cwl_version, step_id: Any=step_id, value: Any=value) -> Array[StepInput]:
|
|
2966
|
+
object_arg_1: IRequiredGetter = get_0027_1.Required
|
|
2967
|
+
return object_arg_1.Field("in", Decode_inputStepDecoder)
|
|
2968
|
+
|
|
2969
|
+
inputs: Array[StepInput] = object(_arrow963, value)
|
|
2970
|
+
outputs: Array[StepOutput] = Decode_outputStepsDecoder(value)
|
|
2971
|
+
requirements: Array[Requirement] | None = Decode_requirementsDecoder(value)
|
|
2972
|
+
hints: Array[HintEntry] | None = Decode_hintsDecoder(value)
|
|
2973
|
+
doc: str | None = Decode_docDecoder(value)
|
|
2974
|
+
wf_step: WorkflowStep = WorkflowStep(step_id, inputs, outputs, run, Decode_labelDecoder(value), doc, Decode_scatterFieldDecoder("scatter")(value), Decode_scatterMethodFieldDecoder("scatterMethod")(value), Decode_expressionStringOptionFieldDecoder("when")(value))
|
|
2975
|
+
if requirements is not None:
|
|
2976
|
+
wf_step.Requirements = requirements
|
|
2977
|
+
|
|
2978
|
+
if hints is not None:
|
|
2979
|
+
wf_step.Hints = hints
|
|
2980
|
+
|
|
2981
|
+
return wf_step
|
|
2982
|
+
|
|
2983
|
+
|
|
2984
|
+
def Decode_decodeWorkflowStepFromArrayItem(default_cwl_version: str, item: YAMLElement) -> WorkflowStep:
|
|
2985
|
+
return Decode_decodeWorkflowStepFromValueWithId(default_cwl_version, Decode_stringFieldDecoder("id")(item), item)
|
|
2986
|
+
|
|
2987
|
+
|
|
2988
|
+
def Decode_stepArrayDecoderWithVersion(default_cwl_version: str, value: YAMLElement) -> Array[WorkflowStep]:
|
|
2989
|
+
(pattern_matching_result, items) = (None, None)
|
|
2990
|
+
if value.tag == 3:
|
|
2991
|
+
if not is_empty(value.fields[0]):
|
|
2992
|
+
if head(value.fields[0]).tag == 2:
|
|
2993
|
+
if is_empty(tail(value.fields[0])):
|
|
2994
|
+
pattern_matching_result = 0
|
|
2995
|
+
items = head(value.fields[0]).fields[0]
|
|
2996
|
+
|
|
2997
|
+
else:
|
|
2998
|
+
pattern_matching_result = 1
|
|
2999
|
+
|
|
3000
|
+
|
|
3001
|
+
else:
|
|
3002
|
+
pattern_matching_result = 1
|
|
3003
|
+
|
|
3004
|
+
|
|
3005
|
+
else:
|
|
3006
|
+
pattern_matching_result = 1
|
|
3007
|
+
|
|
3008
|
+
|
|
3009
|
+
elif value.tag == 2:
|
|
3010
|
+
pattern_matching_result = 0
|
|
3011
|
+
items = value.fields[0]
|
|
3012
|
+
|
|
3013
|
+
else:
|
|
3014
|
+
pattern_matching_result = 1
|
|
3015
|
+
|
|
3016
|
+
if pattern_matching_result == 0:
|
|
3017
|
+
def mapping(item: YAMLElement, default_cwl_version: Any=default_cwl_version, value: Any=value) -> WorkflowStep:
|
|
3018
|
+
return Decode_decodeWorkflowStepFromArrayItem(default_cwl_version, item)
|
|
3019
|
+
|
|
3020
|
+
return list(map(mapping, items))
|
|
3021
|
+
|
|
3022
|
+
elif pattern_matching_result == 1:
|
|
3023
|
+
def _arrow965(get: IGetters, default_cwl_version: Any=default_cwl_version, value: Any=value) -> Any:
|
|
3024
|
+
return get.Overflow.FieldList(empty())
|
|
3025
|
+
|
|
3026
|
+
dict_1: Any = object(_arrow965, value)
|
|
3027
|
+
def _arrow967(__unit: None=None, default_cwl_version: Any=default_cwl_version, value: Any=value) -> IEnumerable_1[WorkflowStep]:
|
|
3028
|
+
def _arrow966(key: str) -> WorkflowStep:
|
|
3029
|
+
return Decode_decodeWorkflowStepFromValueWithId(default_cwl_version, key, get_item_from_dict(dict_1, key))
|
|
3030
|
+
|
|
3031
|
+
return map_2(_arrow966, dict_1.keys())
|
|
3032
|
+
|
|
3033
|
+
return list(to_array(delay(_arrow967)))
|
|
3034
|
+
|
|
3035
|
+
|
|
3036
|
+
|
|
3037
|
+
def Decode_stepsDecoderWithVersion(default_cwl_version: str) -> Callable[[YAMLElement], Array[WorkflowStep]]:
|
|
3038
|
+
def _arrow968(value_1: YAMLElement, default_cwl_version: Any=default_cwl_version) -> Array[WorkflowStep]:
|
|
3039
|
+
def getter(get: IGetters) -> Array[WorkflowStep]:
|
|
3040
|
+
object_arg: IRequiredGetter = get.Required
|
|
3041
|
+
def arg_1(value: YAMLElement, get: Any=get) -> Array[WorkflowStep]:
|
|
3042
|
+
return Decode_stepArrayDecoderWithVersion(default_cwl_version, value)
|
|
3043
|
+
|
|
3044
|
+
return object_arg.Field("steps", arg_1)
|
|
3045
|
+
|
|
3046
|
+
return object(getter, value_1)
|
|
3047
|
+
|
|
3048
|
+
return _arrow968
|
|
3049
|
+
|
|
3050
|
+
|
|
3051
|
+
def Decode_commandLineToolDecoder(yaml_cwl: YAMLElement) -> CWLToolDescription:
|
|
3052
|
+
cwl_version: str = Decode_versionDecoder(yaml_cwl)
|
|
3053
|
+
outputs: Array[CWLOutput] = Decode_outputsDecoder(yaml_cwl)
|
|
3054
|
+
inputs: Array[CWLInput] | None = Decode_inputsDecoder(yaml_cwl)
|
|
3055
|
+
requirements: Array[Requirement] | None = Decode_requirementsDecoder(yaml_cwl)
|
|
3056
|
+
hints: Array[HintEntry] | None = Decode_hintsDecoder(yaml_cwl)
|
|
3057
|
+
intent: Array[str] | None = Decode_intentDecoder(yaml_cwl)
|
|
3058
|
+
base_command: Array[str] | None = Decode_baseCommandDecoder(yaml_cwl)
|
|
3059
|
+
doc: str | None = Decode_docDecoder(yaml_cwl)
|
|
3060
|
+
label: str | None = Decode_labelDecoder(yaml_cwl)
|
|
3061
|
+
description: CWLToolDescription = CWLToolDescription(outputs, cwl_version)
|
|
3062
|
+
metadata: DynamicObj
|
|
3063
|
+
md: DynamicObj = DynamicObj()
|
|
3064
|
+
def getter(get: IGetters, yaml_cwl: Any=yaml_cwl) -> DynamicObj:
|
|
3065
|
+
return Decode_overflowDecoder(md, get.Overflow.FieldList(of_array(["inputs", "outputs", "class", "id", "label", "doc", "intent", "requirements", "hints", "cwlVersion", "baseCommand", "arguments", "stdin", "stderr", "stdout", "successCodes", "temporaryFailCodes", "permanentFailCodes"])))
|
|
3066
|
+
|
|
3067
|
+
ignore(object(getter, yaml_cwl))
|
|
3068
|
+
metadata = md
|
|
3069
|
+
def getter_1(get_1: IGetters, yaml_cwl: Any=yaml_cwl) -> DynamicObj:
|
|
3070
|
+
return Decode_overflowDecoder(description, get_1.MultipleOptional.FieldList(of_array(["id", "arguments", "stdin", "stderr", "stdout", "successCodes", "temporaryFailCodes", "permanentFailCodes"])))
|
|
3071
|
+
|
|
3072
|
+
ignore(object(getter_1, yaml_cwl))
|
|
3073
|
+
if inputs is not None:
|
|
3074
|
+
description.Inputs = inputs
|
|
3075
|
+
|
|
3076
|
+
if requirements is not None:
|
|
3077
|
+
description.Requirements = requirements
|
|
3078
|
+
|
|
3079
|
+
if hints is not None:
|
|
3080
|
+
description.Hints = hints
|
|
3081
|
+
|
|
3082
|
+
if intent is not None:
|
|
3083
|
+
description.Intent = intent
|
|
3084
|
+
|
|
3085
|
+
if base_command is not None:
|
|
3086
|
+
description.BaseCommand = base_command
|
|
3087
|
+
|
|
3088
|
+
if doc is not None:
|
|
3089
|
+
description.Doc = doc
|
|
3090
|
+
|
|
3091
|
+
if label is not None:
|
|
3092
|
+
description.Label = label
|
|
3093
|
+
|
|
3094
|
+
if length(metadata.GetProperties(False)) > 0:
|
|
3095
|
+
description.Metadata = metadata
|
|
3096
|
+
|
|
3097
|
+
return description
|
|
3098
|
+
|
|
3099
|
+
|
|
3100
|
+
def Decode_expressionToolDecoder(yaml_cwl: YAMLElement) -> CWLExpressionToolDescription:
|
|
3101
|
+
cwl_version: str = Decode_versionDecoder(yaml_cwl)
|
|
3102
|
+
outputs: Array[CWLOutput] = Decode_outputsDecoder(yaml_cwl)
|
|
3103
|
+
inputs: Array[CWLInput] | None = Decode_inputsDecoder(yaml_cwl)
|
|
3104
|
+
requirements: Array[Requirement] | None = Decode_requirementsDecoder(yaml_cwl)
|
|
3105
|
+
hints: Array[HintEntry] | None = Decode_hintsDecoder(yaml_cwl)
|
|
3106
|
+
intent: Array[str] | None = Decode_intentDecoder(yaml_cwl)
|
|
3107
|
+
doc: str | None = Decode_docDecoder(yaml_cwl)
|
|
3108
|
+
label: str | None = Decode_labelDecoder(yaml_cwl)
|
|
3109
|
+
def _arrow970(get: IGetters, yaml_cwl: Any=yaml_cwl) -> str:
|
|
3110
|
+
object_arg: IRequiredGetter = get.Required
|
|
3111
|
+
return object_arg.Field("expression", Decode_decodeStringOrExpression)
|
|
3112
|
+
|
|
3113
|
+
description: CWLExpressionToolDescription = CWLExpressionToolDescription(outputs, object(_arrow970, yaml_cwl), cwl_version)
|
|
3114
|
+
metadata: DynamicObj
|
|
3115
|
+
md: DynamicObj = DynamicObj()
|
|
3116
|
+
def getter(get_1: IGetters, yaml_cwl: Any=yaml_cwl) -> DynamicObj:
|
|
3117
|
+
return Decode_overflowDecoder(md, get_1.Overflow.FieldList(of_array(["inputs", "outputs", "class", "id", "label", "doc", "intent", "requirements", "hints", "cwlVersion", "expression"])))
|
|
3118
|
+
|
|
3119
|
+
ignore(object(getter, yaml_cwl))
|
|
3120
|
+
metadata = md
|
|
3121
|
+
def getter_1(get_2: IGetters, yaml_cwl: Any=yaml_cwl) -> DynamicObj:
|
|
3122
|
+
return Decode_overflowDecoder(description, get_2.MultipleOptional.FieldList(singleton_1("id")))
|
|
3123
|
+
|
|
3124
|
+
ignore(object(getter_1, yaml_cwl))
|
|
3125
|
+
if inputs is not None:
|
|
3126
|
+
description.Inputs = inputs
|
|
3127
|
+
|
|
3128
|
+
if requirements is not None:
|
|
3129
|
+
description.Requirements = requirements
|
|
3130
|
+
|
|
3131
|
+
if hints is not None:
|
|
3132
|
+
description.Hints = hints
|
|
3133
|
+
|
|
3134
|
+
if intent is not None:
|
|
3135
|
+
description.Intent = intent
|
|
3136
|
+
|
|
3137
|
+
if doc is not None:
|
|
3138
|
+
description.Doc = doc
|
|
3139
|
+
|
|
3140
|
+
if label is not None:
|
|
3141
|
+
description.Label = label
|
|
3142
|
+
|
|
3143
|
+
if length(metadata.GetProperties(False)) > 0:
|
|
3144
|
+
description.Metadata = metadata
|
|
3145
|
+
|
|
3146
|
+
return description
|
|
3147
|
+
|
|
3148
|
+
|
|
3149
|
+
def Decode_operationDecoder(yaml_cwl: YAMLElement) -> CWLOperationDescription:
|
|
3150
|
+
cwl_version: str = Decode_versionDecoder(yaml_cwl)
|
|
3151
|
+
outputs: Array[CWLOutput] = Decode_outputsDecoder(yaml_cwl)
|
|
3152
|
+
inputs: Array[CWLInput]
|
|
3153
|
+
match_value: Array[CWLInput] | None = Decode_inputsDecoder(yaml_cwl)
|
|
3154
|
+
if match_value is None:
|
|
3155
|
+
raise Exception("Inputs are required for an operation")
|
|
3156
|
+
|
|
3157
|
+
else:
|
|
3158
|
+
inputs = match_value
|
|
3159
|
+
|
|
3160
|
+
requirements: Array[Requirement] | None = Decode_requirementsDecoder(yaml_cwl)
|
|
3161
|
+
hints: Array[HintEntry] | None = Decode_hintsDecoder(yaml_cwl)
|
|
3162
|
+
intent: Array[str] | None = Decode_intentDecoder(yaml_cwl)
|
|
3163
|
+
doc: str | None = Decode_docDecoder(yaml_cwl)
|
|
3164
|
+
label: str | None = Decode_labelDecoder(yaml_cwl)
|
|
3165
|
+
description: CWLOperationDescription = CWLOperationDescription(inputs, outputs, cwl_version)
|
|
3166
|
+
metadata: DynamicObj
|
|
3167
|
+
md: DynamicObj = DynamicObj()
|
|
3168
|
+
def getter(get: IGetters, yaml_cwl: Any=yaml_cwl) -> DynamicObj:
|
|
3169
|
+
return Decode_overflowDecoder(md, get.Overflow.FieldList(of_array(["inputs", "outputs", "label", "doc", "intent", "class", "id", "requirements", "hints", "cwlVersion"])))
|
|
3170
|
+
|
|
3171
|
+
ignore(object(getter, yaml_cwl))
|
|
3172
|
+
metadata = md
|
|
3173
|
+
def getter_1(get_1: IGetters, yaml_cwl: Any=yaml_cwl) -> DynamicObj:
|
|
3174
|
+
return Decode_overflowDecoder(description, get_1.MultipleOptional.FieldList(singleton_1("id")))
|
|
3175
|
+
|
|
3176
|
+
ignore(object(getter_1, yaml_cwl))
|
|
3177
|
+
if requirements is not None:
|
|
3178
|
+
description.Requirements = requirements
|
|
3179
|
+
|
|
3180
|
+
if hints is not None:
|
|
3181
|
+
description.Hints = hints
|
|
3182
|
+
|
|
3183
|
+
if intent is not None:
|
|
3184
|
+
description.Intent = intent
|
|
3185
|
+
|
|
3186
|
+
if doc is not None:
|
|
3187
|
+
description.Doc = doc
|
|
3188
|
+
|
|
3189
|
+
if label is not None:
|
|
3190
|
+
description.Label = label
|
|
3191
|
+
|
|
3192
|
+
if length(metadata.GetProperties(False)) > 0:
|
|
3193
|
+
description.Metadata = metadata
|
|
3194
|
+
|
|
3195
|
+
return description
|
|
3196
|
+
|
|
3197
|
+
|
|
3198
|
+
def Decode_workflowDecoder(yaml_cwl: YAMLElement) -> CWLWorkflowDescription:
|
|
3199
|
+
cwl_version: str = Decode_versionDecoder(yaml_cwl)
|
|
3200
|
+
outputs: Array[CWLOutput] = Decode_outputsDecoder(yaml_cwl)
|
|
3201
|
+
inputs: Array[CWLInput]
|
|
3202
|
+
match_value: Array[CWLInput] | None = Decode_inputsDecoder(yaml_cwl)
|
|
3203
|
+
if match_value is None:
|
|
3204
|
+
raise Exception("Inputs are required for a workflow")
|
|
3205
|
+
|
|
3206
|
+
else:
|
|
3207
|
+
inputs = match_value
|
|
3208
|
+
|
|
3209
|
+
requirements: Array[Requirement] | None = Decode_requirementsDecoder(yaml_cwl)
|
|
3210
|
+
hints: Array[HintEntry] | None = Decode_hintsDecoder(yaml_cwl)
|
|
3211
|
+
intent: Array[str] | None = Decode_intentDecoder(yaml_cwl)
|
|
3212
|
+
steps: Array[WorkflowStep] = Decode_stepsDecoderWithVersion(cwl_version)(yaml_cwl)
|
|
3213
|
+
doc: str | None = Decode_docDecoder(yaml_cwl)
|
|
3214
|
+
label: str | None = Decode_labelDecoder(yaml_cwl)
|
|
3215
|
+
description: CWLWorkflowDescription = CWLWorkflowDescription(steps, inputs, outputs, cwl_version)
|
|
3216
|
+
metadata: DynamicObj
|
|
3217
|
+
md: DynamicObj = DynamicObj()
|
|
3218
|
+
def getter(get: IGetters, yaml_cwl: Any=yaml_cwl) -> DynamicObj:
|
|
3219
|
+
return Decode_overflowDecoder(md, get.Overflow.FieldList(of_array(["inputs", "outputs", "label", "doc", "intent", "class", "steps", "id", "requirements", "hints", "cwlVersion"])))
|
|
3220
|
+
|
|
3221
|
+
ignore(object(getter, yaml_cwl))
|
|
3222
|
+
metadata = md
|
|
3223
|
+
def getter_1(get_1: IGetters, yaml_cwl: Any=yaml_cwl) -> DynamicObj:
|
|
3224
|
+
return Decode_overflowDecoder(description, get_1.MultipleOptional.FieldList(singleton_1("id")))
|
|
3225
|
+
|
|
3226
|
+
ignore(object(getter_1, yaml_cwl))
|
|
3227
|
+
if requirements is not None:
|
|
3228
|
+
description.Requirements = requirements
|
|
3229
|
+
|
|
3230
|
+
if hints is not None:
|
|
3231
|
+
description.Hints = hints
|
|
3232
|
+
|
|
3233
|
+
if intent is not None:
|
|
3234
|
+
description.Intent = intent
|
|
3235
|
+
|
|
3236
|
+
if doc is not None:
|
|
3237
|
+
description.Doc = doc
|
|
3238
|
+
|
|
3239
|
+
if label is not None:
|
|
3240
|
+
description.Label = label
|
|
3241
|
+
|
|
3242
|
+
if length(metadata.GetProperties(False)) > 0:
|
|
3243
|
+
description.Metadata = metadata
|
|
3244
|
+
|
|
3245
|
+
return description
|
|
3246
|
+
|
|
3247
|
+
|
|
3248
|
+
def Decode_decodeCWLProcessingUnitElement(yaml_cwl: YAMLElement) -> CWLProcessingUnit:
|
|
3249
|
+
cls: str = Decode_classDecoder(yaml_cwl)
|
|
3250
|
+
if cls == "CommandLineTool":
|
|
3251
|
+
return CWLProcessingUnit(0, Decode_commandLineToolDecoder(yaml_cwl))
|
|
3252
|
+
|
|
3253
|
+
elif cls == "Workflow":
|
|
3254
|
+
return CWLProcessingUnit(1, Decode_workflowDecoder(yaml_cwl))
|
|
3255
|
+
|
|
3256
|
+
elif cls == "ExpressionTool":
|
|
3257
|
+
return CWLProcessingUnit(2, Decode_expressionToolDecoder(yaml_cwl))
|
|
3258
|
+
|
|
3259
|
+
elif cls == "Operation":
|
|
3260
|
+
return CWLProcessingUnit(3, Decode_operationDecoder(yaml_cwl))
|
|
3261
|
+
|
|
3262
|
+
else:
|
|
3263
|
+
raise Exception(("Invalid or unsupported CWL class: " + cls) + "")
|
|
3264
|
+
|
|
3265
|
+
|
|
3266
|
+
|
|
3267
|
+
def _arrow971(value: YAMLElement) -> Array[WorkflowStep]:
|
|
3268
|
+
return Decode_stepArrayDecoderWithVersion("v1.2", value)
|
|
3269
|
+
|
|
3270
|
+
|
|
3271
|
+
Decode_stepArrayDecoder: Callable[[YAMLElement], Array[WorkflowStep]] = _arrow971
|
|
3272
|
+
|
|
3273
|
+
Decode_stepsDecoder: Callable[[YAMLElement], Array[WorkflowStep]] = Decode_stepsDecoderWithVersion("v1.2")
|
|
3274
|
+
|
|
3275
|
+
def Decode_decodeCommandLineTool(cwl: str) -> CWLToolDescription:
|
|
3276
|
+
return Decode_commandLineToolDecoder(Decode_readSanitizedYaml(cwl))
|
|
3277
|
+
|
|
3278
|
+
|
|
3279
|
+
def Decode_decodeWorkflow(cwl: str) -> CWLWorkflowDescription:
|
|
3280
|
+
return Decode_workflowDecoder(Decode_readSanitizedYaml(cwl))
|
|
3281
|
+
|
|
3282
|
+
|
|
3283
|
+
def Decode_decodeExpressionTool(cwl: str) -> CWLExpressionToolDescription:
|
|
3284
|
+
return Decode_expressionToolDecoder(Decode_readSanitizedYaml(cwl))
|
|
3285
|
+
|
|
3286
|
+
|
|
3287
|
+
def Decode_decodeOperation(cwl: str) -> CWLOperationDescription:
|
|
3288
|
+
return Decode_operationDecoder(Decode_readSanitizedYaml(cwl))
|
|
3289
|
+
|
|
3290
|
+
|
|
3291
|
+
def Decode_decodeCWLProcessingUnit(cwl: str) -> CWLProcessingUnit:
|
|
3292
|
+
return Decode_decodeCWLProcessingUnitElement(Decode_readSanitizedYaml(cwl))
|
|
3293
|
+
|
|
3294
|
+
|
|
3295
|
+
def DecodeParameters_cwlParameterReferenceDecoder(get: IGetters, key: str, y_ele: YAMLElement) -> CWLParameterReference:
|
|
3296
|
+
(pattern_matching_result, v, v1, v2, s) = (None, None, None, None, None)
|
|
3297
|
+
if y_ele.tag == 3:
|
|
3298
|
+
if not is_empty(y_ele.fields[0]):
|
|
3299
|
+
if head(y_ele.fields[0]).tag == 1:
|
|
3300
|
+
if is_empty(tail(y_ele.fields[0])):
|
|
3301
|
+
pattern_matching_result = 0
|
|
3302
|
+
v = head(y_ele.fields[0]).fields[0]
|
|
3303
|
+
|
|
3304
|
+
else:
|
|
3305
|
+
pattern_matching_result = 3
|
|
3306
|
+
|
|
3307
|
+
|
|
3308
|
+
elif head(y_ele.fields[0]).tag == 0:
|
|
3309
|
+
if head(y_ele.fields[0]).fields[1].tag == 3:
|
|
3310
|
+
if not is_empty(head(y_ele.fields[0]).fields[1].fields[0]):
|
|
3311
|
+
if head(head(y_ele.fields[0]).fields[1].fields[0]).tag == 1:
|
|
3312
|
+
if is_empty(tail(head(y_ele.fields[0]).fields[1].fields[0])):
|
|
3313
|
+
if not is_empty(tail(y_ele.fields[0])):
|
|
3314
|
+
if head(tail(y_ele.fields[0])).tag == 0:
|
|
3315
|
+
if head(tail(y_ele.fields[0])).fields[1].tag == 3:
|
|
3316
|
+
if not is_empty(head(tail(y_ele.fields[0])).fields[1].fields[0]):
|
|
3317
|
+
if head(head(tail(y_ele.fields[0])).fields[1].fields[0]).tag == 1:
|
|
3318
|
+
if is_empty(tail(head(tail(y_ele.fields[0])).fields[1].fields[0])):
|
|
3319
|
+
if is_empty(tail(tail(y_ele.fields[0]))):
|
|
3320
|
+
pattern_matching_result = 1
|
|
3321
|
+
v1 = head(head(y_ele.fields[0]).fields[1].fields[0]).fields[0]
|
|
3322
|
+
v2 = head(head(tail(y_ele.fields[0])).fields[1].fields[0]).fields[0]
|
|
3323
|
+
|
|
3324
|
+
else:
|
|
3325
|
+
pattern_matching_result = 3
|
|
3326
|
+
|
|
3327
|
+
|
|
3328
|
+
else:
|
|
3329
|
+
pattern_matching_result = 3
|
|
3330
|
+
|
|
3331
|
+
|
|
3332
|
+
else:
|
|
3333
|
+
pattern_matching_result = 3
|
|
3334
|
+
|
|
3335
|
+
|
|
3336
|
+
else:
|
|
3337
|
+
pattern_matching_result = 3
|
|
3338
|
+
|
|
3339
|
+
|
|
3340
|
+
else:
|
|
3341
|
+
pattern_matching_result = 3
|
|
3342
|
+
|
|
3343
|
+
|
|
3344
|
+
else:
|
|
3345
|
+
pattern_matching_result = 3
|
|
3346
|
+
|
|
3347
|
+
|
|
3348
|
+
else:
|
|
3349
|
+
pattern_matching_result = 3
|
|
3350
|
+
|
|
3351
|
+
|
|
3352
|
+
else:
|
|
3353
|
+
pattern_matching_result = 3
|
|
3354
|
+
|
|
3355
|
+
|
|
3356
|
+
else:
|
|
3357
|
+
pattern_matching_result = 3
|
|
3358
|
+
|
|
3359
|
+
|
|
3360
|
+
else:
|
|
3361
|
+
pattern_matching_result = 3
|
|
3362
|
+
|
|
3363
|
+
|
|
3364
|
+
else:
|
|
3365
|
+
pattern_matching_result = 3
|
|
3366
|
+
|
|
3367
|
+
|
|
3368
|
+
elif head(y_ele.fields[0]).tag == 2:
|
|
3369
|
+
if is_empty(tail(y_ele.fields[0])):
|
|
3370
|
+
pattern_matching_result = 2
|
|
3371
|
+
s = head(y_ele.fields[0]).fields[0]
|
|
3372
|
+
|
|
3373
|
+
else:
|
|
3374
|
+
pattern_matching_result = 3
|
|
3375
|
+
|
|
3376
|
+
|
|
3377
|
+
else:
|
|
3378
|
+
pattern_matching_result = 3
|
|
3379
|
+
|
|
3380
|
+
|
|
3381
|
+
else:
|
|
3382
|
+
pattern_matching_result = 3
|
|
3383
|
+
|
|
3384
|
+
|
|
3385
|
+
else:
|
|
3386
|
+
pattern_matching_result = 3
|
|
3387
|
+
|
|
3388
|
+
if pattern_matching_result == 0:
|
|
3389
|
+
return CWLParameterReference(key, [v.Value])
|
|
3390
|
+
|
|
3391
|
+
elif pattern_matching_result == 1:
|
|
3392
|
+
return CWLParameterReference(key, [v2.Value], Decode_cwlTypeStringMatcher(v1.Value, get)[0])
|
|
3393
|
+
|
|
3394
|
+
elif pattern_matching_result == 2:
|
|
3395
|
+
match_value: YAMLElement | None = try_head(s)
|
|
3396
|
+
(pattern_matching_result_1, mappings) = (None, None)
|
|
3397
|
+
if match_value is not None:
|
|
3398
|
+
if match_value.tag == 3:
|
|
3399
|
+
pattern_matching_result_1 = 0
|
|
3400
|
+
mappings = match_value.fields[0]
|
|
3401
|
+
|
|
3402
|
+
else:
|
|
3403
|
+
pattern_matching_result_1 = 1
|
|
3404
|
+
|
|
3405
|
+
|
|
3406
|
+
else:
|
|
3407
|
+
pattern_matching_result_1 = 1
|
|
3408
|
+
|
|
3409
|
+
if pattern_matching_result_1 == 0:
|
|
3410
|
+
def predicate(_arg: YAMLElement, get: Any=get, key: Any=key, y_ele: Any=y_ele) -> bool:
|
|
3411
|
+
if _arg.tag == 0:
|
|
3412
|
+
return True
|
|
3413
|
+
|
|
3414
|
+
else:
|
|
3415
|
+
return False
|
|
3416
|
+
|
|
3417
|
+
|
|
3418
|
+
if not exists(predicate, mappings):
|
|
3419
|
+
def _arrow972(value: YAMLElement, get: Any=get, key: Any=key, y_ele: Any=y_ele) -> str:
|
|
3420
|
+
return string(value)
|
|
3421
|
+
|
|
3422
|
+
return CWLParameterReference(key, resizearray(_arrow972, YAMLElement(2, s)))
|
|
3423
|
+
|
|
3424
|
+
else:
|
|
3425
|
+
def predicate_1(_arg_1: YAMLElement, get: Any=get, key: Any=key, y_ele: Any=y_ele) -> bool:
|
|
3426
|
+
(pattern_matching_result_2,) = (None,)
|
|
3427
|
+
if _arg_1.tag == 0:
|
|
3428
|
+
if _arg_1.fields[0].Value == "class":
|
|
3429
|
+
pattern_matching_result_2 = 0
|
|
3430
|
+
|
|
3431
|
+
else:
|
|
3432
|
+
pattern_matching_result_2 = 1
|
|
3433
|
+
|
|
3434
|
+
|
|
3435
|
+
else:
|
|
3436
|
+
pattern_matching_result_2 = 1
|
|
3437
|
+
|
|
3438
|
+
if pattern_matching_result_2 == 0:
|
|
3439
|
+
return True
|
|
3440
|
+
|
|
3441
|
+
elif pattern_matching_result_2 == 1:
|
|
3442
|
+
return False
|
|
3443
|
+
|
|
3444
|
+
|
|
3445
|
+
if exists(predicate_1, mappings):
|
|
3446
|
+
paths: Array[str] = []
|
|
3447
|
+
with get_enumerator(s) as enumerator:
|
|
3448
|
+
while enumerator.System_Collections_IEnumerator_MoveNext():
|
|
3449
|
+
item: YAMLElement = enumerator.System_Collections_Generic_IEnumerator_1_get_Current()
|
|
3450
|
+
if item.tag == 3:
|
|
3451
|
+
with get_enumerator(item.fields[0]) as enumerator_1:
|
|
3452
|
+
while enumerator_1.System_Collections_IEnumerator_MoveNext():
|
|
3453
|
+
mapping: YAMLElement = enumerator_1.System_Collections_Generic_IEnumerator_1_get_Current()
|
|
3454
|
+
(pattern_matching_result_3, k_3, v_2) = (None, None, None)
|
|
3455
|
+
if mapping.tag == 0:
|
|
3456
|
+
if mapping.fields[1].tag == 3:
|
|
3457
|
+
if not is_empty(mapping.fields[1].fields[0]):
|
|
3458
|
+
if head(mapping.fields[1].fields[0]).tag == 1:
|
|
3459
|
+
if is_empty(tail(mapping.fields[1].fields[0])):
|
|
3460
|
+
if mapping.fields[0].Value == "path":
|
|
3461
|
+
pattern_matching_result_3 = 0
|
|
3462
|
+
k_3 = mapping.fields[0]
|
|
3463
|
+
v_2 = head(mapping.fields[1].fields[0]).fields[0]
|
|
3464
|
+
|
|
3465
|
+
else:
|
|
3466
|
+
pattern_matching_result_3 = 1
|
|
3467
|
+
|
|
3468
|
+
|
|
3469
|
+
else:
|
|
3470
|
+
pattern_matching_result_3 = 1
|
|
3471
|
+
|
|
3472
|
+
|
|
3473
|
+
else:
|
|
3474
|
+
pattern_matching_result_3 = 1
|
|
3475
|
+
|
|
3476
|
+
|
|
3477
|
+
else:
|
|
3478
|
+
pattern_matching_result_3 = 1
|
|
3479
|
+
|
|
3480
|
+
|
|
3481
|
+
else:
|
|
3482
|
+
pattern_matching_result_3 = 1
|
|
3483
|
+
|
|
3484
|
+
|
|
3485
|
+
else:
|
|
3486
|
+
pattern_matching_result_3 = 1
|
|
3487
|
+
|
|
3488
|
+
if pattern_matching_result_3 == 0:
|
|
3489
|
+
(paths.append(v_2.Value))
|
|
3490
|
+
|
|
3491
|
+
|
|
3492
|
+
return CWLParameterReference(key, paths, CWLType(11, InputArraySchema(CWLType(0, FileInstance__ctor()), None, None, None)))
|
|
3493
|
+
|
|
3494
|
+
else:
|
|
3495
|
+
return CWLParameterReference(key, [])
|
|
3496
|
+
|
|
3497
|
+
|
|
3498
|
+
|
|
3499
|
+
elif pattern_matching_result_1 == 1:
|
|
3500
|
+
def _arrow973(value_1: YAMLElement, get: Any=get, key: Any=key, y_ele: Any=y_ele) -> str:
|
|
3501
|
+
return string(value_1)
|
|
3502
|
+
|
|
3503
|
+
return CWLParameterReference(key, resizearray(_arrow973, YAMLElement(2, s)))
|
|
3504
|
+
|
|
3505
|
+
|
|
3506
|
+
elif pattern_matching_result == 3:
|
|
3507
|
+
raise Exception(to_text(interpolate("Unexpected YAMLElement format in cwlParameterReferenceDecoder: %A%P()", [y_ele])))
|
|
3508
|
+
|
|
3509
|
+
|
|
3510
|
+
|
|
3511
|
+
def _arrow976(value: YAMLElement) -> Array[CWLParameterReference]:
|
|
3512
|
+
def getter(get: IGetters) -> Array[CWLParameterReference]:
|
|
3513
|
+
dict_1: Any = get.Overflow.FieldList(empty())
|
|
3514
|
+
def _arrow975(__unit: None=None, get: Any=get) -> IEnumerable_1[CWLParameterReference]:
|
|
3515
|
+
def _arrow974(ele: Any) -> CWLParameterReference:
|
|
3516
|
+
return DecodeParameters_cwlParameterReferenceDecoder(get, ele[0], ele[1])
|
|
3517
|
+
|
|
3518
|
+
return map_2(_arrow974, dict_1)
|
|
3519
|
+
|
|
3520
|
+
return list(to_array(delay(_arrow975)))
|
|
3521
|
+
|
|
3522
|
+
return object(getter, value)
|
|
3523
|
+
|
|
3524
|
+
|
|
3525
|
+
DecodeParameters_cwlparameterReferenceArrayDecoder: Callable[[YAMLElement], Array[CWLParameterReference]] = _arrow976
|
|
3526
|
+
|
|
3527
|
+
def DecodeParameters_decodeYAMLParameterFile(yaml: str) -> Array[CWLParameterReference]:
|
|
3528
|
+
return DecodeParameters_cwlparameterReferenceArrayDecoder(read(yaml))
|
|
3529
|
+
|
|
3530
|
+
|
|
3531
|
+
__all__ = ["ResizeArray_map", "Decode_normalizeYamlInput", "Decode_removeFullLineComments", "Decode_removeYamlComments", "Decode_isRecoverableDecodingError", "Decode_readSanitizedYaml", "Decode_overflowDecoder", "Decode_decodeSchemaSaladString", "Decode_decodeStringOrExpression", "Decode_outputBindingGlobDecoder", "Decode_outputBindingDecoder", "Decode_decodeStringArrayOrScalar", "Decode_outputSourceDecoder", "Decode_direntDecoder", "Decode_initialWorkDirEntryDecoder", "Decode_cwlSimpleTypeFromString", "Decode_parseArrayShorthand", "input_array_schema_decoder_0040261", "input_array_schema_decoder_0040261_002d1", "input_record_field_decoder_0040275", "input_record_field_decoder_0040275_002d1", "input_record_schema_decoder_0040314", "input_record_schema_decoder_0040314_002d1", "input_enum_schema_decoder_0040341", "input_enum_schema_decoder_0040341_002d1", "Decode_inputArraySchemaDecoder", "Decode_inputRecordFieldDecoder", "Decode_tryDecodeFieldsAsArray", "Decode_tryDecodeFieldsAsMap", "Decode_inputRecordSchemaDecoder", "Decode_inputEnumSchemaDecoder", "Decode_cwlTypeDecoder_0027", "Decode_cwlTypeStringMatcher", "Decode_cwlTypeDecoder", "Decode_outputArrayDecoder", "Decode_outputsDecoder", "Decode_dockerRequirementDecoder", "Decode_envVarRequirementDecoder", "Decode_softwareRequirementDecoder", "Decode_initialWorkDirRequirementDecoder", "Decode_loadListingRequirementDecoder", "Decode_decodeResourceScalar", "Decode_optionalResourceField", "Decode_resourceRequirementDecoder", "Decode_schemaDefRequirementTypeDecoder", "Decode_schemaDefRequirementDecoder", "Decode_tryDecodeBoolScalar", "Decode_workReuseRequirementDecoder", "Decode_networkAccessRequirementDecoder", "Decode_inplaceUpdateRequirementDecoder", "Decode_toolTimeLimitRequirementDecoder", "Decode_inlineJavascriptRequirementDecoder", "Decode_requirementFromTypeName", "Decode_requirementArrayDecoder", "Decode_tryDecodeKnownRequirementFromElement", "Decode_decodeHintElement", "Decode_hintArrayDecoder", "Decode_requirementsDecoder", "Decode_hintsDecoder", "Decode_inputBindingDecoder", "Decode_inputArrayDecoder", "Decode_inputsDecoder", "Decode_baseCommandDecoder", "Decode_versionDecoder", "Decode_classDecoder", "Decode_stringOptionFieldDecoder", "Decode_boolOptionFieldDecoder", "Decode_yamlElementOptionFieldDecoder", "Decode_stringFieldDecoder", "Decode_stringOrStringArrayDecoder", "Decode_sourceArrayFieldDecoder", "Decode_linkMergeFieldDecoder", "Decode_pickValueFieldDecoder", "Decode_scatterFieldDecoder", "Decode_scatterMethodFieldDecoder", "Decode_expressionStringOptionFieldDecoder", "Decode_decodeStepInputFromValue", "Decode_decodeStepInputsFromMap", "Decode_decodeStepInputFromArrayItem", "Decode_decodeStepInputsFromArray", "Decode_inputStepDecoder", "Decode_decodeStepOutputItem", "Decode_outputStepsDecoder", "Decode_docDecoder", "Decode_labelDecoder", "Decode_intentDecoder", "Decode_hasField", "Decode_withDefaultCwlVersion", "Decode_workflowStepRunDecoder", "Decode_decodeWorkflowStepFromValueWithId", "Decode_decodeWorkflowStepFromArrayItem", "Decode_stepArrayDecoderWithVersion", "Decode_stepsDecoderWithVersion", "Decode_commandLineToolDecoder", "Decode_expressionToolDecoder", "Decode_operationDecoder", "Decode_workflowDecoder", "Decode_decodeCWLProcessingUnitElement", "Decode_stepArrayDecoder", "Decode_stepsDecoder", "Decode_decodeCommandLineTool", "Decode_decodeWorkflow", "Decode_decodeExpressionTool", "Decode_decodeOperation", "Decode_decodeCWLProcessingUnit", "DecodeParameters_cwlParameterReferenceDecoder", "DecodeParameters_cwlparameterReferenceArrayDecoder", "DecodeParameters_decodeYAMLParameterFile"]
|
|
3532
|
+
|