Skip to content

Commit 34035c5

Browse files
committed
Fix capitalization for "EV Chargers" in docstrings and log messages
Signed-off-by: Sahas Subramanian <[email protected]>
1 parent eb29a05 commit 34035c5

File tree

4 files changed

+38
-38
lines changed

4 files changed

+38
-38
lines changed

src/frequenz/sdk/timeseries/_formula_engine/_formula_generators/_ev_charger_current_formula.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ class EVChargerCurrentFormula(FormulaGenerator):
1818
"""Create a formula engine from the component graph for calculating grid current."""
1919

2020
async def generate(self) -> FormulaEngine3Phase:
21-
"""Generate a formula for calculating total ev current for given component ids.
21+
"""Generate a formula for calculating total EV current for given component ids.
2222
2323
Returns:
24-
A formula engine that calculates total 3-phase ev charger current values.
24+
A formula engine that calculates total 3-phase EV Charger current values.
2525
"""
2626
component_ids = self._config.component_ids
2727

2828
if not component_ids:
2929
logger.warning(
30-
"No ev charger component IDs specified. "
30+
"No EV Charger component IDs specified. "
3131
"Subscribing to the resampling actor with a non-existing "
3232
"component id, so that `0` values are sent from the formula."
3333
)
@@ -72,7 +72,7 @@ async def _gen_phase_formula(
7272
) -> FormulaEngine:
7373
builder = self._get_builder("ev-current", metric_id)
7474

75-
# generate a formula that just adds values from all ev-chargers.
75+
# generate a formula that just adds values from all EV Chargers.
7676
for idx, component_id in enumerate(component_ids):
7777
if idx > 0:
7878
builder.push_oper("+")

src/frequenz/sdk/timeseries/_formula_engine/_formula_generators/_ev_charger_power_formula.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,17 @@ class EVChargerPowerFormula(FormulaGenerator):
1616
"""Create a formula engine from the component graph for calculating grid power."""
1717

1818
async def generate(self) -> FormulaEngine:
19-
"""Generate a formula for calculating total ev power for given component ids.
19+
"""Generate a formula for calculating total EV power for given component ids.
2020
2121
Returns:
22-
A formula engine that calculates total EV charger power values.
22+
A formula engine that calculates total EV Charger power values.
2323
"""
2424
builder = self._get_builder("ev-power", ComponentMetricId.ACTIVE_POWER)
2525

2626
component_ids = self._config.component_ids
2727
if not component_ids:
2828
logger.warning(
29-
"No ev charger component IDs specified. "
29+
"No EV Charger component IDs specified. "
3030
"Subscribing to the resampling actor with a non-existing "
3131
"component id, so that `0` values are sent from the formula."
3232
)

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

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# License: MIT
22
# Copyright © 2022 Frequenz Energy-as-a-Service GmbH
33

4-
"""Interactions with pools of ev chargers."""
4+
"""Interactions with pools of EV Chargers."""
55

66
from __future__ import annotations
77

