lhcb-ntuple-wizard-test 2.0.5 → 2.0.6
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/dist/models/yamlFile.d.ts +4 -2
- package/dist/models/yamlFile.js +15 -14
- package/dist/utils/utils.d.ts +2 -2
- package/dist/utils/utils.js +6 -6
- package/package.json +1 -1
- package/dist/models/blobFile.d.ts +0 -12
- package/dist/models/blobFile.js +0 -1
|
@@ -9,9 +9,11 @@ interface InfoYamlDefaults {
|
|
|
9
9
|
automatically_configure: boolean;
|
|
10
10
|
output: string;
|
|
11
11
|
}
|
|
12
|
-
export type
|
|
12
|
+
export type InfoYaml = {
|
|
13
13
|
defaults: InfoYamlDefaults;
|
|
14
|
-
} &
|
|
14
|
+
} & {
|
|
15
|
+
[K in string as K extends "defaults" ? never : K]?: JobConfig;
|
|
16
|
+
};
|
|
15
17
|
export declare class YamlFile {
|
|
16
18
|
name: string;
|
|
17
19
|
content: string;
|
package/dist/models/yamlFile.js
CHANGED
|
@@ -14,15 +14,7 @@ export class YamlFile {
|
|
|
14
14
|
const uniquePathSet = new Set(rows.flatMap((row) => row.paths));
|
|
15
15
|
const uniquePaths = [...uniquePathSet].sort();
|
|
16
16
|
const pathIndex = new Map(uniquePaths.map((p, i) => [p, i]));
|
|
17
|
-
const
|
|
18
|
-
defaults: {
|
|
19
|
-
application: `DaVinci/${metadata.tupleTools.applicationInfo.DaVinci}`,
|
|
20
|
-
wg: "OpenData",
|
|
21
|
-
inform: [],
|
|
22
|
-
automatically_configure: true,
|
|
23
|
-
output: "DVNtuple.root",
|
|
24
|
-
},
|
|
25
|
-
};
|
|
17
|
+
const jobs = {};
|
|
26
18
|
for (const row of rows) {
|
|
27
19
|
if (!row.dtt)
|
|
28
20
|
continue;
|
|
@@ -32,8 +24,8 @@ export class YamlFile {
|
|
|
32
24
|
continue;
|
|
33
25
|
const key = `job${jobID}`;
|
|
34
26
|
const dttFile = row.dtt.getName();
|
|
35
|
-
if (key
|
|
36
|
-
|
|
27
|
+
if (jobs[key]) {
|
|
28
|
+
jobs[key].options.push(dttFile);
|
|
37
29
|
}
|
|
38
30
|
else {
|
|
39
31
|
const job = {
|
|
@@ -42,14 +34,23 @@ export class YamlFile {
|
|
|
42
34
|
};
|
|
43
35
|
if (path.includes("MDST")) {
|
|
44
36
|
const stream = row.lines[0]?.stream;
|
|
45
|
-
if (stream)
|
|
37
|
+
if (stream)
|
|
46
38
|
job.root_in_tes = `/Event/${stream}`;
|
|
47
|
-
}
|
|
48
39
|
}
|
|
49
|
-
|
|
40
|
+
jobs[key] = job;
|
|
50
41
|
}
|
|
51
42
|
}
|
|
52
43
|
}
|
|
44
|
+
const info = {
|
|
45
|
+
defaults: {
|
|
46
|
+
application: `DaVinci/${metadata.tupleTools.applicationInfo.DaVinci}`,
|
|
47
|
+
wg: "OpenData",
|
|
48
|
+
inform: [],
|
|
49
|
+
automatically_configure: true,
|
|
50
|
+
output: "DVNtuple.root",
|
|
51
|
+
},
|
|
52
|
+
...jobs,
|
|
53
|
+
};
|
|
53
54
|
return new YamlFile("info.yaml", yaml.dump(info));
|
|
54
55
|
}
|
|
55
56
|
}
|
package/dist/utils/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { InfoYaml, YamlFile } from "../models/yamlFile";
|
|
2
2
|
import { SavedDttConfig } from "../models/dtt";
|
|
3
3
|
import { RowData } from "../models/rowData";
|
|
4
4
|
import { MetadataContext } from "../providers/MetadataProvider";
|
|
@@ -6,7 +6,7 @@ export declare function parseProductionFiles(files: File[], metadata: MetadataCo
|
|
|
6
6
|
rows: RowData[];
|
|
7
7
|
emails: string[];
|
|
8
8
|
}>;
|
|
9
|
-
export declare function processProductionFiles(metadata: MetadataContext, configs: SavedDttConfig[], infoYaml:
|
|
9
|
+
export declare function processProductionFiles(metadata: MetadataContext, configs: SavedDttConfig[], infoYaml: InfoYaml | null): string | {
|
|
10
10
|
rows: RowData[];
|
|
11
11
|
emails: string[];
|
|
12
12
|
};
|
package/dist/utils/utils.js
CHANGED
|
@@ -61,7 +61,7 @@ async function parseInfoYamlFile(file) {
|
|
|
61
61
|
const value = input[key];
|
|
62
62
|
if (undefined === value)
|
|
63
63
|
return true;
|
|
64
|
-
return "object" === typeof value && null !== value && _io2(value);
|
|
64
|
+
return undefined === value || "object" === typeof value && null !== value && _io2(value);
|
|
65
65
|
}); const _io1 = input => "string" === typeof input.application && "string" === typeof input.wg && (Array.isArray(input.inform) && input.inform.every(elem => "string" === typeof elem)) && "boolean" === typeof input.automatically_configure && "string" === typeof input.output; const _io2 = input => Array.isArray(input.options) && input.options.every(elem => "string" === typeof elem) && ("object" === typeof input.input && null !== input.input && _io3(input.input)) && (undefined === input.root_in_tes || "string" === typeof input.root_in_tes); const _io3 = input => "string" === typeof input.bk_query; const _vo0 = (input, _path, _exceptionable = true) => [("object" === typeof input.defaults && null !== input.defaults || _report(_exceptionable, {
|
|
66
66
|
path: _path + ".defaults",
|
|
67
67
|
expected: "InfoYamlDefaults",
|
|
@@ -76,13 +76,13 @@ async function parseInfoYamlFile(file) {
|
|
|
76
76
|
const value = input[key];
|
|
77
77
|
if (undefined === value)
|
|
78
78
|
return true;
|
|
79
|
-
return ("object" === typeof value && null !== value || _report(_exceptionable, {
|
|
79
|
+
return undefined === value || ("object" === typeof value && null !== value || _report(_exceptionable, {
|
|
80
80
|
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
81
|
-
expected: "JobConfig",
|
|
81
|
+
expected: "(JobConfig | undefined)",
|
|
82
82
|
value: value
|
|
83
83
|
})) && _vo2(value, _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key), true && _exceptionable) || _report(_exceptionable, {
|
|
84
84
|
path: _path + __typia_transform__accessExpressionAsString._accessExpressionAsString(key),
|
|
85
|
-
expected: "JobConfig",
|
|
85
|
+
expected: "(JobConfig | undefined)",
|
|
86
86
|
value: value
|
|
87
87
|
});
|
|
88
88
|
}).every(flag => flag)].every(flag => flag); const _vo1 = (input, _path, _exceptionable = true) => ["string" === typeof input.application || _report(_exceptionable, {
|
|
@@ -147,11 +147,11 @@ async function parseInfoYamlFile(file) {
|
|
|
147
147
|
_report = __typia_transform__validateReport._validateReport(errors);
|
|
148
148
|
((input, _path, _exceptionable = true) => ("object" === typeof input && null !== input || _report(true, {
|
|
149
149
|
path: _path + "",
|
|
150
|
-
expected: "
|
|
150
|
+
expected: "InfoYaml",
|
|
151
151
|
value: input
|
|
152
152
|
})) && _vo0(input, _path + "", true) || _report(true, {
|
|
153
153
|
path: _path + "",
|
|
154
|
-
expected: "
|
|
154
|
+
expected: "InfoYaml",
|
|
155
155
|
value: input
|
|
156
156
|
}))(input, "$input", true);
|
|
157
157
|
const success = 0 === errors.length;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lhcb-ntuple-wizard-test",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "An application to access large-scale open data from LHCb",
|
|
5
5
|
"url": "https://gitlab.cern.ch/lhcb-dpa/wp6-analysis-preservation-and-open-data/lhcb-ntuple-wizard-frontend/issues",
|
|
6
6
|
"private": false,
|
package/dist/models/blobFile.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|