Skip to content

Commit 18d68c3

Browse files
committed
Rename available_bounds to inclusion_bounds in PowerManager Reports
They are still the available inclusion limits based on the actor's priority, but the new (old) name makes it easier to contrast with exclusion bounds, which will be introduced in the next commits. Signed-off-by: Sahas Subramanian <[email protected]>
1 parent 8de3864 commit 18d68c3

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/frequenz/sdk/actor/_power_managing/_base_classes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ class Report:
5858
target_power: Power
5959
"""The currently set power for the batteries."""
6060

61-
available_bounds: Bounds
62-
"""The available bounds for the batteries, for the actor's priority.
61+
inclusion_bounds: Bounds
62+
"""The available inclusion bounds for the batteries, for the actor's priority.
6363
6464
These bounds are adjusted to any restrictions placed by actors with higher
6565
priorities.

src/frequenz/sdk/actor/_power_managing/_matryoshka.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,5 +176,5 @@ def get_status(
176176

177177
return Report(
178178
target_power=self._target_power.get(battery_ids, Power.zero()),
179-
available_bounds=Bounds(lower=lower_bound, upper=upper_bound),
179+
inclusion_bounds=Bounds(lower=lower_bound, upper=upper_bound),
180180
)

tests/actor/_power_managing/test_matryoshka.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ def test_bounds(
5555
) -> None:
5656
report = algorithm.get_status(batteries, priority, system_bounds)
5757
assert report.target_power.as_watts() == expected_power
58-
assert report.available_bounds.lower.as_watts() == expected_bounds[0]
59-
assert report.available_bounds.upper.as_watts() == expected_bounds[1]
58+
assert report.inclusion_bounds.lower.as_watts() == expected_bounds[0]
59+
assert report.inclusion_bounds.upper.as_watts() == expected_bounds[1]
6060

6161
test_tgt_power(priority=2, power=25.0, bounds=(25.0, 50.0), expected=25.0)
6262
test_bounds(priority=2, expected_power=25.0, expected_bounds=(-200.0, 200.0))

tests/timeseries/_battery_pool/test_battery_pool_control_methods.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def _make_report(
141141
) -> _power_managing.Report:
142142
return _power_managing.Report(
143143
target_power=Power.from_watts(power),
144-
available_bounds=_power_managing.Bounds(
144+
inclusion_bounds=_power_managing.Bounds(
145145
lower=Power.from_watts(lower),
146146
upper=Power.from_watts(upper),
147147
),

0 commit comments

Comments
 (0)