@nfdi4plants/arctrl 2.0.0-beta.2 → 2.0.0
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.
- package/ARC.js +55 -18
- package/Contract/ArcAssay.js +4 -4
- package/Contract/ArcInvestigation.js +4 -4
- package/Contract/ArcStudy.js +3 -3
- package/Contract/Datamap.js +1 -1
- package/Contract/ValidationPackagesConfig.js +96 -0
- package/Core/ArcTypes.js +93 -90
- package/Core/Conversion.js +13 -13
- package/Core/DataContext.js +53 -6
- package/Core/{Table/DataMap.js → DataMap.js} +34 -22
- package/Core/Process/Component.js +15 -5
- package/Core/Process/FactorValue.js +14 -5
- package/Core/Process/MaterialAttributeValue.js +14 -5
- package/Core/Process/ProcessParameterValue.js +11 -2
- package/Core/Table/ArcTable.js +99 -11
- package/Core/Table/CompositeCell.js +38 -23
- package/Core/Table/CompositeColumn.js +7 -30
- package/Core/Table/CompositeHeader.js +5 -215
- package/Core/{Process/Value.js → Value.js} +9 -9
- package/Json/Assay.js +10 -9
- package/Json/{Process/Data.js → Data.js} +17 -17
- package/Json/{Process/DataFile.js → DataFile.js} +9 -9
- package/Json/DataMap/DataContext.js +30 -0
- package/Json/DataMap/DataMap.js +25 -0
- package/Json/Encode.js +10 -1
- package/Json/Process/Component.js +1 -1
- package/Json/Process/FactorValue.js +1 -1
- package/Json/Process/MaterialAttributeValue.js +1 -1
- package/Json/Process/ProcessInput.js +1 -1
- package/Json/Process/ProcessOutput.js +1 -1
- package/Json/Process/ProcessParameterValue.js +2 -2
- package/Json/Process/Value.js +3 -3
- package/Json/{Process/PropertyValue.js → PropertyValue.js} +30 -21
- package/Json/Study.js +9 -8
- package/Json/Table/CompositeCell.js +1 -1
- package/Json/context/rocrate/isa_data_context.js +1 -1
- package/Json/context/rocrate/isa_investigation_context.js +1 -1
- package/Json/context/rocrate/property_value_context.js +1 -1
- package/Spreadsheet/AnnotationTable/ArcTable.js +3 -2
- package/Spreadsheet/AnnotationTable/CompositeColumn.js +9 -7
- package/Spreadsheet/ArcAssay.js +62 -26
- package/Spreadsheet/ArcInvestigation.js +59 -38
- package/Spreadsheet/ArcStudy.js +51 -20
- package/Spreadsheet/DataMap.js +1 -1
- package/Spreadsheet/DataMapTable/DataMapTable.js +3 -3
- package/Spreadsheet/Template.js +1 -1
- package/ValidationPackages/ValidationPackage.js +61 -0
- package/ValidationPackages/ValidationPackagesConfig.js +88 -0
- package/Xlsx.js +9 -9
- package/Yaml/Encode.js +8 -0
- package/Yaml/ValidationPackage.js +47 -0
- package/Yaml/ValidationPackagesConfig.js +48 -0
- package/fable_modules/YAMLicious.0.0.1/Decode.fs +374 -0
- package/fable_modules/YAMLicious.0.0.1/Decode.fs.js +1684 -0
- package/fable_modules/YAMLicious.0.0.1/Encode.fs +148 -0
- package/fable_modules/YAMLicious.0.0.1/Encode.fs.js +74 -0
- package/fable_modules/YAMLicious.0.0.1/Interop/JsInterop.fs +14 -0
- package/fable_modules/YAMLicious.0.0.1/Interop/JsInterop.fs.js +11 -0
- package/fable_modules/YAMLicious.0.0.1/Interop/PyInterop.fs +9 -0
- package/fable_modules/YAMLicious.0.0.1/Library.fs +138 -0
- package/fable_modules/YAMLicious.0.0.1/Library.fs.js +7 -0
- package/fable_modules/YAMLicious.0.0.1/Persil.fs +86 -0
- package/fable_modules/YAMLicious.0.0.1/Persil.fs.js +49 -0
- package/fable_modules/YAMLicious.0.0.1/Preprocessing.fs +59 -0
- package/fable_modules/YAMLicious.0.0.1/Preprocessing.fs.js +102 -0
- package/fable_modules/YAMLicious.0.0.1/Reader.fs +295 -0
- package/fable_modules/YAMLicious.0.0.1/Reader.fs.js +530 -0
- package/fable_modules/YAMLicious.0.0.1/Regex.fs +108 -0
- package/fable_modules/YAMLicious.0.0.1/Regex.fs.js +19 -0
- package/fable_modules/YAMLicious.0.0.1/RegexActivePatterns.fs +166 -0
- package/fable_modules/YAMLicious.0.0.1/RegexActivePatterns.fs.js +225 -0
- package/fable_modules/YAMLicious.0.0.1/Writer.fs +84 -0
- package/fable_modules/YAMLicious.0.0.1/Writer.fs.js +161 -0
- package/fable_modules/YAMLicious.0.0.1/YAMLicious.fableproj +39 -0
- package/fable_modules/YAMLicious.0.0.1/YAMLiciousTypes.fs +82 -0
- package/fable_modules/YAMLicious.0.0.1/YAMLiciousTypes.fs.js +130 -0
- package/fable_modules/YAMLicious.0.0.1/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/YAMLicious.0.0.1/obj/Debug/netstandard2.0/YAMLicious.AssemblyInfo.fs +19 -0
- package/fable_modules/YAMLicious.0.0.1/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +3 -0
- package/fable_modules/YAMLicious.0.0.1/obj/Release/netstandard2.0/YAMLicious.AssemblyInfo.fs +19 -0
- package/fable_modules/project_cracked.json +1 -1
- package/index.js +1 -0
- package/package.json +1 -1
package/ARC.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { concat, fold, map, exactlyOne, tryPick, choose } from "./fable_modules/fable-library-js.4.16.0/Array.js";
|
|
1
|
+
import { append as append_1, contains as contains_1, concat, fold, map, exactlyOne, tryPick, choose } from "./fable_modules/fable-library-js.4.16.0/Array.js";
|
|
2
2
|
import { ARCtrl_ArcAssay__ArcAssay_ToUpdateContract, ARCtrl_ArcAssay__ArcAssay_ToCreateContract_6FCE9E49, ARCtrl_ArcAssay__ArcAssay_ToDeleteContract, ARCtrl_ArcAssay__ArcAssay_tryFromReadContract_Static_7570923F } from "./Contract/ArcAssay.js";
|
|
3
3
|
import { ARCtrl_DataMap__DataMap_ToUpdateContractForAssay_Z721C83C5, ARCtrl_DataMap__DataMap_ToCreateContractForAssay_Z721C83C5, ARCtrl_DataMap__DataMap_ToUpdateContractForStudy_Z721C83C5, ARCtrl_DataMap__DataMap_ToCreateContractForStudy_Z721C83C5, ARCtrl_DataMap__DataMap_tryFromReadContractForStudy_Static, ARCtrl_DataMap__DataMap_tryFromReadContractForAssay_Static } from "./Contract/Datamap.js";
|
|
4
4
|
import { ARCtrl_ArcStudy__ArcStudy_ToCreateContract_6FCE9E49, ARCtrl_ArcStudy__ArcStudy_ToUpdateContract, ARCtrl_ArcStudy__ArcStudy_tryFromReadContract_Static_7570923F } from "./Contract/ArcStudy.js";
|
|
@@ -15,13 +15,13 @@ import { ofArray } from "./fable_modules/fable-library-js.4.16.0/List.js";
|
|
|
15
15
|
import { tryISAReadContractFromPath } from "./Contract/ARC.js";
|
|
16
16
|
import { ArcTables } from "./Core/Table/ArcTables.js";
|
|
17
17
|
import { addToDict } from "./fable_modules/fable-library-js.4.16.0/MapUtil.js";
|
|
18
|
-
import {
|
|
18
|
+
import { ARCtrl_ArcInvestigation__ArcInvestigation_toFsWorkbook_Static_Z720BD3FF } from "./Spreadsheet/ArcInvestigation.js";
|
|
19
19
|
import { ArcInvestigation } from "./Core/ArcTypes.js";
|
|
20
20
|
import { Assay_datamapFileNameFromIdentifier, Assay_fileNameFromIdentifier, Study_datamapFileNameFromIdentifier, Study_fileNameFromIdentifier } from "./Core/Helper/Identifier.js";
|
|
21
|
-
import {
|
|
22
|
-
import { DataMap__get_StaticHash, DataMap__set_StaticHash_Z524259A4 } from "./Core/
|
|
23
|
-
import { toFsWorkbook
|
|
24
|
-
import {
|
|
21
|
+
import { ARCtrl_ArcStudy__ArcStudy_toFsWorkbook_Static_Z4CEFA522 } from "./Spreadsheet/ArcStudy.js";
|
|
22
|
+
import { DataMap__get_StaticHash, DataMap__set_StaticHash_Z524259A4 } from "./Core/DataMap.js";
|
|
23
|
+
import { toFsWorkbook } from "./Spreadsheet/DataMap.js";
|
|
24
|
+
import { ARCtrl_ArcAssay__ArcAssay_toFsWorkbook_Static_Z2508BE4F } from "./Spreadsheet/ArcAssay.js";
|
|
25
25
|
import { Dictionary_tryGet } from "./fable_modules/FsSpreadsheet.6.2.0/Cells/FsCellsCollection.fs.js";
|
|
26
26
|
import { Clone_createCloneContract_5000466F, Init_createAddRemoteContract_Z721C83C5, gitignoreContract, gitattributesContract, Init_createInitContract_6DFDD678 } from "./Contract/Git.js";
|
|
27
27
|
import { FSharpSet__Contains, ofSeq, unionMany } from "./fable_modules/fable-library-js.4.16.0/Set.js";
|
|
@@ -30,6 +30,7 @@ import { fromString } from "./fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.f
|
|
|
30
30
|
import { encoder, decoder as decoder_1 } from "./Json/ARC.js";
|
|
31
31
|
import { toString } from "./fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
32
32
|
import { defaultSpaces } from "./Json/Encode.js";
|
|
33
|
+
import { ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_tryFromReadContract_Static_7570923F, ValidationPackagesConfigHelper_ReadContract, ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_toDeleteContract_Static_724DAE55, ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_toCreateContract_Static_724DAE55, ValidationPackagesConfigHelper_ConfigFilePath } from "./Contract/ValidationPackagesConfig.js";
|
|
33
34
|
import { class_type } from "./fable_modules/fable-library-js.4.16.0/Reflection.js";
|
|
34
35
|
|
|
35
36
|
export function ARCAux_getArcAssaysFromContracts(contracts) {
|
|
@@ -256,7 +257,9 @@ export class ARC {
|
|
|
256
257
|
registeredStudy.UpdateReferenceByStudyFile(study, true);
|
|
257
258
|
}
|
|
258
259
|
const datamap = ARCAux_getAssayDataMapFromContracts(study.Identifier, contracts);
|
|
259
|
-
study.DataMap
|
|
260
|
+
if (study.DataMap == null) {
|
|
261
|
+
study.DataMap = datamap;
|
|
262
|
+
}
|
|
260
263
|
study.StaticHash = (study.GetLightHashCode() | 0);
|
|
261
264
|
});
|
|
262
265
|
assays.forEach((assay) => {
|
|
@@ -273,7 +276,9 @@ export class ARC {
|
|
|
273
276
|
const array_6 = assay_1.StudiesRegisteredIn;
|
|
274
277
|
updatedTables = fold((tables, study_1) => ArcTables.updateReferenceTablesBySheets(new ArcTables(study_1.Tables), tables, false), new ArcTables(assay_1.Tables), array_6);
|
|
275
278
|
const datamap_1 = ARCAux_getAssayDataMapFromContracts(assay_1.Identifier, contracts);
|
|
276
|
-
assay_1.DataMap
|
|
279
|
+
if (assay_1.DataMap == null) {
|
|
280
|
+
assay_1.DataMap = datamap_1;
|
|
281
|
+
}
|
|
277
282
|
assay_1.Tables = updatedTables.Tables;
|
|
278
283
|
});
|
|
279
284
|
iterate((a_3) => {
|
|
@@ -297,28 +302,28 @@ export class ARC {
|
|
|
297
302
|
const workbooks = new Map([]);
|
|
298
303
|
const matchValue = this$.ISA;
|
|
299
304
|
if (matchValue == null) {
|
|
300
|
-
addToDict(workbooks, "isa.investigation.xlsx", ["ISA_Investigation",
|
|
305
|
+
addToDict(workbooks, "isa.investigation.xlsx", ["ISA_Investigation", ARCtrl_ArcInvestigation__ArcInvestigation_toFsWorkbook_Static_Z720BD3FF(ArcInvestigation.create("MISSING_IDENTIFIER_"))]);
|
|
301
306
|
}
|
|
302
307
|
else {
|
|
303
308
|
const inv = matchValue;
|
|
304
|
-
addToDict(workbooks, "isa.investigation.xlsx", ["ISA_Investigation",
|
|
309
|
+
addToDict(workbooks, "isa.investigation.xlsx", ["ISA_Investigation", ARCtrl_ArcInvestigation__ArcInvestigation_toFsWorkbook_Static_Z720BD3FF(inv)]);
|
|
305
310
|
inv.StaticHash = (inv.GetLightHashCode() | 0);
|
|
306
311
|
iterate((s) => {
|
|
307
312
|
s.StaticHash = (s.GetLightHashCode() | 0);
|
|
308
|
-
addToDict(workbooks, Study_fileNameFromIdentifier(s.Identifier), ["ISA_Study",
|
|
313
|
+
addToDict(workbooks, Study_fileNameFromIdentifier(s.Identifier), ["ISA_Study", ARCtrl_ArcStudy__ArcStudy_toFsWorkbook_Static_Z4CEFA522(s)]);
|
|
309
314
|
if (s.DataMap != null) {
|
|
310
315
|
const dm = value_2(s.DataMap);
|
|
311
316
|
DataMap__set_StaticHash_Z524259A4(dm, safeHash(dm));
|
|
312
|
-
addToDict(workbooks, Study_datamapFileNameFromIdentifier(s.Identifier), ["ISA_Datamap",
|
|
317
|
+
addToDict(workbooks, Study_datamapFileNameFromIdentifier(s.Identifier), ["ISA_Datamap", toFsWorkbook(dm)]);
|
|
313
318
|
}
|
|
314
319
|
}, inv.Studies);
|
|
315
320
|
iterate((a) => {
|
|
316
321
|
a.StaticHash = (a.GetLightHashCode() | 0);
|
|
317
|
-
addToDict(workbooks, Assay_fileNameFromIdentifier(a.Identifier), ["ISA_Assay",
|
|
322
|
+
addToDict(workbooks, Assay_fileNameFromIdentifier(a.Identifier), ["ISA_Assay", ARCtrl_ArcAssay__ArcAssay_toFsWorkbook_Static_Z2508BE4F(a)]);
|
|
318
323
|
if (a.DataMap != null) {
|
|
319
324
|
const dm_1 = value_2(a.DataMap);
|
|
320
325
|
DataMap__set_StaticHash_Z524259A4(dm_1, safeHash(dm_1));
|
|
321
|
-
addToDict(workbooks, Assay_datamapFileNameFromIdentifier(a.Identifier), ["ISA_Datamap",
|
|
326
|
+
addToDict(workbooks, Assay_datamapFileNameFromIdentifier(a.Identifier), ["ISA_Datamap", toFsWorkbook(dm_1)]);
|
|
322
327
|
}
|
|
323
328
|
}, inv.Assays);
|
|
324
329
|
}
|
|
@@ -512,11 +517,43 @@ export class ARC {
|
|
|
512
517
|
throw new Error(toText(printf("Error decoding string: %O"))(matchValue.fields[0]));
|
|
513
518
|
})() : matchValue.fields[0]));
|
|
514
519
|
}
|
|
520
|
+
ToROCrateJsonString(spaces) {
|
|
521
|
+
const this$ = this;
|
|
522
|
+
const value = encoder(value_2(this$._isa));
|
|
523
|
+
return toString(defaultSpaces(spaces), value);
|
|
524
|
+
}
|
|
515
525
|
static toROCrateJsonString(spaces) {
|
|
516
|
-
return (obj) =>
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
526
|
+
return (obj) => obj.ToROCrateJsonString(unwrap(spaces));
|
|
527
|
+
}
|
|
528
|
+
GetValidationPackagesConfigWriteContract(vpc) {
|
|
529
|
+
const this$ = this;
|
|
530
|
+
const paths = this$.FileSystem.Tree.ToFilePaths();
|
|
531
|
+
if (!contains_1(ValidationPackagesConfigHelper_ConfigFilePath, paths, {
|
|
532
|
+
Equals: (x, y) => (x === y),
|
|
533
|
+
GetHashCode: stringHash,
|
|
534
|
+
})) {
|
|
535
|
+
const filePaths = append_1([ValidationPackagesConfigHelper_ConfigFilePath], paths);
|
|
536
|
+
this$.SetFilePaths(filePaths);
|
|
537
|
+
}
|
|
538
|
+
return ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_toCreateContract_Static_724DAE55(vpc);
|
|
539
|
+
}
|
|
540
|
+
GetValidationPackagesConfigDeleteContract(vpc) {
|
|
541
|
+
const this$ = this;
|
|
542
|
+
const paths = this$.FileSystem.Tree.ToFilePaths();
|
|
543
|
+
if (contains_1(ValidationPackagesConfigHelper_ConfigFilePath, paths, {
|
|
544
|
+
Equals: (x, y) => (x === y),
|
|
545
|
+
GetHashCode: stringHash,
|
|
546
|
+
})) {
|
|
547
|
+
const filePaths = paths.filter((p) => !(p === ValidationPackagesConfigHelper_ConfigFilePath));
|
|
548
|
+
this$.SetFilePaths(filePaths);
|
|
549
|
+
}
|
|
550
|
+
return ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_toDeleteContract_Static_724DAE55(vpc);
|
|
551
|
+
}
|
|
552
|
+
GetValidationPackagesConfigReadContract() {
|
|
553
|
+
return ValidationPackagesConfigHelper_ReadContract;
|
|
554
|
+
}
|
|
555
|
+
GetValidationPackagesConfigFromReadContract(contract) {
|
|
556
|
+
return ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_tryFromReadContract_Static_7570923F(contract);
|
|
520
557
|
}
|
|
521
558
|
}
|
|
522
559
|
|
package/Contract/ArcAssay.js
CHANGED
|
@@ -4,7 +4,7 @@ import { defaultOf } from "../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
|
4
4
|
import { unwrap, defaultArg } from "../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
5
5
|
import { Assay_fileNameFromIdentifier } from "../Core/Helper/Identifier.js";
|
|
6
6
|
import { Contract } from "./Contract.js";
|
|
7
|
-
import {
|
|
7
|
+
import { ARCtrl_ArcAssay__ArcAssay_fromFsWorkbook_Static_32154C9D, ARCtrl_ArcAssay__ArcAssay_toFsWorkbook_Static_Z2508BE4F } from "../Spreadsheet/ArcAssay.js";
|
|
8
8
|
import { empty, singleton, collect, append, delay, toArray } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
9
9
|
import { FileSystemTree } from "../FileSystem/FileSystemTree.js";
|
|
10
10
|
|
|
@@ -39,7 +39,7 @@ export function $007CAssayPath$007C_$007C(input) {
|
|
|
39
39
|
export function ARCtrl_ArcAssay__ArcAssay_ToCreateContract_6FCE9E49(this$, WithFolder) {
|
|
40
40
|
const withFolder = defaultArg(WithFolder, false);
|
|
41
41
|
const path = Assay_fileNameFromIdentifier(this$.Identifier);
|
|
42
|
-
const c = Contract.createCreate(path, "ISA_Assay",
|
|
42
|
+
const c = Contract.createCreate(path, "ISA_Assay", ARCtrl_ArcAssay__ArcAssay_toFsWorkbook_Static_Z2508BE4F(this$));
|
|
43
43
|
return toArray(delay(() => {
|
|
44
44
|
let folderFS;
|
|
45
45
|
return append(withFolder ? ((folderFS = FileSystemTree.createAssaysFolder([FileSystemTree.createAssayFolder(this$.Identifier)]), collect((p) => (((p !== path) && (p !== "assays/.gitkeep")) ? singleton(Contract.createCreate(p, "PlainText")) : empty()), folderFS.ToFilePaths(false)))) : empty(), delay(() => singleton(c)));
|
|
@@ -48,7 +48,7 @@ export function ARCtrl_ArcAssay__ArcAssay_ToCreateContract_6FCE9E49(this$, WithF
|
|
|
48
48
|
|
|
49
49
|
export function ARCtrl_ArcAssay__ArcAssay_ToUpdateContract(this$) {
|
|
50
50
|
const path = Assay_fileNameFromIdentifier(this$.Identifier);
|
|
51
|
-
return Contract.createUpdate(path, "ISA_Assay",
|
|
51
|
+
return Contract.createUpdate(path, "ISA_Assay", ARCtrl_ArcAssay__ArcAssay_toFsWorkbook_Static_Z2508BE4F(this$));
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
export function ARCtrl_ArcAssay__ArcAssay_ToDeleteContract(this$) {
|
|
@@ -94,7 +94,7 @@ export function ARCtrl_ArcAssay__ArcAssay_tryFromReadContract_Static_7570923F(c)
|
|
|
94
94
|
}
|
|
95
95
|
switch (matchResult) {
|
|
96
96
|
case 0:
|
|
97
|
-
return
|
|
97
|
+
return ARCtrl_ArcAssay__ArcAssay_fromFsWorkbook_Static_32154C9D(fsworkbook);
|
|
98
98
|
default:
|
|
99
99
|
return void 0;
|
|
100
100
|
}
|
|
@@ -2,7 +2,7 @@ import { combineMany } from "../FileSystem/Path.js";
|
|
|
2
2
|
import { item, equalsWith } from "../fable_modules/fable-library-js.4.16.0/Array.js";
|
|
3
3
|
import { defaultOf } from "../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
4
4
|
import { Contract } from "./Contract.js";
|
|
5
|
-
import {
|
|
5
|
+
import { ARCtrl_ArcInvestigation__ArcInvestigation_fromFsWorkbook_Static_32154C9D, ARCtrl_ArcInvestigation__ArcInvestigation_toFsWorkbook_Static_Z720BD3FF } from "../Spreadsheet/ArcInvestigation.js";
|
|
6
6
|
|
|
7
7
|
export function $007CInvestigationPath$007C_$007C(input) {
|
|
8
8
|
let matchResult;
|
|
@@ -26,11 +26,11 @@ export function $007CInvestigationPath$007C_$007C(input) {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export function ARCtrl_ArcInvestigation__ArcInvestigation_ToCreateContract(this$) {
|
|
29
|
-
return Contract.createCreate("isa.investigation.xlsx", "ISA_Investigation",
|
|
29
|
+
return Contract.createCreate("isa.investigation.xlsx", "ISA_Investigation", ARCtrl_ArcInvestigation__ArcInvestigation_toFsWorkbook_Static_Z720BD3FF(this$));
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export function ARCtrl_ArcInvestigation__ArcInvestigation_ToUpdateContract(this$) {
|
|
33
|
-
return Contract.createUpdate("isa.investigation.xlsx", "ISA_Investigation",
|
|
33
|
+
return Contract.createUpdate("isa.investigation.xlsx", "ISA_Investigation", ARCtrl_ArcInvestigation__ArcInvestigation_toFsWorkbook_Static_Z720BD3FF(this$));
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export function ARCtrl_ArcInvestigation__ArcInvestigation_toCreateContract_Static_Z720BD3FF(inv) {
|
|
@@ -67,7 +67,7 @@ export function ARCtrl_ArcInvestigation__ArcInvestigation_tryFromReadContract_St
|
|
|
67
67
|
}
|
|
68
68
|
switch (matchResult) {
|
|
69
69
|
case 0:
|
|
70
|
-
return
|
|
70
|
+
return ARCtrl_ArcInvestigation__ArcInvestigation_fromFsWorkbook_Static_32154C9D(fsworkbook);
|
|
71
71
|
default:
|
|
72
72
|
return void 0;
|
|
73
73
|
}
|
package/Contract/ArcStudy.js
CHANGED
|
@@ -4,7 +4,7 @@ import { defaultOf } from "../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
|
4
4
|
import { unwrap, defaultArg } from "../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
5
5
|
import { Study_fileNameFromIdentifier } from "../Core/Helper/Identifier.js";
|
|
6
6
|
import { Contract } from "./Contract.js";
|
|
7
|
-
import { ARCtrl_ArcStudy__ArcStudy_fromFsWorkbook_Static_32154C9D,
|
|
7
|
+
import { ARCtrl_ArcStudy__ArcStudy_fromFsWorkbook_Static_32154C9D, ARCtrl_ArcStudy__ArcStudy_toFsWorkbook_Static_Z4CEFA522 } from "../Spreadsheet/ArcStudy.js";
|
|
8
8
|
import { empty, singleton, collect, append, delay, toArray } from "../fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
9
9
|
import { FileSystemTree } from "../FileSystem/FileSystemTree.js";
|
|
10
10
|
|
|
@@ -39,7 +39,7 @@ export function $007CStudyPath$007C_$007C(input) {
|
|
|
39
39
|
export function ARCtrl_ArcStudy__ArcStudy_ToCreateContract_6FCE9E49(this$, WithFolder) {
|
|
40
40
|
const withFolder = defaultArg(WithFolder, false);
|
|
41
41
|
const path = Study_fileNameFromIdentifier(this$.Identifier);
|
|
42
|
-
const c = Contract.createCreate(path, "ISA_Study",
|
|
42
|
+
const c = Contract.createCreate(path, "ISA_Study", ARCtrl_ArcStudy__ArcStudy_toFsWorkbook_Static_Z4CEFA522(this$));
|
|
43
43
|
return toArray(delay(() => {
|
|
44
44
|
let folderFS;
|
|
45
45
|
return append(withFolder ? ((folderFS = FileSystemTree.createStudiesFolder([FileSystemTree.createStudyFolder(this$.Identifier)]), collect((p) => (((p !== path) && (p !== "studies/.gitkeep")) ? singleton(Contract.createCreate(p, "PlainText")) : empty()), folderFS.ToFilePaths(false)))) : empty(), delay(() => singleton(c)));
|
|
@@ -48,7 +48,7 @@ export function ARCtrl_ArcStudy__ArcStudy_ToCreateContract_6FCE9E49(this$, WithF
|
|
|
48
48
|
|
|
49
49
|
export function ARCtrl_ArcStudy__ArcStudy_ToUpdateContract(this$) {
|
|
50
50
|
const path = Study_fileNameFromIdentifier(this$.Identifier);
|
|
51
|
-
return Contract.createUpdate(path, "ISA_Study",
|
|
51
|
+
return Contract.createUpdate(path, "ISA_Study", ARCtrl_ArcStudy__ArcStudy_toFsWorkbook_Static_Z4CEFA522(this$));
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
export function ARCtrl_ArcStudy__ArcStudy_ToDeleteContract(this$) {
|
package/Contract/Datamap.js
CHANGED
|
@@ -4,7 +4,7 @@ import { safeHash, defaultOf } from "../fable_modules/fable-library-js.4.16.0/Ut
|
|
|
4
4
|
import { Study_datamapFileNameFromIdentifier, Assay_datamapFileNameFromIdentifier } from "../Core/Helper/Identifier.js";
|
|
5
5
|
import { Contract } from "./Contract.js";
|
|
6
6
|
import { fromFsWorkbook, toFsWorkbook } from "../Spreadsheet/DataMap.js";
|
|
7
|
-
import { DataMap__set_StaticHash_Z524259A4 } from "../Core/
|
|
7
|
+
import { DataMap__set_StaticHash_Z524259A4 } from "../Core/DataMap.js";
|
|
8
8
|
|
|
9
9
|
export function $007CDatamapPath$007C_$007C(input) {
|
|
10
10
|
let matchResult;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { combineMany } from "../FileSystem/Path.js";
|
|
2
|
+
import { Contract } from "./Contract.js";
|
|
3
|
+
import { item, equalsWith } from "../fable_modules/fable-library-js.4.16.0/Array.js";
|
|
4
|
+
import { defaultOf } from "../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
5
|
+
import { ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_fromYamlString_Static_Z721C83C5, ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_toYamlString_Static_71136F3F } from "../Yaml/ValidationPackagesConfig.js";
|
|
6
|
+
|
|
7
|
+
export const ValidationPackagesConfigHelper_ConfigFilePath = combineMany([".arc", "validation_packages.yml"]);
|
|
8
|
+
|
|
9
|
+
export const ValidationPackagesConfigHelper_ReadContract = new Contract("READ", ValidationPackagesConfigHelper_ConfigFilePath, "YAML", void 0);
|
|
10
|
+
|
|
11
|
+
export function ValidationPackagesConfigExtensions_$007CValidationPackagesYamlPath$007C_$007C(input) {
|
|
12
|
+
let matchResult;
|
|
13
|
+
if (!equalsWith((x, y) => (x === y), input, defaultOf()) && (input.length === 2)) {
|
|
14
|
+
if (item(0, input) === ".arc") {
|
|
15
|
+
if (item(1, input) === "validation_packages.yml") {
|
|
16
|
+
matchResult = 0;
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
matchResult = 1;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
matchResult = 1;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
matchResult = 1;
|
|
28
|
+
}
|
|
29
|
+
switch (matchResult) {
|
|
30
|
+
case 0:
|
|
31
|
+
return combineMany(input);
|
|
32
|
+
default:
|
|
33
|
+
return void 0;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export function ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_ToCreateContract(this$) {
|
|
38
|
+
return Contract.createCreate(ValidationPackagesConfigHelper_ConfigFilePath, "YAML", ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_toYamlString_Static_71136F3F()(this$));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_ToDeleteContract(this$) {
|
|
42
|
+
return Contract.createDelete(ValidationPackagesConfigHelper_ConfigFilePath);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_toDeleteContract_Static_724DAE55(config) {
|
|
46
|
+
return ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_ToDeleteContract(config);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_toCreateContract_Static_724DAE55(config) {
|
|
50
|
+
return ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_ToCreateContract(config);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_tryFromReadContract_Static_7570923F(c) {
|
|
54
|
+
let yaml;
|
|
55
|
+
let matchResult, p_1, yaml_1;
|
|
56
|
+
if (c.Operation === "READ") {
|
|
57
|
+
if (c.DTOType != null) {
|
|
58
|
+
if (c.DTOType === "YAML") {
|
|
59
|
+
if (c.DTO != null) {
|
|
60
|
+
if (typeof c.DTO === "string") {
|
|
61
|
+
if ((yaml = c.DTO, c.Path === ValidationPackagesConfigHelper_ConfigFilePath)) {
|
|
62
|
+
matchResult = 0;
|
|
63
|
+
p_1 = c.Path;
|
|
64
|
+
yaml_1 = c.DTO;
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
matchResult = 1;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
matchResult = 1;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
matchResult = 1;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
matchResult = 1;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
else {
|
|
83
|
+
matchResult = 1;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
matchResult = 1;
|
|
88
|
+
}
|
|
89
|
+
switch (matchResult) {
|
|
90
|
+
case 0:
|
|
91
|
+
return ARCtrl_ValidationPackages_ValidationPackagesConfig__ValidationPackagesConfig_fromYamlString_Static_Z721C83C5(yaml_1);
|
|
92
|
+
default:
|
|
93
|
+
return void 0;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|