@nfdi4plants/arctrl 1.0.0-alpha6

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 (277) hide show
  1. package/ARCtrl.js +257 -0
  2. package/Contract/Contract.js +95 -0
  3. package/Contracts/Contracts.ARCtrl.js +35 -0
  4. package/Contracts/Contracts.ArcAssay.js +65 -0
  5. package/Contracts/Contracts.ArcInvestigation.js +58 -0
  6. package/Contracts/Contracts.ArcStudy.js +65 -0
  7. package/Contracts/Contracts.Git.js +91 -0
  8. package/FileSystem/Commit.js +18 -0
  9. package/FileSystem/DefaultGitignore.js +3 -0
  10. package/FileSystem/FileSystem.js +53 -0
  11. package/FileSystem/FileSystemTree.js +223 -0
  12. package/FileSystem/Path.js +38 -0
  13. package/FileSystemTree.js +51 -0
  14. package/ISA/ISA/ArcTypes/ArcTable.js +744 -0
  15. package/ISA/ISA/ArcTypes/ArcTableAux.js +1142 -0
  16. package/ISA/ISA/ArcTypes/ArcTables.js +380 -0
  17. package/ISA/ISA/ArcTypes/ArcTypes.js +2018 -0
  18. package/ISA/ISA/ArcTypes/CompositeCell.js +180 -0
  19. package/ISA/ISA/ArcTypes/CompositeColumn.js +42 -0
  20. package/ISA/ISA/ArcTypes/CompositeHeader.js +358 -0
  21. package/ISA/ISA/ArcTypes/CompositeRow.js +111 -0
  22. package/ISA/ISA/ArcTypes/IdentifierSetters.js +26 -0
  23. package/ISA/ISA/Builder/Types.js +243 -0
  24. package/ISA/ISA/Fable.js +50 -0
  25. package/ISA/ISA/Helper.js +326 -0
  26. package/ISA/ISA/Identifier.js +76 -0
  27. package/ISA/ISA/JsonTypes/AnnotationValue.js +56 -0
  28. package/ISA/ISA/JsonTypes/Assay.js +620 -0
  29. package/ISA/ISA/JsonTypes/AssayMaterials.js +39 -0
  30. package/ISA/ISA/JsonTypes/ColumnIndex.js +246 -0
  31. package/ISA/ISA/JsonTypes/Comment.js +58 -0
  32. package/ISA/ISA/JsonTypes/CommentList.js +139 -0
  33. package/ISA/ISA/JsonTypes/Component.js +158 -0
  34. package/ISA/ISA/JsonTypes/Data.js +55 -0
  35. package/ISA/ISA/JsonTypes/DataFile.js +68 -0
  36. package/ISA/ISA/JsonTypes/Factor.js +128 -0
  37. package/ISA/ISA/JsonTypes/FactorValue.js +109 -0
  38. package/ISA/ISA/JsonTypes/Investigation.js +204 -0
  39. package/ISA/ISA/JsonTypes/Material.js +66 -0
  40. package/ISA/ISA/JsonTypes/MaterialAttribute.js +101 -0
  41. package/ISA/ISA/JsonTypes/MaterialAttributeValue.js +126 -0
  42. package/ISA/ISA/JsonTypes/MaterialType.js +41 -0
  43. package/ISA/ISA/JsonTypes/OntologyAnnotation.js +219 -0
  44. package/ISA/ISA/JsonTypes/OntologySourceReference.js +85 -0
  45. package/ISA/ISA/JsonTypes/Person.js +137 -0
  46. package/ISA/ISA/JsonTypes/Process.js +401 -0
  47. package/ISA/ISA/JsonTypes/ProcessInput.js +297 -0
  48. package/ISA/ISA/JsonTypes/ProcessOutput.js +263 -0
  49. package/ISA/ISA/JsonTypes/ProcessParameterValue.js +129 -0
  50. package/ISA/ISA/JsonTypes/ProcessSequence.js +255 -0
  51. package/ISA/ISA/JsonTypes/Protocol.js +277 -0
  52. package/ISA/ISA/JsonTypes/ProtocolParameter.js +101 -0
  53. package/ISA/ISA/JsonTypes/Publication.js +105 -0
  54. package/ISA/ISA/JsonTypes/Sample.js +71 -0
  55. package/ISA/ISA/JsonTypes/Source.js +54 -0
  56. package/ISA/ISA/JsonTypes/Study.js +942 -0
  57. package/ISA/ISA/JsonTypes/StudyMaterials.js +45 -0
  58. package/ISA/ISA/JsonTypes/URI.js +19 -0
  59. package/ISA/ISA/JsonTypes/Value.js +210 -0
  60. package/ISA/ISA/Regex.js +588 -0
  61. package/ISA/ISA.Json/Assay.js +123 -0
  62. package/ISA/ISA.Json/Comment.js +84 -0
  63. package/ISA/ISA.Json/ConverterOptions.js +33 -0
  64. package/ISA/ISA.Json/Data.js +271 -0
  65. package/ISA/ISA.Json/Decode.js +46 -0
  66. package/ISA/ISA.Json/Factor.js +194 -0
  67. package/ISA/ISA.Json/GEncode.js +15 -0
  68. package/ISA/ISA.Json/Investigation.js +132 -0
  69. package/ISA/ISA.Json/Material.js +233 -0
  70. package/ISA/ISA.Json/Ontology.js +204 -0
  71. package/ISA/ISA.Json/Person.js +204 -0
  72. package/ISA/ISA.Json/Process.js +291 -0
  73. package/ISA/ISA.Json/Protocol.js +242 -0
  74. package/ISA/ISA.Json/Publication.js +92 -0
  75. package/ISA/ISA.Json/Study.js +230 -0
  76. package/ISA/ISA.Json/Validation/Fable.js +69 -0
  77. package/ISA/ISA.Json/Validation/JsonSchemaValidation.js +88 -0
  78. package/ISA/ISA.Json/Validation/ValidationResult.js +45 -0
  79. package/ISA/ISA.Spreadsheet/AnnotationTable/ArcTable.js +137 -0
  80. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeCell.js +78 -0
  81. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeColumn.js +59 -0
  82. package/ISA/ISA.Spreadsheet/AnnotationTable/CompositeHeader.js +478 -0
  83. package/ISA/ISA.Spreadsheet/ArcAssay.js +150 -0
  84. package/ISA/ISA.Spreadsheet/ArcInvestigation.js +314 -0
  85. package/ISA/ISA.Spreadsheet/ArcStudy.js +67 -0
  86. package/ISA/ISA.Spreadsheet/CollectionAux.js +128 -0
  87. package/ISA/ISA.Spreadsheet/Metadata/Assays.js +81 -0
  88. package/ISA/ISA.Spreadsheet/Metadata/Comment.js +60 -0
  89. package/ISA/ISA.Spreadsheet/Metadata/Contacts.js +104 -0
  90. package/ISA/ISA.Spreadsheet/Metadata/Conversions.js +180 -0
  91. package/ISA/ISA.Spreadsheet/Metadata/DesignDescriptors.js +27 -0
  92. package/ISA/ISA.Spreadsheet/Metadata/Factors.js +85 -0
  93. package/ISA/ISA.Spreadsheet/Metadata/OntologyAnnotation.js +65 -0
  94. package/ISA/ISA.Spreadsheet/Metadata/OntologySourceReference.js +73 -0
  95. package/ISA/ISA.Spreadsheet/Metadata/Protocols.js +116 -0
  96. package/ISA/ISA.Spreadsheet/Metadata/Publication.js +96 -0
  97. package/ISA/ISA.Spreadsheet/Metadata/SparseTable.js +451 -0
  98. package/ISA/ISA.Spreadsheet/Metadata/Study.js +260 -0
  99. package/README.md +277 -0
  100. package/SemVer.js +60 -0
  101. package/Templates/Templates.Json.js +40 -0
  102. package/Templates/Templates.Spreadsheet.js +315 -0
  103. package/Templates/Templates.js +179 -0
  104. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs +387 -0
  105. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCell.fs.js +240 -0
  106. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs +725 -0
  107. package/fable_modules/FsSpreadsheet.4.1.0/Cells/FsCellsCollection.fs.js +522 -0
  108. package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs +195 -0
  109. package/fable_modules/FsSpreadsheet.4.1.0/DSL/CellBuilder.fs.js +208 -0
  110. package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs +209 -0
  111. package/fable_modules/FsSpreadsheet.4.1.0/DSL/ColumnBuilder.fs.js +137 -0
  112. package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs +61 -0
  113. package/fable_modules/FsSpreadsheet.4.1.0/DSL/DSL.fs.js +62 -0
  114. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs +24 -0
  115. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Expression.fs.js +56 -0
  116. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs +102 -0
  117. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Operators.fs.js +6 -0
  118. package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs +200 -0
  119. package/fable_modules/FsSpreadsheet.4.1.0/DSL/RowBuilder.fs.js +137 -0
  120. package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs +139 -0
  121. package/fable_modules/FsSpreadsheet.4.1.0/DSL/SheetBuilder.fs.js +116 -0
  122. package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs +120 -0
  123. package/fable_modules/FsSpreadsheet.4.1.0/DSL/TableBuilder.fs.js +120 -0
  124. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs +229 -0
  125. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Transform.fs.js +421 -0
  126. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs +151 -0
  127. package/fable_modules/FsSpreadsheet.4.1.0/DSL/Types.fs.js +277 -0
  128. package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs +114 -0
  129. package/fable_modules/FsSpreadsheet.4.1.0/DSL/WorkbookBuilder.fs.js +104 -0
  130. package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs +177 -0
  131. package/fable_modules/FsSpreadsheet.4.1.0/FsAddress.fs.js +249 -0
  132. package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs +200 -0
  133. package/fable_modules/FsSpreadsheet.4.1.0/FsColumn.fs.js +125 -0
  134. package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs +202 -0
  135. package/fable_modules/FsSpreadsheet.4.1.0/FsRow.fs.js +135 -0
  136. package/fable_modules/FsSpreadsheet.4.1.0/FsSpreadsheet.fableproj +58 -0
  137. package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs +183 -0
  138. package/fable_modules/FsSpreadsheet.4.1.0/FsWorkbook.fs.js +138 -0
  139. package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs +628 -0
  140. package/fable_modules/FsSpreadsheet.4.1.0/FsWorksheet.fs.js +398 -0
  141. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs +19 -0
  142. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRange.fs.js +41 -0
  143. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs +222 -0
  144. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeAddress.fs.js +235 -0
  145. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs +93 -0
  146. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeBase.fs.js +91 -0
  147. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs +65 -0
  148. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeColumn.fs.js +74 -0
  149. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs +22 -0
  150. package/fable_modules/FsSpreadsheet.4.1.0/Ranges/FsRangeRow.fs.js +40 -0
  151. package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs +249 -0
  152. package/fable_modules/FsSpreadsheet.4.1.0/SheetBuilder.fs.js +325 -0
  153. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs +455 -0
  154. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTable.fs.js +310 -0
  155. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs +140 -0
  156. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableField.fs.js +173 -0
  157. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs +6 -0
  158. package/fable_modules/FsSpreadsheet.4.1.0/Tables/FsTableRow.fs.js +17 -0
  159. package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  160. package/fable_modules/FsSpreadsheet.4.1.0/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
  161. package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
  162. package/fable_modules/FsSpreadsheet.4.1.0/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +19 -0
  163. package/fable_modules/Thoth.Json.10.1.0/Decode.fs +1366 -0
  164. package/fable_modules/Thoth.Json.10.1.0/Decode.fs.js +1798 -0
  165. package/fable_modules/Thoth.Json.10.1.0/Encode.fs +621 -0
  166. package/fable_modules/Thoth.Json.10.1.0/Encode.fs.js +472 -0
  167. package/fable_modules/Thoth.Json.10.1.0/Extra.fs +31 -0
  168. package/fable_modules/Thoth.Json.10.1.0/Extra.fs.js +8 -0
  169. package/fable_modules/Thoth.Json.10.1.0/Thoth.Json.fableproj +30 -0
  170. package/fable_modules/Thoth.Json.10.1.0/Types.fs +59 -0
  171. package/fable_modules/Thoth.Json.10.1.0/Types.fs.js +98 -0
  172. package/fable_modules/Thoth.Json.10.1.0/obj/Release/netstandard2.0/Thoth.Json.AssemblyInfo.fs +19 -0
  173. package/fable_modules/Thoth.Json.10.1.0/package.json +5 -0
  174. package/fable_modules/fable-library.4.1.4/Array.d.ts +120 -0
  175. package/fable_modules/fable-library.4.1.4/Array.js +1204 -0
  176. package/fable_modules/fable-library.4.1.4/Async.d.ts +32 -0
  177. package/fable_modules/fable-library.4.1.4/Async.js +158 -0
  178. package/fable_modules/fable-library.4.1.4/AsyncBuilder.d.ts +59 -0
  179. package/fable_modules/fable-library.4.1.4/AsyncBuilder.js +183 -0
  180. package/fable_modules/fable-library.4.1.4/BigInt.d.ts +115 -0
  181. package/fable_modules/fable-library.4.1.4/BigInt.js +282 -0
  182. package/fable_modules/fable-library.4.1.4/BitConverter.d.ts +27 -0
  183. package/fable_modules/fable-library.4.1.4/BitConverter.js +138 -0
  184. package/fable_modules/fable-library.4.1.4/Boolean.d.ts +3 -0
  185. package/fable_modules/fable-library.4.1.4/Boolean.js +21 -0
  186. package/fable_modules/fable-library.4.1.4/Char.d.ts +65 -0
  187. package/fable_modules/fable-library.4.1.4/Char.js +169 -0
  188. package/fable_modules/fable-library.4.1.4/Choice.d.ts +138 -0
  189. package/fable_modules/fable-library.4.1.4/Choice.js +227 -0
  190. package/fable_modules/fable-library.4.1.4/Date.d.ts +70 -0
  191. package/fable_modules/fable-library.4.1.4/Date.js +451 -0
  192. package/fable_modules/fable-library.4.1.4/DateOffset.d.ts +63 -0
  193. package/fable_modules/fable-library.4.1.4/DateOffset.js +268 -0
  194. package/fable_modules/fable-library.4.1.4/DateOnly.d.ts +18 -0
  195. package/fable_modules/fable-library.4.1.4/DateOnly.js +124 -0
  196. package/fable_modules/fable-library.4.1.4/Decimal.d.ts +45 -0
  197. package/fable_modules/fable-library.4.1.4/Decimal.js +212 -0
  198. package/fable_modules/fable-library.4.1.4/Double.d.ts +11 -0
  199. package/fable_modules/fable-library.4.1.4/Double.js +46 -0
  200. package/fable_modules/fable-library.4.1.4/Encoding.d.ts +12 -0
  201. package/fable_modules/fable-library.4.1.4/Encoding.js +173 -0
  202. package/fable_modules/fable-library.4.1.4/Event.d.ts +31 -0
  203. package/fable_modules/fable-library.4.1.4/Event.js +93 -0
  204. package/fable_modules/fable-library.4.1.4/FSharp.Collections.d.ts +7 -0
  205. package/fable_modules/fable-library.4.1.4/FSharp.Collections.js +27 -0
  206. package/fable_modules/fable-library.4.1.4/FSharp.Core.d.ts +17 -0
  207. package/fable_modules/fable-library.4.1.4/FSharp.Core.js +69 -0
  208. package/fable_modules/fable-library.4.1.4/Global.d.ts +24 -0
  209. package/fable_modules/fable-library.4.1.4/Global.js +8 -0
  210. package/fable_modules/fable-library.4.1.4/Guid.d.ts +10 -0
  211. package/fable_modules/fable-library.4.1.4/Guid.js +142 -0
  212. package/fable_modules/fable-library.4.1.4/Int32.d.ts +28 -0
  213. package/fable_modules/fable-library.4.1.4/Int32.js +135 -0
  214. package/fable_modules/fable-library.4.1.4/List.d.ts +143 -0
  215. package/fable_modules/fable-library.4.1.4/List.js +1273 -0
  216. package/fable_modules/fable-library.4.1.4/Long.d.ts +3 -0
  217. package/fable_modules/fable-library.4.1.4/Long.js +46 -0
  218. package/fable_modules/fable-library.4.1.4/MailboxProcessor.d.ts +25 -0
  219. package/fable_modules/fable-library.4.1.4/MailboxProcessor.js +93 -0
  220. package/fable_modules/fable-library.4.1.4/Map.d.ts +178 -0
  221. package/fable_modules/fable-library.4.1.4/Map.js +1396 -0
  222. package/fable_modules/fable-library.4.1.4/MapUtil.d.ts +10 -0
  223. package/fable_modules/fable-library.4.1.4/MapUtil.js +112 -0
  224. package/fable_modules/fable-library.4.1.4/MutableMap.d.ts +52 -0
  225. package/fable_modules/fable-library.4.1.4/MutableMap.js +326 -0
  226. package/fable_modules/fable-library.4.1.4/MutableSet.d.ts +39 -0
  227. package/fable_modules/fable-library.4.1.4/MutableSet.js +232 -0
  228. package/fable_modules/fable-library.4.1.4/Native.d.ts +2 -0
  229. package/fable_modules/fable-library.4.1.4/Native.js +8 -0
  230. package/fable_modules/fable-library.4.1.4/Numeric.d.ts +19 -0
  231. package/fable_modules/fable-library.4.1.4/Numeric.js +71 -0
  232. package/fable_modules/fable-library.4.1.4/Observable.d.ts +32 -0
  233. package/fable_modules/fable-library.4.1.4/Observable.js +113 -0
  234. package/fable_modules/fable-library.4.1.4/Option.d.ts +28 -0
  235. package/fable_modules/fable-library.4.1.4/Option.js +96 -0
  236. package/fable_modules/fable-library.4.1.4/README.md +3 -0
  237. package/fable_modules/fable-library.4.1.4/Random.d.ts +37 -0
  238. package/fable_modules/fable-library.4.1.4/Random.js +170 -0
  239. package/fable_modules/fable-library.4.1.4/Range.d.ts +12 -0
  240. package/fable_modules/fable-library.4.1.4/Range.js +45 -0
  241. package/fable_modules/fable-library.4.1.4/Reflection.d.ts +119 -0
  242. package/fable_modules/fable-library.4.1.4/Reflection.js +461 -0
  243. package/fable_modules/fable-library.4.1.4/RegExp.d.ts +10 -0
  244. package/fable_modules/fable-library.4.1.4/RegExp.js +132 -0
  245. package/fable_modules/fable-library.4.1.4/Seq.d.ts +165 -0
  246. package/fable_modules/fable-library.4.1.4/Seq.js +1379 -0
  247. package/fable_modules/fable-library.4.1.4/Seq2.d.ts +18 -0
  248. package/fable_modules/fable-library.4.1.4/Seq2.js +111 -0
  249. package/fable_modules/fable-library.4.1.4/Set.d.ts +190 -0
  250. package/fable_modules/fable-library.4.1.4/Set.js +1789 -0
  251. package/fable_modules/fable-library.4.1.4/String.d.ts +49 -0
  252. package/fable_modules/fable-library.4.1.4/String.js +540 -0
  253. package/fable_modules/fable-library.4.1.4/System.Collections.Generic.d.ts +71 -0
  254. package/fable_modules/fable-library.4.1.4/System.Collections.Generic.js +307 -0
  255. package/fable_modules/fable-library.4.1.4/System.Text.d.ts +30 -0
  256. package/fable_modules/fable-library.4.1.4/System.Text.js +110 -0
  257. package/fable_modules/fable-library.4.1.4/SystemException.d.ts +5 -0
  258. package/fable_modules/fable-library.4.1.4/SystemException.js +5 -0
  259. package/fable_modules/fable-library.4.1.4/TimeOnly.d.ts +15 -0
  260. package/fable_modules/fable-library.4.1.4/TimeOnly.js +122 -0
  261. package/fable_modules/fable-library.4.1.4/TimeSpan.d.ts +34 -0
  262. package/fable_modules/fable-library.4.1.4/TimeSpan.js +177 -0
  263. package/fable_modules/fable-library.4.1.4/Timer.d.ts +19 -0
  264. package/fable_modules/fable-library.4.1.4/Timer.js +67 -0
  265. package/fable_modules/fable-library.4.1.4/Types.d.ts +58 -0
  266. package/fable_modules/fable-library.4.1.4/Types.js +208 -0
  267. package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.d.ts +2 -0
  268. package/fable_modules/fable-library.4.1.4/Unicode.13.0.0.js +4 -0
  269. package/fable_modules/fable-library.4.1.4/Uri.d.ts +29 -0
  270. package/fable_modules/fable-library.4.1.4/Uri.js +142 -0
  271. package/fable_modules/fable-library.4.1.4/Util.d.ts +187 -0
  272. package/fable_modules/fable-library.4.1.4/Util.js +662 -0
  273. package/fable_modules/fable-library.4.1.4/lib/big.d.ts +338 -0
  274. package/fable_modules/fable-library.4.1.4/lib/big.js +826 -0
  275. package/fable_modules/fable-library.4.1.4/package.json +23 -0
  276. package/fable_modules/project_cracked.json +1 -0
  277. package/package.json +22 -0
