scilens 0.3.7__py3-none-any.whl → 0.3.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- scilens/cli/main.py +20 -14
- scilens/components/executor.py +16 -9
- scilens/config/models/execute.py +1 -1
- scilens/config/models/reader_format_csv.py +2 -2
- scilens/config/models/reader_format_txt_fixed_cols.py +1 -1
- scilens/config/models/readers.py +8 -12
- scilens/config/models/report.py +1 -1
- scilens/config/models/report_html.py +10 -5
- scilens/processors/execute_and_compare.py +2 -2
- scilens/readers/mat_dataset.py +7 -13
- scilens/readers/reader_csv.py +33 -27
- scilens/readers/reader_txt_fixed_cols.py +68 -25
- scilens/report/html_report.py +1 -1
- scilens/report/templates/body_01_title.html +0 -12
- scilens/report/templates/body_02_tabs.html +9 -0
- scilens/report/templates/compare_11_summary.html +12 -1
- scilens/report/templates/compare_12_sections.html +6 -1
- scilens/report/templates/index.html +29 -15
- scilens/report/templates/js_chartlibs_plotly.js +44 -26
- scilens/report/templates/js_com_page.js +1 -1
- scilens/report/templates/js_curvemgr.js +61 -24
- scilens/report/templates/style.css +9 -0
- scilens/report/templates/uti_matrix.js +22 -9
- scilens/report/templates/uti_spectrograms.js +29 -20
- scilens/report/templates/utils_compare_report_anim.js +4 -1
- scilens/report/templates/utils_compare_report_framesseries.js +5 -2
- scilens/run/standalone_task_runner.py +1 -1
- scilens/utils/file.py +2 -0
- scilens/utils/load_model_from_file.py +16 -0
- {scilens-0.3.7.dist-info → scilens-0.3.9.dist-info}/METADATA +1 -1
- {scilens-0.3.7.dist-info → scilens-0.3.9.dist-info}/RECORD +33 -31
- {scilens-0.3.7.dist-info → scilens-0.3.9.dist-info}/WHEEL +0 -0
- {scilens-0.3.7.dist-info → scilens-0.3.9.dist-info}/entry_points.txt +0 -0
|
@@ -3,40 +3,58 @@
|
|
|
3
3
|
const plotly = {
|
|
4
4
|
add: function(elt, meta, items) {
|
|
5
5
|
const series = []
|
|
6
|
+
let yaxis2 = null;
|
|
7
|
+
|
|
8
|
+
//
|
|
9
|
+
|
|
6
10
|
items.forEach(item => {
|
|
7
|
-
|
|
11
|
+
const serie = {
|
|
8
12
|
name: item.name,
|
|
9
13
|
x: item.x_data,
|
|
10
14
|
y: item.y_data,
|
|
15
|
+
// yaxis : 'y1', // required if there are multiple y axes
|
|
11
16
|
// mode: 'lines+markers',
|
|
12
17
|
mode: 'lines',
|
|
13
18
|
line: { color: item.color, width: 3 },
|
|
14
|
-
marker: { color: item.color, size: 6 },
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
// legend: {
|
|
27
|
-
// x: 1,
|
|
28
|
-
// xanchor: 'right',
|
|
29
|
-
// y: 1
|
|
30
|
-
// }
|
|
31
|
-
// margin: {
|
|
32
|
-
// l: 10,
|
|
33
|
-
// r: 10,
|
|
34
|
-
// b: 10,
|
|
35
|
-
// t: 10,
|
|
36
|
-
// pad: 0,
|
|
37
|
-
// },
|
|
19
|
+
// marker: { color: item.color, size: 6 },
|
|
20
|
+
}
|
|
21
|
+
if (item.special) {
|
|
22
|
+
switch (item.special) {
|
|
23
|
+
case 'diff':
|
|
24
|
+
yaxis2 = {title: 'Difference',overlaying: 'y',side: 'right', color: 'rgba(255, 0, 0, 1)'}
|
|
25
|
+
serie.line.color = 'rgba(255, 0, 0, 0.5)';
|
|
26
|
+
serie.yaxis = 'y2';
|
|
27
|
+
serie.fill = 'tozeroy';
|
|
28
|
+
serie.fillcolor = 'rgba(255, 0, 0, 0.2)';
|
|
29
|
+
break;
|
|
30
|
+
}
|
|
38
31
|
}
|
|
39
|
-
|
|
32
|
+
// item.special
|
|
33
|
+
series.push(serie)
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const layout = {
|
|
37
|
+
title: { text: meta.title, font: { weight: 800 } },
|
|
38
|
+
xaxis: { title: meta.xaxis },
|
|
39
|
+
yaxis: { title: meta.yaxis },
|
|
40
|
+
autosize: true,
|
|
41
|
+
// showlegend: false,
|
|
42
|
+
// legend: {
|
|
43
|
+
// x: 1,
|
|
44
|
+
// xanchor: 'right',
|
|
45
|
+
// y: 1
|
|
46
|
+
// }
|
|
47
|
+
// margin: {
|
|
48
|
+
// l: 10,
|
|
49
|
+
// r: 10,
|
|
50
|
+
// b: 10,
|
|
51
|
+
// t: 10,
|
|
52
|
+
// pad: 0,
|
|
53
|
+
// },
|
|
54
|
+
};
|
|
55
|
+
if (yaxis2) {layout.yaxis2 = yaxis2;}
|
|
56
|
+
|
|
57
|
+
Plotly.newPlot(elt,series,layout);
|
|
40
58
|
},
|
|
41
59
|
add_ys: function(elt, meta, x_data, y_items) {
|
|
42
60
|
this.add(elt, meta, y_items.map((item) => {return {name: item.name, color: item.color, x_data: x_data, y_data: item.data} } ))
|
|
@@ -60,6 +60,8 @@ const CONFIG = {
|
|
|
60
60
|
display_on_load: false,
|
|
61
61
|
init_width: 600,
|
|
62
62
|
init_height: 400,
|
|
63
|
+
compare_vs_values: true,
|
|
64
|
+
compare_vs_difference: true,
|
|
63
65
|
}
|
|
64
66
|
|
|
65
67
|
|
|
@@ -79,10 +81,11 @@ const curve_add_chart = function(element_parent, data, zoom) {
|
|
|
79
81
|
div,
|
|
80
82
|
{ title: data.title, xaxis: data.xaxis , yaxis: data.yaxis },
|
|
81
83
|
data.series.map((item) => {return {
|
|
82
|
-
name:
|
|
83
|
-
color:
|
|
84
|
-
x_data:
|
|
85
|
-
y_data:
|
|
84
|
+
name: item.name,
|
|
85
|
+
color: item.color,
|
|
86
|
+
x_data: item.data.map((e) => e[0]),
|
|
87
|
+
y_data: item.data.map((e) => e[1]),
|
|
88
|
+
special: item.special,
|
|
86
89
|
}}),
|
|
87
90
|
)
|
|
88
91
|
};
|
|
@@ -198,29 +201,63 @@ CurvesChart.prototype = {
|
|
|
198
201
|
|
|
199
202
|
}
|
|
200
203
|
// display each curve test vs reference
|
|
201
|
-
|
|
202
|
-
|
|
204
|
+
if (CONFIG.compare_vs_values || CONFIG.compare_vs_difference) {
|
|
205
|
+
for (index_curve in chart.curves) {
|
|
206
|
+
real_index = chart.curves[index_curve]
|
|
203
207
|
|
|
204
|
-
|
|
205
|
-
{
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
208
|
+
const series = [];
|
|
209
|
+
if (CONFIG.compare_vs_values) {
|
|
210
|
+
series.push({
|
|
211
|
+
name: "Test",
|
|
212
|
+
data: this.curves["test"].curves[real_index].series,
|
|
213
|
+
color: '#1982c4',
|
|
214
|
+
});
|
|
215
|
+
series.push({
|
|
216
|
+
name: "Reference",
|
|
217
|
+
data: this.curves["reference"].curves[real_index].series,
|
|
218
|
+
color: '#6a4c93',
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
if (CONFIG.compare_vs_difference) {
|
|
222
|
+
series.push({
|
|
223
|
+
name: "Difference",
|
|
224
|
+
data: this.curves["test"].curves[real_index].series.map((e, i) => {
|
|
225
|
+
return [e[0], e[1] - this.curves["reference"].curves[real_index].series[i][1]]
|
|
226
|
+
}),
|
|
227
|
+
color: '#ffcc00',
|
|
228
|
+
special: 'diff',
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// {
|
|
233
|
+
// name: "Test",
|
|
234
|
+
// data: this.curves["test"].curves[real_index].series,
|
|
235
|
+
// color: '#1982c4',
|
|
236
|
+
// },
|
|
237
|
+
// {
|
|
238
|
+
// name: "Reference",
|
|
239
|
+
// data: this.curves["reference"].curves[real_index].series,
|
|
240
|
+
// color: '#6a4c93',
|
|
241
|
+
// },
|
|
242
|
+
// {
|
|
243
|
+
// name: "Difference",
|
|
244
|
+
// data: this.curves["test"].curves[real_index].series.map((e, i) => {
|
|
245
|
+
// return [e[0], e[1] - this.curves["reference"].curves[real_index].series[i][1]]
|
|
246
|
+
// }),
|
|
247
|
+
// color: '#ffcc00',
|
|
248
|
+
// special: 'diff',
|
|
249
|
+
// },
|
|
250
|
+
//
|
|
251
|
+
const data = {
|
|
252
|
+
title: this.curves["test"].curves[real_index].title + " [Test vs Reference]",
|
|
253
|
+
xaxis: chart.xaxis,
|
|
254
|
+
yaxis: chart.yaxis,
|
|
255
|
+
series : series,
|
|
256
|
+
}
|
|
257
|
+
curve_add_chart((chart.curves.length > 1) ? out.row_2 : out.row_1, data, this.curve_block.zoom);
|
|
221
258
|
}
|
|
222
|
-
curve_add_chart((chart.curves.length > 1) ? out.row_2 : out.row_1, data, this.curve_block.zoom);
|
|
223
259
|
}
|
|
260
|
+
|
|
224
261
|
}
|
|
225
262
|
},
|
|
226
263
|
}
|
|
@@ -37,6 +37,15 @@ padding:15px;
|
|
|
37
37
|
background-color: #fafafa;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
.description {
|
|
41
|
+
background-color: #eef2f7;
|
|
42
|
+
border-left: 6px solid #4a90e2;
|
|
43
|
+
padding: 20px;
|
|
44
|
+
margin-bottom: 30px;
|
|
45
|
+
border-radius: 8px;
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
|
|
40
49
|
|
|
41
50
|
.ERROR { background-color:#c52a0f20;color:#c52a0f; }
|
|
42
51
|
.WARNING { background-color:#bcbc0620;color:#bcbc06; }
|
|
@@ -21,13 +21,18 @@ function subtractMatrices(A, B) {
|
|
|
21
21
|
row.map((v, j) => v - B[i][j])
|
|
22
22
|
);
|
|
23
23
|
}
|
|
24
|
+
function absolueMatrice(A) {
|
|
25
|
+
return A.map(row => row.map(v => Math.abs(v)));
|
|
26
|
+
}
|
|
24
27
|
//
|
|
25
28
|
class Matrix {
|
|
26
|
-
constructor(data, x, y, name, ref) {
|
|
29
|
+
constructor(data, x, y, name, x_name, y_name, ref) {
|
|
27
30
|
this.data = data; // Matrix data array[array[float]]
|
|
28
31
|
this.x = x; // X-axis values array[float]
|
|
29
32
|
this.y = y; // Y-axis values array[float]
|
|
30
33
|
this.name = name; // string
|
|
34
|
+
this.x_name = x_name; // X-axis Name
|
|
35
|
+
this.y_name = y_name; // Y-axis Name
|
|
31
36
|
this.ref = ref; // Reference matrix data (optional) array[array[float]]
|
|
32
37
|
// // Check if the matrix is valid (rectangular)
|
|
33
38
|
// const rowLength = data[0].length;
|
|
@@ -45,31 +50,39 @@ class Matrix {
|
|
|
45
50
|
// ) { throw new Error("Matrices must have the same dimensions."); }
|
|
46
51
|
return new Matrix(subtractMatrices(this.data, other.data), this.x, this.y, name);
|
|
47
52
|
}
|
|
48
|
-
|
|
49
|
-
return subtractMatrices(this.data, this.ref);
|
|
53
|
+
ref_diff_abs_data() {
|
|
54
|
+
return absolueMatrice(subtractMatrices(this.data, this.ref));
|
|
50
55
|
}
|
|
56
|
+
absolueMatrice
|
|
51
57
|
}
|
|
52
58
|
class MatrixGroup {
|
|
53
59
|
constructor(arr, is_spectro, is_frameseries, has_ref) {
|
|
54
60
|
this.arr = arr; // array of Matrix objects
|
|
55
|
-
this.is_spectro = is_spectro;
|
|
56
|
-
this.is_frameseries = is_frameseries;
|
|
57
61
|
this.has_ref = has_ref;
|
|
58
62
|
}
|
|
59
63
|
}
|
|
60
64
|
const MatrixMgmt = {
|
|
61
65
|
groups: [],
|
|
62
|
-
loadGlobal: function() {
|
|
66
|
+
loadGlobal: function(has_spectrograms, has_frameseries) {
|
|
63
67
|
// load loop GLOBAL_VARS groups
|
|
64
68
|
const g = GLOBAL_VARS.matrices;
|
|
65
69
|
g.test.forEach((data, i) => {
|
|
66
70
|
const group_data = [];
|
|
67
71
|
const ref = g.reference[i];
|
|
68
72
|
data.datasets.forEach((dataset, j) => {
|
|
69
|
-
|
|
73
|
+
console.log(dataset);
|
|
74
|
+
const mat = new Matrix(
|
|
75
|
+
dataset.data,
|
|
76
|
+
dataset.x_values,
|
|
77
|
+
dataset.y_values,
|
|
78
|
+
data.names[j],
|
|
79
|
+
dataset.x_name,
|
|
80
|
+
dataset.y_name,
|
|
81
|
+
ref.datasets[j].data,
|
|
82
|
+
);
|
|
70
83
|
group_data.push(mat);
|
|
71
84
|
});
|
|
72
|
-
const group = new MatrixGroup(group_data,
|
|
85
|
+
const group = new MatrixGroup(group_data, true);
|
|
73
86
|
this.groups.push(group);
|
|
74
87
|
});
|
|
75
88
|
// IMPORTANT
|
|
@@ -78,7 +91,7 @@ const MatrixMgmt = {
|
|
|
78
91
|
// Init
|
|
79
92
|
this.groups.forEach((group, i) => {
|
|
80
93
|
// Init Spectrograms
|
|
81
|
-
if (
|
|
94
|
+
if (has_spectrograms) {
|
|
82
95
|
const spec = new Spectrograms(i, group.arr);
|
|
83
96
|
}
|
|
84
97
|
// Init Frameseries
|
|
@@ -4,14 +4,15 @@
|
|
|
4
4
|
//
|
|
5
5
|
function resize22(obj, parent, dir) { // ASSUMPTIONS : obj.size int, "js-plotly-plot"
|
|
6
6
|
// size
|
|
7
|
-
const
|
|
8
|
-
|
|
7
|
+
const w = obj.size[0] + (dir * obj.size[0] * 0.1);
|
|
8
|
+
const h = obj.size[0] + (dir * obj.size[0] * 0.1);
|
|
9
|
+
obj.size = [w, h];
|
|
9
10
|
// update widgets
|
|
10
|
-
const update = { width:
|
|
11
|
+
const update = { width: w, height: h };
|
|
11
12
|
const nodes = dom.q(parent, ".js-plotly-plot");
|
|
12
13
|
nodes.forEach((node) => {
|
|
13
|
-
node.style.width =
|
|
14
|
-
node.style.height =
|
|
14
|
+
node.style.width = w + "px";
|
|
15
|
+
node.style.height = h + "px";
|
|
15
16
|
Plotly.relayout(node, update); // update plotly
|
|
16
17
|
});
|
|
17
18
|
}
|
|
@@ -19,15 +20,21 @@ function resize22(obj, parent, dir) { // ASSUMPTIONS : obj.size int, "js-plotly-
|
|
|
19
20
|
//
|
|
20
21
|
//
|
|
21
22
|
const PREFIX = "spectrograms_"; // section prefix
|
|
22
|
-
const DEFAULT_SIZE = 300;
|
|
23
23
|
const COLORSCALE = "Viridis"; // plotly
|
|
24
24
|
const COLORSCALE_DIFF = "RdBu"; // plotly
|
|
25
|
+
const CFG = {
|
|
26
|
+
"DISPLAY_TESTREF": true, // display test reference
|
|
27
|
+
"DISPLAY_DIFF": true, // display diff
|
|
28
|
+
"WIDTH": 300, // default width
|
|
29
|
+
"HEIGHT": 300, // default height
|
|
30
|
+
}
|
|
31
|
+
|
|
25
32
|
//
|
|
26
33
|
class Spectrograms {
|
|
27
34
|
constructor(index, arr_mat) {
|
|
28
|
-
console.log("index data", index);
|
|
35
|
+
//console.log("index data", index);
|
|
29
36
|
// data
|
|
30
|
-
this.size =
|
|
37
|
+
this.size = [CFG.WIDTH, CFG.HEIGHT]; // default size
|
|
31
38
|
this.arr_mat = arr_mat;
|
|
32
39
|
this.elt = dom.get(PREFIX+(1+index));
|
|
33
40
|
// init
|
|
@@ -64,13 +71,14 @@ class Spectrograms {
|
|
|
64
71
|
var_add(idx) {
|
|
65
72
|
const mat = this.arr_mat[idx];
|
|
66
73
|
//
|
|
67
|
-
const style = "width:"+this.size+"px;height:"+this.size+"px;";
|
|
74
|
+
const style = "width:"+this.size[0]+"px;height:"+this.size[1]+"px;";
|
|
68
75
|
const attrs = { class: "m-1 shadow-lg" };
|
|
69
76
|
//
|
|
70
|
-
const templs = [
|
|
77
|
+
const templs = [];
|
|
78
|
+
if (CFG.DISPLAY_TESTREF) templs.push({out:"var", tag:"div", attrs: attrs, style:style});
|
|
71
79
|
if (mat.ref) {
|
|
72
|
-
templs.push({out:"ref", tag:"div", attrs: attrs, style:style});
|
|
73
|
-
templs.push({out:"dif", tag:"div", attrs: attrs, style:style});
|
|
80
|
+
if (CFG.DISPLAY_TESTREF) templs.push({out:"ref", tag:"div", attrs: attrs, style:style});
|
|
81
|
+
if (CFG.DISPLAY_DIFF) templs.push({out:"dif", tag:"div", attrs: attrs, style:style});
|
|
74
82
|
}
|
|
75
83
|
const e = {};
|
|
76
84
|
dom.tree(
|
|
@@ -81,30 +89,31 @@ class Spectrograms {
|
|
|
81
89
|
e
|
|
82
90
|
);
|
|
83
91
|
|
|
84
|
-
this.add_widget(e["var"], mat.data);
|
|
92
|
+
if (CFG.DISPLAY_TESTREF) this.add_widget(e["var"], mat, mat.data);
|
|
85
93
|
if (mat.ref) {
|
|
86
|
-
this.add_widget(e["ref"], mat.ref);
|
|
87
|
-
this.add_widget(e["dif"], mat.
|
|
94
|
+
if (CFG.DISPLAY_TESTREF) this.add_widget(e["ref"], mat, mat.ref, " - Ref.");
|
|
95
|
+
if (CFG.DISPLAY_DIFF) this.add_widget(e["dif"], mat, mat.ref_diff_abs_data(), " - Diff.", COLORSCALE_DIFF);
|
|
88
96
|
}
|
|
89
97
|
}
|
|
90
98
|
var_rmv(idx) {
|
|
91
99
|
dom.get(this.var_get_id(idx)).remove();
|
|
92
100
|
}
|
|
93
|
-
add_widget(elt, mat, colorscale=COLORSCALE) {
|
|
101
|
+
add_widget(elt, mat, matdata, suffix="", colorscale=COLORSCALE) {
|
|
94
102
|
const data = [{
|
|
95
|
-
z:
|
|
103
|
+
z: matdata,
|
|
96
104
|
type: 'heatmap',
|
|
97
105
|
colorscale: colorscale,
|
|
98
106
|
}];
|
|
99
107
|
|
|
100
108
|
const layout = {
|
|
101
|
-
|
|
102
|
-
xaxis: { title: 'X' },
|
|
103
|
-
yaxis: { title: 'Y' }
|
|
109
|
+
title: mat.name + suffix,
|
|
110
|
+
xaxis: { title: mat.x_name || 'X' },
|
|
111
|
+
yaxis: { title: mat.y_name || 'Y' },
|
|
104
112
|
};
|
|
105
113
|
|
|
106
114
|
Plotly.newPlot(elt, data, layout);
|
|
107
115
|
}
|
|
108
116
|
}
|
|
117
|
+
Spectrograms.config = function(cfg) {for (k in cfg) {CFG[k] = cfg[k];}};
|
|
109
118
|
w_1.Spectrograms = Spectrograms;
|
|
110
119
|
})(window);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
((w_1, undef) => {
|
|
1
2
|
const Anim = function (elt, options, options_2) {
|
|
2
3
|
const that = this;
|
|
3
4
|
// options
|
|
@@ -70,4 +71,6 @@ update: function () {
|
|
|
70
71
|
};
|
|
71
72
|
Anim.create = function(parent, options, options_2) {
|
|
72
73
|
new Anim(parent, options, options_2)
|
|
73
|
-
}
|
|
74
|
+
}
|
|
75
|
+
w_1.Anim = Anim;
|
|
76
|
+
})(window);
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
((w_1, undef) => {
|
|
1
2
|
const Framesseries = function (elt, data, data_ref) {
|
|
2
3
|
const that = this;
|
|
3
4
|
// data
|
|
@@ -21,7 +22,7 @@ const Framesseries = function (elt, data, data_ref) {
|
|
|
21
22
|
// steps
|
|
22
23
|
const steps = []
|
|
23
24
|
data.frames_steps_variable.data.forEach((e,i) => {
|
|
24
|
-
console.log(e)
|
|
25
|
+
// console.log(e)
|
|
25
26
|
steps.push({
|
|
26
27
|
start: e,
|
|
27
28
|
color: palette.get(i),
|
|
@@ -131,7 +132,7 @@ Framesseries.prototype = {
|
|
|
131
132
|
labels.push({label: "Step", val: step, max: steps.length, color: color, val2: val2})
|
|
132
133
|
}
|
|
133
134
|
// labels
|
|
134
|
-
console.log(labels)
|
|
135
|
+
// console.log(labels)
|
|
135
136
|
this.lab.innerHTML = labels.map(x => '<span style="padding:3px 5px;background-color:'+x.color+';"><b> ' + x.label + "</b> " + x.val + "/" + x.max + ( x.val2 ? " (" + x.val2 + ")" : "") +"</span>").join(" - ");
|
|
136
137
|
|
|
137
138
|
|
|
@@ -140,3 +141,5 @@ Framesseries.prototype = {
|
|
|
140
141
|
Framesseries.create = function(parent, options, options_2) {
|
|
141
142
|
new Framesseries(parent, options, options_2)
|
|
142
143
|
}
|
|
144
|
+
w_1.Framesseries = Framesseries;
|
|
145
|
+
})(window);
|
|
@@ -4,6 +4,6 @@ from scilens.run.task_context import TaskContext
|
|
|
4
4
|
from scilens.run.run_task import RunTask
|
|
5
5
|
from scilens.config.models import AppConfig
|
|
6
6
|
class StandaloneTaskRunner:
|
|
7
|
-
config_path=None
|
|
7
|
+
config:AppConfig;config_path=None
|
|
8
8
|
def __init__(A,config):A.config=config_load(config)
|
|
9
9
|
def process(A,working_dir,origin_working_dir=None):B=TaskContext(config=A.config,config_file=A.config_path,working_dir=working_dir,origin_working_dir=origin_working_dir);C=RunTask(B);D=C.process();return D
|
scilens/utils/file.py
CHANGED
|
@@ -26,6 +26,8 @@ def json_load(path):
|
|
|
26
26
|
with open(path)as A:return json.load(A)
|
|
27
27
|
def yaml_write(path,data):
|
|
28
28
|
with open(path,'w')as A:yaml.dump(data,A,default_flow_style=False)
|
|
29
|
+
def yaml_load(path):
|
|
30
|
+
with open(path)as A:return yaml.safe_load(A)
|
|
29
31
|
def move(source,target):shutil.move(source,target)
|
|
30
32
|
def list_paths_at_depth(root_dir,depth):
|
|
31
33
|
B=depth;A=root_dir;C=[]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
from scilens.utils.file import json_load,yaml_load
|
|
3
|
+
def load_model_from_file(cls,path,json=True,yaml=True):
|
|
4
|
+
C=yaml;B=json;A=path
|
|
5
|
+
if isinstance(A,str):A=Path(A)
|
|
6
|
+
if not A.exists():raise FileNotFoundError(f"File {A} does not exist.")
|
|
7
|
+
if B:
|
|
8
|
+
try:D=json_load(A)
|
|
9
|
+
except Exception:
|
|
10
|
+
if not C:raise ValueError(f"Error during loading JSON file: {A}.")
|
|
11
|
+
if C:
|
|
12
|
+
try:D=yaml_load(A)
|
|
13
|
+
except Exception:
|
|
14
|
+
if not B:raise ValueError(f"Error during loading YAML file: {A}.")
|
|
15
|
+
if B and C and not D:raise ValueError(f"Unsupported file format: Supported formats are YAML and JSON.")
|
|
16
|
+
E=cls(**D);return E
|
|
@@ -5,7 +5,7 @@ scilens/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
5
5
|
scilens/cli/cglb.py,sha256=R0377H5H193DJ_h4hj32m6qvrZrMnSFOxSGVl2FItiU,443
|
|
6
6
|
scilens/cli/config.py,sha256=XVY6q5E9fb6MZzPct4-X7m6e45erpt5MCIuzKTBKPAI,965
|
|
7
7
|
scilens/cli/info.py,sha256=xE7q9epjrCQRL6Agi3nhKsG6Mr3B8HSUFMti-epMoXA,1929
|
|
8
|
-
scilens/cli/main.py,sha256=
|
|
8
|
+
scilens/cli/main.py,sha256=C8EWm6JfTBBH74pR3J-O2ZuPX78VcQ5MWC5iqNUFN6Y,6332
|
|
9
9
|
scilens/components/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
scilens/components/analyse_folder.py,sha256=yqc-dscKaHLZJCYeXGak2v0c3F2aeX0E11AFPfya6r0,208
|
|
11
11
|
scilens/components/compare_2_files.py,sha256=jbZNLbRj3x8TxUADM5QC2u_TGl4I7u5OdaEMh-gMBUk,1713
|
|
@@ -13,7 +13,7 @@ scilens/components/compare_errors.py,sha256=vGb4DWP89HMIeBm0dZU2nt-ksppAs_37xtCH
|
|
|
13
13
|
scilens/components/compare_floats.py,sha256=yYJZ_QpAZUhP1uwNtGshXQLIzKtki9ifCN3hd9AFj2U,5916
|
|
14
14
|
scilens/components/compare_folders.py,sha256=LZ1AuYxLVHMNbtXWXQrdms4vZgOQthvDy-8NFD_EFjc,2617
|
|
15
15
|
scilens/components/compare_models.py,sha256=SCPd747h_nd4ewZsqLB6CFr27v6q99NELJb-gpkdj0o,918
|
|
16
|
-
scilens/components/executor.py,sha256=
|
|
16
|
+
scilens/components/executor.py,sha256=PLeKolzPd4wPX8e6DdfOb0uHGky3DxTcKN9QtB6oe3Q,3712
|
|
17
17
|
scilens/components/file_reader.py,sha256=7SbKCqb4Co_pqAKX3wweYhqAcVkU7BDlT903sLd76Kc,1407
|
|
18
18
|
scilens/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
19
|
scilens/config/cli_run_options.py,sha256=Ls7yK5QDUPFbk73nbjGuPvuRbBRYw4Miag5ISpu3prg,281
|
|
@@ -23,17 +23,17 @@ scilens/config/models/__init__.py,sha256=eLCW1OLVINewGFy5GXSrOk8Rab_QsgKAuoErBjp
|
|
|
23
23
|
scilens/config/models/app.py,sha256=JltWRjjqXYkH6rg3OHYhMfkBqHFhZEZdthqES3LxvzY,1453
|
|
24
24
|
scilens/config/models/compare.py,sha256=esRqW3PNVOqkA_mt4_qbS7dVCLulUrZTBUhANQOHoqE,1847
|
|
25
25
|
scilens/config/models/compare_float_thresholds.py,sha256=mHu48-70i3o_qUw6x-1A7XeRwFUNAO6WP6qNPGwAew0,2097
|
|
26
|
-
scilens/config/models/execute.py,sha256=
|
|
26
|
+
scilens/config/models/execute.py,sha256=Hx3DoDJ0fq7bZruqwtPtSKL6PVOF_LpsaDCLrn5klLk,2325
|
|
27
27
|
scilens/config/models/execute_and_compare.py,sha256=TWL6yXGvQSaaV6nhHqWLvtr3v396APIoDNt0U1TbMro,582
|
|
28
28
|
scilens/config/models/file_reader.py,sha256=c18vKhVcBX4ufpbnCBJyVyAsQtlxpwx0lGVuf1i8EGA,1176
|
|
29
29
|
scilens/config/models/reader_format_cols_curve.py,sha256=eKLvifq1xuN8sPds9ijfru3vgMZ3Odv5tGfeiK4Sfk4,1860
|
|
30
|
-
scilens/config/models/reader_format_csv.py,sha256=
|
|
30
|
+
scilens/config/models/reader_format_csv.py,sha256=EQ1nCYsv6Cf4rtK3AUW5LbJakRcutdaNSl4UN634evs,1708
|
|
31
31
|
scilens/config/models/reader_format_netcdf.py,sha256=k-AMdm239T6I42R8jzyRlPKKJ8zkRrN8XS8yU6ZkFu0,1256
|
|
32
32
|
scilens/config/models/reader_format_txt.py,sha256=eHg90gwEI_VpqwqEjMRhwlS8dHcl5G4ow-37HjQq_zY,1168
|
|
33
|
-
scilens/config/models/reader_format_txt_fixed_cols.py,sha256=
|
|
34
|
-
scilens/config/models/readers.py,sha256=
|
|
35
|
-
scilens/config/models/report.py,sha256=
|
|
36
|
-
scilens/config/models/report_html.py,sha256=
|
|
33
|
+
scilens/config/models/reader_format_txt_fixed_cols.py,sha256=SQ84OW9BLc5mr_TC6gQuYzzHJvrU-sVz223WOtAQMc0,1133
|
|
34
|
+
scilens/config/models/readers.py,sha256=oWdE4AkckvwN6boln55orq3hUeAt6S9IdQAZkGROR6E,1657
|
|
35
|
+
scilens/config/models/report.py,sha256=6mzqZMJnS_z5Rs01ISo8L8HRcWvmiQrK0dYqu8a58vM,993
|
|
36
|
+
scilens/config/models/report_html.py,sha256=EqP42x6dupXzHzP4Ar7sP7mmZp1TqpUzgOYV-8FSoOk,3040
|
|
37
37
|
scilens/config/models/report_output.py,sha256=XoqUe-t-y8GRbUR3_bDwwaWf6hif-rZ-5pKDGdCMugw,875
|
|
38
38
|
scilens/helpers/assets.py,sha256=XphDA3-yE1PPKw4XFZhDrlLQjMZfGMlpOBXa8uy_xX0,1552
|
|
39
39
|
scilens/helpers/search_and_index.py,sha256=kXZ7124ra_SGAdKUZ7msy55UOWQ9dCSuPuNoU-NdUyM,1522
|
|
@@ -42,64 +42,66 @@ scilens/helpers/templates/style.css,sha256=2_IndKW2qtGhuoU9T3Sru4NkHR5CXTTs5_nc9
|
|
|
42
42
|
scilens/processors/__init__.py,sha256=x6bmqQVCcdJ7R2oG-_xTVtvl9qRleliEZlZR-Hq9Yc0,105
|
|
43
43
|
scilens/processors/analyse.py,sha256=hG2jALUqtoEwTPiLxDGV9Nbv6TU_SrfzwV_-1RkuiKw,828
|
|
44
44
|
scilens/processors/compare.py,sha256=wCdtDC8nJUeG9dolu2B6rTg4-jW0MYllPbvXFBX64nU,529
|
|
45
|
-
scilens/processors/execute_and_compare.py,sha256
|
|
45
|
+
scilens/processors/execute_and_compare.py,sha256=-JXnZewkza29L3TAsvaAuHTHRNG8biaKMFwpwdeCCbQ,1869
|
|
46
46
|
scilens/processors/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
47
47
|
scilens/processors/models/results.py,sha256=KoWxh13Zgi7PuPql8hkf4VjCis42ZxAuzIgJxBWVaX8,119
|
|
48
48
|
scilens/processors/processor_interface.py,sha256=jzMp1529JXnMGTJijVy6b_1zmARAMNv70f2lgys7vn4,452
|
|
49
49
|
scilens/readers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
50
50
|
scilens/readers/cols_dataset.py,sha256=C4N030_Iqq5KZVpQ0NVjAw4DctALuz_YBb6f6yi35Jk,2452
|
|
51
51
|
scilens/readers/exceptions.py,sha256=JzmxcjnR5sH-IOWVeCC5A1bSwxv-jCAtIJvDjzx1CTI,32
|
|
52
|
-
scilens/readers/mat_dataset.py,sha256=
|
|
53
|
-
scilens/readers/reader_csv.py,sha256=
|
|
52
|
+
scilens/readers/mat_dataset.py,sha256=Z9TYDWaH2aqdniLNDjlpR6VVNHMSARjh52clhdMyOn4,1496
|
|
53
|
+
scilens/readers/reader_csv.py,sha256=MXjGdNHm1i9phhYLeMuNFjCvxuIeZH_KNs6ni3a4nS8,3893
|
|
54
54
|
scilens/readers/reader_interface.py,sha256=nnttHL7wt4MOXpi-SBkk8DYxVWscOPG8JFl_z12mIAo,922
|
|
55
55
|
scilens/readers/reader_manager.py,sha256=DFinxIk3IIIcB6JxybGcv-mXt3jhXgCwUtzR0TqhB2Q,2684
|
|
56
56
|
scilens/readers/reader_txt.py,sha256=WPsFunEA_idzAKkD3UJQbLnaOzG2U03P3gY4gphuIw0,3868
|
|
57
|
-
scilens/readers/reader_txt_fixed_cols.py,sha256=
|
|
57
|
+
scilens/readers/reader_txt_fixed_cols.py,sha256=B7toE3G9KGcgD_p15jzGHOLGIKZ7KMmEQoTt6-4UtHo,4064
|
|
58
58
|
scilens/readers/transform.py,sha256=kppfgPkXymF0qtquFivuosLVfF66L9bE-wGx-3bMHv8,307
|
|
59
59
|
scilens/report/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
60
60
|
scilens/report/assets/logo.svg,sha256=W-1OVqcvdBjf-1AHHcV6WciIUqBoVFUh52Tc3o_jqtA,4519
|
|
61
61
|
scilens/report/assets/logo_cglb.svg,sha256=tEpkSr2h-jjQMecqiHef98Mxod4GD5j5nCQaFloTYso,2411
|
|
62
62
|
scilens/report/assets.py,sha256=CcfGc9NNGnPVinkHZkEyN2S_BGKNIyMFvVdA__-M6-0,532
|
|
63
|
-
scilens/report/html_report.py,sha256=
|
|
63
|
+
scilens/report/html_report.py,sha256=ml_paRkzI81irpeWNtEkBOHkK0W7veNU6RbVM6RLM6E,1940
|
|
64
64
|
scilens/report/report.py,sha256=aS7ktJ2u0IAMMk-HwqqSsRkr77ZBQyYT4wXJ7djQvAk,1811
|
|
65
65
|
scilens/report/template.py,sha256=cPs5gd3uEwb-6JgitGQD_i4IiUxigBTlZLNRS9KVuos,581
|
|
66
|
-
scilens/report/templates/body_01_title.html,sha256=
|
|
66
|
+
scilens/report/templates/body_01_title.html,sha256=LJOWO6ImNPW9cg3tCDlgdllVTwnFGWcb2qvA3yv6wNk,1758
|
|
67
|
+
scilens/report/templates/body_02_tabs.html,sha256=oOFslWcfNsWpCX12GECZDzdR5uAHE54HPP6IYUf7y0U,412
|
|
67
68
|
scilens/report/templates/body_99_footer.html,sha256=8cWebeWfZwZ-9bYAMZkZj8rbCWq3BLIMjKQThWQxoQM,362
|
|
68
|
-
scilens/report/templates/compare_11_summary.html,sha256=
|
|
69
|
-
scilens/report/templates/compare_12_sections.html,sha256=
|
|
69
|
+
scilens/report/templates/compare_11_summary.html,sha256=qVvFydtAvAYyVOOTqjTN3LUj5Lh_Cl680EYL5SCZkd4,4086
|
|
70
|
+
scilens/report/templates/compare_12_sections.html,sha256=EYYMqF2HeRXnWRke2vn9O2JCm8oKbx-r1NL7FJvYFDg,6431
|
|
70
71
|
scilens/report/templates/compare_13_section_numbers copy.html,sha256=0PWK_I2kNX3LjPLkkY4eSYIeB7YFkA28nk-PPLDhnaY,1753
|
|
71
72
|
scilens/report/templates/compare_13_section_numbers.html,sha256=9etEMSqwrDyJIn_nMbKEVaDgnFL_hBxSjPR-hU2wgDI,851
|
|
72
73
|
scilens/report/templates/compare_13_section_numbers_table.html,sha256=sJy6ZYtjl80vM1b3oqZSXawZWp7KNIwLI_wCnvBwYPE,3270
|
|
73
|
-
scilens/report/templates/index.html,sha256=
|
|
74
|
+
scilens/report/templates/index.html,sha256=fcC1jrG2nhmCSzXUV6fe14pRlNQ6CAgGRHMHhlx6nNg,5757
|
|
74
75
|
scilens/report/templates/js_chartlibs_echarts.js,sha256=6YicVhTNIBmmBpV31XCVN5oBeiD0t29JIosJZRUv01M,907
|
|
75
|
-
scilens/report/templates/js_chartlibs_plotly.js,sha256=
|
|
76
|
-
scilens/report/templates/js_com_page.js,sha256=
|
|
77
|
-
scilens/report/templates/js_curvemgr.js,sha256=
|
|
76
|
+
scilens/report/templates/js_chartlibs_plotly.js,sha256=3uiQfbd95NMN-3N2NX3c4CC7zFb0JRtH-ZzezDVGeO8,2111
|
|
77
|
+
scilens/report/templates/js_com_page.js,sha256=Q-_Smn77IYIAdlrS1zJtsVIYBOL1t-J1AYYJKji4eL0,6864
|
|
78
|
+
scilens/report/templates/js_curvemgr.js,sha256=gnRLO6HbZOMLIBQKjVhV2PciqXtuNKxpGx4boijV2Qc,12175
|
|
78
79
|
scilens/report/templates/js_dom.js,sha256=XnxgdB0x-Xtt0eQFrwjcFO1cb_KPsTImpJBB6m_y8FI,1229
|
|
79
80
|
scilens/report/templates/js_palette.js,sha256=HeewAmkR67QiqXSanJS3cCgp6IPKomlULUTKt55F6es,218
|
|
80
|
-
scilens/report/templates/style.css,sha256=
|
|
81
|
-
scilens/report/templates/uti_matrix.js,sha256=
|
|
82
|
-
scilens/report/templates/uti_spectrograms.js,sha256=
|
|
83
|
-
scilens/report/templates/utils_compare_report_anim.js,sha256=
|
|
84
|
-
scilens/report/templates/utils_compare_report_framesseries.js,sha256=
|
|
81
|
+
scilens/report/templates/style.css,sha256=SOKxdCqoj0yBt2zt3g1RkYx4ZV0_9PhGtO-TDWjmSHE,4217
|
|
82
|
+
scilens/report/templates/uti_matrix.js,sha256=N2fNH_E3Km6H60IOW-BjL0LIKTuJ2eGIHnJV_O354es,2936
|
|
83
|
+
scilens/report/templates/uti_spectrograms.js,sha256=WYnNt5d8aGIeUCXy8q3MWRtpJzr4htMiH-mlxXpBeug,3586
|
|
84
|
+
scilens/report/templates/utils_compare_report_anim.js,sha256=6Yg1nQDrmAQSJzHtsmA0CO2Ng1ddiLIhrbKXSZAB-Ms,2971
|
|
85
|
+
scilens/report/templates/utils_compare_report_framesseries.js,sha256=kg5NDVJYL0dF2cwdunD4WpnckvfGOsxXuO1ttmEV8hw,5766
|
|
85
86
|
scilens/report/vendors/tailwindcss_3_4_15.js,sha256=niHw6Rf0uS2pE5_8h-E18NI24o1urZL5Ac31_n9htKE,407279
|
|
86
87
|
scilens/report/vendors/tailwindcss_min_4.0.0-beta.4.js,sha256=fy2LOvMX7m4b1V9WdtWC0dCPNIYhE2cLkFiD3JNcYhI,177617
|
|
87
88
|
scilens/run/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
88
89
|
scilens/run/models/task_results.py,sha256=hdr_QEwMnjdfdawpfuBRMGqCHWQvsF61G39CVEMXKl8,284
|
|
89
90
|
scilens/run/models/task_runtime.py,sha256=VNbMPS1ocl6WUDG5ipUxp3RSAST2OZ5DqGcfJWFEed8,114
|
|
90
91
|
scilens/run/run_task.py,sha256=suCnACK2RmcwGdmOUAxnb0UD3LC_VT8RH9S525rsr14,2828
|
|
91
|
-
scilens/run/standalone_task_runner.py,sha256=
|
|
92
|
+
scilens/run/standalone_task_runner.py,sha256=D3SUgVzoYtFvfDRacX286gXswuyN4z37et_qxfly4Rs,515
|
|
92
93
|
scilens/run/task_context.py,sha256=NnujvpwnxY-YEzivYPYWaX-YChcZlEXt9y0_DXLqZkk,659
|
|
93
94
|
scilens/run/tasks_collector.py,sha256=m_FQaJdQRi4fCLW17ryJxU0TvGNJN54JTw2Mg6XPojY,3174
|
|
94
95
|
scilens/utils/dict.py,sha256=1MVQc8vZCs8_gQJMBkBSXO828wMe2eIWFiraLVmcjqk,214
|
|
95
|
-
scilens/utils/file.py,sha256=
|
|
96
|
+
scilens/utils/file.py,sha256=ljtTHCvT7vfDSbHA-5aKDl9885SVce3TBXWRIA-aRx0,1664
|
|
97
|
+
scilens/utils/load_model_from_file.py,sha256=k5I-B6s5nVZu90MgzKSM0_IRj9oNL-4oJJRTwEvOyw8,619
|
|
96
98
|
scilens/utils/php.py,sha256=VBJxpzwwRPNcr3379f6ViwhpTzjGc4BKlSXHv4lnor8,444
|
|
97
99
|
scilens/utils/system.py,sha256=drXp_Vdv2dP9wFQoEQZIhxyCJhFliBLFPylGwv89FF4,182
|
|
98
100
|
scilens/utils/template.py,sha256=9dlXX3nmfzDRUwzPJOkoxk15UXivZ2SW-McdCwokFa4,443
|
|
99
101
|
scilens/utils/time_tracker.py,sha256=DdVBoMpVLXrX0qZZXyLm4g38EwDVLlRcBqcpNex1mYY,545
|
|
100
102
|
scilens/utils/vectors.py,sha256=4N2BZSC5n3HgZqPujDGF5NdjVmSL1rOHb_qw4OoABQY,103
|
|
101
103
|
scilens/utils/web.py,sha256=MAFWpIFOKz7QhqDoFh-Qwstvc76KpcxstSgHFT8FOL4,901
|
|
102
|
-
scilens-0.3.
|
|
103
|
-
scilens-0.3.
|
|
104
|
-
scilens-0.3.
|
|
105
|
-
scilens-0.3.
|
|
104
|
+
scilens-0.3.9.dist-info/METADATA,sha256=ylBI_UDX3OeXxMTpfxODknkBUEFLGyE-_YU88jb6mn8,1367
|
|
105
|
+
scilens-0.3.9.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
|
106
|
+
scilens-0.3.9.dist-info/entry_points.txt,sha256=DaKGgxUEUv34GJAoXtta6ecL37ercejep9sCSSRQK2s,48
|
|
107
|
+
scilens-0.3.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|