Skip to content

Commit 1ad4a64

Browse files
committed
[TEST] Adding tests for options preset
1 parent 765d22c commit 1ad4a64

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import gempy as gp
2+
from gempy.core.data.enumerators import ExampleModel
3+
from gempy.optional_dependencies import require_gempy_viewer
4+
5+
PLOT = True
6+
7+
8+
def test_default_options():
9+
model = gp.generate_example_model(ExampleModel.COMBINATION, compute_model=False)
10+
11+
# TODO: Change options here
12+
13+
gp.compute_model(
14+
gempy_model=model,
15+
engine_config=gp.data.GemPyEngineConfig(
16+
backend=gp.data.AvailableBackends.PYTORCH
17+
)
18+
)
19+
20+
if PLOT:
21+
gpv = require_gempy_viewer()
22+
gpv.plot_3d(model, show_data=True, image=True)
23+
24+
25+
def test_fast_options():
26+
model = gp.generate_example_model(ExampleModel.COMBINATION, compute_model=False)
27+
28+
# TODO: Change options here
29+
30+
gp.compute_model(
31+
gempy_model=model,
32+
engine_config=gp.data.GemPyEngineConfig(
33+
backend=gp.data.AvailableBackends.PYTORCH
34+
)
35+
)
36+
37+
if PLOT:
38+
gpv = require_gempy_viewer()
39+
gpv.plot_3d(model, show_data=True, image=True)
40+
41+

0 commit comments

Comments
 (0)