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.
Files changed (511) hide show
  1. arctrl/__init__.py +23 -0
  2. arctrl/cwl.py +12 -0
  3. arctrl/py/CWL/__init__.py +0 -0
  4. arctrl/py/CWL/cwlprocessing_unit.py +221 -0
  5. arctrl/py/CWL/cwltypes.py +364 -0
  6. arctrl/py/CWL/decode.py +3532 -0
  7. arctrl/py/CWL/encode.py +1905 -0
  8. arctrl/py/CWL/expression_tool_description.py +192 -0
  9. arctrl/py/CWL/hash_helpers.py +60 -0
  10. arctrl/py/CWL/inputs.py +122 -0
  11. arctrl/py/CWL/operation_description.py +169 -0
  12. arctrl/py/CWL/outputs.py +171 -0
  13. arctrl/py/CWL/parameter_reference.py +74 -0
  14. arctrl/py/CWL/requirements.py +350 -0
  15. arctrl/py/CWL/tool_description.py +192 -0
  16. arctrl/py/CWL/workflow_description.py +181 -0
  17. arctrl/py/CWL/workflow_steps.py +354 -0
  18. arctrl/py/Contract/__init__.py +0 -0
  19. arctrl/py/Contract/arc.py +89 -0
  20. arctrl/py/Contract/arc_assay.py +125 -0
  21. arctrl/py/Contract/arc_investigation.py +88 -0
  22. arctrl/py/Contract/arc_run.py +291 -0
  23. arctrl/py/Contract/arc_study.py +126 -0
  24. arctrl/py/Contract/arc_workflow.py +213 -0
  25. arctrl/py/Contract/contract.py +153 -0
  26. arctrl/py/Contract/datamap.py +396 -0
  27. arctrl/py/Contract/git.py +116 -0
  28. arctrl/py/Contract/license.py +58 -0
  29. arctrl/py/Contract/validation_packages_config.py +107 -0
  30. arctrl/py/ContractIO/__init__.py +0 -0
  31. arctrl/py/ContractIO/contract_io.py +350 -0
  32. arctrl/py/ContractIO/file_system_helper.py +264 -0
  33. arctrl/py/Conversion/__init__.py +0 -0
  34. arctrl/py/Conversion/assay.py +151 -0
  35. arctrl/py/Conversion/basic.py +559 -0
  36. arctrl/py/Conversion/column_index.py +91 -0
  37. arctrl/py/Conversion/datamap.py +36 -0
  38. arctrl/py/Conversion/date_time.py +32 -0
  39. arctrl/py/Conversion/investigation.py +171 -0
  40. arctrl/py/Conversion/person.py +148 -0
  41. arctrl/py/Conversion/process.py +828 -0
  42. arctrl/py/Conversion/run.py +367 -0
  43. arctrl/py/Conversion/scholarly_article.py +163 -0
  44. arctrl/py/Conversion/study.py +99 -0
  45. arctrl/py/Conversion/table.py +229 -0
  46. arctrl/py/Conversion/workflow.py +680 -0
  47. arctrl/py/Core/Helper/__init__.py +0 -0
  48. arctrl/py/Core/Helper/collections_.py +512 -0
  49. arctrl/py/Core/Helper/date_time.py +26 -0
  50. arctrl/py/Core/Helper/hash_codes.py +60 -0
  51. arctrl/py/Core/Helper/identifier.py +290 -0
  52. arctrl/py/Core/Helper/orcid.py +42 -0
  53. arctrl/py/Core/Helper/printer.py +13 -0
  54. arctrl/py/Core/Helper/regex.py +554 -0
  55. arctrl/py/Core/Helper/sem_ver.py +71 -0
  56. arctrl/py/Core/Helper/url.py +148 -0
  57. arctrl/py/Core/Process/__init__.py +0 -0
  58. arctrl/py/Core/Process/column_index.py +280 -0
  59. arctrl/py/Core/Process/component.py +200 -0
  60. arctrl/py/Core/Process/factor.py +151 -0
  61. arctrl/py/Core/Process/factor_value.py +182 -0
  62. arctrl/py/Core/Process/material.py +74 -0
  63. arctrl/py/Core/Process/material_attribute.py +95 -0
  64. arctrl/py/Core/Process/material_attribute_value.py +184 -0
  65. arctrl/py/Core/Process/material_type.py +45 -0
  66. arctrl/py/Core/Process/process.py +477 -0
  67. arctrl/py/Core/Process/process_input.py +265 -0
  68. arctrl/py/Core/Process/process_output.py +235 -0
  69. arctrl/py/Core/Process/process_parameter_value.py +200 -0
  70. arctrl/py/Core/Process/process_sequence.py +435 -0
  71. arctrl/py/Core/Process/protocol.py +175 -0
  72. arctrl/py/Core/Process/protocol_parameter.py +98 -0
  73. arctrl/py/Core/Process/sample.py +82 -0
  74. arctrl/py/Core/Process/source.py +62 -0
  75. arctrl/py/Core/Table/__init__.py +0 -0
  76. arctrl/py/Core/Table/arc_table.py +1206 -0
  77. arctrl/py/Core/Table/arc_table_aux.py +1308 -0
  78. arctrl/py/Core/Table/arc_tables.py +574 -0
  79. arctrl/py/Core/Table/composite_cell.py +319 -0
  80. arctrl/py/Core/Table/composite_column.py +73 -0
  81. arctrl/py/Core/Table/composite_header.py +739 -0
  82. arctrl/py/Core/__init__.py +0 -0
  83. arctrl/py/Core/arc_types.py +5312 -0
  84. arctrl/py/Core/comment.py +128 -0
  85. arctrl/py/Core/comment_list.py +127 -0
  86. arctrl/py/Core/conversion.py +1375 -0
  87. arctrl/py/Core/data.py +247 -0
  88. arctrl/py/Core/data_context.py +157 -0
  89. arctrl/py/Core/data_file.py +112 -0
  90. arctrl/py/Core/datamap.py +217 -0
  91. arctrl/py/Core/identifier_setters.py +43 -0
  92. arctrl/py/Core/iproperty_value.py +36 -0
  93. arctrl/py/Core/ontology_annotation.py +298 -0
  94. arctrl/py/Core/ontology_source_reference.py +114 -0
  95. arctrl/py/Core/person.py +259 -0
  96. arctrl/py/Core/publication.py +161 -0
  97. arctrl/py/Core/template.py +231 -0
  98. arctrl/py/Core/templates.py +148 -0
  99. arctrl/py/Core/uri.py +11 -0
  100. arctrl/py/Core/value.py +188 -0
  101. arctrl/py/FileSystem/__init__.py +0 -0
  102. arctrl/py/FileSystem/commit.py +21 -0
  103. arctrl/py/FileSystem/default_gitattributes.py +1 -0
  104. arctrl/py/FileSystem/default_gitignore.py +1 -0
  105. arctrl/py/FileSystem/default_license.py +1 -0
  106. arctrl/py/FileSystem/file_system.py +58 -0
  107. arctrl/py/FileSystem/file_system_tree.py +483 -0
  108. arctrl/py/FileSystem/path.py +266 -0
  109. arctrl/py/Json/Datamap/__init__.py +0 -0
  110. arctrl/py/Json/Datamap/data_context.py +101 -0
  111. arctrl/py/Json/Datamap/datamap.py +53 -0
  112. arctrl/py/Json/Process/__init__.py +0 -0
  113. arctrl/py/Json/Process/assay_materials.py +46 -0
  114. arctrl/py/Json/Process/component.py +125 -0
  115. arctrl/py/Json/Process/factor.py +107 -0
  116. arctrl/py/Json/Process/factor_value.py +101 -0
  117. arctrl/py/Json/Process/material.py +226 -0
  118. arctrl/py/Json/Process/material_attribute.py +79 -0
  119. arctrl/py/Json/Process/material_attribute_value.py +101 -0
  120. arctrl/py/Json/Process/material_type.py +53 -0
  121. arctrl/py/Json/Process/process.py +296 -0
  122. arctrl/py/Json/Process/process_input.py +83 -0
  123. arctrl/py/Json/Process/process_output.py +67 -0
  124. arctrl/py/Json/Process/process_parameter_value.py +81 -0
  125. arctrl/py/Json/Process/protocol.py +354 -0
  126. arctrl/py/Json/Process/protocol_parameter.py +91 -0
  127. arctrl/py/Json/Process/sample.py +277 -0
  128. arctrl/py/Json/Process/source.py +214 -0
  129. arctrl/py/Json/Process/study_materials.py +52 -0
  130. arctrl/py/Json/Process/value.py +56 -0
  131. arctrl/py/Json/ROCrate/__init__.py +0 -0
  132. arctrl/py/Json/ROCrate/ldcontext.py +143 -0
  133. arctrl/py/Json/ROCrate/ldgraph.py +117 -0
  134. arctrl/py/Json/ROCrate/ldnode.py +304 -0
  135. arctrl/py/Json/ROCrate/ldref.py +44 -0
  136. arctrl/py/Json/ROCrate/ldvalue.py +102 -0
  137. arctrl/py/Json/Table/__init__.py +0 -0
  138. arctrl/py/Json/Table/arc_table.py +375 -0
  139. arctrl/py/Json/Table/cell_table.py +83 -0
  140. arctrl/py/Json/Table/composite_cell.py +136 -0
  141. arctrl/py/Json/Table/composite_header.py +67 -0
  142. arctrl/py/Json/Table/iotype.py +24 -0
  143. arctrl/py/Json/Table/oatable.py +82 -0
  144. arctrl/py/Json/Table/templates.py +281 -0
  145. arctrl/py/Json/__init__.py +0 -0
  146. arctrl/py/Json/assay.py +600 -0
  147. arctrl/py/Json/comment.py +206 -0
  148. arctrl/py/Json/context/rocrate/__init__.py +0 -0
  149. arctrl/py/Json/context/rocrate/isa_assay_context.py +101 -0
  150. arctrl/py/Json/context/rocrate/isa_comment_context.py +60 -0
  151. arctrl/py/Json/context/rocrate/isa_component_context.py +77 -0
  152. arctrl/py/Json/context/rocrate/isa_data_context.py +74 -0
  153. arctrl/py/Json/context/rocrate/isa_factor_context.py +74 -0
  154. arctrl/py/Json/context/rocrate/isa_factor_value_context.py +84 -0
  155. arctrl/py/Json/context/rocrate/isa_investigation_context.py +110 -0
  156. arctrl/py/Json/context/rocrate/isa_material_attribute_context.py +64 -0
  157. arctrl/py/Json/context/rocrate/isa_material_attribute_value_context.py +80 -0
  158. arctrl/py/Json/context/rocrate/isa_material_context.py +71 -0
  159. arctrl/py/Json/context/rocrate/isa_ontology_annotation_context.py +68 -0
  160. arctrl/py/Json/context/rocrate/isa_ontology_source_reference_context.py +75 -0
  161. arctrl/py/Json/context/rocrate/isa_organization_context.py +55 -0
  162. arctrl/py/Json/context/rocrate/isa_person_context.py +131 -0
  163. arctrl/py/Json/context/rocrate/isa_process_context.py +94 -0
  164. arctrl/py/Json/context/rocrate/isa_process_parameter_value_context.py +80 -0
  165. arctrl/py/Json/context/rocrate/isa_protocol_context.py +97 -0
  166. arctrl/py/Json/context/rocrate/isa_protocol_parameter_context.py +64 -0
  167. arctrl/py/Json/context/rocrate/isa_publication_context.py +78 -0
  168. arctrl/py/Json/context/rocrate/isa_sample_context.py +65 -0
  169. arctrl/py/Json/context/rocrate/isa_source_context.py +66 -0
  170. arctrl/py/Json/context/rocrate/isa_study_context.py +125 -0
  171. arctrl/py/Json/context/rocrate/property_value_context.py +73 -0
  172. arctrl/py/Json/context/rocrate/rocrate_context.py +81 -0
  173. arctrl/py/Json/converter_options.py +23 -0
  174. arctrl/py/Json/data.py +356 -0
  175. arctrl/py/Json/data_file.py +63 -0
  176. arctrl/py/Json/decode.py +271 -0
  177. arctrl/py/Json/encode.py +140 -0
  178. arctrl/py/Json/idtable.py +44 -0
  179. arctrl/py/Json/investigation.py +695 -0
  180. arctrl/py/Json/ontology_annotation.py +404 -0
  181. arctrl/py/Json/ontology_source_reference.py +255 -0
  182. arctrl/py/Json/person.py +658 -0
  183. arctrl/py/Json/property_value.py +359 -0
  184. arctrl/py/Json/publication.py +279 -0
  185. arctrl/py/Json/run.py +275 -0
  186. arctrl/py/Json/string_table.py +87 -0
  187. arctrl/py/Json/study.py +793 -0
  188. arctrl/py/Json/workflow.py +307 -0
  189. arctrl/py/JsonIO/Process/__init__.py +0 -0
  190. arctrl/py/JsonIO/Process/component.py +60 -0
  191. arctrl/py/JsonIO/Process/factor.py +36 -0
  192. arctrl/py/JsonIO/Process/factor_value.py +38 -0
  193. arctrl/py/JsonIO/Process/material.py +60 -0
  194. arctrl/py/JsonIO/Process/material_attribute.py +38 -0
  195. arctrl/py/JsonIO/Process/material_attribute_value.py +60 -0
  196. arctrl/py/JsonIO/Process/material_type.py +36 -0
  197. arctrl/py/JsonIO/Process/process.py +60 -0
  198. arctrl/py/JsonIO/Process/process_input.py +38 -0
  199. arctrl/py/JsonIO/Process/process_output.py +60 -0
  200. arctrl/py/JsonIO/Process/process_parameter_value.py +60 -0
  201. arctrl/py/JsonIO/Process/process_sequence.py +71 -0
  202. arctrl/py/JsonIO/Process/protocol.py +60 -0
  203. arctrl/py/JsonIO/Process/protocol_parameter.py +36 -0
  204. arctrl/py/JsonIO/Process/sample.py +60 -0
  205. arctrl/py/JsonIO/Process/source.py +60 -0
  206. arctrl/py/JsonIO/Process/study_materials.py +52 -0
  207. arctrl/py/JsonIO/Process/value.py +32 -0
  208. arctrl/py/JsonIO/Table/__init__.py +0 -0
  209. arctrl/py/JsonIO/Table/arc_table.py +103 -0
  210. arctrl/py/JsonIO/Table/composite_cell.py +36 -0
  211. arctrl/py/JsonIO/Table/composite_header.py +36 -0
  212. arctrl/py/JsonIO/Table/compression.py +67 -0
  213. arctrl/py/JsonIO/Table/iotype.py +36 -0
  214. arctrl/py/JsonIO/Table/templates.py +113 -0
  215. arctrl/py/JsonIO/__init__.py +0 -0
  216. arctrl/py/JsonIO/assay.py +113 -0
  217. arctrl/py/JsonIO/comment.py +80 -0
  218. arctrl/py/JsonIO/data.py +60 -0
  219. arctrl/py/JsonIO/data_file.py +58 -0
  220. arctrl/py/JsonIO/datamap.py +36 -0
  221. arctrl/py/JsonIO/decode.py +9 -0
  222. arctrl/py/JsonIO/encode.py +1 -0
  223. arctrl/py/JsonIO/investigation.py +91 -0
  224. arctrl/py/JsonIO/ldobject.py +106 -0
  225. arctrl/py/JsonIO/ontology_annotation.py +80 -0
  226. arctrl/py/JsonIO/ontology_source_reference.py +80 -0
  227. arctrl/py/JsonIO/person.py +82 -0
  228. arctrl/py/JsonIO/publication.py +82 -0
  229. arctrl/py/JsonIO/run.py +68 -0
  230. arctrl/py/JsonIO/study.py +114 -0
  231. arctrl/py/JsonIO/workflow.py +68 -0
  232. arctrl/py/ROCrate/ISAProfile/__init__.py +0 -0
  233. arctrl/py/ROCrate/ISAProfile/assay.py +70 -0
  234. arctrl/py/ROCrate/ISAProfile/data.py +65 -0
  235. arctrl/py/ROCrate/ISAProfile/dataset.py +24 -0
  236. arctrl/py/ROCrate/ISAProfile/investigation.py +73 -0
  237. arctrl/py/ROCrate/ISAProfile/lab_process.py +162 -0
  238. arctrl/py/ROCrate/ISAProfile/lab_protocol.py +37 -0
  239. arctrl/py/ROCrate/ISAProfile/person.py +72 -0
  240. arctrl/py/ROCrate/ISAProfile/property_value.py +98 -0
  241. arctrl/py/ROCrate/ISAProfile/sample.py +64 -0
  242. arctrl/py/ROCrate/ISAProfile/scholarly_article.py +98 -0
  243. arctrl/py/ROCrate/ISAProfile/study.py +74 -0
  244. arctrl/py/ROCrate/LDTypes/__init__.py +0 -0
  245. arctrl/py/ROCrate/LDTypes/comment.py +131 -0
  246. arctrl/py/ROCrate/LDTypes/computational_workflow.py +455 -0
  247. arctrl/py/ROCrate/LDTypes/computer_language.py +269 -0
  248. arctrl/py/ROCrate/LDTypes/create_action.py +303 -0
  249. arctrl/py/ROCrate/LDTypes/creative_work.py +566 -0
  250. arctrl/py/ROCrate/LDTypes/dataset.py +943 -0
  251. arctrl/py/ROCrate/LDTypes/defined_term.py +131 -0
  252. arctrl/py/ROCrate/LDTypes/file.py +281 -0
  253. arctrl/py/ROCrate/LDTypes/formal_parameter.py +431 -0
  254. arctrl/py/ROCrate/LDTypes/lab_process.py +352 -0
  255. arctrl/py/ROCrate/LDTypes/lab_protocol.py +395 -0
  256. arctrl/py/ROCrate/LDTypes/organization.py +83 -0
  257. arctrl/py/ROCrate/LDTypes/person.py +484 -0
  258. arctrl/py/ROCrate/LDTypes/postal_address.py +195 -0
  259. arctrl/py/ROCrate/LDTypes/property_value.py +952 -0
  260. arctrl/py/ROCrate/LDTypes/sample.py +202 -0
  261. arctrl/py/ROCrate/LDTypes/scholarly_article.py +229 -0
  262. arctrl/py/ROCrate/LDTypes/software_source_code.py +310 -0
  263. arctrl/py/ROCrate/LDTypes/workflow_invocation.py +48 -0
  264. arctrl/py/ROCrate/LDTypes/workflow_protocol.py +52 -0
  265. arctrl/py/ROCrate/__init__.py +0 -0
  266. arctrl/py/ROCrate/arc_rocrate_metadata.py +39 -0
  267. arctrl/py/ROCrate/dyn_obj_extensions.py +1 -0
  268. arctrl/py/ROCrate/helper.py +8 -0
  269. arctrl/py/ROCrate/ldcontext.py +406 -0
  270. arctrl/py/ROCrate/ldobject.py +1247 -0
  271. arctrl/py/ROCrate/rocrate_context.py +51 -0
  272. arctrl/py/Spreadsheet/AnnotationTable/__init__.py +0 -0
  273. arctrl/py/Spreadsheet/AnnotationTable/arc_table.py +203 -0
  274. arctrl/py/Spreadsheet/AnnotationTable/composite_cell.py +78 -0
  275. arctrl/py/Spreadsheet/AnnotationTable/composite_column.py +305 -0
  276. arctrl/py/Spreadsheet/AnnotationTable/composite_header.py +623 -0
  277. arctrl/py/Spreadsheet/DatamapTable/__init__.py +0 -0
  278. arctrl/py/Spreadsheet/DatamapTable/datamap_column.py +114 -0
  279. arctrl/py/Spreadsheet/DatamapTable/datamap_header.py +621 -0
  280. arctrl/py/Spreadsheet/DatamapTable/datamap_table.py +118 -0
  281. arctrl/py/Spreadsheet/Metadata/__init__.py +0 -0
  282. arctrl/py/Spreadsheet/Metadata/assays.py +125 -0
  283. arctrl/py/Spreadsheet/Metadata/comment.py +77 -0
  284. arctrl/py/Spreadsheet/Metadata/contacts.py +134 -0
  285. arctrl/py/Spreadsheet/Metadata/conversions.py +190 -0
  286. arctrl/py/Spreadsheet/Metadata/design_descriptors.py +34 -0
  287. arctrl/py/Spreadsheet/Metadata/factors.py +107 -0
  288. arctrl/py/Spreadsheet/Metadata/ontology_annotation.py +88 -0
  289. arctrl/py/Spreadsheet/Metadata/ontology_source_reference.py +96 -0
  290. arctrl/py/Spreadsheet/Metadata/protocols.py +146 -0
  291. arctrl/py/Spreadsheet/Metadata/publication.py +122 -0
  292. arctrl/py/Spreadsheet/Metadata/run.py +122 -0
  293. arctrl/py/Spreadsheet/Metadata/sparse_table.py +499 -0
  294. arctrl/py/Spreadsheet/Metadata/study.py +312 -0
  295. arctrl/py/Spreadsheet/Metadata/workflow.py +159 -0
  296. arctrl/py/Spreadsheet/__init__.py +0 -0
  297. arctrl/py/Spreadsheet/arc_assay.py +233 -0
  298. arctrl/py/Spreadsheet/arc_investigation.py +435 -0
  299. arctrl/py/Spreadsheet/arc_run.py +190 -0
  300. arctrl/py/Spreadsheet/arc_study.py +144 -0
  301. arctrl/py/Spreadsheet/arc_workflow.py +177 -0
  302. arctrl/py/Spreadsheet/assembly_info.py +1 -0
  303. arctrl/py/Spreadsheet/collection_aux.py +167 -0
  304. arctrl/py/Spreadsheet/datamap.py +43 -0
  305. arctrl/py/Spreadsheet/template.py +460 -0
  306. arctrl/py/ValidationPackages/__init__.py +0 -0
  307. arctrl/py/ValidationPackages/validation_package.py +82 -0
  308. arctrl/py/ValidationPackages/validation_packages_config.py +132 -0
  309. arctrl/py/WebRequest/__init__.py +0 -0
  310. arctrl/py/WebRequest/web_request.py +9 -0
  311. arctrl/py/WebRequest/web_request_py.py +135 -0
  312. arctrl/py/WorkflowGraph/__init__.py +0 -0
  313. arctrl/py/WorkflowGraph/adapters.py +141 -0
  314. arctrl/py/WorkflowGraph/build_options.py +45 -0
  315. arctrl/py/WorkflowGraph/builder.py +720 -0
  316. arctrl/py/WorkflowGraph/graph_types.py +260 -0
  317. arctrl/py/WorkflowGraph/query_helpers.py +76 -0
  318. arctrl/py/WorkflowGraph/reference_parsing.py +59 -0
  319. arctrl/py/WorkflowGraph/visualization_siren.py +574 -0
  320. arctrl/py/WorkflowGraph/workflow_graph.py +119 -0
  321. arctrl/py/Yaml/__init__.py +0 -0
  322. arctrl/py/Yaml/decode.py +1 -0
  323. arctrl/py/Yaml/encode.py +10 -0
  324. arctrl/py/Yaml/validation_package.py +77 -0
  325. arctrl/py/Yaml/validation_packages_config.py +86 -0
  326. arctrl/py/__init__.py +0 -0
  327. arctrl/py/arc.py +1891 -0
  328. arctrl/py/column_index.py +280 -0
  329. arctrl/py/conversion.py +142 -0
  330. arctrl/py/cross_async.py +76 -0
  331. arctrl/py/cwlrun_resolver.py +228 -0
  332. arctrl/py/fable_modules/dynamic_obj/__init__.py +0 -0
  333. arctrl/py/fable_modules/dynamic_obj/dyn_obj.py +136 -0
  334. arctrl/py/fable_modules/dynamic_obj/dynamic_obj.py +415 -0
  335. arctrl/py/fable_modules/dynamic_obj/fable_js.py +1 -0
  336. arctrl/py/fable_modules/dynamic_obj/fable_py.py +288 -0
  337. arctrl/py/fable_modules/dynamic_obj/hash_codes.py +82 -0
  338. arctrl/py/fable_modules/dynamic_obj/property_helper.py +25 -0
  339. arctrl/py/fable_modules/dynamic_obj/reflection_utils.py +87 -0
  340. arctrl/py/fable_modules/fable_library/__init__.py +0 -0
  341. arctrl/py/fable_modules/fable_library/array_.py +1528 -0
  342. arctrl/py/fable_modules/fable_library/async_.py +377 -0
  343. arctrl/py/fable_modules/fable_library/async_builder.py +379 -0
  344. arctrl/py/fable_modules/fable_library/big_int.py +330 -0
  345. arctrl/py/fable_modules/fable_library/bit_converter.py +131 -0
  346. arctrl/py/fable_modules/fable_library/boolean.py +26 -0
  347. arctrl/py/fable_modules/fable_library/char.py +237 -0
  348. arctrl/py/fable_modules/fable_library/choice.py +212 -0
  349. arctrl/py/fable_modules/fable_library/date.py +779 -0
  350. arctrl/py/fable_modules/fable_library/date_offset.py +79 -0
  351. arctrl/py/fable_modules/fable_library/decimal_.py +190 -0
  352. arctrl/py/fable_modules/fable_library/diagnostics.py +54 -0
  353. arctrl/py/fable_modules/fable_library/double.py +87 -0
  354. arctrl/py/fable_modules/fable_library/encoding.py +41 -0
  355. arctrl/py/fable_modules/fable_library/event.py +206 -0
  356. arctrl/py/fable_modules/fable_library/file.py +107 -0
  357. arctrl/py/fable_modules/fable_library/fsharp_collections.py +52 -0
  358. arctrl/py/fable_modules/fable_library/fsharp_core.py +123 -0
  359. arctrl/py/fable_modules/fable_library/global_.py +63 -0
  360. arctrl/py/fable_modules/fable_library/guid.py +41 -0
  361. arctrl/py/fable_modules/fable_library/int32.py +73 -0
  362. arctrl/py/fable_modules/fable_library/list.py +1788 -0
  363. arctrl/py/fable_modules/fable_library/long.py +240 -0
  364. arctrl/py/fable_modules/fable_library/mailbox_processor.py +179 -0
  365. arctrl/py/fable_modules/fable_library/map.py +1854 -0
  366. arctrl/py/fable_modules/fable_library/map_util.py +148 -0
  367. arctrl/py/fable_modules/fable_library/mutable_map.py +397 -0
  368. arctrl/py/fable_modules/fable_library/mutable_set.py +279 -0
  369. arctrl/py/fable_modules/fable_library/native.py +45 -0
  370. arctrl/py/fable_modules/fable_library/numeric.py +46 -0
  371. arctrl/py/fable_modules/fable_library/observable.py +222 -0
  372. arctrl/py/fable_modules/fable_library/option.py +128 -0
  373. arctrl/py/fable_modules/fable_library/path.py +62 -0
  374. arctrl/py/fable_modules/fable_library/range.py +117 -0
  375. arctrl/py/fable_modules/fable_library/reflection.py +463 -0
  376. arctrl/py/fable_modules/fable_library/reg_exp.py +137 -0
  377. arctrl/py/fable_modules/fable_library/resize_array.py +31 -0
  378. arctrl/py/fable_modules/fable_library/result.py +212 -0
  379. arctrl/py/fable_modules/fable_library/seq.py +1979 -0
  380. arctrl/py/fable_modules/fable_library/seq2.py +221 -0
  381. arctrl/py/fable_modules/fable_library/set.py +2414 -0
  382. arctrl/py/fable_modules/fable_library/singleton_local_time_zone.py +36 -0
  383. arctrl/py/fable_modules/fable_library/string_.py +573 -0
  384. arctrl/py/fable_modules/fable_library/system_collections_generic.py +462 -0
  385. arctrl/py/fable_modules/fable_library/system_text.py +237 -0
  386. arctrl/py/fable_modules/fable_library/task.py +116 -0
  387. arctrl/py/fable_modules/fable_library/task_builder.py +122 -0
  388. arctrl/py/fable_modules/fable_library/thread.py +5 -0
  389. arctrl/py/fable_modules/fable_library/time_span.py +283 -0
  390. arctrl/py/fable_modules/fable_library/timer.py +24 -0
  391. arctrl/py/fable_modules/fable_library/types.py +401 -0
  392. arctrl/py/fable_modules/fable_library/uri.py +109 -0
  393. arctrl/py/fable_modules/fable_library/util.py +2735 -0
  394. arctrl/py/fable_modules/fable_openpyxl/__init__.py +0 -0
  395. arctrl/py/fable_modules/fable_openpyxl/openpyxl.py +362 -0
  396. arctrl/py/fable_modules/fable_python/cognite-sdk/__init__.py +0 -0
  397. arctrl/py/fable_modules/fable_python/cognite-sdk/cognite_sdk.py +22 -0
  398. arctrl/py/fable_modules/fable_python/flask/__init__.py +0 -0
  399. arctrl/py/fable_modules/fable_python/flask/flask.py +34 -0
  400. arctrl/py/fable_modules/fable_python/jupyter/__init__.py +0 -0
  401. arctrl/py/fable_modules/fable_python/jupyter/ipy_widgets.py +47 -0
  402. arctrl/py/fable_modules/fable_python/jupyter/ipython.py +13 -0
  403. arctrl/py/fable_modules/fable_python/stdlib/__init__.py +0 -0
  404. arctrl/py/fable_modules/fable_python/stdlib/ast.py +1 -0
  405. arctrl/py/fable_modules/fable_python/stdlib/asyncio/__init__.py +0 -0
  406. arctrl/py/fable_modules/fable_python/stdlib/asyncio/events.py +17 -0
  407. arctrl/py/fable_modules/fable_python/stdlib/asyncio/futures.py +52 -0
  408. arctrl/py/fable_modules/fable_python/stdlib/asyncio/tasks.py +38 -0
  409. arctrl/py/fable_modules/fable_python/stdlib/base64_.py +1 -0
  410. arctrl/py/fable_modules/fable_python/stdlib/builtins_.py +38 -0
  411. arctrl/py/fable_modules/fable_python/stdlib/html.py +1 -0
  412. arctrl/py/fable_modules/fable_python/stdlib/json.py +1 -0
  413. arctrl/py/fable_modules/fable_python/stdlib/math_.py +1 -0
  414. arctrl/py/fable_modules/fable_python/stdlib/os_.py +1 -0
  415. arctrl/py/fable_modules/fable_python/stdlib/queue_.py +1 -0
  416. arctrl/py/fable_modules/fable_python/stdlib/string_.py +1 -0
  417. arctrl/py/fable_modules/fable_python/stdlib/sys_.py +30 -0
  418. arctrl/py/fable_modules/fable_python/stdlib/time_.py +1 -0
  419. arctrl/py/fable_modules/fable_python/stdlib/tk_inter.py +1 -0
  420. arctrl/py/fable_modules/fs_spreadsheet/Cells/__init__.py +0 -0
  421. arctrl/py/fable_modules/fs_spreadsheet/Cells/fs_cell.py +340 -0
  422. arctrl/py/fable_modules/fs_spreadsheet/Cells/fs_cells_collection.py +466 -0
  423. arctrl/py/fable_modules/fs_spreadsheet/DSL/__init__.py +0 -0
  424. arctrl/py/fable_modules/fs_spreadsheet/DSL/cell_builder.py +214 -0
  425. arctrl/py/fable_modules/fs_spreadsheet/DSL/column_builder.py +139 -0
  426. arctrl/py/fable_modules/fs_spreadsheet/DSL/dsl.py +50 -0
  427. arctrl/py/fable_modules/fs_spreadsheet/DSL/expression.py +65 -0
  428. arctrl/py/fable_modules/fs_spreadsheet/DSL/operators.py +9 -0
  429. arctrl/py/fable_modules/fs_spreadsheet/DSL/row_builder.py +139 -0
  430. arctrl/py/fable_modules/fs_spreadsheet/DSL/sheet_builder.py +118 -0
  431. arctrl/py/fable_modules/fs_spreadsheet/DSL/table_builder.py +122 -0
  432. arctrl/py/fable_modules/fs_spreadsheet/DSL/transform.py +463 -0
  433. arctrl/py/fable_modules/fs_spreadsheet/DSL/types.py +314 -0
  434. arctrl/py/fable_modules/fs_spreadsheet/DSL/workbook_builder.py +106 -0
  435. arctrl/py/fable_modules/fs_spreadsheet/Json/__init__.py +0 -0
  436. arctrl/py/fable_modules/fs_spreadsheet/Json/cell.py +103 -0
  437. arctrl/py/fable_modules/fs_spreadsheet/Json/column.py +70 -0
  438. arctrl/py/fable_modules/fs_spreadsheet/Json/row.py +70 -0
  439. arctrl/py/fable_modules/fs_spreadsheet/Json/table.py +54 -0
  440. arctrl/py/fable_modules/fs_spreadsheet/Json/value.py +93 -0
  441. arctrl/py/fable_modules/fs_spreadsheet/Json/workbook.py +71 -0
  442. arctrl/py/fable_modules/fs_spreadsheet/Json/worksheet.py +216 -0
  443. arctrl/py/fable_modules/fs_spreadsheet/Ranges/__init__.py +0 -0
  444. arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range.py +43 -0
  445. arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_address.py +190 -0
  446. arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_base.py +92 -0
  447. arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_column.py +77 -0
  448. arctrl/py/fable_modules/fs_spreadsheet/Ranges/fs_range_row.py +48 -0
  449. arctrl/py/fable_modules/fs_spreadsheet/Tables/__init__.py +0 -0
  450. arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table.py +461 -0
  451. arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table_field.py +117 -0
  452. arctrl/py/fable_modules/fs_spreadsheet/Tables/fs_table_row.py +23 -0
  453. arctrl/py/fable_modules/fs_spreadsheet/__init__.py +0 -0
  454. arctrl/py/fable_modules/fs_spreadsheet/fs_address.py +236 -0
  455. arctrl/py/fable_modules/fs_spreadsheet/fs_column.py +172 -0
  456. arctrl/py/fable_modules/fs_spreadsheet/fs_row.py +183 -0
  457. arctrl/py/fable_modules/fs_spreadsheet/fs_workbook.py +192 -0
  458. arctrl/py/fable_modules/fs_spreadsheet/fs_worksheet.py +610 -0
  459. arctrl/py/fable_modules/fs_spreadsheet/hash_codes.py +60 -0
  460. arctrl/py/fable_modules/fs_spreadsheet/sheet_builder.py +329 -0
  461. arctrl/py/fable_modules/fs_spreadsheet_py/__init__.py +0 -0
  462. arctrl/py/fable_modules/fs_spreadsheet_py/cell.py +60 -0
  463. arctrl/py/fable_modules/fs_spreadsheet_py/cell_type.py +50 -0
  464. arctrl/py/fable_modules/fs_spreadsheet_py/fs_extension.py +60 -0
  465. arctrl/py/fable_modules/fs_spreadsheet_py/json.py +47 -0
  466. arctrl/py/fable_modules/fs_spreadsheet_py/table.py +54 -0
  467. arctrl/py/fable_modules/fs_spreadsheet_py/workbook.py +41 -0
  468. arctrl/py/fable_modules/fs_spreadsheet_py/worksheet.py +52 -0
  469. arctrl/py/fable_modules/fs_spreadsheet_py/xlsx.py +37 -0
  470. arctrl/py/fable_modules/siren/__init__.py +0 -0
  471. arctrl/py/fable_modules/siren/config.py +1038 -0
  472. arctrl/py/fable_modules/siren/formatting.py +1121 -0
  473. arctrl/py/fable_modules/siren/siren.py +1941 -0
  474. arctrl/py/fable_modules/siren/siren_types.py +1229 -0
  475. arctrl/py/fable_modules/siren/theme_variables.py +517 -0
  476. arctrl/py/fable_modules/siren/util.py +37 -0
  477. arctrl/py/fable_modules/siren/yaml.py +101 -0
  478. arctrl/py/fable_modules/thoth_json_core/__init__.py +0 -0
  479. arctrl/py/fable_modules/thoth_json_core/decode.py +1614 -0
  480. arctrl/py/fable_modules/thoth_json_core/encode.py +305 -0
  481. arctrl/py/fable_modules/thoth_json_core/types.py +181 -0
  482. arctrl/py/fable_modules/thoth_json_python/__init__.py +0 -0
  483. arctrl/py/fable_modules/thoth_json_python/decode.py +112 -0
  484. arctrl/py/fable_modules/thoth_json_python/encode.py +72 -0
  485. arctrl/py/fable_modules/thoth_json_python/python.py +1 -0
  486. arctrl/py/fable_modules/yamlicious/Interop/__init__.py +0 -0
  487. arctrl/py/fable_modules/yamlicious/Interop/js_interop.py +1 -0
  488. arctrl/py/fable_modules/yamlicious/Interop/py_interop.py +7 -0
  489. arctrl/py/fable_modules/yamlicious/__init__.py +0 -0
  490. arctrl/py/fable_modules/yamlicious/decode.py +1784 -0
  491. arctrl/py/fable_modules/yamlicious/encode.py +84 -0
  492. arctrl/py/fable_modules/yamlicious/flow_to_block.py +994 -0
  493. arctrl/py/fable_modules/yamlicious/library.py +10 -0
  494. arctrl/py/fable_modules/yamlicious/persil.py +57 -0
  495. arctrl/py/fable_modules/yamlicious/preprocessing.py +99 -0
  496. arctrl/py/fable_modules/yamlicious/reader.py +739 -0
  497. arctrl/py/fable_modules/yamlicious/regex.py +29 -0
  498. arctrl/py/fable_modules/yamlicious/regex_active_patterns.py +265 -0
  499. arctrl/py/fable_modules/yamlicious/writer.py +175 -0
  500. arctrl/py/fable_modules/yamlicious/yamlicious_types.py +128 -0
  501. arctrl/py/json.py +389 -0
  502. arctrl/py/license.py +169 -0
  503. arctrl/py/rocrate_io.py +242 -0
  504. arctrl/py/template_web.py +23 -0
  505. arctrl/py/xlsx.py +212 -0
  506. arctrl/py/yaml.py +79 -0
  507. arctrl/rocrate.py +21 -0
  508. arctrl-3.0.0.dist-info/METADATA +157 -0
  509. arctrl-3.0.0.dist-info/RECORD +511 -0
  510. arctrl-3.0.0.dist-info/WHEEL +4 -0
  511. arctrl-3.0.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,1375 @@
