Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhou0515 committed Dec 21, 2024
1 parent 0bd87f4 commit 58b9115
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions zeus/monitor/carbon.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 58b9115

Please sign in to comment.