diff --git a/caimira/apps/expert.py b/caimira/apps/expert.py index 111505d2..39daf3c3 100644 --- a/caimira/apps/expert.py +++ b/caimira/apps/expert.py @@ -12,10 +12,13 @@ from matplotlib import pyplot as plt import numpy as np import datetime import pandas as pd +import logging from caimira import data, models, state from caimira.store.data_registry import DataRegistry +LOG = logging.getLogger(__name__) + def collapsible(widgets_to_collapse: typing.List, title: str, start_collapsed=False): collapsed = widgets.Accordion([widgets.VBox(widgets_to_collapse)]) @@ -929,6 +932,10 @@ class CAIMIRAStateBuilder(state.StateBuilder): class ExpertApplication(Controller): def __init__(self) -> None: + LOG.warning( + "ExpertApplication is deprecated and will no longer be maintained. It remains in the codebase for legacy purposes." + ) + self._data_registry = DataRegistry() #: A list of scenario name and ModelState instances. This is intended to be #: mutated. Any mutation should notify the appropriate Views for handling. diff --git a/caimira/apps/expert_co2.py b/caimira/apps/expert_co2.py index d083d20b..62e23f82 100644 --- a/caimira/apps/expert_co2.py +++ b/caimira/apps/expert_co2.py @@ -2,6 +2,7 @@ import dataclasses import ipywidgets as widgets import typing import numpy as np +import logging from caimira import data, models, state from caimira.store.data_registry import DataRegistry @@ -11,6 +12,8 @@ import matplotlib.lines as mlines import matplotlib.patches as patches from .expert import generate_presence_widget, collapsible, ipympl_canvas, WidgetGroup, CAIMIRAStateBuilder +LOG = logging.getLogger(__name__) + def baseline_model(data_registry: DataRegistry): return models.CO2ConcentrationModel( @@ -188,6 +191,10 @@ class ExposureComparisonResult(View): class CO2Application(Controller): def __init__(self) -> None: + LOG.warning( + "CO2Application is deprecated and will no longer be maintained. It remains in the codebase for legacy purposes." + ) + self._data_registry = DataRegistry() # self._debug_output = widgets.Output() diff --git a/caimira/tests/apps/test_expert_app.py b/caimira/tests/apps/test_expert_app.py index c94f8206..85a35406 100644 --- a/caimira/tests/apps/test_expert_app.py +++ b/caimira/tests/apps/test_expert_app.py @@ -8,6 +8,7 @@ def expert_app(): return caimira.apps.ExpertApplication() +@pytest.mark.skip(reason="ExpertApplication is deprecated") def test_app(expert_app): # To start with, let's just test that the application runs. We don't try to # do anything fancy to verify how it looks etc., we leave that for manual @@ -15,6 +16,7 @@ def test_app(expert_app): assert expert_app._model_scenarios[0][0] == "Scenario 1" +@pytest.mark.skip(reason="ExpertApplication is deprecated") def test_new_scenario_changes_tab(expert_app): # Adding a new scenario should change the tab index of the multi-model view. assert expert_app.multi_model_view.widget.selected_index == 0