From 58b9115d496ae6a281d0f5d6f2130671f03bfc03 Mon Sep 17 00:00:00 2001 From: Daniel Hou Date: Sat, 21 Dec 2024 12:35:54 -0500 Subject: [PATCH] commit --- zeus/monitor/carbon.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/zeus/monitor/carbon.py b/zeus/monitor/carbon.py index dd56bd21..6cca64e7 100644 --- a/zeus/monitor/carbon.py +++ b/zeus/monitor/carbon.py @@ -70,13 +70,14 @@ def get_recent_carbon_intensity(self) -> dict[datetime, float]: @abc.abstractmethod def update_period(self) -> timedelta: """Abstract method for how long each carbon intensity value in the history dict remains current.""" - return timedelta(hours=1) + pass @property @abc.abstractmethod - def history_length(self) -> timedelta: + def history_length(self) -> int: """Abstract method for how many carbon intensity values are in the history dict.""" - return timedelta(hours=1) + pass + class ElectrictyMapsClient(CarbonIntensityProvider): """Carbon Intensity Provider with ElectricityMaps API. @@ -171,6 +172,7 @@ def history_length(self) -> int: """Returns number of carbon intensity values in history dict.""" return 24 + @dataclass class CarbonEmissionMeasurement: """Measurement result of one window.