@nfdi4plants/arctrl 2.0.0-alpha.3 → 2.0.0-alpha.5
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 +178 -21
- package/Contract/ARC.js +9 -1
- package/Contract/Contract.js +3 -0
- package/Contract/Datamap.js +180 -0
- package/Contract/Git.js +3 -0
- package/Core/ArcTypes.js +189 -120
- package/Core/Conversion.js +177 -106
- package/Core/Data.js +119 -0
- package/Core/{Process/DataFile.js → DataFile.js} +3 -3
- package/Core/Helper/Identifier.js +40 -0
- package/Core/Helper/Regex.js +13 -0
- package/Core/OntologyAnnotation.js +28 -6
- package/Core/Process/ColumnIndex.js +13 -3
- package/Core/Process/ProcessInput.js +5 -5
- package/Core/Process/ProcessOutput.js +5 -5
- package/Core/Process/Value.js +1 -1
- package/Core/Table/ArcTable.js +24 -2
- package/Core/Table/ArcTableAux.js +56 -5
- package/Core/Table/ArcTables.js +1 -1
- package/Core/Table/CompositeCell.js +67 -10
- package/Core/Table/CompositeColumn.js +9 -0
- package/Core/Table/CompositeHeader.js +108 -94
- package/Core/Table/DataMap.js +166 -0
- package/FileSystem/DefaultGitattributes.js +3 -0
- package/FileSystem/FileSystemTree.js +18 -4
- package/Json/Assay.js +4 -4
- package/Json/Process/Data.js +56 -18
- package/Json/Process/DataFile.js +5 -5
- package/Json/Process/PropertyValue.js +124 -4
- package/Json/Study.js +4 -4
- package/Json/Table/CompositeCell.js +7 -6
- package/Json/Table/CompositeHeader.js +4 -3
- package/Spreadsheet/AnnotationTable/ArcTable.js +10 -13
- package/Spreadsheet/AnnotationTable/CompositeCell.js +32 -50
- package/Spreadsheet/AnnotationTable/CompositeColumn.js +16 -10
- package/Spreadsheet/AnnotationTable/CompositeHeader.js +290 -135
- package/Spreadsheet/ArcAssay.js +2 -2
- package/Spreadsheet/ArcInvestigation.js +2 -2
- package/Spreadsheet/ArcStudy.js +2 -2
- package/Spreadsheet/DataMap.js +31 -0
- package/Spreadsheet/DataMapTable/DataMapColumn.js +36 -0
- package/Spreadsheet/DataMapTable/DataMapHeader.js +417 -0
- package/Spreadsheet/DataMapTable/DataMapTable.js +98 -0
- package/Spreadsheet/Metadata/Assays.js +2 -2
- package/Spreadsheet/Metadata/SparseTable.js +7 -7
- package/Spreadsheet/Metadata/Study.js +1 -1
- package/Spreadsheet/Template.js +2 -2
- package/Xlsx.js +29 -6
- package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsSpreadsheet.fableproj +9 -3
- package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsWorksheet.fs +1 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Cell.fs +23 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Cell.fs.js +21 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Row.fs +23 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Row.fs.js +19 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Table.fs +24 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Table.fs.js +15 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Value.fs +70 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Value.fs.js +48 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Workbook.fs +20 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Workbook.fs.js +21 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Worksheet.fs +49 -0
- package/fable_modules/FsSpreadsheet.6.1.2/Json/Worksheet.fs.js +44 -0
- package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/obj/Release/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +3 -3
- package/fable_modules/project_cracked.json +1 -1
- package/package.json +1 -1
- package/Core/Process/Data.js +0 -55
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Cells/FsCell.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Cells/FsCell.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Cells/FsCellsCollection.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Cells/FsCellsCollection.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/CellBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/CellBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/ColumnBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/ColumnBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/DSL.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/DSL.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Expression.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Expression.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Operators.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Operators.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/RowBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/RowBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/SheetBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/SheetBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/TableBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/TableBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Transform.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Transform.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Types.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/Types.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/WorkbookBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/DSL/WorkbookBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsAddress.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsAddress.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsColumn.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsColumn.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsRow.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsWorkbook.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsWorkbook.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/FsWorksheet.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRange.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRange.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeAddress.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeAddress.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeBase.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeBase.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeColumn.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeColumn.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Ranges/FsRangeRow.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/SheetBuilder.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/SheetBuilder.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTable.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTable.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTableField.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTableField.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTableRow.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/Tables/FsTableRow.fs.js +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/obj/Debug/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/obj/Debug/netstandard2.0/FsSpreadsheet.AssemblyInfo.fs +0 -0
- /package/fable_modules/{FsSpreadsheet.5.1.3 → FsSpreadsheet.6.1.2}/obj/Release/netstandard2.0/.NETStandard,Version=v2.0.AssemblyAttributes.fs +0 -0
package/ARC.js
CHANGED
|
@@ -1,30 +1,33 @@
|
|
|
1
|
-
import { concat, fold, map, exactlyOne, choose } from "./fable_modules/fable-library-js.4.16.0/Array.js";
|
|
1
|
+
import { 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
|
+
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";
|
|
3
4
|
import { ARCtrl_ArcStudy__ArcStudy_ToCreateContract_6FCE9E49, ARCtrl_ArcStudy__ArcStudy_ToUpdateContract, ARCtrl_ArcStudy__ArcStudy_tryFromReadContract_Static_7570923F } from "./Contract/ArcStudy.js";
|
|
4
5
|
import { ARCtrl_ArcInvestigation__ArcInvestigation_ToUpdateContract_6FCE9E49, ARCtrl_ArcInvestigation__ArcInvestigation_tryFromReadContract_Static_7570923F } from "./Contract/ArcInvestigation.js";
|
|
5
|
-
import { collect, empty, iterate, find, tryFind, map as map_1, singleton, append, delay, toList, toArray } from "./fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
6
|
+
import { collect, empty, iterate, find, tryFind, map as map_1, singleton, append, delay, toList, contains, toArray } from "./fable_modules/fable-library-js.4.16.0/Seq.js";
|
|
6
7
|
import { FileSystemTree } from "./FileSystem/FileSystemTree.js";
|
|
7
8
|
import { FileSystem } from "./FileSystem/FileSystem.js";
|
|
8
9
|
import { bind, map as map_2, value as value_2, defaultArg, unwrap } from "./fable_modules/fable-library-js.4.16.0/Option.js";
|
|
10
|
+
import { comparePrimitives, safeHash, stringHash } from "./fable_modules/fable-library-js.4.16.0/Util.js";
|
|
9
11
|
import { getStudyFolderPath, getAssayFolderPath } from "./FileSystem/Path.js";
|
|
12
|
+
import { printf, toText, replace } from "./fable_modules/fable-library-js.4.16.0/String.js";
|
|
10
13
|
import { Contract } from "./Contract/Contract.js";
|
|
11
14
|
import { ofArray } from "./fable_modules/fable-library-js.4.16.0/List.js";
|
|
12
15
|
import { tryISAReadContractFromPath } from "./Contract/ARC.js";
|
|
13
16
|
import { ArcTables } from "./Core/Table/ArcTables.js";
|
|
14
|
-
import { comparePrimitives, safeHash } from "./fable_modules/fable-library-js.4.16.0/Util.js";
|
|
15
17
|
import { addToDict } from "./fable_modules/fable-library-js.4.16.0/MapUtil.js";
|
|
16
18
|
import { toFsWorkbook, toLightFsWorkbook } from "./Spreadsheet/ArcInvestigation.js";
|
|
17
19
|
import { ArcInvestigation } from "./Core/ArcTypes.js";
|
|
18
|
-
import { Assay_fileNameFromIdentifier, Study_fileNameFromIdentifier } from "./Core/Helper/Identifier.js";
|
|
20
|
+
import { Assay_datamapFileNameFromIdentifier, Assay_fileNameFromIdentifier, Study_datamapFileNameFromIdentifier, Study_fileNameFromIdentifier } from "./Core/Helper/Identifier.js";
|
|
19
21
|
import { ARCtrl_ArcStudy__ArcStudy_toFsWorkbook_Static_353D0DB7 } from "./Spreadsheet/ArcStudy.js";
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
22
|
+
import { DataMap__get_StaticHash, DataMap__set_StaticHash_Z524259A4 } from "./Core/Table/DataMap.js";
|
|
23
|
+
import { toFsWorkbook as toFsWorkbook_1 } from "./Spreadsheet/DataMap.js";
|
|
24
|
+
import { toFsWorkbook as toFsWorkbook_2 } from "./Spreadsheet/ArcAssay.js";
|
|
25
|
+
import { Dictionary_tryGet } from "./fable_modules/FsSpreadsheet.6.1.2/Cells/FsCellsCollection.fs.js";
|
|
26
|
+
import { Clone_createCloneContract_5000466F, Init_createAddRemoteContract_Z721C83C5, gitignoreContract, gitattributesContract, Init_createInitContract_6DFDD678 } from "./Contract/Git.js";
|
|
23
27
|
import { FSharpSet__Contains, ofSeq, unionMany } from "./fable_modules/fable-library-js.4.16.0/Set.js";
|
|
24
28
|
import { ofSeq as ofSeq_1 } from "./fable_modules/fable-library-js.4.16.0/Map.js";
|
|
25
29
|
import { fromString } from "./fable_modules/Thoth.Json.JavaScript.0.1.0/Decode.fs.js";
|
|
26
30
|
import { encoder, decoder as decoder_1 } from "./Json/ARC.js";
|
|
27
|
-
import { printf, toText } from "./fable_modules/fable-library-js.4.16.0/String.js";
|
|
28
31
|
import { toString } from "./fable_modules/Thoth.Json.JavaScript.0.1.0/Encode.fs.js";
|
|
29
32
|
import { defaultSpaces } from "./Json/Encode.js";
|
|
30
33
|
import { class_type } from "./fable_modules/fable-library-js.4.16.0/Reflection.js";
|
|
@@ -33,10 +36,18 @@ export function ARCAux_getArcAssaysFromContracts(contracts) {
|
|
|
33
36
|
return choose(ARCtrl_ArcAssay__ArcAssay_tryFromReadContract_Static_7570923F, contracts);
|
|
34
37
|
}
|
|
35
38
|
|
|
39
|
+
export function ARCAux_getAssayDataMapFromContracts(assayIdentifier, contracts) {
|
|
40
|
+
return tryPick((c) => ARCtrl_DataMap__DataMap_tryFromReadContractForAssay_Static(assayIdentifier, c), contracts);
|
|
41
|
+
}
|
|
42
|
+
|
|
36
43
|
export function ARCAux_getArcStudiesFromContracts(contracts) {
|
|
37
44
|
return choose(ARCtrl_ArcStudy__ArcStudy_tryFromReadContract_Static_7570923F, contracts);
|
|
38
45
|
}
|
|
39
46
|
|
|
47
|
+
export function ARCAux_getStudyDataMapFromContracts(studyIdentifier, contracts) {
|
|
48
|
+
return tryPick((c) => ARCtrl_DataMap__DataMap_tryFromReadContractForStudy_Static(studyIdentifier, c), contracts);
|
|
49
|
+
}
|
|
50
|
+
|
|
40
51
|
export function ARCAux_getArcInvestigationFromContracts(contracts) {
|
|
41
52
|
return exactlyOne(choose(ARCtrl_ArcInvestigation__ArcInvestigation_tryFromReadContract_Static_7570923F, contracts));
|
|
42
53
|
}
|
|
@@ -48,13 +59,17 @@ export function ARCAux_updateFSByISA(isa, fs) {
|
|
|
48
59
|
}
|
|
49
60
|
else {
|
|
50
61
|
const inv = isa;
|
|
51
|
-
patternInput = [toArray(inv.
|
|
62
|
+
patternInput = [toArray(inv.Studies), toArray(inv.Assays)];
|
|
52
63
|
}
|
|
53
|
-
|
|
54
|
-
const
|
|
64
|
+
let assaysFolder;
|
|
65
|
+
const assays_1 = map((a) => FileSystemTree.createAssayFolder(a.Identifier, a.DataMap != null), patternInput[1]);
|
|
66
|
+
assaysFolder = FileSystemTree.createAssaysFolder(assays_1);
|
|
67
|
+
let studiesFolder;
|
|
68
|
+
const studies_1 = map((s) => FileSystemTree.createStudyFolder(s.Identifier, s.DataMap != null), patternInput[0]);
|
|
69
|
+
studiesFolder = FileSystemTree.createStudiesFolder(studies_1);
|
|
55
70
|
const investigation = FileSystemTree.createInvestigationFile();
|
|
56
71
|
let tree_1;
|
|
57
|
-
const tree = FileSystemTree.createRootFolder([investigation,
|
|
72
|
+
const tree = FileSystemTree.createRootFolder([investigation, assaysFolder, studiesFolder]);
|
|
58
73
|
tree_1 = FileSystem.create({
|
|
59
74
|
tree: tree,
|
|
60
75
|
});
|
|
@@ -103,14 +118,22 @@ export class ARC {
|
|
|
103
118
|
this$._fs = fs;
|
|
104
119
|
}
|
|
105
120
|
RemoveAssay(assayIdentifier) {
|
|
121
|
+
let i;
|
|
106
122
|
const this$ = this;
|
|
107
123
|
let isa;
|
|
108
124
|
const matchValue = this$.ISA;
|
|
109
125
|
if (matchValue == null) {
|
|
110
126
|
throw new Error("Cannot remove assay from null ISA value.");
|
|
111
127
|
}
|
|
128
|
+
else if ((i = matchValue, contains(assayIdentifier, i.AssayIdentifiers, {
|
|
129
|
+
Equals: (x, y) => (x === y),
|
|
130
|
+
GetHashCode: stringHash,
|
|
131
|
+
}))) {
|
|
132
|
+
const i_1 = matchValue;
|
|
133
|
+
isa = i_1;
|
|
134
|
+
}
|
|
112
135
|
else {
|
|
113
|
-
|
|
136
|
+
throw new Error("ARC does not contain assay with given name");
|
|
114
137
|
}
|
|
115
138
|
const assay = isa.GetAssay(assayIdentifier);
|
|
116
139
|
const studies = assay.StudiesRegisteredIn;
|
|
@@ -122,6 +145,33 @@ export class ARC {
|
|
|
122
145
|
const collection = toList(delay(() => append(singleton(ARCtrl_ArcAssay__ArcAssay_ToDeleteContract(assay)), delay(() => append(singleton(ARCtrl_ArcInvestigation__ArcInvestigation_ToUpdateContract_6FCE9E49(isa)), delay(() => map_1(ARCtrl_ArcStudy__ArcStudy_ToUpdateContract, studies)))))));
|
|
123
146
|
return Array.from(collection);
|
|
124
147
|
}
|
|
148
|
+
RenameAssay(oldAssayIdentifier, newAssayIdentifier) {
|
|
149
|
+
let i;
|
|
150
|
+
const this$ = this;
|
|
151
|
+
let isa;
|
|
152
|
+
const matchValue = this$.ISA;
|
|
153
|
+
if (matchValue == null) {
|
|
154
|
+
throw new Error("Cannot rename assay in null ISA value.");
|
|
155
|
+
}
|
|
156
|
+
else if ((i = matchValue, contains(oldAssayIdentifier, i.AssayIdentifiers, {
|
|
157
|
+
Equals: (x, y) => (x === y),
|
|
158
|
+
GetHashCode: stringHash,
|
|
159
|
+
}))) {
|
|
160
|
+
const i_1 = matchValue;
|
|
161
|
+
isa = i_1;
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
throw new Error("ARC does not contain assay with given name");
|
|
165
|
+
}
|
|
166
|
+
isa.RenameAssay(oldAssayIdentifier, newAssayIdentifier);
|
|
167
|
+
const paths = this$.FileSystem.Tree.ToFilePaths();
|
|
168
|
+
const oldAssayFolderPath = getAssayFolderPath(oldAssayIdentifier);
|
|
169
|
+
const newAssayFolderPath = getAssayFolderPath(newAssayIdentifier);
|
|
170
|
+
const renamedPaths = map((p) => replace(p, oldAssayFolderPath, newAssayFolderPath), paths);
|
|
171
|
+
this$.SetFilePaths(renamedPaths);
|
|
172
|
+
const collection = toList(delay(() => append(singleton(Contract.createRename(oldAssayFolderPath, newAssayFolderPath)), delay(() => this$.GetUpdateContracts()))));
|
|
173
|
+
return Array.from(collection);
|
|
174
|
+
}
|
|
125
175
|
RemoveStudy(studyIdentifier) {
|
|
126
176
|
const this$ = this;
|
|
127
177
|
let isa;
|
|
@@ -140,6 +190,33 @@ export class ARC {
|
|
|
140
190
|
const collection = ofArray([Contract.createDelete(studyFolderPath), ARCtrl_ArcInvestigation__ArcInvestigation_ToUpdateContract_6FCE9E49(isa)]);
|
|
141
191
|
return Array.from(collection);
|
|
142
192
|
}
|
|
193
|
+
RenameStudy(oldStudyIdentifier, newStudyIdentifier) {
|
|
194
|
+
let i;
|
|
195
|
+
const this$ = this;
|
|
196
|
+
let isa;
|
|
197
|
+
const matchValue = this$.ISA;
|
|
198
|
+
if (matchValue == null) {
|
|
199
|
+
throw new Error("Cannot rename study in null ISA value.");
|
|
200
|
+
}
|
|
201
|
+
else if ((i = matchValue, contains(oldStudyIdentifier, i.StudyIdentifiers, {
|
|
202
|
+
Equals: (x, y) => (x === y),
|
|
203
|
+
GetHashCode: stringHash,
|
|
204
|
+
}))) {
|
|
205
|
+
const i_1 = matchValue;
|
|
206
|
+
isa = i_1;
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
throw new Error("ARC does not contain study with given name");
|
|
210
|
+
}
|
|
211
|
+
isa.RenameStudy(oldStudyIdentifier, newStudyIdentifier);
|
|
212
|
+
const paths = this$.FileSystem.Tree.ToFilePaths();
|
|
213
|
+
const oldStudyFolderPath = getStudyFolderPath(oldStudyIdentifier);
|
|
214
|
+
const newStudyFolderPath = getStudyFolderPath(newStudyIdentifier);
|
|
215
|
+
const renamedPaths = map((p) => replace(p, oldStudyFolderPath, newStudyFolderPath), paths);
|
|
216
|
+
this$.SetFilePaths(renamedPaths);
|
|
217
|
+
const collection = toList(delay(() => append(singleton(Contract.createRename(oldStudyFolderPath, newStudyFolderPath)), delay(() => this$.GetUpdateContracts()))));
|
|
218
|
+
return Array.from(collection);
|
|
219
|
+
}
|
|
143
220
|
static fromFilePaths(filePaths) {
|
|
144
221
|
return new ARC(void 0, void 0, FileSystem.fromFilePaths(filePaths));
|
|
145
222
|
}
|
|
@@ -178,6 +255,8 @@ export class ARC {
|
|
|
178
255
|
const registeredStudy = registeredStudyOpt;
|
|
179
256
|
registeredStudy.UpdateReferenceByStudyFile(study, true);
|
|
180
257
|
}
|
|
258
|
+
const datamap = ARCAux_getAssayDataMapFromContracts(study.Identifier, contracts);
|
|
259
|
+
study.DataMap = datamap;
|
|
181
260
|
study.StaticHash = (study.GetLightHashCode() | 0);
|
|
182
261
|
});
|
|
183
262
|
assays.forEach((assay) => {
|
|
@@ -193,10 +272,12 @@ export class ARC {
|
|
|
193
272
|
let updatedTables;
|
|
194
273
|
const array_6 = assay_1.StudiesRegisteredIn;
|
|
195
274
|
updatedTables = fold((tables, study_1) => ArcTables.updateReferenceTablesBySheets(new ArcTables(study_1.Tables), tables, false), new ArcTables(assay_1.Tables), array_6);
|
|
275
|
+
const datamap_1 = ARCAux_getAssayDataMapFromContracts(assay_1.Identifier, contracts);
|
|
276
|
+
assay_1.DataMap = datamap_1;
|
|
196
277
|
assay_1.Tables = updatedTables.Tables;
|
|
197
278
|
});
|
|
198
279
|
iterate((a_3) => {
|
|
199
|
-
a_3.StaticHash = (
|
|
280
|
+
a_3.StaticHash = (a_3.GetLightHashCode() | 0);
|
|
200
281
|
}, investigation.Assays);
|
|
201
282
|
iterate((s_2) => {
|
|
202
283
|
s_2.StaticHash = (s_2.GetLightHashCode() | 0);
|
|
@@ -226,10 +307,20 @@ export class ARC {
|
|
|
226
307
|
iterate((s) => {
|
|
227
308
|
s.StaticHash = (s.GetLightHashCode() | 0);
|
|
228
309
|
addToDict(workbooks, Study_fileNameFromIdentifier(s.Identifier), ["ISA_Study", ARCtrl_ArcStudy__ArcStudy_toFsWorkbook_Static_353D0DB7(s)]);
|
|
310
|
+
if (s.DataMap != null) {
|
|
311
|
+
const dm = value_2(s.DataMap);
|
|
312
|
+
DataMap__set_StaticHash_Z524259A4(dm, safeHash(dm));
|
|
313
|
+
addToDict(workbooks, Study_datamapFileNameFromIdentifier(s.Identifier), ["ISA_Datamap", toFsWorkbook_1(dm)]);
|
|
314
|
+
}
|
|
229
315
|
}, inv.Studies);
|
|
230
316
|
iterate((a) => {
|
|
231
|
-
a.StaticHash = (
|
|
232
|
-
addToDict(workbooks, Assay_fileNameFromIdentifier(a.Identifier), ["ISA_Assay",
|
|
317
|
+
a.StaticHash = (a.GetLightHashCode() | 0);
|
|
318
|
+
addToDict(workbooks, Assay_fileNameFromIdentifier(a.Identifier), ["ISA_Assay", toFsWorkbook_2(a)]);
|
|
319
|
+
if (a.DataMap != null) {
|
|
320
|
+
const dm_1 = value_2(a.DataMap);
|
|
321
|
+
DataMap__set_StaticHash_Z524259A4(dm_1, safeHash(dm_1));
|
|
322
|
+
addToDict(workbooks, Assay_datamapFileNameFromIdentifier(a.Identifier), ["ISA_Datamap", toFsWorkbook_1(dm_1)]);
|
|
323
|
+
}
|
|
233
324
|
}, inv.Assays);
|
|
234
325
|
}
|
|
235
326
|
return map((fp) => {
|
|
@@ -256,14 +347,80 @@ export class ARC {
|
|
|
256
347
|
return append(collect((s) => {
|
|
257
348
|
const hash_1 = s.GetLightHashCode() | 0;
|
|
258
349
|
return append((s.StaticHash === 0) ? ARCtrl_ArcStudy__ArcStudy_ToCreateContract_6FCE9E49(s, true) : ((s.StaticHash !== hash_1) ? singleton(ARCtrl_ArcStudy__ArcStudy_ToUpdateContract(s)) : empty()), delay(() => {
|
|
350
|
+
let dm_1;
|
|
259
351
|
s.StaticHash = (hash_1 | 0);
|
|
260
|
-
|
|
352
|
+
const matchValue_1 = s.DataMap;
|
|
353
|
+
let matchResult, dm_2, dm_3;
|
|
354
|
+
if (matchValue_1 != null) {
|
|
355
|
+
if (DataMap__get_StaticHash(matchValue_1) === 0) {
|
|
356
|
+
matchResult = 0;
|
|
357
|
+
dm_2 = matchValue_1;
|
|
358
|
+
}
|
|
359
|
+
else if ((dm_1 = matchValue_1, DataMap__get_StaticHash(dm_1) !== safeHash(dm_1))) {
|
|
360
|
+
matchResult = 1;
|
|
361
|
+
dm_3 = matchValue_1;
|
|
362
|
+
}
|
|
363
|
+
else {
|
|
364
|
+
matchResult = 2;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
else {
|
|
368
|
+
matchResult = 2;
|
|
369
|
+
}
|
|
370
|
+
switch (matchResult) {
|
|
371
|
+
case 0:
|
|
372
|
+
return append(singleton(ARCtrl_DataMap__DataMap_ToCreateContractForStudy_Z721C83C5(dm_2, s.Identifier)), delay(() => {
|
|
373
|
+
DataMap__set_StaticHash_Z524259A4(dm_2, safeHash(dm_2));
|
|
374
|
+
return empty();
|
|
375
|
+
}));
|
|
376
|
+
case 1:
|
|
377
|
+
return append(singleton(ARCtrl_DataMap__DataMap_ToUpdateContractForStudy_Z721C83C5(dm_3, s.Identifier)), delay(() => {
|
|
378
|
+
DataMap__set_StaticHash_Z524259A4(dm_3, safeHash(dm_3));
|
|
379
|
+
return empty();
|
|
380
|
+
}));
|
|
381
|
+
default: {
|
|
382
|
+
return empty();
|
|
383
|
+
}
|
|
384
|
+
}
|
|
261
385
|
}));
|
|
262
386
|
}, inv_2.Studies), delay(() => collect((a) => {
|
|
263
|
-
const hash_2 =
|
|
387
|
+
const hash_2 = a.GetLightHashCode() | 0;
|
|
264
388
|
return append((a.StaticHash === 0) ? ARCtrl_ArcAssay__ArcAssay_ToCreateContract_6FCE9E49(a, true) : ((a.StaticHash !== hash_2) ? singleton(ARCtrl_ArcAssay__ArcAssay_ToUpdateContract(a)) : empty()), delay(() => {
|
|
389
|
+
let dm_5;
|
|
265
390
|
a.StaticHash = (hash_2 | 0);
|
|
266
|
-
|
|
391
|
+
const matchValue_2 = a.DataMap;
|
|
392
|
+
let matchResult_1, dm_6, dm_7;
|
|
393
|
+
if (matchValue_2 != null) {
|
|
394
|
+
if (DataMap__get_StaticHash(matchValue_2) === 0) {
|
|
395
|
+
matchResult_1 = 0;
|
|
396
|
+
dm_6 = matchValue_2;
|
|
397
|
+
}
|
|
398
|
+
else if ((dm_5 = matchValue_2, DataMap__get_StaticHash(dm_5) !== safeHash(dm_5))) {
|
|
399
|
+
matchResult_1 = 1;
|
|
400
|
+
dm_7 = matchValue_2;
|
|
401
|
+
}
|
|
402
|
+
else {
|
|
403
|
+
matchResult_1 = 2;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
else {
|
|
407
|
+
matchResult_1 = 2;
|
|
408
|
+
}
|
|
409
|
+
switch (matchResult_1) {
|
|
410
|
+
case 0:
|
|
411
|
+
return append(singleton(ARCtrl_DataMap__DataMap_ToCreateContractForAssay_Z721C83C5(dm_6, a.Identifier)), delay(() => {
|
|
412
|
+
DataMap__set_StaticHash_Z524259A4(dm_6, safeHash(dm_6));
|
|
413
|
+
return empty();
|
|
414
|
+
}));
|
|
415
|
+
case 1:
|
|
416
|
+
return append(singleton(ARCtrl_DataMap__DataMap_ToUpdateContractForAssay_Z721C83C5(dm_7, a.Identifier)), delay(() => {
|
|
417
|
+
DataMap__set_StaticHash_Z524259A4(dm_7, safeHash(dm_7));
|
|
418
|
+
return empty();
|
|
419
|
+
}));
|
|
420
|
+
default: {
|
|
421
|
+
return empty();
|
|
422
|
+
}
|
|
423
|
+
}
|
|
267
424
|
}));
|
|
268
425
|
}, inv_2.Assays)));
|
|
269
426
|
}));
|
|
@@ -271,7 +428,7 @@ export class ARC {
|
|
|
271
428
|
}
|
|
272
429
|
GetGitInitContracts(branch, repositoryAddress, defaultGitignore) {
|
|
273
430
|
const defaultGitignore_1 = defaultArg(defaultGitignore, false);
|
|
274
|
-
return toArray(delay(() => append(singleton(Init_createInitContract_6DFDD678(unwrap(branch))), delay(() => append(defaultGitignore_1 ? singleton(gitignoreContract) : empty(), delay(() => ((repositoryAddress != null) ? singleton(Init_createAddRemoteContract_Z721C83C5(value_2(repositoryAddress))) : empty())))))));
|
|
431
|
+
return toArray(delay(() => append(singleton(Init_createInitContract_6DFDD678(unwrap(branch))), delay(() => append(singleton(gitattributesContract), delay(() => append(defaultGitignore_1 ? singleton(gitignoreContract) : empty(), delay(() => ((repositoryAddress != null) ? singleton(Init_createAddRemoteContract_Z721C83C5(value_2(repositoryAddress))) : empty())))))))));
|
|
275
432
|
}
|
|
276
433
|
static getCloneContract(remoteUrl, merge, branch, token, nolfs) {
|
|
277
434
|
return Clone_createCloneContract_5000466F(remoteUrl, unwrap(merge), unwrap(branch), unwrap(token), unwrap(nolfs));
|
|
@@ -347,7 +504,7 @@ export class ARC {
|
|
|
347
504
|
}, (tree = ((paths = ((array = FileSystemTree.toFilePaths()(this$._fs.Copy().Tree), array.filter((p) => !FSharpSet__Contains(registeredPayload, p)))), FileSystemTree.fromFilePaths(paths))), ignoreHidden ? FileSystemTree.filterFiles((n) => !(n.indexOf(".") === 0))(tree) : tree)), FileSystemTree.fromFilePaths([]));
|
|
348
505
|
}
|
|
349
506
|
static get DefaultContracts() {
|
|
350
|
-
return ofSeq_1([[".gitignore", gitignoreContract]], {
|
|
507
|
+
return ofSeq_1([[".gitignore", gitignoreContract], [".gitattributes", gitattributesContract]], {
|
|
351
508
|
Compare: comparePrimitives,
|
|
352
509
|
});
|
|
353
510
|
}
|
package/Contract/ARC.js
CHANGED
|
@@ -3,6 +3,7 @@ import { $007CInvestigationPath$007C_$007C } from "./ArcInvestigation.js";
|
|
|
3
3
|
import { Contract } from "./Contract.js";
|
|
4
4
|
import { $007CAssayPath$007C_$007C } from "./ArcAssay.js";
|
|
5
5
|
import { $007CStudyPath$007C_$007C } from "./ArcStudy.js";
|
|
6
|
+
import { $007CDatamapPath$007C_$007C } from "./Datamap.js";
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Tries to create READ contract with DTOType = ISA_Assay, ISA_Study or ISA_Investigation from given path relative to ARC root.
|
|
@@ -27,7 +28,14 @@ export function tryISAReadContractFromPath(path) {
|
|
|
27
28
|
return Contract.createRead(p_2, "ISA_Study");
|
|
28
29
|
}
|
|
29
30
|
else {
|
|
30
|
-
|
|
31
|
+
const activePatternResult_3 = $007CDatamapPath$007C_$007C(split);
|
|
32
|
+
if (activePatternResult_3 != null) {
|
|
33
|
+
const p_3 = activePatternResult_3;
|
|
34
|
+
return Contract.createRead(p_3, "ISA_Datamap");
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
return void 0;
|
|
38
|
+
}
|
|
31
39
|
}
|
|
32
40
|
}
|
|
33
41
|
}
|
package/Contract/Contract.js
CHANGED
|
@@ -87,6 +87,9 @@ export class Contract extends Record {
|
|
|
87
87
|
static createExecute(dto, path) {
|
|
88
88
|
return new Contract("EXECUTE", defaultArg(path, ""), "Cli", dto);
|
|
89
89
|
}
|
|
90
|
+
static createRename(oldPath, newPath) {
|
|
91
|
+
return new Contract("RENAME", oldPath, void 0, newPath);
|
|
92
|
+
}
|
|
90
93
|
}
|
|
91
94
|
|
|
92
95
|
export function Contract_$reflection() {
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { equalsWith, item } from "../fable_modules/fable-library-js.4.16.0/Array.js";
|
|
2
|
+
import { combineMany } from "../FileSystem/Path.js";
|
|
3
|
+
import { safeHash, defaultOf } from "../fable_modules/fable-library-js.4.16.0/Util.js";
|
|
4
|
+
import { Study_datamapFileNameFromIdentifier, Assay_datamapFileNameFromIdentifier } from "../Core/Helper/Identifier.js";
|
|
5
|
+
import { Contract } from "./Contract.js";
|
|
6
|
+
import { fromFsWorkbook, toFsWorkbook } from "../Spreadsheet/DataMap.js";
|
|
7
|
+
import { DataMap__set_StaticHash_Z524259A4 } from "../Core/Table/DataMap.js";
|
|
8
|
+
|
|
9
|
+
export function $007CDatamapPath$007C_$007C(input) {
|
|
10
|
+
let matchResult;
|
|
11
|
+
if (!equalsWith((x, y) => (x === y), input, defaultOf()) && (input.length === 3)) {
|
|
12
|
+
if (item(0, input) === "assays") {
|
|
13
|
+
if (item(2, input) === "isa.datamap.xlsx") {
|
|
14
|
+
matchResult = 0;
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
matchResult = 2;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
else if (item(0, input) === "studies") {
|
|
21
|
+
if (item(2, input) === "isa.datamap.xlsx") {
|
|
22
|
+
matchResult = 1;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
matchResult = 2;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
matchResult = 2;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
matchResult = 2;
|
|
34
|
+
}
|
|
35
|
+
switch (matchResult) {
|
|
36
|
+
case 0: {
|
|
37
|
+
const anyAssayName = item(1, input);
|
|
38
|
+
return combineMany(input);
|
|
39
|
+
}
|
|
40
|
+
case 1: {
|
|
41
|
+
const anyStudyName = item(1, input);
|
|
42
|
+
return combineMany(input);
|
|
43
|
+
}
|
|
44
|
+
default:
|
|
45
|
+
return void 0;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function ARCtrl_DataMap__DataMap_ToCreateContractForAssay_Z721C83C5(this$, assayIdentifier) {
|
|
50
|
+
const path = Assay_datamapFileNameFromIdentifier(assayIdentifier);
|
|
51
|
+
return Contract.createCreate(path, "ISA_Datamap", toFsWorkbook(this$));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function ARCtrl_DataMap__DataMap_ToUpdateContractForAssay_Z721C83C5(this$, assayIdentifier) {
|
|
55
|
+
const path = Assay_datamapFileNameFromIdentifier(assayIdentifier);
|
|
56
|
+
return Contract.createUpdate(path, "ISA_Datamap", toFsWorkbook(this$));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function ARCtrl_DataMap__DataMap_ToDeleteContractForAssay_Z721C83C5(this$, assayIdentifier) {
|
|
60
|
+
const path = Assay_datamapFileNameFromIdentifier(assayIdentifier);
|
|
61
|
+
return Contract.createDelete(path);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function ARCtrl_DataMap__DataMap_toDeleteContractForAssay_Static_Z721C83C5(assayIdentifier) {
|
|
65
|
+
return (dataMap) => ARCtrl_DataMap__DataMap_ToDeleteContractForAssay_Z721C83C5(dataMap, assayIdentifier);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function ARCtrl_DataMap__DataMap_toUpdateContractForAssay_Static_Z721C83C5(assayIdentifier) {
|
|
69
|
+
return (dataMap) => ARCtrl_DataMap__DataMap_ToUpdateContractForAssay_Z721C83C5(dataMap, assayIdentifier);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function ARCtrl_DataMap__DataMap_tryFromReadContractForAssay_Static(assayIdentifier, c) {
|
|
73
|
+
let fsworkbook;
|
|
74
|
+
const path = Assay_datamapFileNameFromIdentifier(assayIdentifier);
|
|
75
|
+
let matchResult, fsworkbook_1, p_1;
|
|
76
|
+
if (c.Operation === "READ") {
|
|
77
|
+
if (c.DTOType != null) {
|
|
78
|
+
if (c.DTOType === "ISA_Datamap") {
|
|
79
|
+
if (c.DTO != null) {
|
|
80
|
+
if ((fsworkbook = c.DTO, c.Path === path)) {
|
|
81
|
+
matchResult = 0;
|
|
82
|
+
fsworkbook_1 = c.DTO;
|
|
83
|
+
p_1 = c.Path;
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
matchResult = 1;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
matchResult = 1;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
matchResult = 1;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
matchResult = 1;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
matchResult = 1;
|
|
103
|
+
}
|
|
104
|
+
switch (matchResult) {
|
|
105
|
+
case 0: {
|
|
106
|
+
const dm = fromFsWorkbook(fsworkbook_1);
|
|
107
|
+
DataMap__set_StaticHash_Z524259A4(dm, safeHash(dm));
|
|
108
|
+
return dm;
|
|
109
|
+
}
|
|
110
|
+
default:
|
|
111
|
+
return void 0;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function ARCtrl_DataMap__DataMap_ToCreateContractForStudy_Z721C83C5(this$, studyIdentifier) {
|
|
116
|
+
const path = Study_datamapFileNameFromIdentifier(studyIdentifier);
|
|
117
|
+
return Contract.createCreate(path, "ISA_Datamap", toFsWorkbook(this$));
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function ARCtrl_DataMap__DataMap_ToUpdateContractForStudy_Z721C83C5(this$, studyIdentifier) {
|
|
121
|
+
const path = Study_datamapFileNameFromIdentifier(studyIdentifier);
|
|
122
|
+
return Contract.createUpdate(path, "ISA_Datamap", toFsWorkbook(this$));
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function ARCtrl_DataMap__DataMap_ToDeleteContractForStudy_Z721C83C5(this$, studyIdentifier) {
|
|
126
|
+
const path = Study_datamapFileNameFromIdentifier(studyIdentifier);
|
|
127
|
+
return Contract.createDelete(path);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export function ARCtrl_DataMap__DataMap_toDeleteContractForStudy_Static_Z721C83C5(studyIdentifier) {
|
|
131
|
+
return (dataMap) => ARCtrl_DataMap__DataMap_ToDeleteContractForStudy_Z721C83C5(dataMap, studyIdentifier);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export function ARCtrl_DataMap__DataMap_toUpdateContractForStudy_Static_Z721C83C5(studyIdentifier) {
|
|
135
|
+
return (dataMap) => ARCtrl_DataMap__DataMap_ToUpdateContractForStudy_Z721C83C5(dataMap, studyIdentifier);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export function ARCtrl_DataMap__DataMap_tryFromReadContractForStudy_Static(studyIdentifier, c) {
|
|
139
|
+
let fsworkbook;
|
|
140
|
+
const path = Study_datamapFileNameFromIdentifier(studyIdentifier);
|
|
141
|
+
let matchResult, fsworkbook_1, p_1;
|
|
142
|
+
if (c.Operation === "READ") {
|
|
143
|
+
if (c.DTOType != null) {
|
|
144
|
+
if (c.DTOType === "ISA_Datamap") {
|
|
145
|
+
if (c.DTO != null) {
|
|
146
|
+
if ((fsworkbook = c.DTO, c.Path === path)) {
|
|
147
|
+
matchResult = 0;
|
|
148
|
+
fsworkbook_1 = c.DTO;
|
|
149
|
+
p_1 = c.Path;
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
matchResult = 1;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
else {
|
|
156
|
+
matchResult = 1;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
else {
|
|
160
|
+
matchResult = 1;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
matchResult = 1;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
matchResult = 1;
|
|
169
|
+
}
|
|
170
|
+
switch (matchResult) {
|
|
171
|
+
case 0: {
|
|
172
|
+
const dm = fromFsWorkbook(fsworkbook_1);
|
|
173
|
+
DataMap__set_StaticHash_Z524259A4(dm, safeHash(dm));
|
|
174
|
+
return dm;
|
|
175
|
+
}
|
|
176
|
+
default:
|
|
177
|
+
return void 0;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
package/Contract/Git.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Contract, CLITool } from "./Contract.js";
|
|
2
2
|
import { dgi } from "../FileSystem/DefaultGitignore.js";
|
|
3
|
+
import { dga } from "../FileSystem/DefaultGitattributes.js";
|
|
3
4
|
import { class_type } from "../fable_modules/fable-library-js.4.16.0/Reflection.js";
|
|
4
5
|
import { value, defaultArg } from "../fable_modules/fable-library-js.4.16.0/Option.js";
|
|
5
6
|
import { replace } from "../fable_modules/fable-library-js.4.16.0/String.js";
|
|
@@ -19,6 +20,8 @@ export function createGitContract(arguments$) {
|
|
|
19
20
|
|
|
20
21
|
export const gitignoreContract = Contract.createCreate(".gitignore", "PlainText", dgi);
|
|
21
22
|
|
|
23
|
+
export const gitattributesContract = Contract.createCreate(".gitattributes", "PlainText", dga);
|
|
24
|
+
|
|
22
25
|
export class Init {
|
|
23
26
|
constructor() {
|
|
24
27
|
}
|