diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 6739bb5..75cd00b 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -16,7 +16,6 @@ Commiting the API definitions and preparing the repo to the pass all CI tests. - Commiting the electricity trading api specs. - Rename PublicOrders to PublicTrades - Add a python client with pyton wrappers for methods & classes and support for streaming orders. -- Add unit conversion methods to the Energy type ## Bug Fixes diff --git a/py/frequenz/client/electricity_trading/_types.py b/py/frequenz/client/electricity_trading/_types.py index 7522396..036f6a4 100644 --- a/py/frequenz/client/electricity_trading/_types.py +++ b/py/frequenz/client/electricity_trading/_types.py @@ -144,46 +144,6 @@ def to_pb(self) -> energy_pb2.Energy: decimal_mwh.value = str(self.mwh) return energy_pb2.Energy(mwh=decimal_mwh) - def as_watt_hours(self) -> Decimal: - """Return the energy in watt hours. - - Returns: - The energy in watt hours. - """ - return self.mwh * Decimal(1e6) - - def as_kilowatt_hours(self) -> Decimal: - """Return the energy in kilowatt hours. - - Returns: - The energy in kilowatt hours. - """ - return self.mwh * Decimal(1e3) - - @classmethod - def from_watt_hours(cls, watt_hours: Decimal) -> Self: - """Initialize a new energy quantity from watt hours. - - Args: - watt_hours: The energy in watt hours. - - Returns: - A new energy quantity. - """ - return cls(mwh=watt_hours / Decimal(1e6)) - - @classmethod - def from_kilowatt_hours(cls, kilowatt_hours: Decimal) -> Self: - """Initialize a new energy quantity from kilowatt hours. - - Args: - kilowatt_hours: The energy in kilowatt hours. - - Returns: - A new energy quantity. - """ - return cls(mwh=kilowatt_hours / Decimal(1e3)) - class EnergyMarketCodeType(enum.Enum): """