Skip to content

Commit 4e126ac

Browse files
committed
Extract simulator-related validation from the optimizer schema into a newly defined simulator schema
1 parent ae07fa5 commit 4e126ac

2 files changed

Lines changed: 70 additions & 36 deletions

File tree

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"name": "Simulator validation schema",
3+
"description": "Schema to validate simulator requirements",
4+
"validations": [
5+
{
6+
"name": "ATES_required_attributes_are_set",
7+
"description": "Report errors if the required attributes of ATES assets are not set.",
8+
"type": "error",
9+
"message": "Required attribute not set",
10+
"selects": [
11+
{
12+
"function": "get",
13+
"alias": "ates",
14+
"args": {
15+
"type": ["ATES"]
16+
}
17+
}
18+
],
19+
"check": {
20+
"function": "attributes_not_null",
21+
"dataset": "ates",
22+
"args": {
23+
"checks": [
24+
{
25+
"attribute": "name",
26+
"count_as_null": [""]
27+
},
28+
{
29+
"attribute": "aquiferTopDepth",
30+
"count_as_null": [0.0]
31+
},
32+
{
33+
"attribute": "aquiferThickness",
34+
"count_as_null": [0.0]
35+
},
36+
{
37+
"attribute": "aquiferMidTemperature",
38+
"count_as_null": [0.0]
39+
},
40+
{
41+
"attribute": "aquiferPorosity",
42+
"count_as_null": [0.0]
43+
},
44+
{
45+
"attribute": "aquiferPermeability",
46+
"count_as_null": [0.0]
47+
},
48+
{
49+
"attribute": "aquiferAnisotropy",
50+
"count_as_null": [0.0]
51+
},
52+
{
53+
"attribute": "salinity",
54+
"count_as_null": [0.0]
55+
},
56+
{
57+
"attribute": "wellCasingSize",
58+
"count_as_null": [0.0]
59+
},
60+
{
61+
"attribute": "wellDistance",
62+
"count_as_null": [0.0]
63+
}
64+
],
65+
"resultMsgJSON": true
66+
}
67+
}
68+
}
69+
]
70+
}

testdata/schemas/schema_PoC_optimizer.json

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -314,42 +314,6 @@
314314
{
315315
"attribute": "name",
316316
"count_as_null": [""]
317-
},
318-
{
319-
"attribute": "aquiferTopDepth",
320-
"count_as_null": [0.0]
321-
},
322-
{
323-
"attribute": "aquiferThickness",
324-
"count_as_null": [0.0]
325-
},
326-
{
327-
"attribute": "aquiferMidTemperature",
328-
"count_as_null": [0.0]
329-
},
330-
{
331-
"attribute": "aquiferPorosity",
332-
"count_as_null": [0.0]
333-
},
334-
{
335-
"attribute": "aquiferPermeability",
336-
"count_as_null": [0.0]
337-
},
338-
{
339-
"attribute": "aquiferAnisotropy",
340-
"count_as_null": [0.0]
341-
},
342-
{
343-
"attribute": "salinity",
344-
"count_as_null": [0.0]
345-
},
346-
{
347-
"attribute": "wellCasingSize",
348-
"count_as_null": [0.0]
349-
},
350-
{
351-
"attribute": "wellDistance",
352-
"count_as_null": [0.0]
353317
}
354318
],
355319
"resultMsgJSON": true

0 commit comments

Comments
 (0)