Skip to content

Commit 50c73fd

Browse files
committed
Move DataPipeline.grid method above the *_pool methods
With this, all the `*_pool` methods will be next to each other, and making edits to all of them at the same time becomes easier. Signed-off-by: Sahas Subramanian <[email protected]>
1 parent 0ddf742 commit 50c73fd

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/frequenz/sdk/microgrid/_data_pipeline.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,17 @@ def producer(self) -> Producer:
182182
)
183183
return self._producer
184184

185+
def grid(self) -> Grid:
186+
"""Return the grid measuring point."""
187+
if self._grid is None:
188+
initialize_grid(
189+
channel_registry=self._channel_registry,
190+
resampler_subscription_sender=self._resampling_request_sender(),
191+
)
192+
self._grid = get_grid()
193+
194+
return self._grid
195+
185196
def ev_charger_pool(
186197
self,
187198
*,
@@ -319,17 +330,6 @@ def pv_pool(
319330

320331
return PVPool(self._pv_pool_reference_stores[ref_store_key], name, priority)
321332

322-
def grid(self) -> Grid:
323-
"""Return the grid measuring point."""
324-
if self._grid is None:
325-
initialize_grid(
326-
channel_registry=self._channel_registry,
327-
resampler_subscription_sender=self._resampling_request_sender(),
328-
)
329-
self._grid = get_grid()
330-
331-
return self._grid
332-
333333
def battery_pool(
334334
self,
335335
*,

0 commit comments

Comments
 (0)