Skip to content

Commit ee2e9bd

Browse files
committed
Improve documentation for generated formula stream methods
Signed-off-by: Sahas Subramanian <[email protected]>
1 parent 34035c5 commit ee2e9bd

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ async def total_current(self) -> FormulaReceiver3Phase:
7171
"""Fetch the total current for the EV Chargers in the pool.
7272
7373
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
74+
will be started. Else, it will return a new receiver to the already existing
7575
data stream.
7676
7777
Returns:
@@ -86,12 +86,13 @@ async def total_current(self) -> FormulaReceiver3Phase:
8686
async def total_power(self) -> FormulaReceiver:
8787
"""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
90-
running, it will be started. Else, we'll just get a new receiver
91-
to the already existing data stream.
89+
If a formula engine to calculate EV Charger power is not already running, it
90+
will be started. Else, it will return a new receiver to the already existing
91+
data stream.
9292
9393
Returns:
9494
A *new* receiver that will stream EV Charger power values.
95+
9596
"""
9697
return await self._formula_pool.from_generator(
9798
"ev_charger_total_power",

src/frequenz/sdk/timeseries/logical_meter/_logical_meter.py

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ async def start_formula(
144144
async def grid_power(self) -> FormulaReceiver:
145145
"""Fetch the grid power for the microgrid.
146146
147-
If a formula engine to calculate grid power is not already running, it
148-
will be started. Else, we'll just get a new receiver to the already
149-
existing data stream.
147+
If a formula engine to calculate grid power is not already running, it will be
148+
started. Else, it will return a new receiver to the already existing data
149+
stream.
150150
151151
Returns:
152152
A *new* receiver that will stream grid_power values.
@@ -157,9 +157,9 @@ async def grid_power(self) -> FormulaReceiver:
157157
async def grid_current(self) -> FormulaReceiver3Phase:
158158
"""Fetch the grid power for the microgrid.
159159
160-
If a formula engine to calculate grid current is not already running, it
161-
will be started. Else, we'll just get a new receiver to the already
162-
existing data stream.
160+
If a formula engine to calculate grid current is not already running, it will be
161+
started. Else, it will return a new receiver to the already existing data
162+
stream.
163163
164164
Returns:
165165
A *new* receiver that will stream grid_current values.
@@ -172,9 +172,9 @@ async def grid_current(self) -> FormulaReceiver3Phase:
172172
async def battery_power(self) -> FormulaReceiver:
173173
"""Fetch the cumulative battery power in the microgrid.
174174
175-
If a formula engine to calculate cumulative battery power is not
176-
already running, it will be started. Else, we'll just get a new
177-
receiver to the already existing data stream.
175+
If a formula engine to calculate cumulative battery power is not already
176+
running, it will be started. Else, it will return a new receiver to the already
177+
existing data stream.
178178
179179
Returns:
180180
A *new* receiver that will stream battery_power values.
@@ -187,12 +187,13 @@ async def battery_power(self) -> FormulaReceiver:
187187
async def pv_power(self) -> FormulaReceiver:
188188
"""Fetch the PV power production in the microgrid.
189189
190-
If a formula engine to calculate PV power production is not
191-
already running, it will be started. Else, we'll just get a new
192-
receiver to the already existing data stream.
190+
If a formula engine to calculate PV power production is not already running, it
191+
will be started. Else, it will return a new receiver to the already existing
192+
data stream.
193193
194194
Returns:
195195
A *new* receiver that will stream PV power production values.
196+
196197
"""
197198
return await self._formula_pool.from_generator("pv_power", PVPowerFormula)
198199

0 commit comments

Comments
 (0)