1
+ from __future__ import annotations
2
+ from collections.abc import Callable
3
+ from typing import Any
4
+ from ..fable_modules.fable_library.list import (FSharpList, choose as choose_1, singleton, is_empty, of_array, length, empty, map as map_2, item, map_indexed, collect, try_pick as try_pick_1, head, sort_by, append as append_1, zip, initialize)
5
+ from ..fable_modules.fable_library.option import (default_arg, map, value as value_10)
6
+ from ..fable_modules.fable_library.range import range_big_int
7
+ from ..fable_modules.fable_library.reg_exp import (get_item, groups)
8
+ from ..fable_modules.fable_library.seq import (choose, try_pick, indexed, to_list, filter, map as map_1, delay, append, singleton as singleton_1, empty as empty_1, fold, zip as zip_1)
9
+ from ..fable_modules.fable_library.seq2 import (List_groupBy, List_distinct)
10
+ from ..fable_modules.fable_library.string_ import (to_text, printf, starts_with_exact, ends_with_exact, to_fail)
11
+ from ..fable_modules.fable_library.types import (Array, to_string)
12
+ from ..fable_modules.fable_library.util import (IEnumerable_1, int32_to_string, string_hash, equal_arrays, array_hash, compare_primitives, get_enumerator, ignore, equals, safe_hash)
13
+ from .comment import Comment
14
+ from .data import Data
15
+ from .data_file import DataFile
16
+ from .Helper.collections_ import (ResizeArray_filter, Option_fromValueWithDefault, ResizeArray_singleton)
17
+ from .Helper.hash_codes import (box_hash_option, box_hash_seq)
18
+ from .Helper.identifier import create_missing_identifier
19
+ from .Helper.regex import ActivePatterns__007CRegex_007C__007C
20
+ from .ontology_annotation import OntologyAnnotation
21
+ from .person import Person
22
+ from .Process.column_index import (ARCtrl_OntologyAnnotation__OntologyAnnotation_SetColumnIndex_Z524259A4, ARCtrl_OntologyAnnotation__OntologyAnnotation_setColumnIndex_Static, try_get_parameter_column_index, try_get_component_index, try_get_characteristic_column_index, try_get_factor_column_index, ARCtrl_Process_ProtocolParameter__ProtocolParameter_TryGetColumnIndex, ARCtrl_Process_Component__Component_TryGetColumnIndex)
23
+ from .Process.component import (Component_create_Z2F0B38C7, Component)
24
+ from .Process.factor import Factor
25
+ from .Process.factor_value import (FactorValue_create_30BDC49, FactorValue)
26
+ from .Process.material_attribute import (MaterialAttribute_create_A220A8A, MaterialAttribute)
27
+ from .Process.material_attribute_value import (MaterialAttributeValue_create_ZE1D108D, MaterialAttributeValue)
28
+ from .Process.process import (Process_composeName, Process_make, Process, Process_decomposeName_Z721C83C5, Process_create_Z7C1F7FA9)
29
+ from .Process.process_input import (ProcessInput_createSample_Z598187B7, ProcessInput_createMaterial_4452CB4C, ProcessInput_createRawData_Z721C83C5, ProcessInput_createSource_Z5E00540E, ProcessInput, ProcessInput__isSample, ProcessInput__isSource, ProcessInput__get_Name, ProcessInput_setCharacteristicValues, ProcessInput__isData, ProcessInput__isMaterial, ProcessInput_getCharacteristicValues_5B3D5BA9)
30
+ from .Process.process_output import (ProcessOutput_createSample_Z598187B7, ProcessOutput_createMaterial_4452CB4C, ProcessOutput_createRawData_Z721C83C5, ProcessOutput, ProcessOutput__isSample, ProcessOutput__get_Name, ProcessOutput_setFactorValues, ProcessOutput__isData, ProcessOutput__isMaterial, ProcessOutput_getFactorValues_Z42C11600)
31
+ from .Process.process_parameter_value import ProcessParameterValue
32
+ from .Process.protocol import (Protocol, Protocol_make, Protocol_setProtocolType, Protocol_setVersion, Protocol_setUri, Protocol_setDescription, Protocol_setName, Protocol_addParameter, Protocol_addComponent, Protocol_create_Z414665E7)
33
+ from .Process.protocol_parameter import ProtocolParameter
34
+ from .Process.sample import Sample_create_62424AD2
35
+ from .Process.source import Source_create_Z5CA08497
36
+ from .Table.arc_table import ArcTable
37
+ from .Table.arc_table_aux import (Unchecked_tryGetCellAt, get_empty_cell_for_header, Unchecked_alignByHeaders, ArcTableValues)
38
+ from .Table.arc_tables import ArcTables
39
+ from .Table.composite_cell import CompositeCell
40
+ from .Table.composite_header import (CompositeHeader, IOType)
41
+ from .value import Value as Value_2
42
+
43
+ Person_orcidKey: str = "ORCID"
44
+
45
+ Person_AssayIdentifierPrefix: str = "performer (ARC:00000168)"
46
+
47
+ def _arrow1329(__unit: None=None) -> Callable[[str], str]:
48
+ clo_1: Callable[[str], str] = to_text(printf("%s %s"))(Person_AssayIdentifierPrefix)
49
+ return clo_1
50
+
51
+
52
+ Person_createAssayIdentifierKey: Callable[[str], str] = _arrow1329()
53
+
54
+ def Person_setSourceAssayComment(person: Person, assay_identifier: str) -> Person:
55
+ person_1: Person = person.Copy()
56
+ comment: Comment = Comment(Person_createAssayIdentifierKey(assay_identifier), assay_identifier)
57
+ (person_1.Comments.append(comment))
58
+ return person_1
59
+
60
+
61
+ def Person_getSourceAssayIdentifiersFromComments(person: Person) -> IEnumerable_1[str]:
62
+ def chooser(c: Comment, person: Any=person) -> str | None:
63
+ def mapping(n: str, c: Any=c) -> bool:
64
+ return starts_with_exact(n, Person_AssayIdentifierPrefix)
65
+
66
+ if default_arg(map(mapping, c.Name), False):
67
+ return c.Value
68
+
69
+ else:
70
+ return None
71
+
72
+
73
+ return choose(chooser, person.Comments)
74
+
75
+
76
+ def Person_removeSourceAssayComments(person: Person) -> Array[Comment]:
77
+ def f(c: Comment, person: Any=person) -> bool:
78
+ if c.Name is not None:
79
+ return not starts_with_exact(value_10(c.Name), Person_AssayIdentifierPrefix)
80
+
81
+ else:
82
+ return False
83
+
84
+
85
+ return ResizeArray_filter(f, person.Comments)
86
+
87
+
88
+ def Person_setOrcidFromComments(person: Person) -> Person:
89
+ person_1: Person = person.Copy()
90
+ def is_orcid_comment(c: Comment, person: Any=person) -> bool:
91
+ if c.Name is not None:
92
+ return ends_with_exact(value_10(c.Name).upper(), Person_orcidKey)
93
+
94
+ else:
95
+ return False
96
+
97
+
98
+ def chooser(c_1: Comment, person: Any=person) -> str | None:
99
+ if is_orcid_comment(c_1):
100
+ return c_1.Value
101
+
102
+ else:
103
+ return None
104
+
105
+
106
+ def f(arg: Comment, person: Any=person) -> bool:
107
+ return not is_orcid_comment(arg)
108
+
109
+ pattern_input: tuple[str | None, Array[Comment]] = (try_pick(chooser, person_1.Comments), ResizeArray_filter(f, person_1.Comments))
110
+ person_1.ORCID = pattern_input[0]
111
+ person_1.Comments = pattern_input[1]
112
+ return person_1
113
+
114
+
115
+ def Person_setCommentFromORCID(person: Person) -> Person:
116
+ person_1: Person = person.Copy()
117
+ match_value: str | None = person_1.ORCID
118
+ if match_value is None:
119
+ pass
120
+
121
+ else:
122
+ orcid: str = match_value
123
+ comment: Comment = Comment.create(Person_orcidKey, orcid)
124
+ (person_1.Comments.append(comment))
125
+
126
+ return person_1
127
+
128
+
129
+ def JsonTypes_valueOfCell(value: CompositeCell) -> tuple[Value_2 | None, OntologyAnnotation | None]:
130
+ if value.tag == 0:
131
+ if value.fields[0].is_empty():
132
+ return (None, None)
133
+
134
+ else:
135
+ return (Value_2(0, value.fields[0]), None)
136
+
137
+
138
+ elif value.tag == 2:
139
+ return (None if (value.fields[0] == "") else Value_2.from_string(value.fields[0]), None if value.fields[1].is_empty() else value.fields[1])
140
+
141
+ elif value.tag == 3:
142
+ raise Exception("Data cell should not be parsed to isa value")
143
+
144
+ elif value.fields[0] == "":
145
+ return (None, None)
146
+
147
+ else:
148
+ return (Value_2.from_string(value.fields[0]), None)
149
+
150
+
151
+
152
+ def JsonTypes_composeComponent(header: CompositeHeader, value: CompositeCell) -> Component:
153
+ pattern_input: tuple[Value_2 | None, OntologyAnnotation | None] = JsonTypes_valueOfCell(value)
154
+ return Component_create_Z2F0B38C7(pattern_input[0], pattern_input[1], header.ToTerm())
155
+
156
+
157
+ def JsonTypes_composeParameterValue(header: CompositeHeader, value: CompositeCell) -> ProcessParameterValue:
158
+ pattern_input: tuple[Value_2 | None, OntologyAnnotation | None] = JsonTypes_valueOfCell(value)
159
+ p: ProtocolParameter = ProtocolParameter.create(None, header.ToTerm())
160
+ return ProcessParameterValue.create(p, pattern_input[0], pattern_input[1])
161
+
162
+
163
+ def JsonTypes_composeFactorValue(header: CompositeHeader, value: CompositeCell) -> FactorValue:
164
+ pattern_input: tuple[Value_2 | None, OntologyAnnotation | None] = JsonTypes_valueOfCell(value)
165
+ return FactorValue_create_30BDC49(None, Factor.create(to_string(header), header.ToTerm()), pattern_input[0], pattern_input[1])
166
+
167
+
168
+ def JsonTypes_composeCharacteristicValue(header: CompositeHeader, value: CompositeCell) -> MaterialAttributeValue:
169
+ pattern_input: tuple[Value_2 | None, OntologyAnnotation | None] = JsonTypes_valueOfCell(value)
170
+ return MaterialAttributeValue_create_ZE1D108D(None, MaterialAttribute_create_A220A8A(None, header.ToTerm()), pattern_input[0], pattern_input[1])
171
+
172
+
173
+ def JsonTypes_composeFreetextMaterialName(header_ft: str, name: str) -> str:
174
+ return ((("" + header_ft) + "=") + name) + ""
175
+
176
+
177
+ def JsonTypes_composeProcessInput(header: CompositeHeader, value: CompositeCell) -> ProcessInput:
178
+ if header.tag == 11:
179
+ if header.fields[0].tag == 1:
180
+ return ProcessInput_createSample_Z598187B7(to_string(value))
181
+
182
+ elif header.fields[0].tag == 3:
183
+ return ProcessInput_createMaterial_4452CB4C(to_string(value))
184
+
185
+ elif header.fields[0].tag == 2:
186
+ return ProcessInput_createRawData_Z721C83C5(to_string(value))
187
+
188
+ elif header.fields[0].tag == 4:
189
+ return ProcessInput_createMaterial_4452CB4C(JsonTypes_composeFreetextMaterialName(header.fields[0].fields[0], to_string(value)))
190
+
191
+ else:
192
+ return ProcessInput_createSource_Z5E00540E(to_string(value))
193
+
194
+
195
+ else:
196
+ return to_fail(printf("Could not parse input header %O"))(header)
197
+
198
+
199
+
200
+ def JsonTypes_composeProcessOutput(header: CompositeHeader, value: CompositeCell) -> ProcessOutput:
201
+ (pattern_matching_result, ft) = (None, None)
202
+ if header.tag == 12:
203
+ if header.fields[0].tag == 1:
204
+ pattern_matching_result = 0
205
+
206
+ elif header.fields[0].tag == 3:
207
+ pattern_matching_result = 1
208
+
209
+ elif header.fields[0].tag == 2:
210
+ pattern_matching_result = 2
211
+
212
+ elif header.fields[0].tag == 4:
213
+ pattern_matching_result = 3
214
+ ft = header.fields[0].fields[0]
215
+
216
+ else:
217
+ pattern_matching_result = 0
218
+
219
+
220
+ else:
221
+ pattern_matching_result = 4
222
+
223
+ if pattern_matching_result == 0:
224
+ return ProcessOutput_createSample_Z598187B7(to_string(value))
225
+
226
+ elif pattern_matching_result == 1:
227
+ return ProcessOutput_createMaterial_4452CB4C(to_string(value))
228
+
229
+ elif pattern_matching_result == 2:
230
+ return ProcessOutput_createRawData_Z721C83C5(to_string(value))
231
+
232
+ elif pattern_matching_result == 3:
233
+ return ProcessOutput_createMaterial_4452CB4C(JsonTypes_composeFreetextMaterialName(ft, to_string(value)))
234
+
235
+ elif pattern_matching_result == 4:
236
+ return to_fail(printf("Could not parse output header %O"))(header)
237
+
238
+
239
+
240
+ def JsonTypes_cellOfValue(value: Value_2 | None=None, unit: OntologyAnnotation | None=None) -> CompositeCell:
241
+ value_2: Value_2 = default_arg(value, Value_2(3, ""))
242
+ (pattern_matching_result, oa, text, name, u, f, u_1, f_1, i, u_2, i_1) = (None, None, None, None, None, None, None, None, None, None, None)
243
+ if value_2.tag == 3:
244
+ if value_2.fields[0] == "":
245
+ if unit is not None:
246
+ pattern_matching_result = 3
247
+ name = value_2.fields[0]
248
+ u = unit
249
+
250
+ else:
251
+ pattern_matching_result = 1
252
+
253
+
254
+ elif unit is not None:
255
+ pattern_matching_result = 3
256
+ name = value_2.fields[0]
257
+ u = unit
258
+
259
+ else:
260
+ pattern_matching_result = 2
261
+ text = value_2.fields[0]
262
+
263
+
264
+ elif value_2.tag == 2:
265
+ if unit is None:
266
+ pattern_matching_result = 5
267
+ f_1 = value_2.fields[0]
268
+
269
+ else:
270
+ pattern_matching_result = 4
271
+ f = value_2.fields[0]
272
+ u_1 = unit
273
+
274
+
275
+ elif value_2.tag == 1:
276
+ if unit is None:
277
+ pattern_matching_result = 7
278
+ i_1 = value_2.fields[0]
279
+
280
+ else:
281
+ pattern_matching_result = 6
282
+ i = value_2.fields[0]
283
+ u_2 = unit
284
+
285
+
286
+ elif unit is None:
287
+ pattern_matching_result = 0
288
+ oa = value_2.fields[0]
289
+
290
+ else:
291
+ pattern_matching_result = 8
292
+
293
+ if pattern_matching_result == 0:
294
+ return CompositeCell(0, oa)
295
+
296
+ elif pattern_matching_result == 1:
297
+ return CompositeCell(0, OntologyAnnotation())
298
+
299
+ elif pattern_matching_result == 2:
300
+ return CompositeCell(0, OntologyAnnotation(text))
301
+
302
+ elif pattern_matching_result == 3:
303
+ return CompositeCell(2, name, u)
304
+
305
+ elif pattern_matching_result == 4:
306
+ return CompositeCell(2, to_string(f), u_1)
307
+
308
+ elif pattern_matching_result == 5:
309
+ return CompositeCell(2, to_string(f_1), OntologyAnnotation())
310
+
311
+ elif pattern_matching_result == 6:
312
+ return CompositeCell(2, int32_to_string(i), u_2)
313
+
314
+ elif pattern_matching_result == 7:
315
+ return CompositeCell(2, int32_to_string(i_1), OntologyAnnotation())
316
+
317
+ elif pattern_matching_result == 8:
318
+ return to_fail(printf("Could not parse value %O with unit %O"))(value_2)(unit)
319
+
320
+
321
+
322
+ def JsonTypes_decomposeComponent(c: Component) -> tuple[CompositeHeader, CompositeCell]:
323
+ return (CompositeHeader(0, value_10(c.ComponentType)), JsonTypes_cellOfValue(c.ComponentValue, c.ComponentUnit))
324
+
325
+
326
+ def JsonTypes_decomposeParameterValue(ppv: ProcessParameterValue) -> tuple[CompositeHeader, CompositeCell]:
327
+ return (CompositeHeader(3, value_10(value_10(ppv.Category).ParameterName)), JsonTypes_cellOfValue(ppv.Value, ppv.Unit))
328
+
329
+
330
+ def JsonTypes_decomposeFactorValue(fv: FactorValue) -> tuple[CompositeHeader, CompositeCell]:
331
+ return (CompositeHeader(2, value_10(value_10(fv.Category).FactorType)), JsonTypes_cellOfValue(fv.Value, fv.Unit))
332
+
333
+
334
+ def JsonTypes_decomposeCharacteristicValue(cv: MaterialAttributeValue) -> tuple[CompositeHeader, CompositeCell]:
335
+ return (CompositeHeader(1, value_10(value_10(cv.Category).CharacteristicType)), JsonTypes_cellOfValue(cv.Value, cv.Unit))
336
+
337
+
338
+ def JsonTypes_decomposeProcessInput(pi: ProcessInput) -> tuple[CompositeHeader, CompositeCell]:
339
+ if pi.tag == 1:
340
+ return (CompositeHeader(11, IOType(1)), CompositeCell(1, default_arg(pi.fields[0].Name, "")))
341
+
342
+ elif pi.tag == 3:
343
+ return (CompositeHeader(11, IOType(3)), CompositeCell(1, default_arg(pi.fields[0].Name, "")))
344
+
345
+ elif pi.tag == 2:
346
+ d: Data = pi.fields[0]
347
+ data_type: DataFile = value_10(d.DataType)
348
+ if data_type.tag == 0:
349
+ return (CompositeHeader(11, IOType(2)), CompositeCell(1, default_arg(d.Name, "")))
350
+
351
+ elif data_type.tag == 1:
352
+ return (CompositeHeader(11, IOType(2)), CompositeCell(1, default_arg(d.Name, "")))
353
+
354
+ else:
355
+ return (CompositeHeader(11, IOType(2)), CompositeCell(1, default_arg(d.Name, "")))
356
+
357
+
358
+ else:
359
+ return (CompositeHeader(11, IOType(0)), CompositeCell(1, default_arg(pi.fields[0].Name, "")))
360
+
361
+
362
+
363
+ def JsonTypes_decomposeProcessOutput(po: ProcessOutput) -> tuple[CompositeHeader, CompositeCell]:
364
+ if po.tag == 2:
365
+ return (CompositeHeader(12, IOType(3)), CompositeCell(1, default_arg(po.fields[0].Name, "")))
366
+
367
+ elif po.tag == 1:
368
+ d: Data = po.fields[0]
369
+ data_type: DataFile = value_10(d.DataType)
370
+ if data_type.tag == 0:
371
+ return (CompositeHeader(12, IOType(2)), CompositeCell(1, default_arg(d.Name, "")))
372
+
373
+ elif data_type.tag == 1:
374
+ return (CompositeHeader(12, IOType(2)), CompositeCell(1, default_arg(d.Name, "")))
375
+
376
+ else:
377
+ return (CompositeHeader(12, IOType(2)), CompositeCell(1, default_arg(d.Name, "")))
378
+
379
+
380
+ else:
381
+ return (CompositeHeader(12, IOType(1)), CompositeCell(1, default_arg(po.fields[0].Name, "")))
382
+
383
+
384
+
385
+ def JsonTypes_composeTechnologyPlatform(tp: OntologyAnnotation) -> str:
386
+ match_value: dict[str, Any] | None = tp.TANInfo
387
+ if match_value is None:
388
+ return ("" + tp.NameText) + ""
389
+
390
+ else:
391
+ return ((("" + tp.NameText) + " (") + tp.TermAccessionShort) + ")"
392
+
393
+
394
+
395
+ def JsonTypes_decomposeTechnologyPlatform(name: str) -> OntologyAnnotation:
396
+ active_pattern_result: Any | None = ActivePatterns__007CRegex_007C__007C("^(?<value>.+) \\((?<ontology>[^(]*:[^)]*)\\)$", name)
397
+ if active_pattern_result is not None:
398
+ r: Any = active_pattern_result
399
+ oa: OntologyAnnotation
400
+ tan: str = get_item(groups(r), "ontology") or ""
401
+ oa = OntologyAnnotation.from_term_annotation(tan)
402
+ v: str = get_item(groups(r), "value") or ""
403
+ return OntologyAnnotation.create(v, oa.TermSourceREF, oa.TermAccessionNumber)
404
+
405
+ else:
406
+ return OntologyAnnotation.create(name)
407
+
408
+
409
+
410
+ def ProcessParsing_tryComponentGetter(general_i: int, value_i: int, value_header: CompositeHeader) -> Callable[[ArcTable, int], Component] | None:
411
+ if value_header.tag == 0:
412
+ new_oa: OntologyAnnotation = value_header.fields[0].Copy()
413
+ ARCtrl_OntologyAnnotation__OntologyAnnotation_SetColumnIndex_Z524259A4(new_oa, value_i)
414
+ cat: CompositeHeader = CompositeHeader(0, new_oa)
415
+ def Value(table: ArcTable, general_i: Any=general_i, value_i: Any=value_i, value_header: Any=value_header) -> Callable[[int], Component]:
416
+ def _arrow1340(i: int, table: Any=table) -> Component:
417
+ def _arrow1339(__unit: None=None) -> CompositeCell:
418
+ match_value: CompositeCell | None = Unchecked_tryGetCellAt(general_i, i, table.Values)
419
+ return get_empty_cell_for_header(cat, None) if (match_value is None) else match_value
420
+
421
+ return JsonTypes_composeComponent(cat, _arrow1339())
422
+
423
+ return _arrow1340
424
+
425
+ return Value
426
+
427
+ else:
428
+ return None
429
+
430
+
431
+
432
+ def ProcessParsing_tryParameterGetter(general_i: int, value_i: int, value_header: CompositeHeader) -> Callable[[ArcTable, int], ProcessParameterValue] | None:
433
+ if value_header.tag == 3:
434
+ cat: CompositeHeader = CompositeHeader(3, ARCtrl_OntologyAnnotation__OntologyAnnotation_setColumnIndex_Static(value_i, value_header.fields[0]))
435
+ def Value(table: ArcTable, general_i: Any=general_i, value_i: Any=value_i, value_header: Any=value_header) -> Callable[[int], ProcessParameterValue]:
436
+ def _arrow1342(i_1: int, table: Any=table) -> ProcessParameterValue:
437
+ def _arrow1341(__unit: None=None) -> CompositeCell:
438
+ match_value: CompositeCell | None = Unchecked_tryGetCellAt(general_i, i_1, table.Values)
439
+ return get_empty_cell_for_header(cat, None) if (match_value is None) else match_value
440
+
441
+ return JsonTypes_composeParameterValue(cat, _arrow1341())
442
+
443
+ return _arrow1342
444
+
445
+ return Value
446
+
447
+ else:
448
+ return None
449
+
450
+
451
+
452
+ def ProcessParsing_tryFactorGetter(general_i: int, value_i: int, value_header: CompositeHeader) -> Callable[[ArcTable, int], FactorValue] | None:
453
+ if value_header.tag == 2:
454
+ cat: CompositeHeader = CompositeHeader(2, ARCtrl_OntologyAnnotation__OntologyAnnotation_setColumnIndex_Static(value_i, value_header.fields[0]))
455
+ def Value(table: ArcTable, general_i: Any=general_i, value_i: Any=value_i, value_header: Any=value_header) -> Callable[[int], FactorValue]:
456
+ def _arrow1344(i_1: int, table: Any=table) -> FactorValue:
457
+ def _arrow1343(__unit: None=None) -> CompositeCell:
458
+ match_value: CompositeCell | None = Unchecked_tryGetCellAt(general_i, i_1, table.Values)
459
+ return get_empty_cell_for_header(cat, None) if (match_value is None) else match_value
460
+
461
+ return JsonTypes_composeFactorValue(cat, _arrow1343())
462
+
463
+ return _arrow1344
464
+
465
+ return Value
466
+
467
+ else:
468
+ return None
469
+
470
+
471
+
472
+ def ProcessParsing_tryCharacteristicGetter(general_i: int, value_i: int, value_header: CompositeHeader) -> Callable[[ArcTable, int], MaterialAttributeValue] | None:
473
+ if value_header.tag == 1:
474
+ cat: CompositeHeader = CompositeHeader(1, ARCtrl_OntologyAnnotation__OntologyAnnotation_setColumnIndex_Static(value_i, value_header.fields[0]))
475
+ def Value(table: ArcTable, general_i: Any=general_i, value_i: Any=value_i, value_header: Any=value_header) -> Callable[[int], MaterialAttributeValue]:
476
+ def _arrow1346(i_1: int, table: Any=table) -> MaterialAttributeValue:
477
+ def _arrow1345(__unit: None=None) -> CompositeCell:
478
+ match_value: CompositeCell | None = Unchecked_tryGetCellAt(general_i, i_1, table.Values)
479
+ return get_empty_cell_for_header(cat, None) if (match_value is None) else match_value
480
+
481
+ return JsonTypes_composeCharacteristicValue(cat, _arrow1345())
482
+
483
+ return _arrow1346
484
+
485
+ return Value
486
+
487
+ else:
488
+ return None
489
+
490
+
491
+
492
+ def ProcessParsing_tryGetProtocolTypeGetter(general_i: int, header: CompositeHeader) -> Callable[[ArcTable, int], OntologyAnnotation] | None:
493
+ if header.tag == 4:
494
+ def Value(table: ArcTable, general_i: Any=general_i, header: Any=header) -> Callable[[int], OntologyAnnotation]:
495
+ def _arrow1347(i: int, table: Any=table) -> OntologyAnnotation:
496
+ match_value: CompositeCell | None = Unchecked_tryGetCellAt(general_i, i, table.Values)
497
+ if match_value is None:
498
+ return OntologyAnnotation()
499
+
500
+ else:
501
+ cell: CompositeCell = match_value
502
+ return cell.AsTerm
503
+
504
+
505
+ return _arrow1347
506
+
507
+ return Value
508
+
509
+ else:
510
+ return None
511
+
512
+
513
+
514
+ def ProcessParsing_tryGetProtocolREFGetter(general_i: int, header: CompositeHeader) -> Callable[[ArcTable, int], str] | None:
515
+ if header.tag == 8:
516
+ def Value(table: ArcTable, general_i: Any=general_i, header: Any=header) -> Callable[[int], str]:
517
+ def _arrow1348(i: int, table: Any=table) -> str:
518
+ match_value: CompositeCell | None = Unchecked_tryGetCellAt(general_i, i, table.Values)
519
+ if match_value is None:
520
+ return ""
521
+
522
+ else:
523
+ cell: CompositeCell = match_value
524
+ return cell.AsFreeText
525
+
526
+
527
+ return _arrow1348
528
+
529
+ return Value
530
+
531
+ else:
532
+ return None
533
+
534
+
535
+
536
+ def ProcessParsing_tryGetProtocolDescriptionGetter(general_i: int, header: CompositeHeader) -> Callable[[ArcTable, int], str] | None:
537
+ if header.tag == 5:
538
+ def Value(table: ArcTable, general_i: Any=general_i, header: Any=header) -> Callable[[int], str]:
539
+ def _arrow1349(i: int, table: Any=table) -> str:
540
+ match_value: CompositeCell | None = Unchecked_tryGetCellAt(general_i, i, table.Values)
541
+ if match_value is None:
542
+ return ""
543
+
544
+ else:
545
+ cell: CompositeCell = match_value
546
+ return cell.AsFreeText
547
+
548
+
549
+ return _arrow1349
550
+
551
+ return Value
552
+
553
+ else:
554
+ return None
555
+
556
+
557
+
558
+ def ProcessParsing_tryGetProtocolURIGetter(general_i: int, header: CompositeHeader) -> Callable[[ArcTable, int], str] | None:
559
+ if header.tag == 6:
560
+ def Value(table: ArcTable, general_i: Any=general_i, header: Any=header) -> Callable[[int], str]:
561
+ def _arrow1350(i: int, table: Any=table) -> str:
562
+ match_value: CompositeCell | None = Unchecked_tryGetCellAt(general_i, i, table.Values)
563
+ if match_value is None:
564
+ return ""
565
+
566
+ else:
567
+ cell: CompositeCell = match_value
568
+ return cell.AsFreeText
569
+
570
+
571
+ return _arrow1350
572
+
573
+ return Value
574
+
575
+ else:
576
+ return None
577
+
578
+
579
+
580
+ def ProcessParsing_tryGetProtocolVersionGetter(general_i: int, header: CompositeHeader) -> Callable[[ArcTable, int], str] | None:
581
+ if header.tag == 7:
582
+ def Value(table: ArcTable, general_i: Any=general_i, header: Any=header) -> Callable[[int], str]:
583
+ def _arrow1351(i: int, table: Any=table) -> str:
584
+ match_value: CompositeCell | None = Unchecked_tryGetCellAt(general_i, i, table.Values)
585
+ if match_value is None:
586
+ return ""
587
+
588
+ else:
589
+ cell: CompositeCell = match_value
590
+ return cell.AsFreeText
591
+
592
+
593
+ return _arrow1351
594
+
595
+ return Value
596
+
597
+ else:
598
+ return None
599
+
600
+
601
+
602
+ def ProcessParsing_tryGetInputGetter(general_i: int, header: CompositeHeader) -> Callable[[ArcTable, int], ProcessInput] | None:
603
+ if header.tag == 11:
604
+ def Value(table: ArcTable, general_i: Any=general_i, header: Any=header) -> Callable[[int], ProcessInput]:
605
+ def _arrow1353(i: int, table: Any=table) -> ProcessInput:
606
+ def _arrow1352(__unit: None=None) -> CompositeCell:
607
+ match_value: CompositeCell | None = Unchecked_tryGetCellAt(general_i, i, table.Values)
608
+ return get_empty_cell_for_header(header, None) if (match_value is None) else match_value
609
+
610
+ return JsonTypes_composeProcessInput(header, _arrow1352())
611
+
612
+ return _arrow1353
613
+
614
+ return Value
615
+
616
+ else:
617
+ return None
618
+
619
+
620
+
621
+ def ProcessParsing_tryGetOutputGetter(general_i: int, header: CompositeHeader) -> Callable[[ArcTable, int], ProcessOutput] | None:
622
+ if header.tag == 12:
623
+ def Value(table: ArcTable, general_i: Any=general_i, header: Any=header) -> Callable[[int], ProcessOutput]:
624
+ def _arrow1355(i: int, table: Any=table) -> ProcessOutput:
625
+ def _arrow1354(__unit: None=None) -> CompositeCell:
626
+ match_value: CompositeCell | None = Unchecked_tryGetCellAt(general_i, i, table.Values)
627
+ return get_empty_cell_for_header(header, None) if (match_value is None) else match_value
628
+
629
+ return JsonTypes_composeProcessOutput(header, _arrow1354())
630
+
631
+ return _arrow1355
632
+
633
+ return Value
634
+
635
+ else:
636
+ return None
637
+
638
+
639
+
640
+ def ProcessParsing_tryGetCommentGetter(general_i: int, header: CompositeHeader) -> Callable[[ArcTable, int], Comment] | None:
641
+ if header.tag == 14:
642
+ c: str = header.fields[0]
643
+ def Value(table: ArcTable, general_i: Any=general_i, header: Any=header) -> Callable[[int], Comment]:
644
+ def _arrow1356(i: int, table: Any=table) -> Comment:
645
+ match_value: CompositeCell | None = Unchecked_tryGetCellAt(general_i, i, table.Values)
646
+ if match_value is None:
647
+ return Comment(c)
648
+
649
+ else:
650
+ cell: CompositeCell = match_value
651
+ return Comment(c, cell.AsFreeText)
652
+
653
+
654
+ return _arrow1356
655
+
656
+ return Value
657
+
658
+ else:
659
+ return None
660
+
661
+
662
+
663
+ def ProcessParsing_getProcessGetter(process_name_root: str, headers: IEnumerable_1[CompositeHeader]) -> Callable[[ArcTable, int], Process]:
664
+ headers_1: IEnumerable_1[tuple[int, CompositeHeader]] = indexed(headers)
665
+ def predicate(arg: tuple[int, CompositeHeader], process_name_root: Any=process_name_root, headers: Any=headers) -> bool:
666
+ return arg[1].IsCvParamColumn
667
+
668
+ value_headers: FSharpList[tuple[int, tuple[int, CompositeHeader]]] = to_list(indexed(filter(predicate, headers_1)))
669
+ def chooser(tupled_arg: tuple[int, tuple[int, CompositeHeader]], process_name_root: Any=process_name_root, headers: Any=headers) -> Callable[[ArcTable, int], MaterialAttributeValue] | None:
670
+ _arg: tuple[int, CompositeHeader] = tupled_arg[1]
671
+ return ProcessParsing_tryCharacteristicGetter(_arg[0], tupled_arg[0], _arg[1])
672
+
673
+ char_getters: FSharpList[Callable[[ArcTable, int], MaterialAttributeValue]] = choose_1(chooser, value_headers)
674
+ def chooser_1(tupled_arg_1: tuple[int, tuple[int, CompositeHeader]], process_name_root: Any=process_name_root, headers: Any=headers) -> Callable[[ArcTable, int], FactorValue] | None:
675
+ _arg_1: tuple[int, CompositeHeader] = tupled_arg_1[1]
676
+ return ProcessParsing_tryFactorGetter(_arg_1[0], tupled_arg_1[0], _arg_1[1])
677
+
678
+ factor_value_getters: FSharpList[Callable[[ArcTable, int], FactorValue]] = choose_1(chooser_1, value_headers)
679
+ def chooser_2(tupled_arg_2: tuple[int, tuple[int, CompositeHeader]], process_name_root: Any=process_name_root, headers: Any=headers) -> Callable[[ArcTable, int], ProcessParameterValue] | None:
680
+ _arg_2: tuple[int, CompositeHeader] = tupled_arg_2[1]
681
+ return ProcessParsing_tryParameterGetter(_arg_2[0], tupled_arg_2[0], _arg_2[1])
682
+
683
+ parameter_value_getters: FSharpList[Callable[[ArcTable, int], ProcessParameterValue]] = choose_1(chooser_2, value_headers)
684
+ def chooser_3(tupled_arg_3: tuple[int, tuple[int, CompositeHeader]], process_name_root: Any=process_name_root, headers: Any=headers) -> Callable[[ArcTable, int], Component] | None:
685
+ _arg_3: tuple[int, CompositeHeader] = tupled_arg_3[1]
686
+ return ProcessParsing_tryComponentGetter(_arg_3[0], tupled_arg_3[0], _arg_3[1])
687
+
688
+ component_getters: FSharpList[Callable[[ArcTable, int], Component]] = choose_1(chooser_3, value_headers)
689
+ def chooser_4(tupled_arg_4: tuple[int, CompositeHeader], process_name_root: Any=process_name_root, headers: Any=headers) -> Callable[[ArcTable, int], OntologyAnnotation] | None:
690
+ return ProcessParsing_tryGetProtocolTypeGetter(tupled_arg_4[0], tupled_arg_4[1])
691
+
692
+ protocol_type_getter: Callable[[ArcTable, int], OntologyAnnotation] | None = try_pick(chooser_4, headers_1)
693
+ def chooser_5(tupled_arg_5: tuple[int, CompositeHeader], process_name_root: Any=process_name_root, headers: Any=headers) -> Callable[[ArcTable, int], str] | None:
694
+ return ProcessParsing_tryGetProtocolREFGetter(tupled_arg_5[0], tupled_arg_5[1])
695
+
696
+ protocol_refgetter: Callable[[ArcTable, int], str] | None = try_pick(chooser_5, headers_1)
697
+ def chooser_6(tupled_arg_6: tuple[int, CompositeHeader], process_name_root: Any=process_name_root, headers: Any=headers) -> Callable[[ArcTable, int], str] | None:
698
+ return ProcessParsing_tryGetProtocolDescriptionGetter(tupled_arg_6[0], tupled_arg_6[1])
699
+
700
+ protocol_description_getter: Callable[[ArcTable, int], str] | None = try_pick(chooser_6, headers_1)
701
+ def chooser_7(tupled_arg_7: tuple[int, CompositeHeader], process_name_root: Any=process_name_root, headers: Any=headers) -> Callable[[ArcTable, int], str] | None:
702
+ return ProcessParsing_tryGetProtocolURIGetter(tupled_arg_7[0], tupled_arg_7[1])
703
+
704
+ protocol_urigetter: Callable[[ArcTable, int], str] | None = try_pick(chooser_7, headers_1)
705
+ def chooser_8(tupled_arg_8: tuple[int, CompositeHeader], process_name_root: Any=process_name_root, headers: Any=headers) -> Callable[[ArcTable, int], str] | None:
706
+ return ProcessParsing_tryGetProtocolVersionGetter(tupled_arg_8[0], tupled_arg_8[1])
707
+
708
+ protocol_version_getter: Callable[[ArcTable, int], str] | None = try_pick(chooser_8, headers_1)
709
+ def chooser_9(tupled_arg_9: tuple[int, CompositeHeader], process_name_root: Any=process_name_root, headers: Any=headers) -> Callable[[ArcTable, int], Comment] | None:
710
+ return ProcessParsing_tryGetCommentGetter(tupled_arg_9[0], tupled_arg_9[1])
711
+
712
+ comment_getters: FSharpList[Callable[[ArcTable, int], Comment]] = to_list(choose(chooser_9, headers_1))
713
+ input_getter_1: Callable[[ArcTable, int], FSharpList[ProcessInput]]
714
+ def chooser_10(tupled_arg_10: tuple[int, CompositeHeader], process_name_root: Any=process_name_root, headers: Any=headers) -> Callable[[ArcTable, int], ProcessInput] | None:
715
+ return ProcessParsing_tryGetInputGetter(tupled_arg_10[0], tupled_arg_10[1])
716
+
717
+ match_value: Callable[[ArcTable, int], ProcessInput] | None = try_pick(chooser_10, headers_1)
718
+ if match_value is None:
719
+ def _arrow1358(table_1: ArcTable, process_name_root: Any=process_name_root, headers: Any=headers) -> Callable[[int], FSharpList[ProcessInput]]:
720
+ def _arrow1357(i_1: int) -> FSharpList[ProcessInput]:
721
+ def mapping_1(f_1: Callable[[ArcTable, int], MaterialAttributeValue]) -> MaterialAttributeValue:
722
+ return f_1(table_1)(i_1)
723
+
724
+ return singleton(ProcessInput(0, Source_create_Z5CA08497(None, ((("" + process_name_root) + "_Input_") + str(i_1)) + "", to_list(map_1(mapping_1, char_getters)))))
725
+
726
+ return _arrow1357
727
+
728
+ input_getter_1 = _arrow1358
729
+
730
+ else:
731
+ input_getter: Callable[[ArcTable, int], ProcessInput] = match_value
732
+ def _arrow1360(table: ArcTable, process_name_root: Any=process_name_root, headers: Any=headers) -> Callable[[int], FSharpList[ProcessInput]]:
733
+ def _arrow1359(i: int) -> FSharpList[ProcessInput]:
734
+ def mapping(f: Callable[[ArcTable, int], MaterialAttributeValue]) -> MaterialAttributeValue:
735
+ return f(table)(i)
736
+
737
+ chars: FSharpList[MaterialAttributeValue] = to_list(map_1(mapping, char_getters))
738
+ input: ProcessInput = input_getter(table)(i)
739
+ return of_array([input, ProcessInput_createSample_Z598187B7(ProcessInput__get_Name(input), chars)]) if ((not is_empty(chars)) if (not (True if ProcessInput__isSample(input) else ProcessInput__isSource(input))) else False) else singleton(ProcessInput_setCharacteristicValues(chars, input) if (length(chars) > 0) else input)
740
+
741
+ return _arrow1359
742
+
743
+ input_getter_1 = _arrow1360
744
+
745
+ output_getter_1: Callable[[ArcTable, int], FSharpList[ProcessOutput]]
746
+ def chooser_11(tupled_arg_11: tuple[int, CompositeHeader], process_name_root: Any=process_name_root, headers: Any=headers) -> Callable[[ArcTable, int], ProcessOutput] | None:
747
+ return ProcessParsing_tryGetOutputGetter(tupled_arg_11[0], tupled_arg_11[1])
748
+
749
+ match_value_1: Callable[[ArcTable, int], ProcessOutput] | None = try_pick(chooser_11, headers_1)
750
+ if match_value_1 is None:
751
+ def _arrow1362(table_3: ArcTable, process_name_root: Any=process_name_root, headers: Any=headers) -> Callable[[int], FSharpList[ProcessOutput]]:
752
+ def _arrow1361(i_3: int) -> FSharpList[ProcessOutput]:
753
+ def mapping_3(f_3: Callable[[ArcTable, int], FactorValue]) -> FactorValue:
754
+ return f_3(table_3)(i_3)
755
+
756
+ return singleton(ProcessOutput(0, Sample_create_62424AD2(None, ((("" + process_name_root) + "_Output_") + str(i_3)) + "", None, to_list(map_1(mapping_3, factor_value_getters)))))
757
+
758
+ return _arrow1361
759
+
760
+ output_getter_1 = _arrow1362
761
+
762
+ else:
763
+ output_getter: Callable[[ArcTable, int], ProcessOutput] = match_value_1
764
+ def _arrow1364(table_2: ArcTable, process_name_root: Any=process_name_root, headers: Any=headers) -> Callable[[int], FSharpList[ProcessOutput]]:
765
+ def _arrow1363(i_2: int) -> FSharpList[ProcessOutput]:
766
+ def mapping_2(f_2: Callable[[ArcTable, int], FactorValue]) -> FactorValue:
767
+ return f_2(table_2)(i_2)
768
+
769
+ factors: FSharpList[FactorValue] = to_list(map_1(mapping_2, factor_value_getters))
770
+ output: ProcessOutput = output_getter(table_2)(i_2)
771
+ return of_array([output, ProcessOutput_createSample_Z598187B7(ProcessOutput__get_Name(output), None, factors)]) if ((not is_empty(factors)) if (not ProcessOutput__isSample(output)) else False) else singleton(ProcessOutput_setFactorValues(factors, output) if (length(factors) > 0) else output)
772
+
773
+ return _arrow1363
774
+
775
+ output_getter_1 = _arrow1364
776
+
777
+ def _arrow1366(table_4: ArcTable, process_name_root: Any=process_name_root, headers: Any=headers) -> Callable[[int], Process]:
778
+ def _arrow1365(i_4: int) -> Process:
779
+ def mapping_4(p: str) -> str:
780
+ return Process_composeName(p, i_4)
781
+
782
+ pn: str | None = map(mapping_4, Option_fromValueWithDefault("", process_name_root))
783
+ def mapping_5(f_4: Callable[[ArcTable, int], ProcessParameterValue]) -> ProcessParameterValue:
784
+ return f_4(table_4)(i_4)
785
+
786
+ paramvalues: FSharpList[ProcessParameterValue] | None = Option_fromValueWithDefault(empty(), map_2(mapping_5, parameter_value_getters))
787
+ def mapping_7(list_6: FSharpList[ProcessParameterValue]) -> FSharpList[ProtocolParameter]:
788
+ def mapping_6(pv: ProcessParameterValue, list_6: Any=list_6) -> ProtocolParameter:
789
+ return value_10(pv.Category)
790
+
791
+ return map_2(mapping_6, list_6)
792
+
793
+ parameters: FSharpList[ProtocolParameter] | None = map(mapping_7, paramvalues)
794
+ def mapping_8(f_5: Callable[[ArcTable, int], Comment]) -> Comment:
795
+ return f_5(table_4)(i_4)
796
+
797
+ comments: FSharpList[Comment] | None = Option_fromValueWithDefault(empty(), map_2(mapping_8, comment_getters))
798
+ protocol: Protocol | None
799
+ def mapping_9(f_6: Callable[[ArcTable, int], str]) -> str:
800
+ return f_6(table_4)(i_4)
801
+
802
+ def mapping_10(f_7: Callable[[ArcTable, int], OntologyAnnotation]) -> OntologyAnnotation:
803
+ return f_7(table_4)(i_4)
804
+
805
+ def mapping_11(f_8: Callable[[ArcTable, int], str]) -> str:
806
+ return f_8(table_4)(i_4)
807
+
808
+ def mapping_12(f_9: Callable[[ArcTable, int], str]) -> str:
809
+ return f_9(table_4)(i_4)
810
+
811
+ def mapping_13(f_10: Callable[[ArcTable, int], str]) -> str:
812
+ return f_10(table_4)(i_4)
813
+
814
+ def mapping_14(f_11: Callable[[ArcTable, int], Component]) -> Component:
815
+ return f_11(table_4)(i_4)
816
+
817
+ p_1: Protocol = Protocol_make(None, map(mapping_9, protocol_refgetter), map(mapping_10, protocol_type_getter), map(mapping_11, protocol_description_getter), map(mapping_12, protocol_urigetter), map(mapping_13, protocol_version_getter), parameters, Option_fromValueWithDefault(empty(), map_2(mapping_14, component_getters)), None)
818
+ (pattern_matching_result,) = (None,)
819
+ if p_1.Name is None:
820
+ if p_1.ProtocolType is None:
821
+ if p_1.Description is None:
822
+ if p_1.Uri is None:
823
+ if p_1.Version is None:
824
+ if p_1.Components is None:
825
+ pattern_matching_result = 0
826
+
827
+ else:
828
+ pattern_matching_result = 1
829
+
830
+
831
+ else:
832
+ pattern_matching_result = 1
833
+
834
+
835
+ else:
836
+ pattern_matching_result = 1
837
+
838
+
839
+ else:
840
+ pattern_matching_result = 1
841
+
842
+
843
+ else:
844
+ pattern_matching_result = 1
845
+
846
+
847
+ else:
848
+ pattern_matching_result = 1
849
+
850
+ if pattern_matching_result == 0:
851
+ protocol = None
852
+
853
+ elif pattern_matching_result == 1:
854
+ protocol = p_1
855
+
856
+ pattern_input: tuple[FSharpList[ProcessInput], FSharpList[ProcessOutput]]
857
+ inputs: FSharpList[ProcessInput] = input_getter_1(table_4)(i_4)
858
+ outputs: FSharpList[ProcessOutput] = output_getter_1(table_4)(i_4)
859
+ pattern_input = ((of_array([item(0, inputs), item(0, inputs)]), outputs)) if ((length(outputs) == 2) if (length(inputs) == 1) else False) else (((inputs, of_array([item(0, outputs), item(0, outputs)]))) if ((length(outputs) == 1) if (length(inputs) == 2) else False) else ((inputs, outputs)))
860
+ return Process_make(None, pn, protocol, paramvalues, None, None, None, None, pattern_input[0], pattern_input[1], comments)
861
+
862
+ return _arrow1365
863
+
864
+ return _arrow1366
865
+
866
+
867
+ def ProcessParsing_groupProcesses(ps: FSharpList[Process]) -> FSharpList[tuple[str, FSharpList[Process]]]:
868
+ def projection(x: Process, ps: Any=ps) -> str:
869
+ if (Process_decomposeName_Z721C83C5(value_10(x.Name))[1] is not None) if (x.Name is not None) else False:
870
+ return Process_decomposeName_Z721C83C5(value_10(x.Name))[0]
871
+
872
+ elif (value_10(x.ExecutesProtocol).Name is not None) if (x.ExecutesProtocol is not None) else False:
873
+ return value_10(value_10(x.ExecutesProtocol).Name)
874
+
875
+ elif x.Name is not None:
876
+ return value_10(x.Name)
877
+
878
+ elif (value_10(x.ExecutesProtocol).ID is not None) if (x.ExecutesProtocol is not None) else False:
879
+ return value_10(value_10(x.ExecutesProtocol).ID)
880
+
881
+ else:
882
+ return create_missing_identifier()
883
+
884
+
885
+ class ObjectExpr1368:
886
+ @property
887
+ def Equals(self) -> Callable[[str, str], bool]:
888
+ def _arrow1367(x_1: str, y: str) -> bool:
889
+ return x_1 == y
890
+
891
+ return _arrow1367
892
+
893
+ @property
894
+ def GetHashCode(self) -> Callable[[str], int]:
895
+ return string_hash
896
+
897
+ return List_groupBy(projection, ps, ObjectExpr1368())
898
+
899
+
900
+ def ProcessParsing_mergeIdenticalProcesses(processes: FSharpList[Process]) -> FSharpList[Process]:
901
+ def projection(x: Process, processes: Any=processes) -> tuple[str, Any, Any | None, Any | None]:
902
+ if (Process_decomposeName_Z721C83C5(value_10(x.Name))[1] is not None) if (x.Name is not None) else False:
903
+ def mapping(a: FSharpList[ProcessParameterValue], x: Any=x) -> Any:
904
+ return box_hash_seq(a)
905
+
906
+ def mapping_1(a_1: FSharpList[Comment], x: Any=x) -> Any:
907
+ return box_hash_seq(a_1)
908
+
909
+ return (Process_decomposeName_Z721C83C5(value_10(x.Name))[0], box_hash_option(x.ExecutesProtocol), map(mapping, x.ParameterValues), map(mapping_1, x.Comments))
910
+
911
+ elif (value_10(x.ExecutesProtocol).Name is not None) if (x.ExecutesProtocol is not None) else False:
912
+ def mapping_2(a_2: FSharpList[ProcessParameterValue], x: Any=x) -> Any:
913
+ return box_hash_seq(a_2)
914
+
915
+ def mapping_3(a_3: FSharpList[Comment], x: Any=x) -> Any:
916
+ return box_hash_seq(a_3)
917
+
918
+ return (value_10(value_10(x.ExecutesProtocol).Name), box_hash_option(x.ExecutesProtocol), map(mapping_2, x.ParameterValues), map(mapping_3, x.Comments))
919
+
920
+ else:
921
+ def mapping_4(a_4: FSharpList[ProcessParameterValue], x: Any=x) -> Any:
922
+ return box_hash_seq(a_4)
923
+
924
+ def mapping_5(a_5: FSharpList[Comment], x: Any=x) -> Any:
925
+ return box_hash_seq(a_5)
926
+
927
+ return (create_missing_identifier(), box_hash_option(x.ExecutesProtocol), map(mapping_4, x.ParameterValues), map(mapping_5, x.Comments))
928
+
929
+
930
+ class ObjectExpr1369:
931
+ @property
932
+ def Equals(self) -> Callable[[tuple[str, Any, Any | None, Any | None], tuple[str, Any, Any | None, Any | None]], bool]:
933
+ return equal_arrays
934
+
935
+ @property
936
+ def GetHashCode(self) -> Callable[[tuple[str, Any, Any | None, Any | None]], int]:
937
+ return array_hash
938
+
939
+ l: FSharpList[tuple[tuple[str, Any, Any | None, Any | None], FSharpList[Process]]] = List_groupBy(projection, processes, ObjectExpr1369())
940
+ def mapping_8(i: int, tupled_arg: tuple[tuple[str, Any, Any | None, Any | None], FSharpList[Process]], processes: Any=processes) -> Process:
941
+ processes_1: FSharpList[Process] = tupled_arg[1]
942
+ n: str = tupled_arg[0][0]
943
+ p_vs: FSharpList[ProcessParameterValue] | None = item(0, processes_1).ParameterValues
944
+ def mapping_6(p: Process, i: Any=i, tupled_arg: Any=tupled_arg) -> FSharpList[ProcessInput]:
945
+ return default_arg(p.Inputs, empty())
946
+
947
+ inputs: FSharpList[ProcessInput] | None = Option_fromValueWithDefault(empty(), collect(mapping_6, processes_1))
948
+ def mapping_7(p_1: Process, i: Any=i, tupled_arg: Any=tupled_arg) -> FSharpList[ProcessOutput]:
949
+ return default_arg(p_1.Outputs, empty())
950
+
951
+ outputs: FSharpList[ProcessOutput] | None = Option_fromValueWithDefault(empty(), collect(mapping_7, processes_1))
952
+ return Process_create_Z7C1F7FA9(None, Process_composeName(n, i) if (length(l) > 1) else n, item(0, processes_1).ExecutesProtocol, p_vs, None, None, None, None, inputs, outputs, item(0, processes_1).Comments)
953
+
954
+ return map_indexed(mapping_8, l)
955
+
956
+
957
+ def ProcessParsing_processToRows(p: Process) -> FSharpList[FSharpList[tuple[CompositeHeader, CompositeCell]]]:
958
+ def mapping(ppv: ProcessParameterValue, p: Any=p) -> tuple[tuple[CompositeHeader, CompositeCell], int | None]:
959
+ return (JsonTypes_decomposeParameterValue(ppv), try_get_parameter_column_index(ppv))
960
+
961
+ pvs: FSharpList[tuple[tuple[CompositeHeader, CompositeCell], int | None]] = map_2(mapping, default_arg(p.ParameterValues, empty()))
962
+ components: FSharpList[tuple[tuple[CompositeHeader, CompositeCell], int | None]]
963
+ match_value: Protocol | None = p.ExecutesProtocol
964
+ def mapping_1(ppv_1: Component, p: Any=p) -> tuple[tuple[CompositeHeader, CompositeCell], int | None]:
965
+ return (JsonTypes_decomposeComponent(ppv_1), try_get_component_index(ppv_1))
966
+
967
+ components = empty() if (match_value is None) else map_2(mapping_1, default_arg(match_value.Components, empty()))
968
+ prot_vals: FSharpList[tuple[CompositeHeader, CompositeCell]]
969
+ match_value_1: Protocol | None = p.ExecutesProtocol
970
+ if match_value_1 is None:
971
+ prot_vals = empty()
972
+
973
+ else:
974
+ prot_1: Protocol = match_value_1
975
+ def _arrow1374(__unit: None=None, p: Any=p) -> IEnumerable_1[tuple[CompositeHeader, CompositeCell]]:
976
+ def _arrow1373(__unit: None=None) -> IEnumerable_1[tuple[CompositeHeader, CompositeCell]]:
977
+ def _arrow1372(__unit: None=None) -> IEnumerable_1[tuple[CompositeHeader, CompositeCell]]:
978
+ def _arrow1371(__unit: None=None) -> IEnumerable_1[tuple[CompositeHeader, CompositeCell]]:
979
+ def _arrow1370(__unit: None=None) -> IEnumerable_1[tuple[CompositeHeader, CompositeCell]]:
980
+ return singleton_1((CompositeHeader(7), CompositeCell(1, value_10(prot_1.Version)))) if (prot_1.Version is not None) else empty_1()
981
+
982
+ return append(singleton_1((CompositeHeader(6), CompositeCell(1, value_10(prot_1.Uri)))) if (prot_1.Uri is not None) else empty_1(), delay(_arrow1370))
983
+
984
+ return append(singleton_1((CompositeHeader(5), CompositeCell(1, value_10(prot_1.Description)))) if (prot_1.Description is not None) else empty_1(), delay(_arrow1371))
985
+
986
+ return append(singleton_1((CompositeHeader(4), CompositeCell(0, value_10(prot_1.ProtocolType)))) if (prot_1.ProtocolType is not None) else empty_1(), delay(_arrow1372))
987
+
988
+ return append(singleton_1((CompositeHeader(8), CompositeCell(1, value_10(prot_1.Name)))) if (prot_1.Name is not None) else empty_1(), delay(_arrow1373))
989
+
990
+ prot_vals = to_list(delay(_arrow1374))
991
+
992
+ def mapping_2(c: Comment, p: Any=p) -> tuple[CompositeHeader, CompositeCell]:
993
+ return (CompositeHeader(14, default_arg(c.Name, "")), CompositeCell(1, default_arg(c.Value, "")))
994
+
995
+ comments: FSharpList[tuple[CompositeHeader, CompositeCell]] = map_2(mapping_2, default_arg(p.Comments, empty()))
996
+ def mapping_6(tupled_arg_1: tuple[tuple[str, str], FSharpList[tuple[ProcessInput, ProcessOutput]]], p: Any=p) -> FSharpList[tuple[CompositeHeader, CompositeCell]]:
997
+ ios: FSharpList[tuple[ProcessInput, ProcessOutput]] = tupled_arg_1[1]
998
+ def chooser(tupled_arg_2: tuple[ProcessInput, ProcessOutput], tupled_arg_1: Any=tupled_arg_1) -> ProcessInput | None:
999
+ i_2: ProcessInput = tupled_arg_2[0]
1000
+ if True if ProcessInput__isSource(i_2) else ProcessInput__isSample(i_2):
1001
+ return i_2
1002
+
1003
+ else:
1004
+ return None
1005
+
1006
+
1007
+ input_for_charas: ProcessInput = default_arg(try_pick_1(chooser, ios), head(ios)[0])
1008
+ def chooser_1(tupled_arg_3: tuple[ProcessInput, ProcessOutput], tupled_arg_1: Any=tupled_arg_1) -> ProcessInput | None:
1009
+ i_3: ProcessInput = tupled_arg_3[0]
1010
+ if True if ProcessInput__isData(i_3) else ProcessInput__isMaterial(i_3):
1011
+ return i_3
1012
+
1013
+ else:
1014
+ return None
1015
+
1016
+
1017
+ input_for_type: ProcessInput = default_arg(try_pick_1(chooser_1, ios), head(ios)[0])
1018
+ def mapping_3(cv: MaterialAttributeValue, tupled_arg_1: Any=tupled_arg_1) -> tuple[tuple[CompositeHeader, CompositeCell], int | None]:
1019
+ return (JsonTypes_decomposeCharacteristicValue(cv), try_get_characteristic_column_index(cv))
1020
+
1021
+ chars: FSharpList[tuple[tuple[CompositeHeader, CompositeCell], int | None]] = map_2(mapping_3, ProcessInput_getCharacteristicValues_5B3D5BA9(input_for_charas))
1022
+ def chooser_2(tupled_arg_4: tuple[ProcessInput, ProcessOutput], tupled_arg_1: Any=tupled_arg_1) -> ProcessOutput | None:
1023
+ o_4: ProcessOutput = tupled_arg_4[1]
1024
+ if ProcessOutput__isSample(o_4):
1025
+ return o_4
1026
+
1027
+ else:
1028
+ return None
1029
+
1030
+
1031
+ output_for_factors: ProcessOutput = default_arg(try_pick_1(chooser_2, ios), head(ios)[1])
1032
+ def chooser_3(tupled_arg_5: tuple[ProcessInput, ProcessOutput], tupled_arg_1: Any=tupled_arg_1) -> ProcessOutput | None:
1033
+ o_5: ProcessOutput = tupled_arg_5[1]
1034
+ if True if ProcessOutput__isData(o_5) else ProcessOutput__isMaterial(o_5):
1035
+ return o_5
1036
+
1037
+ else:
1038
+ return None
1039
+
1040
+
1041
+ output_for_type: ProcessOutput = default_arg(try_pick_1(chooser_3, ios), head(ios)[1])
1042
+ def mapping_5(tuple_5: tuple[tuple[CompositeHeader, CompositeCell], int | None], tupled_arg_1: Any=tupled_arg_1) -> tuple[CompositeHeader, CompositeCell]:
1043
+ return tuple_5[0]
1044
+
1045
+ def projection_1(arg: tuple[tuple[CompositeHeader, CompositeCell], int | None], tupled_arg_1: Any=tupled_arg_1) -> int:
1046
+ return default_arg(arg[1], 10000)
1047
+
1048
+ def mapping_4(fv: FactorValue, tupled_arg_1: Any=tupled_arg_1) -> tuple[tuple[CompositeHeader, CompositeCell], int | None]:
1049
+ return (JsonTypes_decomposeFactorValue(fv), try_get_factor_column_index(fv))
1050
+
1051
+ class ObjectExpr1375:
1052
+ @property
1053
+ def Compare(self) -> Callable[[int, int], int]:
1054
+ return compare_primitives
1055
+
1056
+ vals: FSharpList[tuple[CompositeHeader, CompositeCell]] = map_2(mapping_5, sort_by(projection_1, append_1(chars, append_1(components, append_1(pvs, map_2(mapping_4, ProcessOutput_getFactorValues_Z42C11600(output_for_factors))))), ObjectExpr1375()))
1057
+ def _arrow1380(__unit: None=None, tupled_arg_1: Any=tupled_arg_1) -> IEnumerable_1[tuple[CompositeHeader, CompositeCell]]:
1058
+ def _arrow1379(__unit: None=None) -> IEnumerable_1[tuple[CompositeHeader, CompositeCell]]:
1059
+ def _arrow1378(__unit: None=None) -> IEnumerable_1[tuple[CompositeHeader, CompositeCell]]:
1060
+ def _arrow1377(__unit: None=None) -> IEnumerable_1[tuple[CompositeHeader, CompositeCell]]:
1061
+ def _arrow1376(__unit: None=None) -> IEnumerable_1[tuple[CompositeHeader, CompositeCell]]:
1062
+ return singleton_1(JsonTypes_decomposeProcessOutput(output_for_type))
1063
+
1064
+ return append(comments, delay(_arrow1376))
1065
+
1066
+ return append(vals, delay(_arrow1377))
1067
+
1068
+ return append(prot_vals, delay(_arrow1378))
1069
+
1070
+ return append(singleton_1(JsonTypes_decomposeProcessInput(input_for_type)), delay(_arrow1379))
1071
+
1072
+ return to_list(delay(_arrow1380))
1073
+
1074
+ def projection(tupled_arg: tuple[ProcessInput, ProcessOutput], p: Any=p) -> tuple[str, str]:
1075
+ return (ProcessInput__get_Name(tupled_arg[0]), ProcessOutput__get_Name(tupled_arg[1]))
1076
+
1077
+ def _arrow1381(__unit: None=None, p: Any=p) -> FSharpList[tuple[ProcessInput, ProcessOutput]]:
1078
+ list_5: FSharpList[ProcessOutput] = default_arg(p.Outputs, empty())
1079
+ return zip(default_arg(p.Inputs, empty()), list_5)
1080
+
1081
+ class ObjectExpr1382:
1082
+ @property
1083
+ def Equals(self) -> Callable[[tuple[str, str], tuple[str, str]], bool]:
1084
+ return equal_arrays
1085
+
1086
+ @property
1087
+ def GetHashCode(self) -> Callable[[tuple[str, str]], int]:
1088
+ return array_hash
1089
+
1090
+ return map_2(mapping_6, List_groupBy(projection, _arrow1381(), ObjectExpr1382()))
1091
+
1092
+
1093
+ def ARCtrl_CompositeHeader__CompositeHeader_TryParameter(this: CompositeHeader) -> ProtocolParameter | None:
1094
+ if this.tag == 3:
1095
+ return ProtocolParameter.create(None, this.fields[0])
1096
+
1097
+ else:
1098
+ return None
1099
+
1100
+
1101
+
1102
+ def ARCtrl_CompositeHeader__CompositeHeader_TryFactor(this: CompositeHeader) -> Factor | None:
1103
+ if this.tag == 2:
1104
+ return Factor.create(None, this.fields[0])
1105
+
1106
+ else:
1107
+ return None
1108
+
1109
+
1110
+
1111
+ def ARCtrl_CompositeHeader__CompositeHeader_TryCharacteristic(this: CompositeHeader) -> MaterialAttribute | None:
1112
+ if this.tag == 1:
1113
+ return MaterialAttribute_create_A220A8A(None, this.fields[0])
1114
+
1115
+ else:
1116
+ return None
1117
+
1118
+
1119
+
1120
+ def ARCtrl_CompositeHeader__CompositeHeader_TryComponent(this: CompositeHeader) -> Component | None:
1121
+ if this.tag == 0:
1122
+ return Component_create_Z2F0B38C7(None, None, this.fields[0])
1123
+
1124
+ else:
1125
+ return None
1126
+
1127
+
1128
+
1129
+ def ARCtrl_CompositeCell__CompositeCell_fromValue_Static_Z6986DF18(value: Value_2, unit: OntologyAnnotation | None=None) -> CompositeCell:
1130
+ return JsonTypes_cellOfValue(value, unit)
1131
+
1132
+
1133
+ def CompositeRow_toProtocol(table_name: str, row: IEnumerable_1[tuple[CompositeHeader, CompositeCell]]) -> Protocol:
1134
+ def folder(p: Protocol, hc: tuple[CompositeHeader, CompositeCell], table_name: Any=table_name, row: Any=row) -> Protocol:
1135
+ (pattern_matching_result, oa, v, v_1, v_2, v_3, oa_1, oa_2, unit, v_4, oa_3, t) = (None, None, None, None, None, None, None, None, None, None, None, None)
1136
+ if hc[0].tag == 4:
1137
+ if hc[1].tag == 0:
1138
+ pattern_matching_result = 0
1139
+ oa = hc[1].fields[0]
1140
+
1141
+ else:
1142
+ pattern_matching_result = 8
1143
+
1144
+
1145
+ elif hc[0].tag == 7:
1146
+ if hc[1].tag == 1:
1147
+ pattern_matching_result = 1
1148
+ v = hc[1].fields[0]
1149
+
1150
+ else:
1151
+ pattern_matching_result = 8
1152
+
1153
+
1154
+ elif hc[0].tag == 6:
1155
+ if hc[1].tag == 1:
1156
+ pattern_matching_result = 2
1157
+ v_1 = hc[1].fields[0]
1158
+
1159
+ else:
1160
+ pattern_matching_result = 8
1161
+
1162
+
1163
+ elif hc[0].tag == 5:
1164
+ if hc[1].tag == 1:
1165
+ pattern_matching_result = 3
1166
+ v_2 = hc[1].fields[0]
1167
+
1168
+ else:
1169
+ pattern_matching_result = 8
1170
+
1171
+
1172
+ elif hc[0].tag == 8:
1173
+ if hc[1].tag == 1:
1174
+ pattern_matching_result = 4
1175
+ v_3 = hc[1].fields[0]
1176
+
1177
+ else:
1178
+ pattern_matching_result = 8
1179
+
1180
+
1181
+ elif hc[0].tag == 3:
1182
+ pattern_matching_result = 5
1183
+ oa_1 = hc[0].fields[0]
1184
+
1185
+ elif hc[0].tag == 0:
1186
+ if hc[1].tag == 2:
1187
+ pattern_matching_result = 6
1188
+ oa_2 = hc[0].fields[0]
1189
+ unit = hc[1].fields[1]
1190
+ v_4 = hc[1].fields[0]
1191
+
1192
+ elif hc[1].tag == 0:
1193
+ pattern_matching_result = 7
1194
+ oa_3 = hc[0].fields[0]
1195
+ t = hc[1].fields[0]
1196
+
1197
+ else:
1198
+ pattern_matching_result = 8
1199
+
1200
+
1201
+ else:
1202
+ pattern_matching_result = 8
1203
+
1204
+ if pattern_matching_result == 0:
1205
+ return Protocol_setProtocolType(p, oa)
1206
+
1207
+ elif pattern_matching_result == 1:
1208
+ return Protocol_setVersion(p, v)
1209
+
1210
+ elif pattern_matching_result == 2:
1211
+ return Protocol_setUri(p, v_1)
1212
+
1213
+ elif pattern_matching_result == 3:
1214
+ return Protocol_setDescription(p, v_2)
1215
+
1216
+ elif pattern_matching_result == 4:
1217
+ return Protocol_setName(p, v_3)
1218
+
1219
+ elif pattern_matching_result == 5:
1220
+ return Protocol_addParameter(ProtocolParameter.create(None, oa_1), p)
1221
+
1222
+ elif pattern_matching_result == 6:
1223
+ return Protocol_addComponent(Component_create_Z2F0B38C7(Value_2.from_string(v_4), unit, oa_2), p)
1224
+
1225
+ elif pattern_matching_result == 7:
1226
+ return Protocol_addComponent(Component_create_Z2F0B38C7(Value_2(0, t), None, oa_3), p)
1227
+
1228
+ elif pattern_matching_result == 8:
1229
+ return p
1230
+
1231
+
1232
+ return fold(folder, Protocol_create_Z414665E7(None, table_name), row)
1233
+
1234
+
1235
+ def ARCtrl_ArcTable__ArcTable_fromProtocol_Static_3BF20962(p: Protocol) -> ArcTable:
1236
+ t: ArcTable = ArcTable.init(default_arg(p.Name, create_missing_identifier()))
1237
+ with get_enumerator(default_arg(p.Parameters, empty())) as enumerator:
1238
+ while enumerator.System_Collections_IEnumerator_MoveNext():
1239
+ pp: ProtocolParameter = enumerator.System_Collections_Generic_IEnumerator_1_get_Current()
1240
+ t.AddColumn(CompositeHeader(3, value_10(pp.ParameterName)), None, ARCtrl_Process_ProtocolParameter__ProtocolParameter_TryGetColumnIndex(pp))
1241
+ with get_enumerator(default_arg(p.Components, empty())) as enumerator_1:
1242
+ while enumerator_1.System_Collections_IEnumerator_MoveNext():
1243
+ c: Component = enumerator_1.System_Collections_Generic_IEnumerator_1_get_Current()
1244
+ def mapping(arg: Value_2, p: Any=p) -> Array[CompositeCell]:
1245
+ return ResizeArray_singleton(ARCtrl_CompositeCell__CompositeCell_fromValue_Static_Z6986DF18(arg, c.ComponentUnit))
1246
+
1247
+ v_1: Array[CompositeCell] | None = map(mapping, c.ComponentValue)
1248
+ t.AddColumn(CompositeHeader(3, value_10(c.ComponentType)), v_1, ARCtrl_Process_Component__Component_TryGetColumnIndex(c))
1249
+ def mapping_1(d: str, p: Any=p) -> None:
1250
+ t.AddProtocolDescriptionColumn(ResizeArray_singleton(d))
1251
+
1252
+ ignore(map(mapping_1, p.Description))
1253
+ def mapping_2(d_1: str, p: Any=p) -> None:
1254
+ t.AddProtocolVersionColumn(ResizeArray_singleton(d_1))
1255
+
1256
+ ignore(map(mapping_2, p.Version))
1257
+ def mapping_3(d_2: OntologyAnnotation, p: Any=p) -> None:
1258
+ t.AddProtocolTypeColumn(ResizeArray_singleton(d_2))
1259
+
1260
+ ignore(map(mapping_3, p.ProtocolType))
1261
+ def mapping_4(d_3: str, p: Any=p) -> None:
1262
+ t.AddProtocolUriColumn(ResizeArray_singleton(d_3))
1263
+
1264
+ ignore(map(mapping_4, p.Uri))
1265
+ def mapping_5(d_4: str, p: Any=p) -> None:
1266
+ t.AddProtocolNameColumn(ResizeArray_singleton(d_4))
1267
+
1268
+ ignore(map(mapping_5, p.Name))
1269
+ return t
1270
+
1271
+
1272
+ def ARCtrl_ArcTable__ArcTable_GetProtocols(this: ArcTable) -> FSharpList[Protocol]:
1273
+ if this.RowCount == 0:
1274
+ def _arrow1383(__unit: None=None, this: Any=this) -> Protocol:
1275
+ source: Array[CompositeHeader] = this.Headers
1276
+ def folder(p: Protocol, h: CompositeHeader) -> Protocol:
1277
+ if h.tag == 4:
1278
+ return Protocol_setProtocolType(p, OntologyAnnotation())
1279
+
1280
+ elif h.tag == 7:
1281
+ return Protocol_setVersion(p, "")
1282
+
1283
+ elif h.tag == 6:
1284
+ return Protocol_setUri(p, "")
1285
+
1286
+ elif h.tag == 5:
1287
+ return Protocol_setDescription(p, "")
1288
+
1289
+ elif h.tag == 8:
1290
+ return Protocol_setName(p, "")
1291
+
1292
+ elif h.tag == 3:
1293
+ return Protocol_addParameter(ProtocolParameter.create(None, h.fields[0]), p)
1294
+
1295
+ elif h.tag == 0:
1296
+ return Protocol_addComponent(Component_create_Z2F0B38C7(None, None, h.fields[0]), p)
1297
+
1298
+ else:
1299
+ return p
1300
+
1301
+
1302
+ return fold(folder, Protocol_create_Z414665E7(None, this.Name), source)
1303
+
1304
+ return singleton(_arrow1383())
1305
+
1306
+ else:
1307
+ def _arrow1384(i: int, this: Any=this) -> Protocol:
1308
+ row: IEnumerable_1[tuple[CompositeHeader, CompositeCell]]
1309
+ source_2: Array[CompositeCell] = this.GetRow(i, True)
1310
+ row = zip_1(this.Headers, source_2)
1311
+ return CompositeRow_toProtocol(this.Name, row)
1312
+
1313
+ class ObjectExpr1385:
1314
+ @property
1315
+ def Equals(self) -> Callable[[Protocol, Protocol], bool]:
1316
+ return equals
1317
+
1318
+ @property
1319
+ def GetHashCode(self) -> Callable[[Protocol], int]:
1320
+ return safe_hash
1321
+
1322
+ return List_distinct(initialize(this.RowCount, _arrow1384), ObjectExpr1385())
1323
+
1324
+
1325
+
1326
+ def ARCtrl_ArcTable__ArcTable_GetProcesses(this: ArcTable) -> FSharpList[Process]:
1327
+ if this.RowCount == 0:
1328
+ return singleton(Process_create_Z7C1F7FA9(None, this.Name))
1329
+
1330
+ else:
1331
+ getter: Callable[[ArcTable, int], Process]
1332
+ clo: Callable[[ArcTable, int], Process] = ProcessParsing_getProcessGetter(this.Name, this.Headers)
1333
+ def _arrow1386(arg: ArcTable, this: Any=this) -> Callable[[int], Process]:
1334
+ clo_1: Callable[[int], Process] = clo(arg)
1335
+ return clo_1
1336
+
1337
+ getter = _arrow1386
1338
+ def _arrow1388(__unit: None=None, this: Any=this) -> IEnumerable_1[Process]:
1339
+ def _arrow1387(i: int) -> Process:
1340
+ return getter(this)(i)
1341
+
1342
+ return map_1(_arrow1387, range_big_int(0, 1, this.RowCount - 1))
1343
+
1344
+ return ProcessParsing_mergeIdenticalProcesses(to_list(delay(_arrow1388)))
1345
+
1346
+
1347
+
1348
+ def ARCtrl_ArcTable__ArcTable_fromProcesses_Static(name: str, ps: FSharpList[Process]) -> ArcTable:
1349
+ def mapping(p: Process, name: Any=name, ps: Any=ps) -> FSharpList[FSharpList[tuple[CompositeHeader, CompositeCell]]]:
1350
+ return ProcessParsing_processToRows(p)
1351
+
1352
+ tupled_arg: tuple[Array[CompositeHeader], ArcTableValues] = Unchecked_alignByHeaders(True, collect(mapping, ps))
1353
+ return ArcTable.from_arc_table_values(name, tupled_arg[0], tupled_arg[1])
1354
+
1355
+
1356
+ def ARCtrl_ArcTables__ArcTables_GetProcesses(this: ArcTables) -> FSharpList[Process]:
1357
+ def mapping(t: ArcTable, this: Any=this) -> FSharpList[Process]:
1358
+ return ARCtrl_ArcTable__ArcTable_GetProcesses(t)
1359
+
1360
+ return collect(mapping, to_list(this.Tables))
1361
+
1362
+
1363
+ def ARCtrl_ArcTables__ArcTables_fromProcesses_Static_62A3309D(ps: FSharpList[Process]) -> ArcTables:
1364
+ def mapping_1(tupled_arg: tuple[str, FSharpList[Process]], ps: Any=ps) -> ArcTable:
1365
+ def mapping(p: Process, tupled_arg: Any=tupled_arg) -> FSharpList[FSharpList[tuple[CompositeHeader, CompositeCell]]]:
1366
+ return ProcessParsing_processToRows(p)
1367
+
1368
+ tupled_arg_1: tuple[Array[CompositeHeader], ArcTableValues] = Unchecked_alignByHeaders(True, collect(mapping, tupled_arg[1]))
1369
+ return ArcTable.from_arc_table_values(tupled_arg[0], tupled_arg_1[0], tupled_arg_1[1])
1370
+
1371
+ return ArcTables(list(map_2(mapping_1, ProcessParsing_groupProcesses(ps))))
1372
+
1373
+
1374
+ __all__ = ["Person_orcidKey", "Person_AssayIdentifierPrefix", "Person_createAssayIdentifierKey", "Person_setSourceAssayComment", "Person_getSourceAssayIdentifiersFromComments", "Person_removeSourceAssayComments", "Person_setOrcidFromComments", "Person_setCommentFromORCID", "JsonTypes_valueOfCell", "JsonTypes_composeComponent", "JsonTypes_composeParameterValue", "JsonTypes_composeFactorValue", "JsonTypes_composeCharacteristicValue", "JsonTypes_composeFreetextMaterialName", "JsonTypes_composeProcessInput", "JsonTypes_composeProcessOutput", "JsonTypes_cellOfValue", "JsonTypes_decomposeComponent", "JsonTypes_decomposeParameterValue", "JsonTypes_decomposeFactorValue", "JsonTypes_decomposeCharacteristicValue", "JsonTypes_decomposeProcessInput", "JsonTypes_decomposeProcessOutput", "JsonTypes_composeTechnologyPlatform", "JsonTypes_decomposeTechnologyPlatform", "ProcessParsing_tryComponentGetter", "ProcessParsing_tryParameterGetter", "ProcessParsing_tryFactorGetter", "ProcessParsing_tryCharacteristicGetter", "ProcessParsing_tryGetProtocolTypeGetter", "ProcessParsing_tryGetProtocolREFGetter", "ProcessParsing_tryGetProtocolDescriptionGetter", "ProcessParsing_tryGetProtocolURIGetter", "ProcessParsing_tryGetProtocolVersionGetter", "ProcessParsing_tryGetInputGetter", "ProcessParsing_tryGetOutputGetter", "ProcessParsing_tryGetCommentGetter", "ProcessParsing_getProcessGetter", "ProcessParsing_groupProcesses", "ProcessParsing_mergeIdenticalProcesses", "ProcessParsing_processToRows", "ARCtrl_CompositeHeader__CompositeHeader_TryParameter", "ARCtrl_CompositeHeader__CompositeHeader_TryFactor", "ARCtrl_CompositeHeader__CompositeHeader_TryCharacteristic", "ARCtrl_CompositeHeader__CompositeHeader_TryComponent", "ARCtrl_CompositeCell__CompositeCell_fromValue_Static_Z6986DF18", "CompositeRow_toProtocol", "ARCtrl_ArcTable__ArcTable_fromProtocol_Static_3BF20962", "ARCtrl_ArcTable__ArcTable_GetProtocols", "ARCtrl_ArcTable__ArcTable_GetProcesses", "ARCtrl_ArcTable__ArcTable_fromProcesses_Static", "ARCtrl_ArcTables__ArcTables_GetProcesses", "ARCtrl_ArcTables__ArcTables_fromProcesses_Static_62A3309D"]
1375
+