diff --git a/src/velofy/forecasts/models/base.py b/src/velofy/forecasts/models/base.py index 723172f..c8bc6d7 100644 --- a/src/velofy/forecasts/models/base.py +++ b/src/velofy/forecasts/models/base.py @@ -2,6 +2,7 @@ import abc import datetime as dt +import typing as t import pandas as pd @@ -20,16 +21,14 @@ class ForecastingModelABC(abc.ABC): """ self._order_history = order_history - @property - @abc.abstractmethod - def name(self) -> str: - """The name of the model. + name: t.ClassVar[str] + """The name of the model. - Used to identify `Forecast`s of the same `*Model` in the database. - So, these must be chosen carefully and must not be changed later on! + Used to identify `Forecast`s of the same `*Model` in the database. + So, these must be chosen carefully and must not be changed later on! - Example: "hets" or "varima" for tactical demand forecasting - """ + Example: "hets" or "varima" for tactical demand forecasting + """ @abc.abstractmethod def predict( diff --git a/tests/forecasts/test_models.py b/tests/forecasts/test_models.py index ce8173a..48de8c1 100644 --- a/tests/forecasts/test_models.py +++ b/tests/forecasts/test_models.py @@ -40,7 +40,7 @@ class TestGenericForecastingModelProperties: assert model is not None def test_model_has_a_name(self, model_cls, order_history): - """Access the `*Model.name` property.""" + """Access the `*Model.name` class variable.""" model = model_cls(order_history=order_history) result = model.name