refactor: ensure temporary backward compatibility after API changes

This commit is contained in:
appel_c 2024-07-03 08:30:16 +02:00
parent f481c1f812
commit 73c636b46f

View File

@ -88,7 +88,16 @@ class SimulatedDataBase(ABC):
- update_sim_state: update the simulated state of the device
"""
USER_ACCESS = ["params", "select_model", "get_models", "show_all"]
# USER_ACCESS = ["params", "select_model", "get_models", "show_all"]
# TODO remove
USER_ACCESS = [
"params",
"select_model",
"get_models",
"show_all",
"sim_select_model",
"sim_params",
]
def __init__(self, *args, parent=None, **kwargs) -> None:
"""
@ -127,6 +136,18 @@ class SimulatedDataBase(ABC):
"""Select the active simulation model."""
self.select_model(model)
@property
def sim_params(self) -> None:
"""Set the parameters for the active simulation model."""
return self.params
@sim_params.setter
def sim_params(self, params: dict):
"""Set the parameters for the active simulation model."""
self.params = params
# TODO remove after refactoring code in main
def select_model(self, model: str) -> None:
"""
Method to select the active simulation model.