Skip to content

Commit 0f1734b

Browse files
committed
Added modules __init__ and minor changes in json module
1 parent f82abf2 commit 0f1734b

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

gempy/modules/__init__.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
"""
2+
GemPy modules package.
3+
"""
4+
5+
from . import json_io
6+
from . import custom_implicit_functions
7+
from . import data_manipulation
8+
from . import grids
9+
from . import advance_pile
10+
11+
__all__ = [
12+
'json_io',
13+
'custom_implicit_functions',
14+
'data_manipulation',
15+
'grids',
16+
'advance_pile'
17+
]

gempy/modules/json_io/json_operations.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import numpy as np
99

1010
from .schema import SurfacePoint, Orientation, GemPyModelJson
11+
from gempy_engine.core.data.stack_relation_type import StackRelationType
1112

1213

1314
class JsonIO:
@@ -75,9 +76,9 @@ def load_model_from_json(file_path: str):
7576
interpolation_options=interpolation_options
7677
)
7778

78-
# Map series to surfaces
79-
for series in data['series']:
80-
map_stack_to_surfaces(model, {series['name']: series['surfaces']})
79+
# Map series to surfaces with structural relations
80+
mapping_object = {series['name']: series['surfaces'] for series in data['series']}
81+
map_stack_to_surfaces(model, mapping_object, series_data=data['series'])
8182

8283
return model
8384

0 commit comments

Comments
 (0)