Skip to content

Commit bce3ee6

Browse files
committed
[TEST] Validate serialization for gravity
1 parent 501f04e commit bce3ee6

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

gempy/API/compute_API.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def compute_model_at(gempy_model: GeoModel, at: np.ndarray,
9191
xyz_coord=at
9292
)
9393

94-
sol = compute_model(gempy_model, engine_config, validate_serialization=False)
94+
sol = compute_model(gempy_model, engine_config, validate_serialization=True)
9595
return sol.raw_arrays.custom
9696

9797

test/test_modules/_geophysics_TO_UPDATE/test_gravity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def test_gravity():
5959
structural_frame=frame,
6060
)
6161

62-
gp.compute_model(geo_model, validate_serialization=False)
62+
gp.compute_model(geo_model, validate_serialization=True)
6363

6464
import gempy_viewer as gpv
6565
gpv.plot_2d(geo_model, cell_number=0)

test/test_modules/_geophysics_TO_UPDATE/test_gravity.test_gravity.verify/2-layers.approved.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,11 @@
5555
],
5656
"is_dirty": true,
5757
"basement_color": "#ffbe00",
58+
"_input_binary_size": 79,
5859
"binary_meta_data": {
59-
"sp_binary_length": 144
60+
"sp_binary_length": 144,
61+
"ori_binary_length": 60,
62+
"input_binary_size": 79
6063
}
6164
},
6265
"grid": {
@@ -101,6 +104,12 @@
101104
},
102105
"_transform": null,
103106
"_octree_levels": -1,
107+
"_grid_binary_size": 8,
108+
"binary_meta_data": {
109+
"custom_grid_binary_length": 0,
110+
"topography_binary_length": 0,
111+
"grid_binary_size": 8
112+
},
104113
"active_grids": 1058
105114
},
106115
"geophysics_input": {

0 commit comments

Comments
 (0)