webviz-subsurface 0.2.33__py3-none-any.whl → 0.2.35__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.
- webviz_subsurface/_models/parameter_model.py +1 -0
- webviz_subsurface/_providers/ensemble_grid_provider/_xtgeo_to_vtk_explicit_structured_grid.py +1 -1
- webviz_subsurface/_providers/ensemble_grid_provider/grid_viz_service.py +6 -4
- webviz_subsurface/_providers/ensemble_summary_provider/_provider_impl_arrow_lazy.py +2 -2
- webviz_subsurface/_providers/ensemble_summary_provider/_provider_impl_arrow_presampled.py +1 -1
- webviz_subsurface/_providers/ensemble_summary_provider/_resampling.py +30 -22
- webviz_subsurface/_providers/ensemble_surface_provider/_provider_impl_file.py +1 -17
- webviz_subsurface/_providers/ensemble_surface_provider/_surface_to_float32_array.py +1 -1
- webviz_subsurface/_utils/parameter_response.py +3 -1
- webviz_subsurface/plugins/_bhp_qc/views/_view_functions.py +1 -1
- webviz_subsurface/plugins/_co2_leakage/_utilities/plume_extent.py +1 -1
- webviz_subsurface/plugins/_co2_leakage/views/mainview/mainview.py +2 -2
- webviz_subsurface/plugins/_grid_viewer_fmu/views/view_3d/view_elements/_vtk_view_3d_element.py +2 -2
- webviz_subsurface/plugins/_history_match.py +1 -1
- webviz_subsurface/plugins/_map_viewer_fmu/_tmp_well_pick_provider.py +3 -1
- webviz_subsurface/plugins/_map_viewer_fmu/_types.py +1 -0
- webviz_subsurface/plugins/_map_viewer_fmu/_utils.py +18 -1
- webviz_subsurface/plugins/_map_viewer_fmu/callbacks.py +38 -12
- webviz_subsurface/plugins/_map_viewer_fmu/layout.py +32 -18
- webviz_subsurface/plugins/_map_viewer_fmu/map_viewer_fmu.py +33 -5
- webviz_subsurface/plugins/_rft_plotter/_plugin.py +5 -0
- webviz_subsurface/plugins/_rft_plotter/_utils/_rft_plotter_data_model.py +5 -2
- webviz_subsurface/plugins/_running_time_analysis_fmu.py +3 -3
- webviz_subsurface/plugins/_segy_viewer.py +6 -26
- webviz_subsurface/plugins/_surface_with_grid_cross_section.py +3 -16
- webviz_subsurface/plugins/_surface_with_seismic_cross_section.py +3 -16
- webviz_subsurface/plugins/_volumetric_analysis/controllers/distribution_controllers.py +33 -29
- webviz_subsurface/plugins/_volumetric_analysis/controllers/selections_controllers.py +8 -12
- webviz_subsurface/plugins/_volumetric_analysis/views/main_view.py +0 -3
- webviz_subsurface/plugins/_volumetric_analysis/views/selections_view.py +2 -12
- webviz_subsurface/plugins/_volumetric_analysis/volumetric_analysis.py +45 -3
- webviz_subsurface/plugins/_well_log_viewer/well_log_viewer.py +1 -1
- {webviz_subsurface-0.2.33.dist-info → webviz_subsurface-0.2.35.dist-info}/METADATA +3 -4
- {webviz_subsurface-0.2.33.dist-info → webviz_subsurface-0.2.35.dist-info}/RECORD +39 -66
- tests/integration_tests/plugin_tests/__init__.py +0 -0
- tests/integration_tests/plugin_tests/test_bhp_qc.py +0 -12
- tests/integration_tests/plugin_tests/test_history_match.py +0 -18
- tests/integration_tests/plugin_tests/test_line_plotter_fmu.py +0 -29
- tests/integration_tests/plugin_tests/test_parameter_analysis.py +0 -26
- tests/integration_tests/plugin_tests/test_parameter_correlation.py +0 -25
- tests/integration_tests/plugin_tests/test_parameter_distribution.py +0 -13
- tests/integration_tests/plugin_tests/test_parameter_parallel_coordinates.py +0 -13
- tests/integration_tests/plugin_tests/test_parameter_response_correlation.py +0 -15
- tests/integration_tests/plugin_tests/test_property_statistics.py +0 -22
- tests/integration_tests/plugin_tests/test_pvt_plot.py +0 -15
- tests/integration_tests/plugin_tests/test_relative_permeability.py +0 -14
- tests/integration_tests/plugin_tests/test_reservoir_simulation_timeseries.py +0 -30
- tests/integration_tests/plugin_tests/test_reservoir_simulation_timeseries_onebyone.py +0 -16
- tests/integration_tests/plugin_tests/test_reservoir_simulation_timeseries_regional.py +0 -23
- tests/integration_tests/plugin_tests/test_rft_plotter.py +0 -43
- tests/integration_tests/plugin_tests/test_segy_viewer.py +0 -22
- tests/integration_tests/plugin_tests/test_simulation_timeseries_onebyone.py +0 -23
- tests/integration_tests/plugin_tests/test_structural_uncertainty.py +0 -244
- tests/integration_tests/plugin_tests/test_surface_viewer_fmu.py +0 -21
- tests/integration_tests/plugin_tests/test_surface_with_grid_crossection.py +0 -45
- tests/integration_tests/plugin_tests/test_surface_with_seismic_crossection.py +0 -35
- tests/integration_tests/plugin_tests/test_tornado_plotter_fmu.py +0 -14
- tests/integration_tests/plugin_tests/test_vfp_analysis.py +0 -13
- tests/integration_tests/plugin_tests/test_volumetric_analysis.py +0 -38
- tests/integration_tests/plugin_tests/test_well_log_viewer.py +0 -16
- webviz_subsurface/_providers/ensemble_summary_provider/dev_resampling_perf_testing.py +0 -112
- {webviz_subsurface-0.2.33.dist-info → webviz_subsurface-0.2.35.dist-info}/LICENSE +0 -0
- {webviz_subsurface-0.2.33.dist-info → webviz_subsurface-0.2.35.dist-info}/LICENSE.chromedriver +0 -0
- {webviz_subsurface-0.2.33.dist-info → webviz_subsurface-0.2.35.dist-info}/WHEEL +0 -0
- {webviz_subsurface-0.2.33.dist-info → webviz_subsurface-0.2.35.dist-info}/entry_points.txt +0 -0
- {webviz_subsurface-0.2.33.dist-info → webviz_subsurface-0.2.35.dist-info}/top_level.txt +0 -0
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# pylint: disable=no-name-in-module
|
|
2
|
-
from webviz_config.plugins import ReservoirSimulationTimeSeriesOneByOne
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
def test_reservoir_simulation_timeseries_onebyone(
|
|
6
|
-
dash_duo, app, shared_settings
|
|
7
|
-
) -> None:
|
|
8
|
-
plugin = ReservoirSimulationTimeSeriesOneByOne(
|
|
9
|
-
app,
|
|
10
|
-
shared_settings["SENS_SETTINGS"],
|
|
11
|
-
ensembles=shared_settings["SENS_ENSEMBLES"],
|
|
12
|
-
initial_vector="FOPT",
|
|
13
|
-
)
|
|
14
|
-
app.layout = plugin.layout
|
|
15
|
-
dash_duo.start_server(app)
|
|
16
|
-
assert not dash_duo.get_logs()
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# pylint: disable=no-name-in-module
|
|
2
|
-
from webviz_config.plugins import ReservoirSimulationTimeSeriesRegional
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
def test_reservoir_simulation_timeseries_regional(
|
|
6
|
-
dash_duo, app, shared_settings, testdata_folder
|
|
7
|
-
) -> None:
|
|
8
|
-
plugin = ReservoirSimulationTimeSeriesRegional(
|
|
9
|
-
app,
|
|
10
|
-
shared_settings["HM_SETTINGS"],
|
|
11
|
-
ensembles=shared_settings["HM_ENSEMBLES"],
|
|
12
|
-
fipfile=testdata_folder
|
|
13
|
-
/ "01_drogon_ahm"
|
|
14
|
-
/ "realization-0"
|
|
15
|
-
/ "iter-0"
|
|
16
|
-
/ "share"
|
|
17
|
-
/ "results"
|
|
18
|
-
/ "tables"
|
|
19
|
-
/ "fip.yml",
|
|
20
|
-
)
|
|
21
|
-
app.layout = plugin.layout
|
|
22
|
-
dash_duo.start_server(app)
|
|
23
|
-
assert not dash_duo.get_logs()
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
# pylint: disable=no-name-in-module
|
|
2
|
-
from webviz_config.plugins import RftPlotter
|
|
3
|
-
from webviz_config.testing import WebvizComposite
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def test_rft_plotter(
|
|
7
|
-
_webviz_duo: WebvizComposite, shared_settings, testdata_folder
|
|
8
|
-
) -> None:
|
|
9
|
-
plugin = RftPlotter(
|
|
10
|
-
shared_settings["HM_SETTINGS"],
|
|
11
|
-
ensembles=shared_settings["HM_ENSEMBLES"],
|
|
12
|
-
formations=testdata_folder
|
|
13
|
-
/ "01_drogon_ahm"
|
|
14
|
-
/ "realization-0"
|
|
15
|
-
/ "iter-0"
|
|
16
|
-
/ "share"
|
|
17
|
-
/ "results"
|
|
18
|
-
/ "tables"
|
|
19
|
-
/ "formations_res_only.csv",
|
|
20
|
-
faultlines=testdata_folder
|
|
21
|
-
/ "01_drogon_ahm"
|
|
22
|
-
/ "realization-0"
|
|
23
|
-
/ "iter-0"
|
|
24
|
-
/ "share"
|
|
25
|
-
/ "results"
|
|
26
|
-
/ "polygons"
|
|
27
|
-
/ "toptherys--gl_faultlines_extract_postprocess.csv",
|
|
28
|
-
)
|
|
29
|
-
|
|
30
|
-
_webviz_duo.start_server(plugin)
|
|
31
|
-
|
|
32
|
-
_webviz_duo.toggle_webviz_settings_drawer()
|
|
33
|
-
_webviz_duo.toggle_webviz_settings_group(
|
|
34
|
-
plugin.view("map-view").settings_group_unique_id("map-settings")
|
|
35
|
-
)
|
|
36
|
-
# Using str literals directly, not IDs from the plugin as intended because
|
|
37
|
-
# the run test did not accept the imports
|
|
38
|
-
|
|
39
|
-
my_component_id = _webviz_duo.view_settings_group_unique_component_id(
|
|
40
|
-
"map-view", "map-settings", "map-ensemble"
|
|
41
|
-
)
|
|
42
|
-
_webviz_duo.wait_for_contains_text(my_component_id, "iter-0")
|
|
43
|
-
assert not _webviz_duo.get_logs()
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
# pylint: disable=no-name-in-module
|
|
2
|
-
from webviz_config.plugins import SegyViewer
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
def test_segy_viewer(dash_duo, app, shared_settings, testdata_folder) -> None:
|
|
6
|
-
plugin = SegyViewer(
|
|
7
|
-
app,
|
|
8
|
-
shared_settings["HM_SETTINGS"],
|
|
9
|
-
segyfiles=[
|
|
10
|
-
testdata_folder
|
|
11
|
-
/ "01_drogon_ahm"
|
|
12
|
-
/ "realization-0"
|
|
13
|
-
/ "iter-0"
|
|
14
|
-
/ "share"
|
|
15
|
-
/ "results"
|
|
16
|
-
/ "seismic"
|
|
17
|
-
/ "seismic--amplitude_depth--20180701_20180101.segy"
|
|
18
|
-
],
|
|
19
|
-
)
|
|
20
|
-
app.layout = plugin.layout
|
|
21
|
-
dash_duo.start_server(app)
|
|
22
|
-
assert not dash_duo.get_logs()
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import warnings
|
|
2
|
-
|
|
3
|
-
# pylint: disable=no-name-in-module
|
|
4
|
-
from webviz_config.plugins import SimulationTimeSeriesOneByOne
|
|
5
|
-
from webviz_config.testing import WebvizComposite
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
def test_simulation_timeseries_onebyone(
|
|
9
|
-
_webviz_duo: WebvizComposite, shared_settings: dict
|
|
10
|
-
) -> None:
|
|
11
|
-
plugin = SimulationTimeSeriesOneByOne(
|
|
12
|
-
webviz_settings=shared_settings["SENS_SETTINGS"],
|
|
13
|
-
ensembles=shared_settings["SENS_ENSEMBLES"],
|
|
14
|
-
initial_vector="FOPT",
|
|
15
|
-
)
|
|
16
|
-
_webviz_duo.start_server(plugin)
|
|
17
|
-
logs = []
|
|
18
|
-
for log in _webviz_duo.get_logs() or []:
|
|
19
|
-
if "dash_renderer" in log.get("message"):
|
|
20
|
-
warnings.warn(log.get("message"))
|
|
21
|
-
else:
|
|
22
|
-
logs.append(log)
|
|
23
|
-
assert not logs
|
|
@@ -1,244 +0,0 @@
|
|
|
1
|
-
import json
|
|
2
|
-
|
|
3
|
-
from dash import Input, Output, State, html
|
|
4
|
-
from webviz_config import WebvizSettings
|
|
5
|
-
|
|
6
|
-
# pylint: disable=no-name-in-module
|
|
7
|
-
from webviz_config.plugins import StructuralUncertainty
|
|
8
|
-
from webviz_config.themes import default_theme
|
|
9
|
-
|
|
10
|
-
# pylint: enable=no-name-in-module
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def stringify_object_id(uuid) -> str:
|
|
14
|
-
"""Object ids must be sorted and converted to
|
|
15
|
-
css strings to be recognized as dom elements"""
|
|
16
|
-
sorted_uuid_obj = json.loads(
|
|
17
|
-
json.dumps(
|
|
18
|
-
uuid,
|
|
19
|
-
sort_keys=True,
|
|
20
|
-
separators=(",", ":"),
|
|
21
|
-
)
|
|
22
|
-
)
|
|
23
|
-
string = ["{"]
|
|
24
|
-
for idx, (key, value) in enumerate(sorted_uuid_obj.items()):
|
|
25
|
-
string.append(f'\\"{key}\\"\\:\\"{value}\\"\\')
|
|
26
|
-
if idx == len(sorted_uuid_obj) - 1:
|
|
27
|
-
string.append("}")
|
|
28
|
-
else:
|
|
29
|
-
string.append(",")
|
|
30
|
-
return ("").join(string)
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
# pylint: disable=too-many-locals
|
|
34
|
-
def test_default_configuration(dash_duo, app, testdata_folder) -> None:
|
|
35
|
-
webviz_settings = WebvizSettings(
|
|
36
|
-
shared_settings={
|
|
37
|
-
"scratch_ensembles": {
|
|
38
|
-
"iter-0": str(testdata_folder / "01_drogon_ahm/realization-*/iter-0")
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
theme=default_theme,
|
|
42
|
-
)
|
|
43
|
-
plugin = StructuralUncertainty(
|
|
44
|
-
app,
|
|
45
|
-
webviz_settings,
|
|
46
|
-
ensembles=["iter-0"],
|
|
47
|
-
surface_attributes=["ds_extract_postprocess"],
|
|
48
|
-
surface_name_filter=[
|
|
49
|
-
"topvolon",
|
|
50
|
-
"toptherys",
|
|
51
|
-
"topvolantis",
|
|
52
|
-
"basevolantis",
|
|
53
|
-
],
|
|
54
|
-
wellsuffix=".rmswell",
|
|
55
|
-
wellfolder=testdata_folder / "observed_data" / "wells",
|
|
56
|
-
)
|
|
57
|
-
|
|
58
|
-
app.layout = plugin.layout
|
|
59
|
-
dash_duo.start_server(app)
|
|
60
|
-
|
|
61
|
-
intersection_data_id = plugin.uuid("intersection-data")
|
|
62
|
-
dialog_id = plugin.uuid("dialog")
|
|
63
|
-
# Check some initialization
|
|
64
|
-
# Check dropdowns
|
|
65
|
-
for element, return_val in zip(
|
|
66
|
-
["well", "surface_attribute"], ["55_33-1", "ds_extract_postprocess"]
|
|
67
|
-
):
|
|
68
|
-
uuid = stringify_object_id(
|
|
69
|
-
uuid={"element": element, "id": intersection_data_id}
|
|
70
|
-
)
|
|
71
|
-
assert dash_duo.wait_for_element(f"#\\{uuid} .Select-value").text == return_val
|
|
72
|
-
|
|
73
|
-
# Check Selects
|
|
74
|
-
for element, return_val in zip(
|
|
75
|
-
["surface_names"],
|
|
76
|
-
[["topvolon", "toptherys", "topvolantis", "basevolantis"]],
|
|
77
|
-
):
|
|
78
|
-
uuid = stringify_object_id(
|
|
79
|
-
uuid={"element": element, "id": intersection_data_id}
|
|
80
|
-
)
|
|
81
|
-
assert (
|
|
82
|
-
dash_duo.wait_for_element(f"#\\{uuid} select").text.splitlines()
|
|
83
|
-
== return_val
|
|
84
|
-
)
|
|
85
|
-
|
|
86
|
-
# Check Calculation checkbox
|
|
87
|
-
uuid = stringify_object_id(
|
|
88
|
-
uuid={"element": "calculation", "id": intersection_data_id}
|
|
89
|
-
)
|
|
90
|
-
calculation_element = dash_duo.driver.find_elements_by_css_selector(
|
|
91
|
-
f"#\\{uuid} > label > input"
|
|
92
|
-
)
|
|
93
|
-
assert len(calculation_element) == len(
|
|
94
|
-
["Min", "Max", "Mean", "Realizations", "Uncertainty envelope"]
|
|
95
|
-
)
|
|
96
|
-
for checkbox, selected in zip(
|
|
97
|
-
calculation_element,
|
|
98
|
-
["true", "true", "true", None, None],
|
|
99
|
-
):
|
|
100
|
-
assert checkbox.get_attribute("selected") == selected
|
|
101
|
-
|
|
102
|
-
# Check realizations
|
|
103
|
-
real_filter_btn_uuid = stringify_object_id(
|
|
104
|
-
{
|
|
105
|
-
"id": dialog_id,
|
|
106
|
-
"dialog_id": "realization-filter",
|
|
107
|
-
"element": "button-open",
|
|
108
|
-
}
|
|
109
|
-
)
|
|
110
|
-
real_uuid = stringify_object_id(
|
|
111
|
-
uuid={"element": "realizations", "id": intersection_data_id}
|
|
112
|
-
)
|
|
113
|
-
|
|
114
|
-
### Open realization filter and check realizations
|
|
115
|
-
dash_duo.wait_for_element_by_id(real_filter_btn_uuid).click()
|
|
116
|
-
real_selector = dash_duo.wait_for_element_by_id(real_uuid)
|
|
117
|
-
assert real_selector.text.splitlines() == ["0", "1"]
|
|
118
|
-
|
|
119
|
-
assert not dash_duo.get_logs(), "browser console should contain no error"
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
def test_full_configuration(dash_duo, app, testdata_folder) -> None:
|
|
123
|
-
webviz_settings = WebvizSettings(
|
|
124
|
-
shared_settings={
|
|
125
|
-
"scratch_ensembles": {
|
|
126
|
-
"iter-0": str(testdata_folder / "01_drogon_ahm/realization-*/iter-0"),
|
|
127
|
-
}
|
|
128
|
-
},
|
|
129
|
-
theme=default_theme,
|
|
130
|
-
)
|
|
131
|
-
plugin = StructuralUncertainty(
|
|
132
|
-
app,
|
|
133
|
-
webviz_settings,
|
|
134
|
-
ensembles=["iter-0"],
|
|
135
|
-
surface_attributes=["ds_extract_postprocess"],
|
|
136
|
-
surface_name_filter=["topvolon", "toptherys", "topvolantis", "basevolantis"],
|
|
137
|
-
wellfolder=testdata_folder / "observed_data" / "wells",
|
|
138
|
-
wellsuffix=".rmswell",
|
|
139
|
-
zonelog="Zone",
|
|
140
|
-
initial_settings={
|
|
141
|
-
"intersection_data": {
|
|
142
|
-
"surface_names": ["topvolon", "toptherys", "topvolantis"],
|
|
143
|
-
"surface_attribute": "ds_extract_postprocess",
|
|
144
|
-
"ensembles": [
|
|
145
|
-
"iter-0",
|
|
146
|
-
],
|
|
147
|
-
"calculation": ["Mean", "Min", "Max"],
|
|
148
|
-
# - Uncertainty envelope
|
|
149
|
-
"well": "55_33-1",
|
|
150
|
-
"realizations": [0, 1],
|
|
151
|
-
"colors": {
|
|
152
|
-
"topvolon": {"iter-0": "#2C82C9"},
|
|
153
|
-
"toptherys": {
|
|
154
|
-
"iter-0": "#512E34",
|
|
155
|
-
},
|
|
156
|
-
"topvolantis": {
|
|
157
|
-
"iter-0": "#EEE657",
|
|
158
|
-
},
|
|
159
|
-
},
|
|
160
|
-
},
|
|
161
|
-
"intersection_layout": {
|
|
162
|
-
"yaxis": {
|
|
163
|
-
"range": [1700, 1550],
|
|
164
|
-
"title": "True vertical depth [m]",
|
|
165
|
-
},
|
|
166
|
-
"xaxis": {"title": "Lateral distance [m]"},
|
|
167
|
-
},
|
|
168
|
-
},
|
|
169
|
-
)
|
|
170
|
-
|
|
171
|
-
app.layout = plugin.layout
|
|
172
|
-
|
|
173
|
-
# Injecting a div that will be updated when the plot data stores are
|
|
174
|
-
# changed. Since the plot data are stored in LocalStorage and Selenium
|
|
175
|
-
# has no functionality to wait for LocalStorage to equal some value we
|
|
176
|
-
# instead populate this injected div with some data before we check the content
|
|
177
|
-
# of Localstorage.
|
|
178
|
-
@app.callback(
|
|
179
|
-
Output(plugin.uuid("layout"), "children"),
|
|
180
|
-
Input(plugin.uuid("intersection-graph-layout"), "data"),
|
|
181
|
-
State(plugin.uuid("layout"), "children"),
|
|
182
|
-
)
|
|
183
|
-
def _add_or_update_div(data, children):
|
|
184
|
-
plot_is_updated = html.Div(
|
|
185
|
-
id=plugin.uuid("plot_is_updated"), children=data.get("title")
|
|
186
|
-
)
|
|
187
|
-
if len(children) == 6:
|
|
188
|
-
children[5] = plot_is_updated
|
|
189
|
-
else:
|
|
190
|
-
children.append(plot_is_updated)
|
|
191
|
-
|
|
192
|
-
return children
|
|
193
|
-
|
|
194
|
-
dash_duo.start_server(app)
|
|
195
|
-
|
|
196
|
-
intersection_data_id = plugin.uuid("intersection-data")
|
|
197
|
-
|
|
198
|
-
# Check some initialization
|
|
199
|
-
# Check dropdowns
|
|
200
|
-
for element, return_val in zip(
|
|
201
|
-
["well", "surface_attribute"], ["55_33-1", "ds_extract_postprocess"]
|
|
202
|
-
):
|
|
203
|
-
uuid = stringify_object_id(
|
|
204
|
-
uuid={"element": element, "id": intersection_data_id}
|
|
205
|
-
)
|
|
206
|
-
assert dash_duo.wait_for_text_to_equal(f"#\\{uuid} .Select-value", return_val)
|
|
207
|
-
|
|
208
|
-
# Wait for the callbacks to execute
|
|
209
|
-
dash_duo.wait_for_text_to_equal(
|
|
210
|
-
f'#{plugin.uuid("plot_is_updated")}',
|
|
211
|
-
"Intersection along well: 55_33-1",
|
|
212
|
-
timeout=30,
|
|
213
|
-
)
|
|
214
|
-
|
|
215
|
-
# Check that graph data is stored
|
|
216
|
-
graph_data = dash_duo.get_session_storage(plugin.uuid("intersection-graph-data"))
|
|
217
|
-
assert len(graph_data) == 14
|
|
218
|
-
graph_layout = dash_duo.get_session_storage(
|
|
219
|
-
plugin.uuid("intersection-graph-layout")
|
|
220
|
-
)
|
|
221
|
-
assert isinstance(graph_layout, dict)
|
|
222
|
-
assert graph_layout.get("title") == "Intersection along well: 55_33-1"
|
|
223
|
-
|
|
224
|
-
### Change well and check graph
|
|
225
|
-
well_uuid = stringify_object_id(
|
|
226
|
-
uuid={"element": "well", "id": intersection_data_id}
|
|
227
|
-
)
|
|
228
|
-
|
|
229
|
-
apply_btn = dash_duo.wait_for_element_by_id(
|
|
230
|
-
plugin.uuid("apply-intersection-data-selections")
|
|
231
|
-
)
|
|
232
|
-
well_dropdown = dash_duo.wait_for_element_by_id(well_uuid)
|
|
233
|
-
dash_duo.select_dcc_dropdown(well_dropdown, value="55_33-2")
|
|
234
|
-
apply_btn.click()
|
|
235
|
-
|
|
236
|
-
# dash_duo.wait_for_text_to_equal(
|
|
237
|
-
# f'#{plugin.uuid("plot_is_updated")}',
|
|
238
|
-
# "Intersection along well: 55_33-1",
|
|
239
|
-
# timeout=100,
|
|
240
|
-
# )
|
|
241
|
-
graph_layout = dash_duo.get_session_storage(
|
|
242
|
-
plugin.uuid("intersection-graph-layout")
|
|
243
|
-
)
|
|
244
|
-
# assert graph_layout.get("title") == "Intersection along well: 55_33-2"
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# pylint: disable=no-name-in-module
|
|
2
|
-
from webviz_config.plugins import SurfaceViewerFMU
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
def test_surface_viewer_fmu(dash_duo, app, shared_settings, testdata_folder) -> None:
|
|
6
|
-
plugin = SurfaceViewerFMU(
|
|
7
|
-
app,
|
|
8
|
-
shared_settings["HM_SETTINGS"],
|
|
9
|
-
ensembles=shared_settings["HM_ENSEMBLES"],
|
|
10
|
-
wellsuffix=".rmswell",
|
|
11
|
-
wellfolder=testdata_folder
|
|
12
|
-
/ "01_drogon_ahm"
|
|
13
|
-
/ "realization-0"
|
|
14
|
-
/ "iter-0"
|
|
15
|
-
/ "share"
|
|
16
|
-
/ "results"
|
|
17
|
-
/ "wells",
|
|
18
|
-
)
|
|
19
|
-
app.layout = plugin.layout
|
|
20
|
-
dash_duo.start_server(app)
|
|
21
|
-
assert not dash_duo.get_logs()
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# pylint: disable=no-name-in-module
|
|
2
|
-
from webviz_config.plugins import SurfaceWithGridCrossSection
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
def test_surface_with_grid_crosssection(
|
|
6
|
-
dash_duo, app, shared_settings, testdata_folder
|
|
7
|
-
) -> None:
|
|
8
|
-
plugin = SurfaceWithGridCrossSection(
|
|
9
|
-
app,
|
|
10
|
-
shared_settings["HM_SETTINGS"],
|
|
11
|
-
gridfile=(
|
|
12
|
-
testdata_folder
|
|
13
|
-
/ "01_drogon_ahm"
|
|
14
|
-
/ "realization-0"
|
|
15
|
-
/ "iter-0"
|
|
16
|
-
/ "share"
|
|
17
|
-
/ "results"
|
|
18
|
-
/ "grids"
|
|
19
|
-
/ "geogrid.roff"
|
|
20
|
-
),
|
|
21
|
-
gridparameterfiles=[
|
|
22
|
-
testdata_folder
|
|
23
|
-
/ "01_drogon_ahm"
|
|
24
|
-
/ "realization-0"
|
|
25
|
-
/ "iter-0"
|
|
26
|
-
/ "share"
|
|
27
|
-
/ "results"
|
|
28
|
-
/ "grids"
|
|
29
|
-
/ "geogrid--phit.roff"
|
|
30
|
-
],
|
|
31
|
-
surfacefiles=[
|
|
32
|
-
testdata_folder
|
|
33
|
-
/ "01_drogon_ahm"
|
|
34
|
-
/ "realization-0"
|
|
35
|
-
/ "iter-0"
|
|
36
|
-
/ "share"
|
|
37
|
-
/ "results"
|
|
38
|
-
/ "maps"
|
|
39
|
-
/ "topvolon--ds_extract_geogrid.gri"
|
|
40
|
-
],
|
|
41
|
-
surfacenames=["Top Volon"],
|
|
42
|
-
)
|
|
43
|
-
app.layout = plugin.layout
|
|
44
|
-
dash_duo.start_server(app)
|
|
45
|
-
assert not dash_duo.get_logs()
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
# pylint: disable=no-name-in-module
|
|
2
|
-
from webviz_config.plugins import SurfaceWithSeismicCrossSection
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
def test_surface_with_seismic_crosssection(
|
|
6
|
-
dash_duo, app, shared_settings, testdata_folder
|
|
7
|
-
) -> None:
|
|
8
|
-
plugin = SurfaceWithSeismicCrossSection(
|
|
9
|
-
app,
|
|
10
|
-
shared_settings["HM_SETTINGS"],
|
|
11
|
-
segyfiles=[
|
|
12
|
-
testdata_folder
|
|
13
|
-
/ "01_drogon_ahm"
|
|
14
|
-
/ "realization-0"
|
|
15
|
-
/ "iter-0"
|
|
16
|
-
/ "share"
|
|
17
|
-
/ "results"
|
|
18
|
-
/ "seismic"
|
|
19
|
-
/ "seismic--amplitude_depth--20180701_20180101.segy"
|
|
20
|
-
],
|
|
21
|
-
surfacefiles=[
|
|
22
|
-
testdata_folder
|
|
23
|
-
/ "01_drogon_ahm"
|
|
24
|
-
/ "realization-0"
|
|
25
|
-
/ "iter-0"
|
|
26
|
-
/ "share"
|
|
27
|
-
/ "results"
|
|
28
|
-
/ "maps"
|
|
29
|
-
/ "topvolon--ds_extract_geogrid.gri"
|
|
30
|
-
],
|
|
31
|
-
surfacenames=["Top Volon"],
|
|
32
|
-
)
|
|
33
|
-
app.layout = plugin.layout
|
|
34
|
-
dash_duo.start_server(app)
|
|
35
|
-
assert not dash_duo.get_logs()
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# pylint: disable=no-name-in-module
|
|
2
|
-
from webviz_config.plugins import TornadoPlotterFMU
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
def test_tornado_plotter_fmu(dash_duo, app, shared_settings) -> None:
|
|
6
|
-
plugin = TornadoPlotterFMU(
|
|
7
|
-
shared_settings["SENS_SETTINGS"],
|
|
8
|
-
ensemble=shared_settings["SENS_ENSEMBLES"][0],
|
|
9
|
-
csvfile="share/results/volumes/geogrid--vol.csv",
|
|
10
|
-
multi_value_selectors=["REGION", "ZONE"],
|
|
11
|
-
)
|
|
12
|
-
app.layout = plugin.layout
|
|
13
|
-
dash_duo.start_server(app)
|
|
14
|
-
assert not dash_duo.get_logs()
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
# pylint: disable=no-name-in-module
|
|
2
|
-
from webviz_config.plugins import VfpAnalysis
|
|
3
|
-
from webviz_config.testing import WebvizComposite
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def test_vfp_analysis(_webviz_duo: WebvizComposite, shared_settings: dict) -> None:
|
|
7
|
-
plugin = VfpAnalysis(
|
|
8
|
-
shared_settings["HM_SETTINGS"], vfp_file_pattern="tests/data/vfp.arrow"
|
|
9
|
-
)
|
|
10
|
-
|
|
11
|
-
_webviz_duo.start_server(plugin)
|
|
12
|
-
|
|
13
|
-
assert not _webviz_duo.get_logs()
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import warnings
|
|
2
|
-
|
|
3
|
-
# pylint: disable=no-name-in-module
|
|
4
|
-
from webviz_config.plugins import VolumetricAnalysis
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
def test_volumetrics_no_sens(dash_duo, app, shared_settings) -> None:
|
|
8
|
-
plugin = VolumetricAnalysis(
|
|
9
|
-
shared_settings["HM_SETTINGS"],
|
|
10
|
-
ensembles=shared_settings["HM_ENSEMBLES"],
|
|
11
|
-
volfiles={"geogrid": "geogrid--vol.csv", "simgrid": "simgrid--vol.csv"},
|
|
12
|
-
)
|
|
13
|
-
app.layout = plugin.layout
|
|
14
|
-
dash_duo.start_server(app)
|
|
15
|
-
logs = []
|
|
16
|
-
for log in dash_duo.get_logs() or []:
|
|
17
|
-
if "dash_renderer" in log.get("message"):
|
|
18
|
-
warnings.warn(log.get("message"))
|
|
19
|
-
else:
|
|
20
|
-
logs.append(log)
|
|
21
|
-
assert not logs
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
def test_volumetrics_sens(dash_duo, app, shared_settings) -> None:
|
|
25
|
-
plugin = VolumetricAnalysis(
|
|
26
|
-
shared_settings["SENS_SETTINGS"],
|
|
27
|
-
ensembles=shared_settings["SENS_ENSEMBLES"],
|
|
28
|
-
volfiles={"geogrid": "geogrid--vol.csv", "simgrid": "simgrid--vol.csv"},
|
|
29
|
-
)
|
|
30
|
-
app.layout = plugin.layout
|
|
31
|
-
dash_duo.start_server(app)
|
|
32
|
-
logs = []
|
|
33
|
-
for log in dash_duo.get_logs() or []:
|
|
34
|
-
if "dash_renderer" in log.get("message"):
|
|
35
|
-
warnings.warn(log.get("message"))
|
|
36
|
-
else:
|
|
37
|
-
logs.append(log)
|
|
38
|
-
assert not logs
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# pylint: disable=no-name-in-module
|
|
2
|
-
from webviz_config.plugins import WellLogViewer
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
def test_well_log_viewer(dash_duo, app, testdata_folder) -> None:
|
|
6
|
-
wellfolder = testdata_folder / "observed_data" / "wells/"
|
|
7
|
-
plugin = WellLogViewer(
|
|
8
|
-
app,
|
|
9
|
-
wellfolder=wellfolder,
|
|
10
|
-
wellsuffix=".rmswell",
|
|
11
|
-
mdlog="MDepth",
|
|
12
|
-
logtemplates=[f"{testdata_folder}/webviz_examples/all_logs_template.yml"],
|
|
13
|
-
)
|
|
14
|
-
app.layout = plugin.layout
|
|
15
|
-
dash_duo.start_server(app)
|
|
16
|
-
assert not dash_duo.get_logs()
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
import time
|
|
3
|
-
|
|
4
|
-
import numpy as np
|
|
5
|
-
import pyarrow as pa
|
|
6
|
-
|
|
7
|
-
from webviz_subsurface._providers.ensemble_summary_provider._resampling import (
|
|
8
|
-
sample_segmented_multi_real_table_at_date,
|
|
9
|
-
)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def _create_table(
|
|
13
|
-
num_reals: int, start_date: np.datetime64, end_date: np.datetime64, num_columns: int
|
|
14
|
-
) -> pa.Table:
|
|
15
|
-
date_arr_np = np.empty(0, np.datetime64)
|
|
16
|
-
real_arr_np = np.empty(0, np.int32)
|
|
17
|
-
|
|
18
|
-
for real in range(0, num_reals):
|
|
19
|
-
dates_for_this_real = np.arange(start_date, end_date + 1)
|
|
20
|
-
dates_for_this_real = dates_for_this_real.astype("datetime64[ms]")
|
|
21
|
-
real_arr_np = np.concatenate(
|
|
22
|
-
(real_arr_np, np.full(len(dates_for_this_real), real))
|
|
23
|
-
)
|
|
24
|
-
date_arr_np = np.concatenate((date_arr_np, dates_for_this_real))
|
|
25
|
-
|
|
26
|
-
print(
|
|
27
|
-
f"real_arr_np (num unique={len(np.unique(real_arr_np))} len={len(real_arr_np)}):"
|
|
28
|
-
)
|
|
29
|
-
print(real_arr_np)
|
|
30
|
-
print(
|
|
31
|
-
f"date_arr_np (num unique={len(np.unique(date_arr_np))} len={len(date_arr_np)}):"
|
|
32
|
-
)
|
|
33
|
-
print(date_arr_np)
|
|
34
|
-
|
|
35
|
-
field_list = []
|
|
36
|
-
columndata_list = []
|
|
37
|
-
field_list.append(pa.field("DATE", pa.timestamp("ms")))
|
|
38
|
-
field_list.append(pa.field("REAL", pa.int64()))
|
|
39
|
-
columndata_list.append(pa.array(date_arr_np))
|
|
40
|
-
columndata_list.append(pa.array(real_arr_np))
|
|
41
|
-
|
|
42
|
-
num_rows = len(real_arr_np)
|
|
43
|
-
|
|
44
|
-
for colnum in range(0, num_columns):
|
|
45
|
-
if (colnum % 2) == 0:
|
|
46
|
-
metadata = {b"is_rate": b'{"is_rate": False}'}
|
|
47
|
-
else:
|
|
48
|
-
metadata = {b"is_rate": b'{"is_rate": True}'}
|
|
49
|
-
|
|
50
|
-
field_list.append(pa.field(f"c_{colnum}", pa.float32(), metadata=metadata))
|
|
51
|
-
|
|
52
|
-
valarr = np.linspace(colnum, colnum + num_rows, num_rows)
|
|
53
|
-
columndata_list.append(pa.array(valarr))
|
|
54
|
-
|
|
55
|
-
schema = pa.schema(field_list)
|
|
56
|
-
return pa.table(columndata_list, schema=schema)
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
def main() -> None:
|
|
60
|
-
print()
|
|
61
|
-
print("## Running resampling performance tests")
|
|
62
|
-
print("## =================================================")
|
|
63
|
-
|
|
64
|
-
logging.basicConfig(
|
|
65
|
-
level=logging.WARNING,
|
|
66
|
-
format="%(asctime)s %(levelname)-3s [%(name)s]: %(message)s",
|
|
67
|
-
)
|
|
68
|
-
logging.getLogger("webviz_subsurface").setLevel(level=logging.INFO)
|
|
69
|
-
logging.getLogger("webviz_subsurface").setLevel(level=logging.DEBUG)
|
|
70
|
-
|
|
71
|
-
# table = _create_table(
|
|
72
|
-
# num_reals=3,
|
|
73
|
-
# start_date=np.datetime64("2020-12-30"),
|
|
74
|
-
# end_date=np.datetime64("2021-01-05"),
|
|
75
|
-
# num_columns=4,
|
|
76
|
-
# )
|
|
77
|
-
|
|
78
|
-
table = _create_table(
|
|
79
|
-
num_reals=100,
|
|
80
|
-
start_date=np.datetime64("2000-01-01", "M"),
|
|
81
|
-
end_date=np.datetime64("2099-12-31", "M"),
|
|
82
|
-
num_columns=10000,
|
|
83
|
-
)
|
|
84
|
-
|
|
85
|
-
print("## table shape (rows,columns):", table.shape)
|
|
86
|
-
# print(table.to_pandas())
|
|
87
|
-
|
|
88
|
-
start_tim = time.perf_counter()
|
|
89
|
-
|
|
90
|
-
res = sample_segmented_multi_real_table_at_date(
|
|
91
|
-
table, np.datetime64("2098-01-03", "ms")
|
|
92
|
-
)
|
|
93
|
-
|
|
94
|
-
# res = sample_segmented_multi_real_table_at_date(
|
|
95
|
-
# table, np.datetime64("2098-01-01", "ms")
|
|
96
|
-
# )
|
|
97
|
-
|
|
98
|
-
elapsed_time_ms = int(1000 * (time.perf_counter() - start_tim))
|
|
99
|
-
|
|
100
|
-
# print(res)
|
|
101
|
-
# print(res.to_pandas())
|
|
102
|
-
|
|
103
|
-
print("## res shape:", res.shape)
|
|
104
|
-
|
|
105
|
-
print(f"## sample at date took: {elapsed_time_ms}ms")
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
# Running:
|
|
109
|
-
# python -m webviz_subsurface._providers.ensemble_summary_provider.dev_resampling_perf_testing
|
|
110
|
-
# -------------------------------------------------------------------------
|
|
111
|
-
if __name__ == "__main__":
|
|
112
|
-
main()
|
|
File without changes
|
{webviz_subsurface-0.2.33.dist-info → webviz_subsurface-0.2.35.dist-info}/LICENSE.chromedriver
RENAMED
|
File without changes
|
|
File without changes
|