@@ -44,7 +44,7 @@ def __init__(
4444
resampler_subscription_sender: A sender for sending metric requests to the
4545
resampling actor.
4646
component_ids: An optional list of component_ids belonging to this pool. If
47-
not specified, IDs of all ev chargers in the microgrid will be fetched
47+
not specified, IDs of all EV Chargers in the microgrid will be fetched
4848
from the component graph.
4949
"""
5050
self._channel_registry = channel_registry
@@ -68,14 +68,14 @@ def __init__(
6868
)
6969

7070
async def total_current(self) -> FormulaReceiver3Phase:
71-
"""Fetch the total current for the ev chargers in the pool.
71+
"""Fetch the total current for the EV Chargers in the pool.
7272
73-
If a formula engine to calculate ev charger current is not already
74-
running, it will be started. Else, we'll just get a new receiver to the
75-
already existing data stream.
73+
If a formula engine to calculate EV Charger current is not already running, it
74+
will be started. Else, we'll just get a new receiver to the already existing
75+
data stream.
7676
7777
Returns:
78-
A *new* receiver that will stream ev_charger current values.
78+
A *new* receiver that will stream EV Charger current values.
7979
"""
8080
return await self._formula_pool.from_generator(
8181
"ev_charger_total_current",
@@ -84,14 +84,14 @@ async def total_current(self) -> FormulaReceiver3Phase:
8484
)
8585

8686
async def total_power(self) -> FormulaReceiver:
87-
"""Fetch the total power for the ev chargers in the pool.
87+
"""Fetch the total power for the EV Chargers in the pool.
8888
89-
If a formula engine to calculate EV charger power is not already
89+
If a formula engine to calculate EV Charger power is not already
9090
running, it will be started. Else, we'll just get a new receiver
9191
to the already existing data stream.
9292
9393
Returns:
94-
A *new* receiver that will stream ev_charger power values.
94+
A *new* receiver that will stream EV Charger power values.
9595
"""
9696
return await self._formula_pool.from_generator(
9797
"ev_charger_total_power",
@@ -100,14 +100,14 @@ async def total_power(self) -> FormulaReceiver:
100100
)
101101

102102
async def current(self, component_id: int) -> FormulaReceiver3Phase:
103-
"""Fetch the 3-phase current for the given ev_charger id.
103+
"""Fetch the 3-phase current for the given EV Charger id.
104104
105105
Args:
106-
component_id: id of the ev charger to stream current values for.
106+
component_id: id of the EV Charger to stream current values for.
107107
108108
Returns:
109109
A *new* receiver that will stream 3-phase current values for the given
110-
ev charger.
110+
EV Charger.
111111
112112
Raises:
113113
EVChargerPoolError: if the given component_id is not part of the pool.
@@ -124,13 +124,13 @@ async def current(self, component_id: int) -> FormulaReceiver3Phase:
124124
)
125125

126126
async def power(self, component_id: int) -> FormulaReceiver:
127-
"""Fetch the power for the given ev_charger id.
127+
"""Fetch the power for the given EV Charger id.
128128
129129
Args:
130-
component_id: id of the ev charger to stream power values for.
130+
component_id: id of the EV Charger to stream power values for.
131131
132132
Returns:
133-
A *new* receiver that will stream power values for the given ev charger.
133+
A *new* receiver that will stream power values for the given EV Charger.
134134
135135
Raises:
136136
EVChargerPoolError: if the given component_id is not part of the pool.

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# License: MIT
22
# Copyright © 2023 Frequenz Energy-as-a-Service GmbH
33

4-
"""State tracking for ev charger pools."""
4+
"""State tracking for EV Charger pools."""
55

66
from __future__ import annotations
77

@@ -57,21 +57,21 @@ def from_ev_charger_data(cls, data: EVChargerData) -> EVChargerState:
5757

5858
@dataclass(frozen=True)
5959
class EVChargerPoolStates:
60-
"""States of all ev chargers in the pool."""
60+
"""States of all EV Chargers in the pool."""
6161

6262
_states: dict[int, EVChargerState]
6363
_changed_component: Optional[int] = None
6464

6565
def __iter__(self) -> Iterator[tuple[int, EVChargerState]]:
66-
"""Iterate over states of all ev chargers.
66+
"""Iterate over states of all EV Chargers.
6767
6868
Returns:
69-
An iterator over all ev charger states.
69+
An iterator over all EV Charger states.
7070
"""
7171
return iter(self._states.items())
7272

7373
def latest_change(self) -> Optional[tuple[int, EVChargerState]]:
74-
"""Return the most recent ev charger state change.
74+
"""Return the most recent EV Charger state change.
7575
7676
The first `EVChargerPoolStates` instance created by a `StateTracker` will just
7777
be a representation of the states of all EV Chargers. At that point, the most
@@ -80,7 +80,7 @@ def latest_change(self) -> Optional[tuple[int, EVChargerState]]:
8080
8181
Returns:
8282
None, when the most recent change is unknown. Otherwise, a tuple with
83-
the component ID of an ev charger that just had a state change, and its
83+
the component ID of an EV Charger that just had a state change, and its
8484
new state.
8585
"""
8686
if self._changed_component is None:
@@ -94,13 +94,13 @@ def latest_change(self) -> Optional[tuple[int, EVChargerState]]:
9494

9595

9696
class StateTracker:
97-
"""A class for keeping track of the states of all ev chargers in a pool."""
97+
"""A class for keeping track of the states of all EV Chargers in a pool."""
9898

9999
def __init__(self, component_ids: set[int]) -> None:
100100
"""Create a `_StateTracker` instance.
101101
102102
Args:
103-
component_ids: ev charger component ids to track the states of.
103+
component_ids: EV Charger component ids to track the states of.
104104
"""
105105
self._component_ids = component_ids
106106
self._channel = Broadcast[EVChargerPoolStates](
@@ -111,7 +111,7 @@ def __init__(self, component_ids: set[int]) -> None:
111111
self._states: dict[int, EVChargerState] = {}
112112

113113
def _get(self) -> EVChargerPoolStates:
114-
"""Get a representation of the current states of all ev chargers.
114+
"""Get a representation of the current states of all EV Chargers.
115115
116116
Returns:
117117
An `EVChargerPoolStates` instance.
@@ -122,15 +122,15 @@ def _update(
122122
self,
123123
data: EVChargerData,
124124
) -> Optional[EVChargerPoolStates]:
125-
"""Update the state of an ev charger, from a new data point.
125+
"""Update the state of an EV Charger, from a new data point.
126126
127127
Args:
128-
data: component data from the microgrid, for an ev charger in the pool.
128+
data: component data from the microgrid, for an EV Charger in the pool.
129129
130130
Returns:
131-
A new `EVChargerPoolStates` instance representing all the ev chargers in
132-
the pool, in case there has been a state change for any of the ev
133-
chargers, or `None` otherwise.
131+
A new `EVChargerPoolStates` instance representing all the EV Chargers in
132+
the pool, in case there has been a state change for any of the EV
133+
Chargers, or `None` otherwise.
134134
"""
135135
evc_id = data.component_id
136136
new_state = EVChargerState.from_ev_charger_data(data)
@@ -163,7 +163,7 @@ def new_receiver(self) -> Receiver[EVChargerPoolStates]:
163163
"""Return a receiver that streams ev charger states.
164164
165165
Returns:
166-
A receiver that streams the states of all ev chargers in the pool, every
166+
A receiver that streams the states of all EV Chargers in the pool, every
167167
time the states of any of them change.
168168
"""
169169
if self._task is None or self._task.done():

0 commit comments

Comments
 (0)