Skip to content

Commit 54180de

Browse files
committed
Rename AbstractPool and related classes to ComponentPool
Signed-off-by: Simon Völcker <simon.voelcker@frequenz.com>
1 parent d2d1ca7 commit 54180de

14 files changed

Lines changed: 35 additions & 39 deletions

src/frequenz/sdk/timeseries/abstract_pool/__init__.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/frequenz/sdk/timeseries/battery_pool/_battery_pool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from ...microgrid import _power_managing, connection_manager
1919
from ...timeseries import Sample
2020
from .._base_types import SystemBounds
21-
from ..abstract_pool import AbstractPool
21+
from ..component_pool import ComponentPool
2222
from ..formulas import Formula
2323
from ._battery_pool_reference_store import BatteryPoolReferenceStore
2424
from ._methods import SendOnUpdate
@@ -33,7 +33,7 @@
3333
# pylint: disable=protected-access
3434

3535

36-
class BatteryPool(AbstractPool[BatteryPoolReferenceStore, BatteryPoolReport]):
36+
class BatteryPool(ComponentPool[BatteryPoolReferenceStore, BatteryPoolReport]):
3737
"""An interface for interaction with pools of batteries.
3838
3939
Provides:

src/frequenz/sdk/timeseries/battery_pool/_battery_pool_reference_store.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
from ...microgrid._power_distributing import Result
2121
from ...microgrid._power_distributing._component_status import ComponentPoolStatus
2222
from ...microgrid._power_managing._base_classes import Proposal, ReportRequest
23-
from ..abstract_pool import AbstractPoolReferenceStore
23+
from ..component_pool._component_pool_reference_store import ComponentPoolReferenceStore
2424
from ._methods import MetricAggregator
2525

2626

27-
class BatteryPoolReferenceStore(AbstractPoolReferenceStore):
27+
class BatteryPoolReferenceStore(ComponentPoolReferenceStore):
2828
"""A class for maintaining the shared state/tasks for a set of pool of batteries.
2929
3030
This includes ownership of

src/frequenz/sdk/timeseries/battery_pool/messages.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
Success,
1717
)
1818
from .._base_types import Bounds
19-
from ..abstract_pool import AbstractPoolReport
19+
from ..component_pool._component_pool_report import ComponentPoolReport
2020

2121

2222
# This class is used to expose the generic reports from the PowerManager with specific
2323
# documentation for the battery pool.
24-
class BatteryPoolReport(AbstractPoolReport, typing.Protocol):
24+
class BatteryPoolReport(ComponentPoolReport, typing.Protocol):
2525
"""A status report for a battery pool."""
2626

2727
@property
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# License: MIT
2+
# Copyright © 2026 Frequenz Energy-as-a-Service GmbH
3+
4+
"""Manage a pool of components."""
5+
6+
from ._component_pool import ComponentPool
7+
8+
__all__ = [
9+
"ComponentPool",
10+
]

src/frequenz/sdk/timeseries/abstract_pool/_abstract_pool.py renamed to src/frequenz/sdk/timeseries/component_pool/_component_pool.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
from frequenz.sdk.timeseries._base_types import SystemBounds
1919
from frequenz.sdk.timeseries.formulas import Formula
2020

21-
from ._abstract_pool_reference_store import AbstractPoolReferenceStore
22-
from ._abstract_pool_report import AbstractPoolReport
21+
from ._component_pool_reference_store import ComponentPoolReferenceStore
22+
from ._component_pool_report import ComponentPoolReport
2323

24-
RefStoreT = TypeVar("RefStoreT", bound=AbstractPoolReferenceStore)
25-
ReportT = TypeVar("ReportT", bound=AbstractPoolReport)
24+
RefStoreT = TypeVar("RefStoreT", bound=ComponentPoolReferenceStore)
25+
ReportT = TypeVar("ReportT", bound=ComponentPoolReport)
2626

2727

28-
class AbstractPool(ABC, Generic[RefStoreT, ReportT]):
28+
class ComponentPool(ABC, Generic[RefStoreT, ReportT]):
2929
"""Abstract base class for component pools."""
3030

3131
def __init__( # pylint: disable=too-many-arguments

src/frequenz/sdk/timeseries/abstract_pool/_abstract_pool_reference_store.py renamed to src/frequenz/sdk/timeseries/component_pool/_component_pool_reference_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from frequenz.sdk.timeseries.formulas._formula_pool import FormulaPool
2323

2424

25-
class AbstractPoolReferenceStore(ABC):
25+
class ComponentPoolReferenceStore(ABC):
2626
"""Abstract base class for pool reference stores."""
2727

2828
def __init__( # pylint: disable=too-many-arguments

src/frequenz/sdk/timeseries/abstract_pool/_abstract_pool_report.py renamed to src/frequenz/sdk/timeseries/component_pool/_component_pool_report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from .._base_types import Bounds
1111

1212

13-
class AbstractPoolReport(typing.Protocol):
13+
class ComponentPoolReport(typing.Protocol):
1414
"""A status report for a component pool."""
1515

1616
@property

src/frequenz/sdk/timeseries/ev_charger_pool/_ev_charger_pool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
from ...microgrid import connection_manager
1010
from ...timeseries import Bounds
11-
from ..abstract_pool import AbstractPool
11+
from ..component_pool import ComponentPool
1212
from ..formulas import Formula, Formula3Phase
1313
from ._ev_charger_pool_reference_store import EVChargerPoolReferenceStore
1414
from ._result_types import EVChargerPoolReport
@@ -18,7 +18,7 @@ class EVChargerPoolError(Exception):
1818
"""An error that occurred in any of the EVChargerPool methods."""
1919

2020

21-
class EVChargerPool(AbstractPool[EVChargerPoolReferenceStore, EVChargerPoolReport]):
21+
class EVChargerPool(ComponentPool[EVChargerPoolReferenceStore, EVChargerPoolReport]):
2222
"""An interface for interaction with pools of EV Chargers.
2323
2424
Provides:

src/frequenz/sdk/timeseries/ev_charger_pool/_ev_charger_pool_reference_store.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
from frequenz.client.microgrid.component import Component, EvCharger
1010
from typing_extensions import override
1111

12-
from ..abstract_pool import AbstractPoolReferenceStore
12+
from ..component_pool._component_pool_reference_store import ComponentPoolReferenceStore
1313
from ._system_bounds_tracker import EVCSystemBoundsTracker
1414

1515

16-
class EVChargerPoolReferenceStore(AbstractPoolReferenceStore):
16+
class EVChargerPoolReferenceStore(ComponentPoolReferenceStore):
1717
"""A class for maintaining the shared state/tasks for a set of pool of EV chargers.
1818
1919
This includes ownership of

0 commit comments

Comments
 (0)