Skip to content

Commit 31ca2e1

Browse files
committed
Rename BatteryPool.battery_idscomponent_ids
To be consistent with the other *Pools. Signed-off-by: Sahas Subramanian <[email protected]>
1 parent 37b4062 commit 31ca2e1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ async def propose_discharge(
230230
)
231231

232232
@property
233-
def battery_ids(self) -> abc.Set[int]:
233+
def component_ids(self) -> abc.Set[int]:
234234
"""Return ids of the batteries in the pool.
235235
236236
Returns:

tests/timeseries/_battery_pool/test_battery_pool.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ async def run_capacity_test( # pylint: disable=too-many-locals
659659
)
660660
compare_messages(msg, expected, WAIT_FOR_COMPONENT_DATA_SEC + 0.2)
661661

662-
batteries_in_pool = list(battery_pool.battery_ids)
662+
batteries_in_pool = list(battery_pool.component_ids)
663663
scenarios: list[Scenario[Sample[Energy]]] = [
664664
Scenario(
665665
batteries_in_pool[0],
@@ -851,7 +851,7 @@ async def run_soc_test(setup_args: SetupArgs) -> None:
851851
)
852852
compare_messages(msg, expected, WAIT_FOR_COMPONENT_DATA_SEC + 0.2)
853853

854-
batteries_in_pool = list(battery_pool.battery_ids)
854+
batteries_in_pool = list(battery_pool.component_ids)
855855
scenarios: list[Scenario[Sample[Percentage]]] = [
856856
Scenario(
857857
batteries_in_pool[0],
@@ -1007,7 +1007,7 @@ async def run_power_bounds_test( # pylint: disable=too-many-locals
10071007
)
10081008
compare_messages(msg, expected, WAIT_FOR_COMPONENT_DATA_SEC + 0.2)
10091009

1010-
batteries_in_pool = list(battery_pool.battery_ids)
1010+
batteries_in_pool = list(battery_pool.component_ids)
10111011
scenarios: list[Scenario[SystemBounds]] = [
10121012
Scenario(
10131013
next(iter(bat_invs_map[batteries_in_pool[0]])),
@@ -1241,7 +1241,7 @@ async def run_temperature_test( # pylint: disable=too-many-locals
12411241
expected = Sample(now, value=Temperature.from_celsius(25.0))
12421242
compare_messages(msg, expected, WAIT_FOR_COMPONENT_DATA_SEC + 0.2)
12431243

1244-
batteries_in_pool = list(battery_pool.battery_ids)
1244+
batteries_in_pool = list(battery_pool.component_ids)
12451245
bat_0, bat_1 = batteries_in_pool
12461246
scenarios: list[Scenario[Sample[Temperature]]] = [
12471247
Scenario(

0 commit comments

Comments
 (0)