diff --git a/setup.py b/setup.py index bb8c1f796..4a0f0243a 100644 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ "scipy~=1.2", "dash-daq~=0.1", "matplotlib~=3.0", - "webviz-config>=0.0.4", + "webviz-config>=0.0.23", "webviz-subsurface-components>=0.0.3", "pillow~=6.1", "xtgeo~=2.1", diff --git a/tests/integration_tests/test_inplace_volumes.py b/tests/integration_tests/test_inplace_volumes.py index 17cb49969..13b50998f 100644 --- a/tests/integration_tests/test_inplace_volumes.py +++ b/tests/integration_tests/test_inplace_volumes.py @@ -1,7 +1,7 @@ import mock import dash import pandas as pd -from webviz_config.common_cache import cache +from webviz_config.common_cache import CACHE from webviz_config.containers import InplaceVolumes # mocked functions @@ -14,7 +14,7 @@ def test_inplace_volumes(dash_duo): app.css.config.serve_locally = True app.scripts.config.serve_locally = True app.config.suppress_callback_exceptions = True - cache.init_app(app.server) + CACHE.init_app(app.server) container_settings = {"scratch_ensembles": {"iter-0": "", "iter-1": ""}} ensembles = ["iter-0", "iter-1"] volfiles = {"geogrid": "geogrid--oil.csv", "simgrid": "simgrid--oil.csv"} diff --git a/tests/integration_tests/test_parameter_corr.py b/tests/integration_tests/test_parameter_corr.py index 115489084..f849553a2 100644 --- a/tests/integration_tests/test_parameter_corr.py +++ b/tests/integration_tests/test_parameter_corr.py @@ -1,7 +1,7 @@ import mock import dash import pandas as pd -from webviz_config.common_cache import cache +from webviz_config.common_cache import CACHE from webviz_config.containers import ParameterCorrelation # mocked functions @@ -14,7 +14,7 @@ def test_parameter_corr(dash_duo): app.css.config.serve_locally = True app.scripts.config.serve_locally = True app.config.suppress_callback_exceptions = True - cache.init_app(app.server) + CACHE.init_app(app.server) container_settings = {"scratch_ensembles": {"iter-0": ""}} ensembles = ["iter-0"] diff --git a/tests/test_parameter_correlation.py b/tests/test_parameter_correlation.py deleted file mode 100644 index 65382d955..000000000 --- a/tests/test_parameter_correlation.py +++ /dev/null @@ -1,33 +0,0 @@ -import mock -import dash -import pandas as pd -from webviz_config.common_cache import cache -from webviz_config.containers import ( # pylint: disable=no-name-in-module - ParameterCorrelation, -) - - -def test_parameter_corr(dash_duo): - - app = dash.Dash(__name__) - app.css.config.serve_locally = True - app.scripts.config.serve_locally = True - app.config.suppress_callback_exceptions = True - cache.init_app(app.server) - container_settings = {"scratch_ensembles": {"iter-0": ""}} - ensembles = ["iter-0"] - - with mock.patch( - "webviz_subsurface.containers._parameter_correlation.get_parameters" - ) as mock_parameters: - mock_parameters.return_value = pd.read_csv("tests/data/parameters.csv") - - param_corr = ParameterCorrelation(app, container_settings, ensembles) - - app.layout = param_corr.layout - dash_duo.start_server(app) - - my_component = dash_duo.find_element(f"#{param_corr.ens_matrix_id}") - - if not my_component.text.startswith("iter-0"): - raise AssertionError() diff --git a/webviz_subsurface/containers/_disk_usage.py b/webviz_subsurface/containers/_disk_usage.py index 90ca8051a..cbbd401b6 100644 --- a/webviz_subsurface/containers/_disk_usage.py +++ b/webviz_subsurface/containers/_disk_usage.py @@ -7,11 +7,11 @@ import webviz_core_components as wcc from dash.dependencies import Input, Output from webviz_config.webviz_store import webvizstore -from webviz_config.common_cache import cache -from webviz_config.containers import WebvizContainer +from webviz_config.common_cache import CACHE +from webviz_config import WebvizContainerABC -class DiskUsage(WebvizContainer): +class DiskUsage(WebvizContainerABC): """### Disk usage This container adds functionality for standard visualization of disk usage in @@ -99,7 +99,7 @@ def add_webvizstore(self): return [(get_disk_usage, [{"scratch_dir": self.scratch_dir}])] -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) @webvizstore def get_disk_usage(scratch_dir) -> pd.DataFrame: try: diff --git a/webviz_subsurface/containers/_history_match.py b/webviz_subsurface/containers/_history_match.py index a6544da43..29e58ebd7 100644 --- a/webviz_subsurface/containers/_history_match.py +++ b/webviz_subsurface/containers/_history_match.py @@ -6,12 +6,12 @@ from scipy.stats import chi2 import dash_html_components as html import webviz_subsurface_components as wsc -from webviz_config.containers import WebvizContainer +from webviz_config import WebvizContainerABC from ..datainput import extract_mismatch -class HistoryMatch(WebvizContainer): +class HistoryMatch(WebvizContainerABC): """### History match This container visualizes the quality of the history match. diff --git a/webviz_subsurface/containers/_inplace_volumes.py b/webviz_subsurface/containers/_inplace_volumes.py index dccc33cde..8d2130efe 100644 --- a/webviz_subsurface/containers/_inplace_volumes.py +++ b/webviz_subsurface/containers/_inplace_volumes.py @@ -6,13 +6,13 @@ import dash_core_components as dcc import webviz_core_components as wcc from dash.dependencies import Input, Output -from webviz_config.common_cache import cache -from webviz_config.containers import WebvizContainer +from webviz_config.common_cache import CACHE +from webviz_config import WebvizContainerABC from ..datainput import extract_volumes -class InplaceVolumes(WebvizContainer): +class InplaceVolumes(WebvizContainerABC): """### Volumetrics This container visualizes inplace volumetrics results from @@ -350,7 +350,7 @@ def _set_source_selector(group_by): return False, list(self.volumes["SOURCE"].unique())[0] -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) def plot_data(plot_type, dframe, response, name): values = dframe[response] @@ -383,7 +383,7 @@ def plot_data(plot_type, dframe, response, name): return output -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) def plot_layout(plot_type, response): if plot_type == "Histogram": @@ -406,7 +406,7 @@ def plot_layout(plot_type, response): return output -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) def filter_dataframe(dframe, columns, column_values): df = dframe.copy() if not isinstance(columns, list): diff --git a/webviz_subsurface/containers/_inplace_volumes_onebyone.py b/webviz_subsurface/containers/_inplace_volumes_onebyone.py index 7675a1544..c2779964e 100644 --- a/webviz_subsurface/containers/_inplace_volumes_onebyone.py +++ b/webviz_subsurface/containers/_inplace_volumes_onebyone.py @@ -10,14 +10,14 @@ import webviz_core_components as wcc from dash.dependencies import Input, Output, State -from webviz_config.common_cache import cache -from webviz_config.containers import WebvizContainer +from webviz_config.common_cache import CACHE +from webviz_config import WebvizContainerABC from webviz_subsurface.private_containers._tornado_plot import TornadoPlot from ..datainput import extract_volumes, get_realizations -class InplaceVolumesOneByOne(WebvizContainer): +class InplaceVolumesOneByOne(WebvizContainerABC): # pylint: disable=too-many-instance-attributes """### InplaceVolumesOneByOne @@ -462,7 +462,7 @@ def calculate_table_rows(df, response): return table -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) def filter_dataframe(dframe, columns, column_values): df = dframe.copy() if not isinstance(columns, list): diff --git a/webviz_subsurface/containers/_intersect.py b/webviz_subsurface/containers/_intersect.py index 81f3142ab..ded0510ea 100644 --- a/webviz_subsurface/containers/_intersect.py +++ b/webviz_subsurface/containers/_intersect.py @@ -9,13 +9,13 @@ import webviz_core_components as wcc from dash.dependencies import Input, Output, State from dash_table import DataTable -from webviz_config.common_cache import cache -from webviz_config.containers import WebvizContainer +from webviz_config.common_cache import CACHE +from webviz_config import WebvizContainerABC from ..datainput import scratch_ensemble, load_surface, get_wfence, get_hfence -class Intersect(WebvizContainer): +class Intersect(WebvizContainerABC): """### Intersect This container visualizes surfaces intersected along a well path. @@ -107,7 +107,7 @@ def surface_colors(self): for i, surf in enumerate(self.surface_names) } - # @cache.memoize(timeout=cache.TIMEOUT) + # @CACHE.memoize(timeout=CACHE.TIMEOUT) # def agg_surfaces(self, surf_names, calc='avg'): # agg = [] # for s_name in surf_names: @@ -118,7 +118,7 @@ def surface_colors(self): # agg.append(s) # return agg - @cache.memoize(timeout=cache.TIMEOUT) + @CACHE.memoize(timeout=CACHE.TIMEOUT) def plot_xsection(self, well, reals, surf_names, tvdmin=0): """Plots all lines in intersection""" traces = [] @@ -328,7 +328,7 @@ def _hover(_data, _fig, _surfaces): ] -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) def make_well_trace(well, tvdmin=0): """Creates well trace for graph""" x = [trace[3] for trace in get_wfence(well, extend=2).values] @@ -348,7 +348,7 @@ def make_well_trace(well, tvdmin=0): } -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) def make_surface_traces(well, reals, surf_name, cat, color): """Creates surface traces for graph""" plot_data = [] diff --git a/webviz_subsurface/containers/_morris_plot.py b/webviz_subsurface/containers/_morris_plot.py index f96ae883f..03c0b4a7c 100644 --- a/webviz_subsurface/containers/_morris_plot.py +++ b/webviz_subsurface/containers/_morris_plot.py @@ -7,11 +7,11 @@ from dash.dependencies import Input, Output from webviz_subsurface_components import Morris from webviz_config.webviz_store import webvizstore -from webviz_config.common_cache import cache -from webviz_config.containers import WebvizContainer +from webviz_config.common_cache import CACHE +from webviz_config import WebvizContainerABC -class MorrisPlot(WebvizContainer): +class MorrisPlot(WebvizContainerABC): """### Morris This container renders a visualization of the Morris sampling method. @@ -82,7 +82,7 @@ def _update_plot(vector): return output, vector, parameters -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) @webvizstore def read_csv(csv_file) -> pd.DataFrame: return pd.read_csv(csv_file) diff --git a/webviz_subsurface/containers/_parameter_correlation.py b/webviz_subsurface/containers/_parameter_correlation.py index 5f972bb24..b8f35d29f 100644 --- a/webviz_subsurface/containers/_parameter_correlation.py +++ b/webviz_subsurface/containers/_parameter_correlation.py @@ -7,8 +7,8 @@ import webviz_core_components as wcc from dash.dependencies import Input, Output from webviz_config.webviz_store import webvizstore -from webviz_config.common_cache import cache -from webviz_config.containers import WebvizContainer +from webviz_config.common_cache import CACHE +from webviz_config import WebvizContainerABC from ..datainput import scratch_ensemble @@ -24,7 +24,7 @@ def dropdown_from_dict(dom_id, dictionary): ) -class ParameterCorrelation(WebvizContainer): +class ParameterCorrelation(WebvizContainerABC): """### Parameter correlation This container shows parameter correlation using a correlation matrix, @@ -249,14 +249,14 @@ def add_webvizstore(self): ] -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) @webvizstore def get_parameters(ensemble_path) -> pd.DataFrame: return scratch_ensemble("", ensemble_path).parameters -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) def render_scatter(ens1, x_col, ens2, y_col, color, density): if ens1 == ens2: real_text = [f"Realization:{r}" for r in get_parameters(ens1)["REAL"]] @@ -365,7 +365,7 @@ def render_scatter(ens1, x_col, ens2, y_col, color, density): return {"data": data, "layout": layout} -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) def get_corr_data(ensemble_path, drop_constants=True): """ if drop_constants: @@ -390,7 +390,7 @@ def get_corr_data(ensemble_path, drop_constants=True): ) -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) def render_matrix(ensemble_path, drop_constants=True): corr_data = get_corr_data(ensemble_path, drop_constants) diff --git a/webviz_subsurface/containers/_parameter_distribution.py b/webviz_subsurface/containers/_parameter_distribution.py index 9042d3a7e..c175bda15 100644 --- a/webviz_subsurface/containers/_parameter_distribution.py +++ b/webviz_subsurface/containers/_parameter_distribution.py @@ -7,12 +7,12 @@ import webviz_core_components as wcc from dash.exceptions import PreventUpdate from dash.dependencies import Input, Output, State -from webviz_config.containers import WebvizContainer +from webviz_config import WebvizContainerABC from ..datainput import load_parameters -class ParameterDistribution(WebvizContainer): +class ParameterDistribution(WebvizContainerABC): """### ParameterDistribution This container shows parameter distribution per ensemble as a histogram diff --git a/webviz_subsurface/containers/_reservoir_simulation_timeseries.py b/webviz_subsurface/containers/_reservoir_simulation_timeseries.py index d2dd760d2..674baa8bb 100644 --- a/webviz_subsurface/containers/_reservoir_simulation_timeseries.py +++ b/webviz_subsurface/containers/_reservoir_simulation_timeseries.py @@ -11,8 +11,8 @@ from dash.dependencies import Input, Output, State from plotly.colors import DEFAULT_PLOTLY_COLORS import plotly.graph_objs as go -from webviz_config.containers import WebvizContainer -from webviz_config.common_cache import cache +from webviz_config import WebvizContainerABC +from webviz_config.common_cache import CACHE from ..datainput import ( get_time_series_data, @@ -26,7 +26,7 @@ # ============================================================================= -class ReservoirSimulationTimeSeries(WebvizContainer): +class ReservoirSimulationTimeSeries(WebvizContainerABC): """### Time series from reservoir simulations * `ensembles`: Which ensembles in `container_settings` to visualize. @@ -363,7 +363,7 @@ def _user_download_data( ).filter(items=["STATISTIC", vector, "DATE", "ENSEMBLE"]) return ( - WebvizContainer.container_data_compress( + WebvizContainerABC.container_data_compress( [ { "filename": f"{file_name}.csv", @@ -436,7 +436,7 @@ def add_webvizstore(self): # ============================================================================= -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) def render_realization_plot( ensemble_paths: tuple, time_index: str, @@ -552,7 +552,7 @@ def render_realization_plot( return wcc.Graph(figure={"data": plot_traces, "layout": layout}) -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) def render_stat_plot( ensemble_paths: tuple, time_index: str, diff --git a/webviz_subsurface/containers/_subsurface_map.py b/webviz_subsurface/containers/_subsurface_map.py index 82719dd36..d14d3ba59 100644 --- a/webviz_subsurface/containers/_subsurface_map.py +++ b/webviz_subsurface/containers/_subsurface_map.py @@ -5,13 +5,13 @@ import dash_html_components as html from webviz_subsurface_components import Map from webviz_config.webviz_store import webvizstore -from webviz_config.common_cache import cache -from webviz_config.containers import WebvizContainer +from webviz_config.common_cache import CACHE +from webviz_config import WebvizContainerABC from ..datainput import scratch_ensemble -class SubsurfaceMap(WebvizContainer): +class SubsurfaceMap(WebvizContainerABC): """### Subsurface map This container visualizes the subsurface. Currently only supporting reservoir @@ -60,7 +60,7 @@ def add_webvizstore(self): ] -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) def get_map_data(ensemble_path, map_value, flow_value, time_step): """Returns map data in the format of a JSON string, suitable for the corresponding subsurface map component in diff --git a/webviz_subsurface/datainput/_fmu_input.py b/webviz_subsurface/datainput/_fmu_input.py index f46087276..93b3b7753 100644 --- a/webviz_subsurface/datainput/_fmu_input.py +++ b/webviz_subsurface/datainput/_fmu_input.py @@ -1,7 +1,7 @@ from pathlib import Path import glob import pandas as pd -from webviz_config.common_cache import cache +from webviz_config.common_cache import CACHE from webviz_config.webviz_store import webvizstore try: @@ -10,7 +10,7 @@ pass -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) def load_ensemble_set(ensemble_paths: tuple, ensemble_set_name: str = "EnsembleSet"): return EnsembleSet( ensemble_set_name, @@ -18,7 +18,7 @@ def load_ensemble_set(ensemble_paths: tuple, ensemble_set_name: str = "EnsembleS ) -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) @webvizstore def load_parameters( ensemble_paths: tuple, ensemble_set_name: str = "EnsembleSet" @@ -27,7 +27,7 @@ def load_parameters( return load_ensemble_set(ensemble_paths, ensemble_set_name).parameters -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) @webvizstore def get_realizations( ensemble_paths: tuple, ensemble_set_name: str = "EnsembleSet" @@ -67,7 +67,7 @@ def find_sens_type(senscase): return "scalar" -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) def find_surfaces(ensemble_paths: tuple, suffix="*.gri", delimiter="--"): """Reads surface file names stored in standard FMU format, and returns a dictionary on the following format: diff --git a/webviz_subsurface/datainput/_history_match.py b/webviz_subsurface/datainput/_history_match.py index f5adf9546..ab31aa0ec 100644 --- a/webviz_subsurface/datainput/_history_match.py +++ b/webviz_subsurface/datainput/_history_match.py @@ -1,7 +1,7 @@ from pathlib import Path import pandas as pd -from webviz_config.common_cache import cache +from webviz_config.common_cache import CACHE from webviz_config.webviz_store import webvizstore try: @@ -10,12 +10,12 @@ pass # for a portable webviz instance, it is never used. -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) def scratch_ensemble(ensemble_name, ensemble_path): return fmu.ensemble.ScratchEnsemble(ensemble_name, ensemble_path) -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) @webvizstore def extract_mismatch(ens_paths, observation_file: Path) -> pd.DataFrame: """Convert the fmu-ensemble mismatch dataframe into the the format diff --git a/webviz_subsurface/datainput/_inplace_volumes.py b/webviz_subsurface/datainput/_inplace_volumes.py index 6d375e899..ae0d24013 100644 --- a/webviz_subsurface/datainput/_inplace_volumes.py +++ b/webviz_subsurface/datainput/_inplace_volumes.py @@ -1,7 +1,7 @@ import os import pandas as pd -from webviz_config.common_cache import cache +from webviz_config.common_cache import CACHE from webviz_config.webviz_store import webvizstore try: @@ -10,12 +10,12 @@ pass # for a portable webviz instance, it is never used. -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) def scratch_ensemble(ensemble_name, ensemble_path): return fmu.ensemble.ScratchEnsemble(ensemble_name, ensemble_path) -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) @webvizstore def extract_volumes(ensemble_paths, volfolder, volfiles) -> pd.DataFrame: dfs = [] diff --git a/webviz_subsurface/datainput/_intersect.py b/webviz_subsurface/datainput/_intersect.py index f33c2a16e..2b27e85a8 100644 --- a/webviz_subsurface/datainput/_intersect.py +++ b/webviz_subsurface/datainput/_intersect.py @@ -1,7 +1,7 @@ import os import pandas as pd -from webviz_config.common_cache import cache +from webviz_config.common_cache import CACHE try: import xtgeo @@ -9,7 +9,7 @@ pass -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) def load_well(well_name): return xtgeo.well.Well(well_name) @@ -23,7 +23,7 @@ def load_surface(s_name, real_path, surface_cat): raise IOError -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) def get_wfence(well_name, extend=200, tvdmin=0): well = load_well(well_name) data = well.get_fence_polyline(sampling=20, nextend=extend, tvdmin=tvdmin) @@ -32,6 +32,6 @@ def get_wfence(well_name, extend=200, tvdmin=0): return df -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) def get_hfence(well, surface): return surface.get_fence(get_wfence(well).values.copy()) diff --git a/webviz_subsurface/datainput/_reservoir_simulation_timeseries.py b/webviz_subsurface/datainput/_reservoir_simulation_timeseries.py index 6a315e340..d9e3627c4 100644 --- a/webviz_subsurface/datainput/_reservoir_simulation_timeseries.py +++ b/webviz_subsurface/datainput/_reservoir_simulation_timeseries.py @@ -1,5 +1,5 @@ import pandas as pd -from webviz_config.common_cache import cache +from webviz_config.common_cache import CACHE from webviz_config.webviz_store import webvizstore try: @@ -10,7 +10,7 @@ from ._history_match import scratch_ensemble -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) def load_ensemble_set(ensemble_paths: tuple, ensemble_set_name: str = "EnsembleSet"): return EnsembleSet( @@ -19,7 +19,7 @@ def load_ensemble_set(ensemble_paths: tuple, ensemble_set_name: str = "EnsembleS ) -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) @webvizstore def get_time_series_statistics( ensemble_paths: tuple, time_index: str, column_keys: tuple @@ -42,7 +42,7 @@ def get_time_series_statistics( return pd.concat(smry_stats) -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) @webvizstore def get_time_series_data( ensemble_paths: tuple, @@ -60,7 +60,7 @@ def get_time_series_data( return ensset.get_smry(time_index=time_index, column_keys=column_keys) -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) @webvizstore def get_time_series_delta_ens( ensemble_paths: tuple, @@ -95,7 +95,7 @@ def get_time_series_delta_ens( return pd.concat(delta_ens_dfs) -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) @webvizstore def get_time_series_delta_ens_stats( ensemble_paths: tuple, diff --git a/webviz_subsurface/private_containers/_tornado_plot.py b/webviz_subsurface/private_containers/_tornado_plot.py index c9cd8db4d..c036da8d8 100644 --- a/webviz_subsurface/private_containers/_tornado_plot.py +++ b/webviz_subsurface/private_containers/_tornado_plot.py @@ -7,7 +7,7 @@ import dash_html_components as html import dash_core_components as dcc -from webviz_config.common_cache import cache +from webviz_config.common_cache import CACHE import webviz_core_components as wcc @@ -216,7 +216,7 @@ def cut_by_ref(tornadotable, refname): return dfr_filtered -@cache.memoize(timeout=cache.TIMEOUT) +@CACHE.memoize(timeout=CACHE.TIMEOUT) def tornado_plot( realizations, data, reference="rms_seed", scale="Percentage", cutbyref=True ): # pylint: disable=too-many-locals