@@ -0,0 +1,260 @@
1
+ import { Record } from "../../../fable_modules/fable-library.4.1.4/Types.js";
2
+ import { record_type, list_type, string_type } from "../../../fable_modules/fable-library.4.1.4/Reflection.js";
3
+ import { Comment$_$reflection } from "../../ISA/JsonTypes/Comment.js";
4
+ import { ofSeq, append, toArray, reverse, cons, empty, map, ofArray } from "../../../fable_modules/fable-library.4.1.4/List.js";
5
+ import { Comment_toString, Comment_fromString } from "./Comment.js";
6
+ import { SparseRowModule_fromValues, SparseTable_ToRows_6A3D4534, SparseTable_FromRows_Z5579EC29, SparseTable, SparseTable_Create_Z2192E64B, SparseTable__TryGetValueDefault_5BAE6133 } from "./SparseTable.js";
7
+ import { Study_fileNameFromIdentifier, createMissingIdentifier } from "../../ISA/Identifier.js";
8
+ import { addToDict } from "../../../fable_modules/fable-library.4.1.4/MapUtil.js";
9
+ import { defaultArg } from "../../../fable_modules/fable-library.4.1.4/Option.js";
10
+ import { List_distinct } from "../../../fable_modules/fable-library.4.1.4/Seq2.js";
11
+ import { stringHash } from "../../../fable_modules/fable-library.4.1.4/Util.js";
12
+ import { Option_fromValueWithDefault } from "./Conversions.js";
13
+ import { ArcTable } from "../../ISA/ArcTypes/ArcTable.js";
14
+ import { ArcStudy } from "../../ISA/ArcTypes/ArcTypes.js";
15
+ import { toRows as toRows_1, fromRows as fromRows_1 } from "./DesignDescriptors.js";
16
+ import { toRows as toRows_2, fromRows as fromRows_2 } from "./Publication.js";
17
+ import { toRows as toRows_3, fromRows as fromRows_3 } from "./Factors.js";
18
+ import { toRows as toRows_4, fromRows as fromRows_4 } from "./Assays.js";
19
+ import { toRows as toRows_5, fromRows as fromRows_5 } from "./Protocols.js";
20
+ import { toRows as toRows_6, fromRows as fromRows_6 } from "./Contacts.js";
21
+ import { singleton, append as append_1, delay, collect } from "../../../fable_modules/fable-library.4.1.4/Seq.js";
22
+
23
+ export class StudyInfo extends Record {
24
+ constructor(Identifier, Title, Description, SubmissionDate, PublicReleaseDate, FileName, Comments) {
25
+ super();
26
+ this.Identifier = Identifier;
27
+ this.Title = Title;
28
+ this.Description = Description;
29
+ this.SubmissionDate = SubmissionDate;
30
+ this.PublicReleaseDate = PublicReleaseDate;
31
+ this.FileName = FileName;
32
+ this.Comments = Comments;
33
+ }
34
+ }
35
+
36
+ export function StudyInfo_$reflection() {
37
+ return record_type("ARCtrl.ISA.Spreadsheet.Studies.StudyInfo", [], StudyInfo, () => [["Identifier", string_type], ["Title", string_type], ["Description", string_type], ["SubmissionDate", string_type], ["PublicReleaseDate", string_type], ["FileName", string_type], ["Comments", list_type(Comment$_$reflection())]]);
38
+ }
39
+
40
+ export function StudyInfo_create(identifier, title, description, submissionDate, publicReleaseDate, fileName, comments) {
41
+ return new StudyInfo(identifier, title, description, submissionDate, publicReleaseDate, fileName, comments);
42
+ }
43
+
44
+ export function StudyInfo_get_Labels() {
45
+ return ofArray(["Study Identifier", "Study Title", "Study Description", "Study Submission Date", "Study Public Release Date", "Study File Name"]);
46
+ }
47
+
48
+ export function StudyInfo_FromSparseTable_651559CC(matrix) {
49
+ const comments = map((k) => Comment_fromString(k, SparseTable__TryGetValueDefault_5BAE6133(matrix, "", [k, 0])), matrix.CommentKeys);
50
+ return StudyInfo_create(SparseTable__TryGetValueDefault_5BAE6133(matrix, createMissingIdentifier(), ["Study Identifier", 0]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Study Title", 0]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Study Description", 0]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Study Submission Date", 0]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Study Public Release Date", 0]), SparseTable__TryGetValueDefault_5BAE6133(matrix, "", ["Study File Name", 0]), comments);
51
+ }
52
+
53
+ export function StudyInfo_ToSparseTable_1B3D5E9B(study) {
54
+ const matrix = SparseTable_Create_Z2192E64B(void 0, StudyInfo_get_Labels(), void 0, 2);
55
+ let commentKeys = empty();
56
+ const patternInput = (study.Identifier.indexOf("MISSING_IDENTIFIER_") === 0) ? ["", ""] : [study.Identifier, Study_fileNameFromIdentifier(study.Identifier)];
57
+ addToDict(matrix.Matrix, ["Study Identifier", 1], patternInput[0]);
58
+ addToDict(matrix.Matrix, ["Study Title", 1], defaultArg(study.Title, ""));
59
+ addToDict(matrix.Matrix, ["Study Description", 1], defaultArg(study.Description, ""));
60
+ addToDict(matrix.Matrix, ["Study Submission Date", 1], defaultArg(study.SubmissionDate, ""));
61
+ addToDict(matrix.Matrix, ["Study Public Release Date", 1], defaultArg(study.PublicReleaseDate, ""));
62
+ addToDict(matrix.Matrix, ["Study File Name", 1], patternInput[1]);
63
+ if (!(study.Comments.length === 0)) {
64
+ const array = study.Comments;
65
+ array.forEach((comment) => {
66
+ const patternInput_1 = Comment_toString(comment);
67
+ const n = patternInput_1[0];
68
+ commentKeys = cons(n, commentKeys);
69
+ addToDict(matrix.Matrix, [n, 1], patternInput_1[1]);
70
+ });
71
+ }
72
+ return new SparseTable(matrix.Matrix, matrix.Keys, reverse(List_distinct(commentKeys, {
73
+ Equals: (x, y) => (x === y),
74
+ GetHashCode: stringHash,
75
+ })), matrix.ColumnCount);
76
+ }
77
+
78
+ export function StudyInfo_fromRows(lineNumber, rows) {
79
+ const tupledArg = SparseTable_FromRows_Z5579EC29(rows, StudyInfo_get_Labels(), lineNumber);
80
+ return [tupledArg[0], tupledArg[1], tupledArg[2], StudyInfo_FromSparseTable_651559CC(tupledArg[3])];
81
+ }
82
+
83
+ export function StudyInfo_toRows_1B3D5E9B(study) {
84
+ return SparseTable_ToRows_6A3D4534(StudyInfo_ToSparseTable_1B3D5E9B(study));
85
+ }
86
+
87
+ export function fromParts(studyInfo, designDescriptors, publications, factors, assays, protocols, contacts) {
88
+ const assayIdentifiers = map((assay) => assay.Identifier, assays);
89
+ let arcstudy;
90
+ const arg_1 = Option_fromValueWithDefault("", studyInfo.Title);
91
+ const arg_2 = Option_fromValueWithDefault("", studyInfo.Description);
92
+ const arg_3 = Option_fromValueWithDefault("", studyInfo.SubmissionDate);
93
+ const arg_4 = Option_fromValueWithDefault("", studyInfo.PublicReleaseDate);
94
+ const arg_5 = toArray(publications);
95
+ const arg_6 = toArray(contacts);
96
+ const arg_7 = toArray(designDescriptors);
97
+ let arg_8;
98
+ const arg_13 = map((arg_12) => ArcTable.fromProtocol(arg_12), protocols);
99
+ arg_8 = Array.from(arg_13);
100
+ const arg_9 = Array.from(assayIdentifiers);
101
+ const arg_10 = toArray(factors);
102
+ const arg_11 = toArray(studyInfo.Comments);
103
+ arcstudy = ArcStudy.make(studyInfo.Identifier, arg_1, arg_2, arg_3, arg_4, arg_5, arg_6, arg_7, arg_8, arg_9, arg_10, arg_11);
104
+ if (arcstudy.isEmpty && (arcstudy.Identifier === "")) {
105
+ return void 0;
106
+ }
107
+ else {
108
+ return [arcstudy, assays];
109
+ }
110
+ }
111
+
112
+ export function fromRows(lineNumber, en) {
113
+ const loop = (lastLine_mut, studyInfo_mut, designDescriptors_mut, publications_mut, factors_mut, assays_mut, protocols_mut, contacts_mut, remarks_mut, lineNumber_1_mut) => {
114
+ loop:
115
+ while (true) {
116
+ const lastLine = lastLine_mut, studyInfo = studyInfo_mut, designDescriptors = designDescriptors_mut, publications = publications_mut, factors = factors_mut, assays = assays_mut, protocols = protocols_mut, contacts = contacts_mut, remarks = remarks_mut, lineNumber_1 = lineNumber_1_mut;
117
+ let matchResult, k_6, k_7, k_8, k_9, k_10, k_11, k_12;
118
+ if (lastLine != null) {
119
+ switch (lastLine) {
120
+ case "STUDY DESIGN DESCRIPTORS": {
121
+ matchResult = 0;
122
+ k_6 = lastLine;
123
+ break;
124
+ }
125
+ case "STUDY PUBLICATIONS": {
126
+ matchResult = 1;
127
+ k_7 = lastLine;
128
+ break;
129
+ }
130
+ case "STUDY FACTORS": {
131
+ matchResult = 2;
132
+ k_8 = lastLine;
133
+ break;
134
+ }
135
+ case "STUDY ASSAYS": {
136
+ matchResult = 3;
137
+ k_9 = lastLine;
138
+ break;
139
+ }
140
+ case "STUDY PROTOCOLS": {
141
+ matchResult = 4;
142
+ k_10 = lastLine;
143
+ break;
144
+ }
145
+ case "STUDY CONTACTS": {
146
+ matchResult = 5;
147
+ k_11 = lastLine;
148
+ break;
149
+ }
150
+ default: {
151
+ matchResult = 6;
152
+ k_12 = lastLine;
153
+ }
154
+ }
155
+ }
156
+ else {
157
+ matchResult = 6;
158
+ k_12 = lastLine;
159
+ }
160
+ switch (matchResult) {
161
+ case 0: {
162
+ const patternInput = fromRows_1("Study Design", lineNumber_1 + 1, en);
163
+ lastLine_mut = patternInput[0];
164
+ studyInfo_mut = studyInfo;
165
+ designDescriptors_mut = patternInput[3];
166
+ publications_mut = publications;
167
+ factors_mut = factors;
168
+ assays_mut = assays;
169
+ protocols_mut = protocols;
170
+ contacts_mut = contacts;
171
+ remarks_mut = append(remarks, patternInput[2]);
172
+ lineNumber_1_mut = patternInput[1];
173
+ continue loop;
174
+ }
175
+ case 1: {
176
+ const patternInput_1 = fromRows_2("Study Publication", lineNumber_1 + 1, en);
177
+ lastLine_mut = patternInput_1[0];
178
+ studyInfo_mut = studyInfo;
179
+ designDescriptors_mut = designDescriptors;
180
+ publications_mut = patternInput_1[3];
181
+ factors_mut = factors;
182
+ assays_mut = assays;
183
+ protocols_mut = protocols;
184
+ contacts_mut = contacts;
185
+ remarks_mut = append(remarks, patternInput_1[2]);
186
+ lineNumber_1_mut = patternInput_1[1];
187
+ continue loop;
188
+ }
189
+ case 2: {
190
+ const patternInput_2 = fromRows_3("Study Factor", lineNumber_1 + 1, en);
191
+ lastLine_mut = patternInput_2[0];
192
+ studyInfo_mut = studyInfo;
193
+ designDescriptors_mut = designDescriptors;
194
+ publications_mut = publications;
195
+ factors_mut = patternInput_2[3];
196
+ assays_mut = assays;
197
+ protocols_mut = protocols;
198
+ contacts_mut = contacts;
199
+ remarks_mut = append(remarks, patternInput_2[2]);
200
+ lineNumber_1_mut = patternInput_2[1];
201
+ continue loop;
202
+ }
203
+ case 3: {
204
+ const patternInput_3 = fromRows_4("Study Assay", lineNumber_1 + 1, en);
205
+ lastLine_mut = patternInput_3[0];
206
+ studyInfo_mut = studyInfo;
207
+ designDescriptors_mut = designDescriptors;
208
+ publications_mut = publications;
209
+ factors_mut = factors;
210
+ assays_mut = patternInput_3[3];
211
+ protocols_mut = protocols;
212
+ contacts_mut = contacts;
213
+ remarks_mut = append(remarks, patternInput_3[2]);
214
+ lineNumber_1_mut = patternInput_3[1];
215
+ continue loop;
216
+ }
217
+ case 4: {
218
+ const patternInput_4 = fromRows_5("Study Protocol", lineNumber_1 + 1, en);
219
+ lastLine_mut = patternInput_4[0];
220
+ studyInfo_mut = studyInfo;
221
+ designDescriptors_mut = designDescriptors;
222
+ publications_mut = publications;
223
+ factors_mut = factors;
224
+ assays_mut = assays;
225
+ protocols_mut = patternInput_4[3];
226
+ contacts_mut = contacts;
227
+ remarks_mut = append(remarks, patternInput_4[2]);
228
+ lineNumber_1_mut = patternInput_4[1];
229
+ continue loop;
230
+ }
231
+ case 5: {
232
+ const patternInput_5 = fromRows_6("Study Person", lineNumber_1 + 1, en);
233
+ lastLine_mut = patternInput_5[0];
234
+ studyInfo_mut = studyInfo;
235
+ designDescriptors_mut = designDescriptors;
236
+ publications_mut = publications;
237
+ factors_mut = factors;
238
+ assays_mut = assays;
239
+ protocols_mut = protocols;
240
+ contacts_mut = patternInput_5[3];
241
+ remarks_mut = append(remarks, patternInput_5[2]);
242
+ lineNumber_1_mut = patternInput_5[1];
243
+ continue loop;
244
+ }
245
+ default:
246
+ return [k_12, lineNumber_1, remarks, fromParts(studyInfo, designDescriptors, publications, factors, assays, protocols, contacts)];
247
+ }
248
+ break;
249
+ }
250
+ };
251
+ const patternInput_6 = StudyInfo_fromRows(lineNumber, en);
252
+ return loop(patternInput_6[0], patternInput_6[3], empty(), empty(), empty(), empty(), empty(), empty(), patternInput_6[2], patternInput_6[1]);
253
+ }
254
+
255
+ export function toRows(study, assays) {
256
+ const protocols = ofSeq(collect((p) => p.GetProtocols(), study.Tables));
257
+ const assays_1 = defaultArg(assays, ofSeq(study.GetRegisteredAssaysOrIdentifier()));
258
+ return delay(() => append_1(StudyInfo_toRows_1B3D5E9B(study), delay(() => append_1(singleton(SparseRowModule_fromValues(["STUDY DESIGN DESCRIPTORS"])), delay(() => append_1(toRows_1("Study Design", ofArray(study.StudyDesignDescriptors)), delay(() => append_1(singleton(SparseRowModule_fromValues(["STUDY PUBLICATIONS"])), delay(() => append_1(toRows_2("Study Publication", ofArray(study.Publications)), delay(() => append_1(singleton(SparseRowModule_fromValues(["STUDY FACTORS"])), delay(() => append_1(toRows_3("Study Factor", ofArray(study.Factors)), delay(() => append_1(singleton(SparseRowModule_fromValues(["STUDY ASSAYS"])), delay(() => append_1(toRows_4("Study Assay", assays_1), delay(() => append_1(singleton(SparseRowModule_fromValues(["STUDY PROTOCOLS"])), delay(() => append_1(toRows_5("Study Protocol", protocols), delay(() => append_1(singleton(SparseRowModule_fromValues(["STUDY CONTACTS"])), delay(() => toRows_6("Study Person", ofArray(study.Contacts)))))))))))))))))))))))))));
259
+ }
260
+
package/README.md ADDED
@@ -0,0 +1,277 @@
1
+ # ARCtrl
2
+ Top level ARC DataModel and API function descriptions.
3
+
4
+ - [ARCtrl](#arctrl)
5
+ - [Jargon/Nomenclature](#jargonnomenclature)
6
+ - [API Design](#api-design)
7
+ - [Top level overview](#top-level-overview)
8
+ - [Stack](#stack)
9
+ - [Libraries](#libraries)
10
+ - [Design choices](#design-choices)
11
+ - [Fable compatibility as top priority](#fable-compatibility-as-top-priority)
12
+
13
+ ## Sub-Libraries
14
+
15
+ [ISA README.md](src/ISA/README.md) :books:
16
+
17
+ [Contracts README.md](src/Contract/README.md) :books:
18
+
19
+ # Jargon/Nomenclature
20
+
21
+ In general, a distinction is made between `DataModel`s, `API`s, and `Tools`:
22
+ - `DataModel`s are the data structures which represent the ARC or it's respective parts in memory. They are serializable and can be used as data exchange format between tool implementations:
23
+ - `FileSystem`: Represents the file system structure of an ARC. All files and their path relative to the arc root folder are contained here.
24
+ - `ISA`: Represents the experimental metadata of the ARC that is stored in the ISA-XLSX format (investigation, studies and assays).
25
+ - `CWL`: Represents the workflow definitions of the ARC in the CWL format.
26
+ - `API`s are static methods on the `DataModel` types that perfrom operations on the `DataModel`s. Often, these are CRUD-like operations, and are aimed to be be composable.
27
+
28
+ **Example**: A `ARC.addAssay` function has to do several things:
29
+ - Add a new assay to the `ISA`
30
+ - Add a new assay to the `FileSystem`
31
+ it should therefore combine the respective functions of `ISA API` and `FileSystem API` to achieve this.
32
+
33
+ - `Tools` or `Clients` are user-facing software such as Swate, ARCitect, or the ARCCommander. They should ideally compose their functionality from the `API`s and work with an in-memory representation of the ARC via `DataModel`s. There are operations such as IO for reading/writing actual files to the file system, which are not part of the `API`s, but rather part of the `Tools`.
34
+
35
+ ## Local Setup
36
+
37
+ 1. `dotnet tool restore`
38
+ 2. `npm install` in *root* (this will also run `npm install` in `src/ISA`).
39
+
40
+ ## API Design
41
+
42
+ Command syntax should be inspired by ArcCommander commands, as they are already well established and known to the power user base.
43
+ See syntax : https://nfdi4plants.github.io/arcCommander-docs/docs/01GeneralCLIStructure.html
44
+ See selection: https://nfdi4plants.github.io/arcCommander-docs/docs/02SubcommandVerbs.html
45
+
46
+ ## Top level overview
47
+
48
+ In the following, the dependency graph of the proposed arcAPI toolstack can be seen:
49
+
50
+ ```mermaid
51
+ flowchart TD
52
+
53
+ %% ----- Nodes ------
54
+
55
+
56
+ subgraph ARCtrl
57
+ arc[ARC]
58
+
59
+ subgraph ISA
60
+ isaj[ISA.Json]
61
+ isax[ISA.Spreadsheet]
62
+ isaa[ISA]
63
+ end
64
+ subgraph FileSystem
65
+ fs[FileSystem]
66
+ end
67
+ subgraph CWL
68
+ cwl[CWL]
69
+ end
70
+ end
71
+
72
+ subgraph DataTransferObject
73
+ fsspread[FsSpreadsheet]
74
+ thoth["Thoth.Json (string)"]
75
+ end
76
+
77
+ subgraph IO
78
+ node[node.fs]
79
+ fsspreadx[FsSpreadsheet.ExcelIO]
80
+ excelJS[exceljs]
81
+ systemio[System.IO]
82
+ end
83
+
84
+
85
+ %% ----- Edges ------
86
+
87
+
88
+ %% Arc
89
+ arc --> ISA
90
+ arc --> FileSystem
91
+ arc --> CWL
92
+
93
+ %% ISA
94
+ isaj --> isaa
95
+ isax --> isaa
96
+ isaj --> thoth
97
+
98
+ isax --> fsspread
99
+
100
+ %% ------ Tools ---------
101
+
102
+ subgraph Tools
103
+ arcdotnet[/arcIO.NET\]
104
+ arcitect[[ARCitect]]
105
+ arccom[[arcCommander]]
106
+ swate[[Swate]]
107
+ end
108
+
109
+ %% ----- Edges ------
110
+
111
+ Tools --> ARCtrl
112
+
113
+ arcdotnet --> fsspreadx
114
+ arcdotnet --> systemio
115
+ arcitect --> excelJS
116
+ arcitect --> node
117
+ arccom --> arcdotnet
118
+
119
+
120
+ fsspreadx -.-> fsspread
121
+ systemio -.-> thoth
122
+ excelJS -.-> fsspread
123
+ node -.-> thoth
124
+
125
+ %% ----- Styling ------
126
+
127
+ %% dotnet
128
+ style Tools stroke:#3A0EC6,stroke-width:2px
129
+ style fsspreadx fill:#8C71E3,stroke:#3A0EC6,stroke-width:2px,color: black
130
+ style arcdotnet fill:#8C71E3,stroke:#3A0EC6,stroke-width:2px,color: black
131
+ style arccom fill:#8C71E3,stroke:#3A0EC6,stroke-width:2px,color: black
132
+ style systemio fill:#8C71E3,stroke:#3A0EC6,stroke-width:2px,color: black
133
+
134
+ %% javascript
135
+ style excelJS fill:#C1AD09,stroke:#EFD81D,stroke-width:2px,color: black
136
+ style arcitect fill:#C1AD09,stroke:#EFD81D,stroke-width:2px,color: black
137
+ style swate fill:#C1AD09,stroke:#EFD81D,stroke-width:2px,color: black
138
+ style node fill:#C1AD09,stroke:#EFD81D,stroke-width:2px,color: black
139
+
140
+
141
+ %% fable
142
+ style ARCtrl stroke:#007B00,stroke-width:2px
143
+ style ISA stroke:#007B00,stroke-width:2px
144
+ style FileSystem stroke:#007B00,stroke-width:2px
145
+ style CWL stroke:#007B00,stroke-width:2px
146
+ style DataTransferObject stroke:#007B00,stroke-width:2px
147
+
148
+ style fsspread fill:#39B539,stroke:#007B00,stroke-width:2px,color: black
149
+ style isax fill:#39B539,stroke:#007B00,stroke-width:2px,color: black
150
+ style isaa fill:#39B539,stroke:#007B00,stroke-width:2px,color: black
151
+ style isaj fill:#39B539,stroke:#007B00,stroke-width:2px,color: black
152
+ style arc fill:#39B539,stroke:#007B00,stroke-width:2px,color: black
153
+ style fs fill:#39B539,stroke:#007B00,stroke-width:2px,color: black
154
+ style cwl fill:#39B539,stroke:#007B00,stroke-width:2px,color: black
155
+ style thoth fill:#39B539,stroke:#007B00,stroke-width:2px,color: black
156
+ ```
157
+
158
+ ## Stack
159
+
160
+ ```mermaid
161
+ classDiagram
162
+
163
+ class arc["ARCtrl"] {
164
+ ISA
165
+ CWL
166
+ FileSystem
167
+ }
168
+ class isa["ISA"] {
169
+ Investigation
170
+ Studies
171
+ Assays
172
+ ArcTable
173
+ CompositeColumn
174
+ CompositeHeader
175
+ CompositeCell
176
+ }
177
+ class file ["FileSystem"] {
178
+ - FileSystemTree
179
+ - History
180
+ }
181
+ class cwl["CWL"] {
182
+ CommandlineTool?
183
+ Workflows
184
+ }
185
+ class io["IO"] {
186
+ FsSpreadsheet.ExcelIO
187
+ System.IO
188
+ exceljs
189
+ node fs
190
+ }
191
+ io <|--|> arc : Contracts
192
+ arc <|--|> isa
193
+ arc <|--|> cwl
194
+ arc <|--|> file
195
+
196
+ ```
197
+
198
+ # Libraries
199
+
200
+ Mockups for each library are in the `ARC` folder. They contain API/Domain stubs to draft and test the new library designs.
201
+
202
+ ## Design choices
203
+
204
+ ### Fable compatibility as top priority
205
+
206
+ All libraries should be Fable compatible, and produce javascript/typescript code that is ergonomic to use in a js/ts environment, therefore:
207
+ - we use classes with static members over nested modules
208
+ - we use the `[<AttachMembers>]` fable attribute for each class
209
+ - Using overloads with the `[<AttachMembers>]` attribute will make js functions shadow itself. Never use this!
210
+ - we use the `[<NamedParams(n)>]` fable attribute for all optional parameters in static methods that use tupled, named params.
211
+ - we use `Array<'T>` for all collections in F#, since they get transpiled to native js arrays.
212
+ - we use the `[<Erase>]` fable attribute for union cases that contain data
213
+ ```fsharp
214
+ [<Erase>] type X = | Y of string | Z of int
215
+ ```
216
+ - we use the `[<StringEnum>]` for unions that contain no data (e.g.)
217
+ ```fsharp
218
+ [<StringEnum>] type YesOrNo = | Yes | No
219
+ ```
220
+
221
+ **Example:**
222
+
223
+ ```fsharp
224
+ [<AttachMembers>]
225
+ type Study =
226
+ {
227
+ Identifier : string option
228
+ Assays : Assay array option
229
+ }
230
+
231
+ [<NamedParams>]
232
+ static member create (?Identifier, ?Assays : Assay array) =
233
+ {
234
+ Identifier = Identifier
235
+ Assays = Assays
236
+ }
237
+ ```
238
+
239
+ will become the following javascript code:
240
+
241
+ ```javascript
242
+ export class Study extends Record {
243
+ constructor(Identifier, Assays) {
244
+ super();
245
+ this.Identifier = Identifier;
246
+ this.Assays = Assays;
247
+ }
248
+ static create({ Identifier, Assays }) {
249
+ return new Study(Identifier, Assays);
250
+ }
251
+ ```
252
+
253
+ and the following typescript code:
254
+
255
+ ```typescript
256
+ export class Study extends Record implements IEquatable<Study>, IComparable<Study> {
257
+ readonly Identifier: Option<string>;
258
+ readonly Assays: Option<Assay[]>;
259
+ constructor(Identifier: Option<string>, Assays: Option<Assay[]>) {
260
+ super();
261
+ this.Identifier = Identifier;
262
+ this.Assays = Assays;
263
+ }
264
+ static create({ Identifier, Assays }: {Identifier?: string, Assays?: Assay[] }): Study {
265
+ return new Study(Identifier, Assays);
266
+ }
267
+ ```
268
+
269
+ ## Development
270
+
271
+ ### Setup
272
+
273
+ 1. `dotnet tool restore`
274
+ 2. `dotnet paket install`
275
+ 3. `npm install`
276
+
277
+ Verify correct setup with `./build.cmd runtests` ✨
package/SemVer.js ADDED
@@ -0,0 +1,60 @@
1
+ import { match, create } from "./fable_modules/fable-library.4.1.4/RegExp.js";
2
+ import { toString, Record } from "./fable_modules/fable-library.4.1.4/Types.js";
3
+ import { record_type, option_type, string_type, int32_type } from "./fable_modules/fable-library.4.1.4/Reflection.js";
4
+ import { parse } from "./fable_modules/fable-library.4.1.4/Int32.js";
5
+ import { value as value_3, unwrap } from "./fable_modules/fable-library.4.1.4/Option.js";
6
+ import { StringBuilder__Append_Z721C83C5, StringBuilder_$ctor } from "./fable_modules/fable-library.4.1.4/System.Text.js";
7
+ import { printf, toText } from "./fable_modules/fable-library.4.1.4/String.js";
8
+
9
+ const SemVerAux_Pattern = "^(?<major>\\d+)(\\.(?<minor>\\d+))?(\\.(?<patch>\\d+))?(-(?<pre>[0-9A-Za-z-\\.]+))?(\\+(?<build>[0-9A-Za-z-\\.]+))?$";
10
+
11
+ export const SemVerAux_SemVerRegex = create(SemVerAux_Pattern);
12
+
13
+ export class SemVer extends Record {
14
+ constructor(Major, Minor, Patch, PreRelease, Metadata) {
15
+ super();
16
+ this.Major = (Major | 0);
17
+ this.Minor = (Minor | 0);
18
+ this.Patch = (Patch | 0);
19
+ this.PreRelease = PreRelease;
20
+ this.Metadata = Metadata;
21
+ }
22
+ }
23
+
24
+ export function SemVer_$reflection() {
25
+ return record_type("ARCtrl.SemVer.SemVer", [], SemVer, () => [["Major", int32_type], ["Minor", int32_type], ["Patch", int32_type], ["PreRelease", option_type(string_type)], ["Metadata", option_type(string_type)]]);
26
+ }
27
+
28
+ export function SemVer_make(major, minor, patch, pre, meta) {
29
+ return new SemVer(major, minor, patch, pre, meta);
30
+ }
31
+
32
+ export function SemVer_create_Z55658624(major, minor, patch, pre, meta) {
33
+ return new SemVer(major, minor, patch, pre, meta);
34
+ }
35
+
36
+ export function SemVer_tryOfString_Z721C83C5(str) {
37
+ const m = match(SemVerAux_SemVerRegex, str);
38
+ const matchValue = m != null;
39
+ if (matchValue) {
40
+ const g = m;
41
+ return SemVer_create_Z55658624(parse((g.groups && g.groups.major) || "", 511, false, 32), parse((g.groups && g.groups.minor) || "", 511, false, 32), parse((g.groups && g.groups.patch) || "", 511, false, 32), unwrap(((g.groups && g.groups.pre) != null) ? ((g.groups && g.groups.pre) || "") : void 0), unwrap(((g.groups && g.groups.build) != null) ? ((g.groups && g.groups.build) || "") : void 0));
42
+ }
43
+ else {
44
+ return void 0;
45
+ }
46
+ }
47
+
48
+ export function SemVer__AsString(this$) {
49
+ let arg_3, arg_4;
50
+ const sb = StringBuilder_$ctor();
51
+ StringBuilder__Append_Z721C83C5(sb, toText(printf("%i.%i.%i"))(this$.Major)(this$.Minor)(this$.Patch));
52
+ if (this$.PreRelease != null) {
53
+ StringBuilder__Append_Z721C83C5(sb, (arg_3 = value_3(this$.PreRelease), toText(printf("-%s"))(arg_3)));
54
+ }
55
+ if (this$.Metadata != null) {
56
+ StringBuilder__Append_Z721C83C5(sb, (arg_4 = value_3(this$.Metadata), toText(printf("+%s"))(arg_4)));
57
+ }
58
+ return toString(sb);
59
+ }
60
+
@@ -0,0 +1,40 @@
1
+ import { toString } from "../fable_modules/fable-library.4.1.4/Types.js";
2
+ import { datetimeUtc, array, map as map_2, list as list_2, guid as guid_1, object as object_1, string, succeed, andThen } from "../fable_modules/Thoth.Json.10.1.0/Decode.fs.js";
3
+ import { uncurry2, uncurry3 } from "../fable_modules/fable-library.4.1.4/Util.js";
4
+ import { Template, Organisation } from "./Templates.js";
5
+ import { ConverterOptions_$ctor } from "../ISA/ISA.Json/ConverterOptions.js";
6
+ import { decoder as decoder_2, encoder } from "../ISA/ISA.Json/Person.js";
7
+ import { OntologyAnnotation_decoder, OntologyAnnotation_encoder } from "../ISA/ISA.Json/Ontology.js";
8
+ import { datetime, list as list_1, guid, object } from "../fable_modules/Thoth.Json.10.1.0/Encode.fs.js";
9
+ import { map } from "../fable_modules/fable-library.4.1.4/List.js";
10
+ import { Process_decoder, Process_encoder } from "../ISA/ISA.Json/Process.js";
11
+ import { map as map_1, delay, toList } from "../fable_modules/fable-library.4.1.4/Seq.js";
12
+ import { ArcTables_fromProcesses_134EBDED, ArcTables__get_Item_Z524259A4 } from "../ISA/ISA/ArcTypes/ArcTables.js";
13
+
14
+ export const Organisation_encode = toString;
15
+
16
+ export const Organisation_decode = (path_1) => ((value_1) => andThen(uncurry3((textValue) => {
17
+ const output = Organisation.ofString(textValue);
18
+ return (arg10$0040) => ((arg20$0040) => succeed(output, arg10$0040, arg20$0040));
19
+ }), string, path_1, value_1));
20
+
21
+ export function Template_encode(template) {
22
+ let list, options_2;
23
+ let personEncoder;
24
+ const options = ConverterOptions_$ctor();
25
+ personEncoder = ((oa) => encoder(options, oa));
26
+ let oaEncoder;
27
+ const options_1 = ConverterOptions_$ctor();
28
+ oaEncoder = ((oa_1) => OntologyAnnotation_encoder(options_1, oa_1));
29
+ return object([["id", guid(template.Id)], ["table", list_1((list = template.Table.GetProcesses(), map((options_2 = ConverterOptions_$ctor(), (oa_2) => Process_encoder(options_2, oa_2)), list)))], ["name", template.Name], ["description", template.Description], ["organisation", Organisation_encode(template.Organisation)], ["version", template.Version], ["authors", list_1(toList(delay(() => map_1(personEncoder, template.Authors))))], ["endpoint_repositories", list_1(toList(delay(() => map_1(oaEncoder, template.EndpointRepositories))))], ["tags", list_1(toList(delay(() => map_1(oaEncoder, template.Tags))))], ["last_updated", datetime(template.LastUpdated)]]);
30
+ }
31
+
32
+ export const Template_decode = (() => {
33
+ const personDecoder = decoder_2(ConverterOptions_$ctor());
34
+ const oaDecoder = OntologyAnnotation_decoder(ConverterOptions_$ctor());
35
+ return (path_10) => ((v) => object_1((get$) => {
36
+ let objectArg, arg_3, d, decoder, objectArg_1, objectArg_2, objectArg_3, objectArg_4, objectArg_5, objectArg_6, objectArg_7, objectArg_8, objectArg_9;
37
+ return Template.create((objectArg = get$.Required, objectArg.Field("id", guid_1)), (arg_3 = ((d = ((decoder = Process_decoder(ConverterOptions_$ctor()), (path_1) => ((value_1) => list_2(uncurry2(decoder), path_1, value_1)))), (path_2) => ((value_2) => map_2((ps) => ArcTables__get_Item_Z524259A4(ArcTables_fromProcesses_134EBDED(ps), 0), uncurry2(d), path_2, value_2)))), (objectArg_1 = get$.Required, objectArg_1.Field("table", uncurry2(arg_3)))), (objectArg_2 = get$.Required, objectArg_2.Field("name", string)), (objectArg_3 = get$.Required, objectArg_3.Field("description", string)), (objectArg_4 = get$.Required, objectArg_4.Field("organisation", uncurry2(Organisation_decode))), (objectArg_5 = get$.Required, objectArg_5.Field("version", string)), (objectArg_6 = get$.Required, objectArg_6.Field("authors", (path_6, value_6) => array(uncurry2(personDecoder), path_6, value_6))), (objectArg_7 = get$.Required, objectArg_7.Field("endpoint_repositories", (path_7, value_7) => array(uncurry2(oaDecoder), path_7, value_7))), (objectArg_8 = get$.Required, objectArg_8.Field("tags", (path_8, value_8) => array(uncurry2(oaDecoder), path_8, value_8))), (objectArg_9 = get$.Required, objectArg_9.Field("last_updated", datetimeUtc)));
38
+ }, path_10, v));
39
+ })();
40
+