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
|
@@ -0,0 +1,559 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from collections.abc import Callable
|
|
3
|
+
from typing import Any
|
|
4
|
+
from ..Core.comment import Comment
|
|
5
|
+
from ..Core.data import Data
|
|
6
|
+
from ..Core.data_context import (DataContext__get_Explication, DataContext__get_Unit, DataContext__get_ObjectType, DataContext__get_GeneratedBy, DataContext__get_Description, DataContext__get_Label, DataContext, DataContext__ctor_Z780A8A2A)
|
|
7
|
+
from ..Core.data_file import (DataFile__get_AsString, DataFile, DataFile_fromString_Z721C83C5)
|
|
8
|
+
from ..Core.Helper.collections_ import (Option_fromValueWithDefault, Option_fromSeq, ResizeArray_map)
|
|
9
|
+
from ..Core.Helper.regex import ActivePatterns__007CRegex_007C__007C
|
|
10
|
+
from ..Core.ontology_annotation import OntologyAnnotation
|
|
11
|
+
from ..Core.Table.composite_cell import CompositeCell
|
|
12
|
+
from ..Core.Table.composite_header import (CompositeHeader, IOType)
|
|
13
|
+
from ..Core.value import Value as Value_1
|
|
14
|
+
from ..FileSystem.file_system import FileSystem
|
|
15
|
+
from ..FileSystem.file_system_tree import FileSystemTree
|
|
16
|
+
from ..FileSystem.path import combine
|
|
17
|
+
from ..ROCrate.ldcontext import LDContext
|
|
18
|
+
from ..ROCrate.ldobject import (LDNode, LDRef, LDGraph)
|
|
19
|
+
from ..ROCrate.LDTypes.comment import LDComment
|
|
20
|
+
from ..ROCrate.LDTypes.dataset import LDDataset
|
|
21
|
+
from ..ROCrate.LDTypes.defined_term import LDDefinedTerm
|
|
22
|
+
from ..ROCrate.LDTypes.file import LDFile
|
|
23
|
+
from ..ROCrate.LDTypes.property_value import LDPropertyValue
|
|
24
|
+
from ..ROCrate.LDTypes.sample import LDSample
|
|
25
|
+
from ..fable_modules.fable_library.array_ import map as map_1
|
|
26
|
+
from ..fable_modules.fable_library.option import (map, default_arg, bind)
|
|
27
|
+
from ..fable_modules.fable_library.reflection import (TypeInfo, class_type)
|
|
28
|
+
from ..fable_modules.fable_library.reg_exp import (get_item, groups)
|
|
29
|
+
from ..fable_modules.fable_library.string_ import (to_fail, printf)
|
|
30
|
+
from ..fable_modules.fable_library.types import (Array, to_string)
|
|
31
|
+
|
|
32
|
+
def _expr4299() -> TypeInfo:
|
|
33
|
+
return class_type("ARCtrl.Conversion.BaseTypes", None, BaseTypes)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class BaseTypes:
|
|
37
|
+
...
|
|
38
|
+
|
|
39
|
+
BaseTypes_reflection = _expr4299
|
|
40
|
+
|
|
41
|
+
def BaseTypes_composeComment_Z13201A7E(comment: Comment) -> LDNode:
|
|
42
|
+
name: str
|
|
43
|
+
match_value: str | None = comment.Name
|
|
44
|
+
if match_value is None:
|
|
45
|
+
raise Exception("Comment must have a name")
|
|
46
|
+
|
|
47
|
+
else:
|
|
48
|
+
name = match_value
|
|
49
|
+
|
|
50
|
+
return LDComment.create(name, None, comment.Value)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def BaseTypes_decomposeComment_Z2F770004(comment: LDNode, context: LDContext | None=None) -> Comment:
|
|
54
|
+
return Comment(LDComment.get_name_as_string(comment, context), LDComment.try_get_text_as_string(comment, context))
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def BaseTypes_ontologyTermFromNameAndID_40457300(name: str | None=None, id: str | None=None) -> OntologyAnnotation:
|
|
58
|
+
if id is None:
|
|
59
|
+
return OntologyAnnotation.create(name)
|
|
60
|
+
|
|
61
|
+
else:
|
|
62
|
+
t: str = id
|
|
63
|
+
return OntologyAnnotation.from_term_annotation(t, name)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def BaseTypes_tryOntologyTermFromNameAndID_40457300(name: str | None=None, id: str | None=None) -> OntologyAnnotation | None:
|
|
68
|
+
if (id is None) if (name is None) else False:
|
|
69
|
+
return None
|
|
70
|
+
|
|
71
|
+
else:
|
|
72
|
+
return BaseTypes_ontologyTermFromNameAndID_40457300(name, id)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def BaseTypes_composeDefinedTerm_ZDED3A0F(term: OntologyAnnotation) -> LDNode:
|
|
77
|
+
tan: str | None = Option_fromValueWithDefault("", term.TermAccessionAndOntobeeUrlIfShort)
|
|
78
|
+
return LDDefinedTerm.create(term.NameText, None, tan)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def BaseTypes_decomposeDefinedTerm_Z2F770004(term: LDNode, context: LDContext | None=None) -> OntologyAnnotation:
|
|
82
|
+
return BaseTypes_ontologyTermFromNameAndID_40457300(LDDefinedTerm.get_name_as_string(term, context), LDDefinedTerm.try_get_term_code_as_string(term, context))
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def BaseTypes_composePropertyValueFromOA_ZDED3A0F(term: OntologyAnnotation) -> LDNode:
|
|
86
|
+
tan: str | None = Option_fromValueWithDefault("", term.TermAccessionAndOntobeeUrlIfShort)
|
|
87
|
+
return LDPropertyValue.create(term.NameText, None, None, tan)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def BaseTypes_decomposePropertyValueToOA_Z2F770004(term: LDNode, context: LDContext | None=None) -> OntologyAnnotation:
|
|
91
|
+
return BaseTypes_ontologyTermFromNameAndID_40457300(LDPropertyValue.get_name_as_string(term, context), LDPropertyValue.try_get_property_idas_string(term, context))
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
def BaseTypes_valuesOfCell_Z436420FE(value: CompositeCell) -> tuple[str | None, str | None, str | None, str | None]:
|
|
95
|
+
if value.tag == 0:
|
|
96
|
+
if value.fields[0].is_empty():
|
|
97
|
+
return (None, None, None, None)
|
|
98
|
+
|
|
99
|
+
elif value.fields[0].TANInfo is not None:
|
|
100
|
+
return (value.fields[0].Name, value.fields[0].TermAccessionAndOntobeeUrlIfShort, None, None)
|
|
101
|
+
|
|
102
|
+
else:
|
|
103
|
+
return (value.fields[0].Name, None, None, None)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
elif value.tag == 2:
|
|
107
|
+
pattern_input: tuple[str | None, str | None] = ((None, None)) if value.fields[1].is_empty() else ((value.fields[1].Name, Option_fromValueWithDefault("", value.fields[1].TermAccessionAndOntobeeUrlIfShort)))
|
|
108
|
+
return (Option_fromValueWithDefault("", value.fields[0]), None, pattern_input[0], pattern_input[1])
|
|
109
|
+
|
|
110
|
+
elif value.tag == 3:
|
|
111
|
+
raise Exception("Data cell should not be parsed to isa value")
|
|
112
|
+
|
|
113
|
+
elif value.fields[0] == "":
|
|
114
|
+
return (None, None, None, None)
|
|
115
|
+
|
|
116
|
+
else:
|
|
117
|
+
return (value.fields[0], None, None, None)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def BaseTypes_termOfHeader_6CAF647B(header: CompositeHeader) -> tuple[str, str | None]:
|
|
122
|
+
(pattern_matching_result, oa) = (None, None)
|
|
123
|
+
if header.tag == 0:
|
|
124
|
+
pattern_matching_result = 0
|
|
125
|
+
oa = header.fields[0]
|
|
126
|
+
|
|
127
|
+
elif header.tag == 3:
|
|
128
|
+
pattern_matching_result = 0
|
|
129
|
+
oa = header.fields[0]
|
|
130
|
+
|
|
131
|
+
elif header.tag == 2:
|
|
132
|
+
pattern_matching_result = 0
|
|
133
|
+
oa = header.fields[0]
|
|
134
|
+
|
|
135
|
+
elif header.tag == 1:
|
|
136
|
+
pattern_matching_result = 0
|
|
137
|
+
oa = header.fields[0]
|
|
138
|
+
|
|
139
|
+
else:
|
|
140
|
+
pattern_matching_result = 1
|
|
141
|
+
|
|
142
|
+
if pattern_matching_result == 0:
|
|
143
|
+
return (oa.NameText, oa.TermAccessionAndOntobeeUrlIfShort if (oa.TANInfo is not None) else None)
|
|
144
|
+
|
|
145
|
+
elif pattern_matching_result == 1:
|
|
146
|
+
return to_fail(printf("header %O should not be parsed to isa value"))(header)
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
def BaseTypes_composeComponent(header: CompositeHeader, value: CompositeCell) -> LDNode:
|
|
151
|
+
pattern_input: tuple[str | None, str | None, str | None, str | None] = BaseTypes_valuesOfCell_Z436420FE(value)
|
|
152
|
+
pattern_input_1: tuple[str, str | None] = BaseTypes_termOfHeader_6CAF647B(header)
|
|
153
|
+
return LDPropertyValue.create_component(pattern_input_1[0], pattern_input[0], None, pattern_input_1[1], pattern_input[3], pattern_input[2], pattern_input[1])
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
def BaseTypes_composeParameterValue(header: CompositeHeader, value: CompositeCell) -> LDNode:
|
|
157
|
+
pattern_input: tuple[str | None, str | None, str | None, str | None] = BaseTypes_valuesOfCell_Z436420FE(value)
|
|
158
|
+
pattern_input_1: tuple[str, str | None] = BaseTypes_termOfHeader_6CAF647B(header)
|
|
159
|
+
return LDPropertyValue.create_parameter_value(pattern_input_1[0], pattern_input[0], None, pattern_input_1[1], pattern_input[3], pattern_input[2], pattern_input[1])
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
def BaseTypes_composeFactorValue(header: CompositeHeader, value: CompositeCell) -> LDNode:
|
|
163
|
+
pattern_input: tuple[str | None, str | None, str | None, str | None] = BaseTypes_valuesOfCell_Z436420FE(value)
|
|
164
|
+
pattern_input_1: tuple[str, str | None] = BaseTypes_termOfHeader_6CAF647B(header)
|
|
165
|
+
return LDPropertyValue.create_factor_value(pattern_input_1[0], pattern_input[0], None, pattern_input_1[1], pattern_input[3], pattern_input[2], pattern_input[1])
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
def BaseTypes_composeCharacteristicValue(header: CompositeHeader, value: CompositeCell) -> LDNode:
|
|
169
|
+
pattern_input: tuple[str | None, str | None, str | None, str | None] = BaseTypes_valuesOfCell_Z436420FE(value)
|
|
170
|
+
pattern_input_1: tuple[str, str | None] = BaseTypes_termOfHeader_6CAF647B(header)
|
|
171
|
+
return LDPropertyValue.create_characteristic_value(pattern_input_1[0], pattern_input[0], None, pattern_input_1[1], pattern_input[3], pattern_input[2], pattern_input[1])
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
def BaseTypes_composeFreetextMaterialName(header_ft: str, name: str) -> str:
|
|
175
|
+
return ((("" + header_ft) + "=") + name) + ""
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
def BaseTypes_composeFile_6CE21C7D(d: Data, fs: FileSystem | None=None) -> LDNode:
|
|
179
|
+
def create_file(__unit: None=None, d: Any=d, fs: Any=fs) -> LDNode:
|
|
180
|
+
data_type: str | None = map(DataFile__get_AsString, d.DataType)
|
|
181
|
+
return LDFile.create(d.NameText, d.NameText, None, data_type, d.Format, d.SelectorFormat)
|
|
182
|
+
|
|
183
|
+
if fs is None:
|
|
184
|
+
return create_file(None)
|
|
185
|
+
|
|
186
|
+
else:
|
|
187
|
+
fs_1: FileSystem = fs
|
|
188
|
+
match_value: FileSystemTree | None = fs_1.Tree.TryGetPath(d.NameText)
|
|
189
|
+
if match_value is not None:
|
|
190
|
+
if match_value.tag == 1:
|
|
191
|
+
fs_2: FileSystemTree = match_value
|
|
192
|
+
file: LDNode = create_file(None)
|
|
193
|
+
file.SchemaType = [LDFile.schema_type(), LDDataset.schema_type()]
|
|
194
|
+
def mapping_1(fp: str, d: Any=d, fs: Any=fs) -> LDNode:
|
|
195
|
+
full_path: str = combine(d.NameText, fp)
|
|
196
|
+
return LDFile.create(full_path, full_path)
|
|
197
|
+
|
|
198
|
+
sub_files: Array[LDNode] = list(map_1(mapping_1, fs_2.ToFilePaths(True), None))
|
|
199
|
+
LDDataset.set_has_parts(file, sub_files)
|
|
200
|
+
return file
|
|
201
|
+
|
|
202
|
+
else:
|
|
203
|
+
return create_file(None)
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
else:
|
|
207
|
+
return create_file(None)
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
def BaseTypes_decomposeFile_Z2F770004(f: LDNode, context: LDContext | None=None) -> Data:
|
|
213
|
+
def mapping(dt: str, f: Any=f, context: Any=context) -> DataFile:
|
|
214
|
+
return DataFile_fromString_Z721C83C5(dt)
|
|
215
|
+
|
|
216
|
+
data_type: DataFile | None = map(mapping, LDFile.try_get_disambiguating_description_as_string(f, context))
|
|
217
|
+
format: str | None = LDFile.try_get_encoding_format_as_string(f, context)
|
|
218
|
+
selector_format: str | None = LDFile.try_get_usage_info_as_string(f, context)
|
|
219
|
+
return Data(None, LDFile.get_name_as_string(f, context), data_type, format, selector_format)
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
def BaseTypes_composeFragmentDescriptor_Z4C0BEF62(dc: DataContext) -> LDNode:
|
|
223
|
+
if dc.Name is None:
|
|
224
|
+
raise Exception("RO-Crate parsing of DataContext failed: Cannot create a fragment descriptor without a name.")
|
|
225
|
+
|
|
226
|
+
id: str = LDPropertyValue.gen_id_fragment_descriptor(dc.NameText)
|
|
227
|
+
def mapping(e: OntologyAnnotation, dc: Any=dc) -> tuple[str | None, str | None]:
|
|
228
|
+
return (e.Name, Option_fromValueWithDefault("", e.TermAccessionAndOntobeeUrlIfShort))
|
|
229
|
+
|
|
230
|
+
pattern_input: tuple[str | None, str | None] = default_arg(map(mapping, DataContext__get_Explication(dc)), (None, None))
|
|
231
|
+
def mapping_1(u: OntologyAnnotation, dc: Any=dc) -> tuple[str | None, str | None]:
|
|
232
|
+
return (u.Name, Option_fromValueWithDefault("", u.TermAccessionAndOntobeeUrlIfShort))
|
|
233
|
+
|
|
234
|
+
pattern_input_1: tuple[str | None, str | None] = default_arg(map(mapping_1, DataContext__get_Unit(dc)), (None, None))
|
|
235
|
+
def f(c: Comment, dc: Any=dc) -> str:
|
|
236
|
+
return to_string(c)
|
|
237
|
+
|
|
238
|
+
disambiguating_descriptions: Array[str] | None = Option_fromSeq(ResizeArray_map(f, dc.Comments))
|
|
239
|
+
data_fragment: LDNode = BaseTypes_composeFile_6CE21C7D(dc)
|
|
240
|
+
def mapping_2(term: OntologyAnnotation, dc: Any=dc) -> LDNode:
|
|
241
|
+
return BaseTypes_composeDefinedTerm_ZDED3A0F(term)
|
|
242
|
+
|
|
243
|
+
pattern: LDNode | None = map(mapping_2, DataContext__get_ObjectType(dc))
|
|
244
|
+
data_fragment.SetProperty(LDFile.about(), LDRef(id))
|
|
245
|
+
data_fragment.SetOptionalProperty(LDFile.pattern(), pattern)
|
|
246
|
+
return LDPropertyValue.create_fragment_descriptor(dc.NameText, pattern_input[0], None, pattern_input_1[1], pattern_input_1[0], pattern_input[1], DataContext__get_GeneratedBy(dc), DataContext__get_Description(dc), DataContext__get_Label(dc), disambiguating_descriptions, data_fragment)
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
def BaseTypes_decomposeFragmentDescriptor_Z6839B9E8(fd: LDNode, graph: LDGraph | None=None, context: LDContext | None=None) -> DataContext:
|
|
250
|
+
file: LDNode | None = LDPropertyValue.try_get_subject_of(fd, graph, context)
|
|
251
|
+
name: str
|
|
252
|
+
if file is None:
|
|
253
|
+
raise Exception("RO-Crate parsing of DataContext failed: Cannot decompose a fragment descriptor without a name.")
|
|
254
|
+
|
|
255
|
+
else:
|
|
256
|
+
f: LDNode = file
|
|
257
|
+
name = LDFile.get_name_as_string(f, context)
|
|
258
|
+
|
|
259
|
+
def mapping(pa: LDNode, fd: Any=fd, graph: Any=graph, context: Any=context) -> OntologyAnnotation:
|
|
260
|
+
return BaseTypes_decomposeDefinedTerm_Z2F770004(pa, context)
|
|
261
|
+
|
|
262
|
+
def binder(f_1: LDNode, fd: Any=fd, graph: Any=graph, context: Any=context) -> LDNode | None:
|
|
263
|
+
return LDFile.try_get_pattern_as_defined_term(f_1, graph, context)
|
|
264
|
+
|
|
265
|
+
object_type: OntologyAnnotation | None = map(mapping, bind(binder, file))
|
|
266
|
+
def binder_1(f_2: LDNode, fd: Any=fd, graph: Any=graph, context: Any=context) -> str | None:
|
|
267
|
+
return LDFile.try_get_encoding_format_as_string(f_2, context)
|
|
268
|
+
|
|
269
|
+
format: str | None = bind(binder_1, file)
|
|
270
|
+
def binder_2(f_3: LDNode, fd: Any=fd, graph: Any=graph, context: Any=context) -> str | None:
|
|
271
|
+
return LDFile.try_get_usage_info_as_string(f_3, context)
|
|
272
|
+
|
|
273
|
+
selector_format: str | None = bind(binder_2, file)
|
|
274
|
+
explication: OntologyAnnotation | None = BaseTypes_tryOntologyTermFromNameAndID_40457300(LDPropertyValue.try_get_value_as_string(fd), LDPropertyValue.try_get_value_reference_as_string(fd))
|
|
275
|
+
unit: OntologyAnnotation | None = BaseTypes_tryOntologyTermFromNameAndID_40457300(LDPropertyValue.try_get_unit_text_as_string(fd), LDPropertyValue.try_get_unit_code_as_string(fd))
|
|
276
|
+
generated_by: str | None = LDPropertyValue.try_get_measurement_method_as_string(fd)
|
|
277
|
+
description: str | None = LDPropertyValue.try_get_description_as_string(fd)
|
|
278
|
+
def f_4(s: str, fd: Any=fd, graph: Any=graph, context: Any=context) -> Comment:
|
|
279
|
+
return Comment.from_string(s)
|
|
280
|
+
|
|
281
|
+
return DataContext__ctor_Z780A8A2A(None, name, None, format, selector_format, explication, unit, object_type, LDPropertyValue.try_get_alternate_name_as_string(fd), description, generated_by, ResizeArray_map(f_4, LDPropertyValue.get_disambiguating_descriptions_as_string(fd)))
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
def BaseTypes_composeProcessInput(header: CompositeHeader, value: CompositeCell, fs: FileSystem | None=None) -> LDNode:
|
|
285
|
+
if header.tag == 11:
|
|
286
|
+
if header.fields[0].tag == 1:
|
|
287
|
+
return LDSample.create_sample(value.AsFreeText)
|
|
288
|
+
|
|
289
|
+
elif header.fields[0].tag == 3:
|
|
290
|
+
return LDSample.create_material(value.AsFreeText)
|
|
291
|
+
|
|
292
|
+
elif header.fields[0].tag == 2:
|
|
293
|
+
if value.tag == 1:
|
|
294
|
+
ft: str = value.fields[0]
|
|
295
|
+
return LDFile.create(ft, ft)
|
|
296
|
+
|
|
297
|
+
elif value.tag == 3:
|
|
298
|
+
return BaseTypes_composeFile_6CE21C7D(value.fields[0], fs)
|
|
299
|
+
|
|
300
|
+
else:
|
|
301
|
+
return to_fail(printf("Could not parse input data %O"))(value)
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
elif header.fields[0].tag == 4:
|
|
305
|
+
n: LDNode = LDNode(BaseTypes_composeFreetextMaterialName(header.fields[0].fields[0], value.AsFreeText), [header.fields[0].fields[0]])
|
|
306
|
+
n.SetProperty(LDSample.name(), value.AsFreeText)
|
|
307
|
+
return n
|
|
308
|
+
|
|
309
|
+
else:
|
|
310
|
+
return LDSample.create_source(value.AsFreeText)
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
else:
|
|
314
|
+
return to_fail(printf("Could not parse input header %O"))(header)
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
def BaseTypes_composeProcessOutput(header: CompositeHeader, value: CompositeCell, fs: FileSystem | None=None) -> LDNode:
|
|
319
|
+
(pattern_matching_result, ft_1) = (None, None)
|
|
320
|
+
if header.tag == 12:
|
|
321
|
+
if header.fields[0].tag == 1:
|
|
322
|
+
pattern_matching_result = 0
|
|
323
|
+
|
|
324
|
+
elif header.fields[0].tag == 3:
|
|
325
|
+
pattern_matching_result = 1
|
|
326
|
+
|
|
327
|
+
elif header.fields[0].tag == 2:
|
|
328
|
+
pattern_matching_result = 2
|
|
329
|
+
|
|
330
|
+
elif header.fields[0].tag == 4:
|
|
331
|
+
pattern_matching_result = 3
|
|
332
|
+
ft_1 = header.fields[0].fields[0]
|
|
333
|
+
|
|
334
|
+
else:
|
|
335
|
+
pattern_matching_result = 0
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
else:
|
|
339
|
+
pattern_matching_result = 4
|
|
340
|
+
|
|
341
|
+
if pattern_matching_result == 0:
|
|
342
|
+
return LDSample.create_sample(value.AsFreeText)
|
|
343
|
+
|
|
344
|
+
elif pattern_matching_result == 1:
|
|
345
|
+
return LDSample.create_material(value.AsFreeText)
|
|
346
|
+
|
|
347
|
+
elif pattern_matching_result == 2:
|
|
348
|
+
if value.tag == 1:
|
|
349
|
+
ft: str = value.fields[0]
|
|
350
|
+
return LDFile.create(ft, ft)
|
|
351
|
+
|
|
352
|
+
elif value.tag == 3:
|
|
353
|
+
return BaseTypes_composeFile_6CE21C7D(value.fields[0], fs)
|
|
354
|
+
|
|
355
|
+
else:
|
|
356
|
+
return to_fail(printf("Could not parse output data %O"))(value)
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
elif pattern_matching_result == 3:
|
|
360
|
+
n: LDNode = LDNode(BaseTypes_composeFreetextMaterialName(ft_1, value.AsFreeText), [ft_1])
|
|
361
|
+
n.SetProperty(LDSample.name(), value.AsFreeText)
|
|
362
|
+
return n
|
|
363
|
+
|
|
364
|
+
elif pattern_matching_result == 4:
|
|
365
|
+
return to_fail(printf("Could not parse output header %O"))(header)
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
def BaseTypes_headerOntologyOfPropertyValue_Z2F770004(pv: LDNode, context: LDContext | None=None) -> OntologyAnnotation:
|
|
370
|
+
n: str = LDPropertyValue.get_name_as_string(pv, context)
|
|
371
|
+
match_value: str | None = LDPropertyValue.try_get_property_idas_string(pv, context)
|
|
372
|
+
if match_value is None:
|
|
373
|
+
return OntologyAnnotation(n)
|
|
374
|
+
|
|
375
|
+
else:
|
|
376
|
+
n_ref: str = match_value
|
|
377
|
+
return OntologyAnnotation.from_term_annotation(n_ref, n)
|
|
378
|
+
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
def BaseTypes_cellOfPropertyValue_Z2F770004(pv: LDNode, context: LDContext | None=None) -> CompositeCell:
|
|
382
|
+
v: str | None = LDPropertyValue.try_get_value_as_string(pv, context)
|
|
383
|
+
v_ref: str | None = LDPropertyValue.try_get_value_reference_as_string(pv, context)
|
|
384
|
+
u: str | None = LDPropertyValue.try_get_unit_text_as_string(pv, context)
|
|
385
|
+
u_ref: str | None = LDPropertyValue.try_get_unit_code_as_string(pv, context)
|
|
386
|
+
(pattern_matching_result, vr, u_1, u_ref_1) = (None, None, None, None)
|
|
387
|
+
if v_ref is None:
|
|
388
|
+
if u is None:
|
|
389
|
+
if u_ref is None:
|
|
390
|
+
pattern_matching_result = 3
|
|
391
|
+
|
|
392
|
+
else:
|
|
393
|
+
pattern_matching_result = 2
|
|
394
|
+
u_ref_1 = u_ref
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
elif u_ref is not None:
|
|
398
|
+
pattern_matching_result = 2
|
|
399
|
+
u_ref_1 = u_ref
|
|
400
|
+
|
|
401
|
+
else:
|
|
402
|
+
pattern_matching_result = 1
|
|
403
|
+
u_1 = u
|
|
404
|
+
|
|
405
|
+
|
|
406
|
+
elif u is None:
|
|
407
|
+
if u_ref is None:
|
|
408
|
+
pattern_matching_result = 0
|
|
409
|
+
vr = v_ref
|
|
410
|
+
|
|
411
|
+
else:
|
|
412
|
+
pattern_matching_result = 4
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
else:
|
|
416
|
+
pattern_matching_result = 4
|
|
417
|
+
|
|
418
|
+
if pattern_matching_result == 0:
|
|
419
|
+
return CompositeCell(0, OntologyAnnotation.from_term_annotation(vr, v))
|
|
420
|
+
|
|
421
|
+
elif pattern_matching_result == 1:
|
|
422
|
+
return CompositeCell(2, default_arg(v, ""), OntologyAnnotation(u_1))
|
|
423
|
+
|
|
424
|
+
elif pattern_matching_result == 2:
|
|
425
|
+
return CompositeCell(2, default_arg(v, ""), OntologyAnnotation.from_term_annotation(u_ref_1, u))
|
|
426
|
+
|
|
427
|
+
elif pattern_matching_result == 3:
|
|
428
|
+
return CompositeCell(0, OntologyAnnotation(v))
|
|
429
|
+
|
|
430
|
+
elif pattern_matching_result == 4:
|
|
431
|
+
arg: str = default_arg(v, "")
|
|
432
|
+
return to_fail(printf("Could not parse value %s with unit %O and unit reference %O"))(arg)(u)(u_ref)
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
|
|
436
|
+
def BaseTypes_decomposePropertyValue_Z2F770004(pv: LDNode, context: LDContext | None=None) -> tuple[OntologyAnnotation, Value_1 | None, OntologyAnnotation | None]:
|
|
437
|
+
def _arrow4300(__unit: None=None, pv: Any=pv, context: Any=context) -> Value_1 | None:
|
|
438
|
+
v: str | None = LDPropertyValue.try_get_value_as_string(pv, context)
|
|
439
|
+
v_ref: str | None = LDPropertyValue.try_get_value_reference_as_string(pv, context)
|
|
440
|
+
if v_ref is None:
|
|
441
|
+
return None if (v is None) else Value_1(3, v)
|
|
442
|
+
|
|
443
|
+
else:
|
|
444
|
+
vr: str = v_ref
|
|
445
|
+
return Value_1(0, OntologyAnnotation.from_term_annotation(vr, v))
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
def _arrow4301(__unit: None=None, pv: Any=pv, context: Any=context) -> OntologyAnnotation | None:
|
|
449
|
+
u: str | None = LDPropertyValue.try_get_unit_text_as_string(pv, context)
|
|
450
|
+
u_ref: str | None = LDPropertyValue.try_get_unit_code_as_string(pv, context)
|
|
451
|
+
(pattern_matching_result, u_1, u_ref_1) = (None, None, None)
|
|
452
|
+
if u is None:
|
|
453
|
+
if u_ref is None:
|
|
454
|
+
pattern_matching_result = 2
|
|
455
|
+
|
|
456
|
+
else:
|
|
457
|
+
pattern_matching_result = 1
|
|
458
|
+
u_ref_1 = u_ref
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
elif u_ref is not None:
|
|
462
|
+
pattern_matching_result = 1
|
|
463
|
+
u_ref_1 = u_ref
|
|
464
|
+
|
|
465
|
+
else:
|
|
466
|
+
pattern_matching_result = 0
|
|
467
|
+
u_1 = u
|
|
468
|
+
|
|
469
|
+
if pattern_matching_result == 0:
|
|
470
|
+
return OntologyAnnotation(u_1)
|
|
471
|
+
|
|
472
|
+
elif pattern_matching_result == 1:
|
|
473
|
+
return OntologyAnnotation.from_term_annotation(u_ref_1, u)
|
|
474
|
+
|
|
475
|
+
elif pattern_matching_result == 2:
|
|
476
|
+
return None
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
return (BaseTypes_headerOntologyOfPropertyValue_Z2F770004(pv, context), _arrow4300(), _arrow4301())
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
def BaseTypes_decomposeComponent_Z2F770004(c: LDNode, context: LDContext | None=None) -> tuple[CompositeHeader, CompositeCell]:
|
|
483
|
+
return (CompositeHeader(0, BaseTypes_headerOntologyOfPropertyValue_Z2F770004(c, context)), BaseTypes_cellOfPropertyValue_Z2F770004(c, context))
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
def BaseTypes_decomposeParameterValue_Z2F770004(c: LDNode, context: LDContext | None=None) -> tuple[CompositeHeader, CompositeCell]:
|
|
487
|
+
return (CompositeHeader(3, BaseTypes_headerOntologyOfPropertyValue_Z2F770004(c, context)), BaseTypes_cellOfPropertyValue_Z2F770004(c, context))
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
def BaseTypes_decomposeFactorValue_Z2F770004(c: LDNode, context: LDContext | None=None) -> tuple[CompositeHeader, CompositeCell]:
|
|
491
|
+
return (CompositeHeader(2, BaseTypes_headerOntologyOfPropertyValue_Z2F770004(c, context)), BaseTypes_cellOfPropertyValue_Z2F770004(c, context))
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
def BaseTypes_decomposeCharacteristicValue_Z2F770004(c: LDNode, context: LDContext | None=None) -> tuple[CompositeHeader, CompositeCell]:
|
|
495
|
+
return (CompositeHeader(1, BaseTypes_headerOntologyOfPropertyValue_Z2F770004(c, context)), BaseTypes_cellOfPropertyValue_Z2F770004(c, context))
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
def BaseTypes_decomposeProcessInput_Z2F770004(pn: LDNode, context: LDContext | None=None) -> tuple[CompositeHeader, CompositeCell]:
|
|
499
|
+
if LDSample.validate_source(pn, context):
|
|
500
|
+
return (CompositeHeader(11, IOType(0)), CompositeCell(1, LDSample.get_name_as_string(pn, context)))
|
|
501
|
+
|
|
502
|
+
elif LDSample.validate_material(pn, context):
|
|
503
|
+
return (CompositeHeader(11, IOType(3)), CompositeCell(1, LDSample.get_name_as_string(pn, context)))
|
|
504
|
+
|
|
505
|
+
elif LDSample.validate(pn, context):
|
|
506
|
+
return (CompositeHeader(11, IOType(1)), CompositeCell(1, LDSample.get_name_as_string(pn, context)))
|
|
507
|
+
|
|
508
|
+
elif LDFile.validate(pn, context):
|
|
509
|
+
return (CompositeHeader(11, IOType(2)), CompositeCell(3, BaseTypes_decomposeFile_Z2F770004(pn, context)))
|
|
510
|
+
|
|
511
|
+
else:
|
|
512
|
+
n: LDNode = pn
|
|
513
|
+
return (CompositeHeader(11, IOType(4, n.SchemaType[0])), CompositeCell(1, LDSample.get_name_as_string(n, context)))
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
def BaseTypes_decomposeProcessOutput_Z2F770004(pn: LDNode, context: LDContext | None=None) -> tuple[CompositeHeader, CompositeCell]:
|
|
518
|
+
if LDSample.validate_material(pn, context):
|
|
519
|
+
return (CompositeHeader(12, IOType(3)), CompositeCell(1, LDSample.get_name_as_string(pn, context)))
|
|
520
|
+
|
|
521
|
+
elif LDSample.validate(pn, context):
|
|
522
|
+
return (CompositeHeader(12, IOType(1)), CompositeCell(1, LDSample.get_name_as_string(pn, context)))
|
|
523
|
+
|
|
524
|
+
elif LDFile.validate(pn, context):
|
|
525
|
+
return (CompositeHeader(12, IOType(2)), CompositeCell(3, BaseTypes_decomposeFile_Z2F770004(pn, context)))
|
|
526
|
+
|
|
527
|
+
else:
|
|
528
|
+
n: LDNode = pn
|
|
529
|
+
return (CompositeHeader(12, IOType(4, n.SchemaType[0])), CompositeCell(1, LDSample.get_name_as_string(n, context)))
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
def BaseTypes_composeTechnologyPlatform_ZDED3A0F(tp: OntologyAnnotation) -> str:
|
|
534
|
+
match_value: dict[str, Any] | None = tp.TANInfo
|
|
535
|
+
if match_value is None:
|
|
536
|
+
return ("" + tp.NameText) + ""
|
|
537
|
+
|
|
538
|
+
else:
|
|
539
|
+
return ((("" + tp.NameText) + " (") + tp.TermAccessionShort) + ")"
|
|
540
|
+
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
def BaseTypes_decomposeTechnologyPlatform_Z721C83C5(name: str) -> OntologyAnnotation:
|
|
544
|
+
active_pattern_result: Any | None = ActivePatterns__007CRegex_007C__007C("^(?<value>.+) \\((?<ontology>[^(]*:[^)]*)\\)$", name)
|
|
545
|
+
if active_pattern_result is not None:
|
|
546
|
+
r: Any = active_pattern_result
|
|
547
|
+
oa: OntologyAnnotation
|
|
548
|
+
tan: str = get_item(groups(r), "ontology") or ""
|
|
549
|
+
oa = OntologyAnnotation.from_term_annotation(tan)
|
|
550
|
+
v: str = get_item(groups(r), "value") or ""
|
|
551
|
+
return OntologyAnnotation.create(v, oa.TermSourceREF, oa.TermAccessionNumber)
|
|
552
|
+
|
|
553
|
+
else:
|
|
554
|
+
return OntologyAnnotation.create(name)
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
__all__ = ["BaseTypes_reflection", "BaseTypes_composeComment_Z13201A7E", "BaseTypes_decomposeComment_Z2F770004", "BaseTypes_ontologyTermFromNameAndID_40457300", "BaseTypes_tryOntologyTermFromNameAndID_40457300", "BaseTypes_composeDefinedTerm_ZDED3A0F", "BaseTypes_decomposeDefinedTerm_Z2F770004", "BaseTypes_composePropertyValueFromOA_ZDED3A0F", "BaseTypes_decomposePropertyValueToOA_Z2F770004", "BaseTypes_valuesOfCell_Z436420FE", "BaseTypes_termOfHeader_6CAF647B", "BaseTypes_composeComponent", "BaseTypes_composeParameterValue", "BaseTypes_composeFactorValue", "BaseTypes_composeCharacteristicValue", "BaseTypes_composeFreetextMaterialName", "BaseTypes_composeFile_6CE21C7D", "BaseTypes_decomposeFile_Z2F770004", "BaseTypes_composeFragmentDescriptor_Z4C0BEF62", "BaseTypes_decomposeFragmentDescriptor_Z6839B9E8", "BaseTypes_composeProcessInput", "BaseTypes_composeProcessOutput", "BaseTypes_headerOntologyOfPropertyValue_Z2F770004", "BaseTypes_cellOfPropertyValue_Z2F770004", "BaseTypes_decomposePropertyValue_Z2F770004", "BaseTypes_decomposeComponent_Z2F770004", "BaseTypes_decomposeParameterValue_Z2F770004", "BaseTypes_decomposeFactorValue_Z2F770004", "BaseTypes_decomposeCharacteristicValue_Z2F770004", "BaseTypes_decomposeProcessInput_Z2F770004", "BaseTypes_decomposeProcessOutput_Z2F770004", "BaseTypes_composeTechnologyPlatform_ZDED3A0F", "BaseTypes_decomposeTechnologyPlatform_Z721C83C5"]
|
|
559
|
+
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from typing import Any
|
|
3
|
+
from ..ROCrate.ldobject import LDNode
|
|
4
|
+
from ..fable_modules.fable_library.int32 import try_parse
|
|
5
|
+
from ..fable_modules.fable_library.option import value
|
|
6
|
+
from ..fable_modules.fable_library.types import FSharpRef
|
|
7
|
+
from ..fable_modules.fable_library.util import int32_to_string
|
|
8
|
+
|
|
9
|
+
def try_int(str_1: str) -> int | None:
|
|
10
|
+
match_value: tuple[bool, int]
|
|
11
|
+
out_arg: int = 0
|
|
12
|
+
def _arrow4296(__unit: None=None, str_1: Any=str_1) -> int:
|
|
13
|
+
return out_arg
|
|
14
|
+
|
|
15
|
+
def _arrow4297(v: int, str_1: Any=str_1) -> None:
|
|
16
|
+
nonlocal out_arg
|
|
17
|
+
out_arg = v or 0
|
|
18
|
+
|
|
19
|
+
match_value = (try_parse(str_1, 511, False, 32, FSharpRef(_arrow4296, _arrow4297)), out_arg)
|
|
20
|
+
if match_value[0]:
|
|
21
|
+
return match_value[1]
|
|
22
|
+
|
|
23
|
+
else:
|
|
24
|
+
return None
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
order_name: str = "columnIndex"
|
|
29
|
+
|
|
30
|
+
columnd_index_property: str = "https://w3id.org/ro/terms/arc#columnIndex"
|
|
31
|
+
|
|
32
|
+
def try_get_index(node: LDNode) -> int | None:
|
|
33
|
+
match_value: Any | None = node.TryGetPropertyAsSingleton(columnd_index_property)
|
|
34
|
+
(pattern_matching_result, ci) = (None, None)
|
|
35
|
+
if match_value is not None:
|
|
36
|
+
if str(type(value(match_value))) == "<class \'str\'>":
|
|
37
|
+
pattern_matching_result = 0
|
|
38
|
+
ci = value(match_value)
|
|
39
|
+
|
|
40
|
+
else:
|
|
41
|
+
pattern_matching_result = 1
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
else:
|
|
45
|
+
pattern_matching_result = 1
|
|
46
|
+
|
|
47
|
+
if pattern_matching_result == 0:
|
|
48
|
+
return try_int(ci)
|
|
49
|
+
|
|
50
|
+
elif pattern_matching_result == 1:
|
|
51
|
+
match_value_1: Any | None = node.TryGetPropertyAsSingleton(order_name)
|
|
52
|
+
(pattern_matching_result_1, ci_1) = (None, None)
|
|
53
|
+
if match_value_1 is not None:
|
|
54
|
+
if str(type(value(match_value_1))) == "<class \'str\'>":
|
|
55
|
+
pattern_matching_result_1 = 0
|
|
56
|
+
ci_1 = value(match_value_1)
|
|
57
|
+
|
|
58
|
+
else:
|
|
59
|
+
pattern_matching_result_1 = 1
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
else:
|
|
63
|
+
pattern_matching_result_1 = 1
|
|
64
|
+
|
|
65
|
+
if pattern_matching_result_1 == 0:
|
|
66
|
+
return try_int(ci_1)
|
|
67
|
+
|
|
68
|
+
elif pattern_matching_result_1 == 1:
|
|
69
|
+
return None
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
def set_index(node: LDNode, index: int) -> None:
|
|
75
|
+
node.SetProperty(columnd_index_property, int32_to_string(index))
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def ARCtrl_ROCrate_LDNode__LDNode_GetColumnIndex(this: LDNode) -> int:
|
|
79
|
+
return value(try_get_index(this))
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def ARCtrl_ROCrate_LDNode__LDNode_TryGetColumnIndex(this: LDNode) -> int | None:
|
|
83
|
+
return try_get_index(this)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def ARCtrl_ROCrate_LDNode__LDNode_SetColumnIndex_Z524259A4(this: LDNode, index: int) -> None:
|
|
87
|
+
set_index(this, index)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
__all__ = ["try_int", "order_name", "columnd_index_property", "try_get_index", "set_index", "ARCtrl_ROCrate_LDNode__LDNode_GetColumnIndex", "ARCtrl_ROCrate_LDNode__LDNode_TryGetColumnIndex", "ARCtrl_ROCrate_LDNode__LDNode_SetColumnIndex_Z524259A4"]
|
|
91
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from typing import Any
|
|
3
|
+
from ..Core.data_context import DataContext
|
|
4
|
+
from ..Core.datamap import Datamap
|
|
5
|
+
from ..Core.Helper.collections_ import ResizeArray_map
|
|
6
|
+
from ..ROCrate.ldcontext import LDContext
|
|
7
|
+
from ..ROCrate.ldobject import (LDNode, LDGraph)
|
|
8
|
+
from ..fable_modules.fable_library.reflection import (TypeInfo, class_type)
|
|
9
|
+
from ..fable_modules.fable_library.types import Array
|
|
10
|
+
from .basic import (BaseTypes_composeFragmentDescriptor_Z4C0BEF62, BaseTypes_decomposeFragmentDescriptor_Z6839B9E8)
|
|
11
|
+
|
|
12
|
+
def _expr4302() -> TypeInfo:
|
|
13
|
+
return class_type("ARCtrl.Conversion.DatamapConversion", None, DatamapConversion)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class DatamapConversion:
|
|
17
|
+
...
|
|
18
|
+
|
|
19
|
+
DatamapConversion_reflection = _expr4302
|
|
20
|
+
|
|
21
|
+
def DatamapConversion_composeFragmentDescriptors_Z892BFC3(datamap: Datamap) -> Array[LDNode]:
|
|
22
|
+
def f(dc: DataContext, datamap: Any=datamap) -> LDNode:
|
|
23
|
+
return BaseTypes_composeFragmentDescriptor_Z4C0BEF62(dc)
|
|
24
|
+
|
|
25
|
+
return ResizeArray_map(f, datamap.DataContexts)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def DatamapConversion_decomposeFragmentDescriptors_Z6E59645F(fragment_descriptors: Array[LDNode], graph: LDGraph | None=None, context: LDContext | None=None) -> Datamap:
|
|
29
|
+
def f(fd: LDNode, fragment_descriptors: Any=fragment_descriptors, graph: Any=graph, context: Any=context) -> DataContext:
|
|
30
|
+
return BaseTypes_decomposeFragmentDescriptor_Z6839B9E8(fd, graph, context)
|
|
31
|
+
|
|
32
|
+
return Datamap(ResizeArray_map(f, fragment_descriptors))
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
__all__ = ["DatamapConversion_reflection", "DatamapConversion_composeFragmentDescriptors_Z892BFC3", "DatamapConversion_decomposeFragmentDescriptors_Z6E59645F"]
|
|
36
|
+
|