Skip to content

Commit 3562004

Browse files
authored
Document methods for creating data pipeline interface objects (#739)
Also clarify in `client` package that it is a low-level one.
2 parents c498555 + 78c41fc commit 3562004

File tree

4 files changed

+46
-5
lines changed

4 files changed

+46
-5
lines changed

src/frequenz/sdk/microgrid/client/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
"""Microgrid API client.
55
6-
This package provides an easy way to connect to the microgrid API.
6+
This package provides a low-level interface for interacting with the microgrid API.
77
"""
88

99
from ._client import MicrogridApiClient, MicrogridGrpcClient

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@
3939
class BatteryPool:
4040
"""An interface for interaction with pools of batteries.
4141
42-
Use the [microgrid.battery_pool][frequenz.sdk.microgrid.battery_pool] method for
43-
creating `BatteryPool` instances.
42+
!!! note
43+
`BatteryPool` instances are not meant to be created directly by users. Use the
44+
[`microgrid.battery_pool`][frequenz.sdk.microgrid.battery_pool] method for
45+
creating `BatteryPool` instances.
4446
4547
Provides:
4648
- properties for fetching reporting streams of instantaneous
@@ -63,6 +65,11 @@ def __init__(
6365
):
6466
"""Create a BatteryPool instance.
6567
68+
!!! note
69+
`BatteryPool` instances are not meant to be created directly by users. Use
70+
the [`microgrid.battery_pool`][frequenz.sdk.microgrid.battery_pool] method
71+
for creating `BatteryPool` instances.
72+
6673
Args:
6774
battery_pool_ref: The battery pool reference store instance.
6875
name: An optional name used to identify this instance of the pool or a

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

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,26 @@ class EVChargerData:
5353

5454

5555
class EVChargerPool:
56-
"""Interactions with EV Chargers."""
56+
"""An interface for interaction with pools of EV Chargers.
57+
58+
!!! note
59+
`EVChargerPool` instances are not meant to be created directly by users. Use the
60+
[`microgrid.ev_charger_pool`][frequenz.sdk.microgrid.ev_charger_pool] method for
61+
creating `EVChargerPool` instances.
62+
63+
Provides:
64+
- Aggregate [`power`][frequenz.sdk.timeseries.ev_charger_pool.EVChargerPool.power]
65+
and 3-phase
66+
[`current`][frequenz.sdk.timeseries.ev_charger_pool.EVChargerPool.current]
67+
measurements of the EV Chargers in the pool.
68+
- The
69+
[`component_data`][frequenz.sdk.timeseries.ev_charger_pool.EVChargerPool.component_data]
70+
method for fetching the 3-phase current and state of individual EV Chargers in
71+
the pool.
72+
- The
73+
[`set_bounds`][frequenz.sdk.timeseries.ev_charger_pool.EVChargerPool.set_bounds]
74+
method for limiting the max current of individual EV Chargers in the pool.
75+
"""
5776

5877
def __init__(
5978
self,
@@ -64,6 +83,11 @@ def __init__(
6483
) -> None:
6584
"""Create an `EVChargerPool` instance.
6685
86+
!!! note
87+
`EVChargerPool` instances are not meant to be created directly by users. Use
88+
the [`microgrid.ev_charger_pool`][frequenz.sdk.microgrid.ev_charger_pool]
89+
method for creating `EVChargerPool` instances.
90+
6791
Args:
6892
channel_registry: A channel registry instance shared with the resampling
6993
actor.

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ class LogicalMeter:
3232
microgrid. These methods return `FormulaReceiver` objects, which can be used like
3333
normal `Receiver`s, but can also be composed to form higher-order formula streams.
3434
35+
!!! note
36+
`LogicalMeter` instances are not meant to be created directly by users. Use the
37+
[`microgrid.logical_meter`][frequenz.sdk.microgrid.logical_meter] method for
38+
creating `LogicalMeter` instances.
39+
3540
Example:
3641
```python
3742
from datetime import timedelta
@@ -71,7 +76,12 @@ def __init__(
7176
channel_registry: ChannelRegistry,
7277
resampler_subscription_sender: Sender[ComponentMetricRequest],
7378
) -> None:
74-
"""Create a `LogicalMeter instance`.
79+
"""Create a `LogicalMeter` instance.
80+
81+
!!! note
82+
`LogicalMeter` instances are not meant to be created directly by users. Use
83+
the [`microgrid.logical_meter`][frequenz.sdk.microgrid.logical_meter] method
84+
for creating `LogicalMeter` instances.
7585
7686
Args:
7787
channel_registry: A channel registry instance shared with the resampling

0 commit comments

Comments
 (0)