Skip to content

Commit a1954a9

Browse files
committed
Expose ComponentMetricId in the public API
This was moved to the microgrid API client, so it wasn't exposed any more in the SDK. This commit exposes it again. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 983a5e4 commit a1954a9

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@
3838
- Updated the logical meter documentation to reflect the latest changes.
3939
- Fixed a bug in the code examples in the getting-started tutorial.
4040
- Fixed a bug in `ConfigManagingActor` that was not properly comparing the event path to the config file path when the config file is a relative path.
41+
- Re-expose `ComponentMetricId` to the docs.

src/frequenz/sdk/actor/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,14 +598,15 @@ async def main() -> None: # (6)!
598598
from ._background_service import BackgroundService
599599
from ._channel_registry import ChannelRegistry
600600
from ._config_managing import ConfigManagingActor
601-
from ._data_sourcing import ComponentMetricRequest, DataSourcingActor
601+
from ._data_sourcing import ComponentMetricId, ComponentMetricRequest, DataSourcingActor
602602
from ._resampling import ComponentMetricsResamplingActor
603603
from ._run_utils import run
604604

605605
__all__ = [
606606
"Actor",
607607
"BackgroundService",
608608
"ChannelRegistry",
609+
"ComponentMetricId",
609610
"ComponentMetricRequest",
610611
"ComponentMetricsResamplingActor",
611612
"ConfigManagingActor",

src/frequenz/sdk/actor/_data_sourcing/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33

44
"""The DataSourcingActor."""
55

6-
from ._component_metric_request import ComponentMetricRequest
6+
from ._component_metric_request import ComponentMetricId, ComponentMetricRequest
77
from .data_sourcing import DataSourcingActor
88

99
__all__ = [
10+
"ComponentMetricId",
1011
"ComponentMetricRequest",
1112
"DataSourcingActor",
1213
]

src/frequenz/sdk/actor/_data_sourcing/_component_metric_request.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
from frequenz.client.microgrid import ComponentMetricId
1010

11+
__all__ = ["ComponentMetricRequest", "ComponentMetricId"]
12+
1113

1214
@dataclass
1315
class ComponentMetricRequest:

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@
77
import uuid
88

99
from frequenz.channels import Sender
10-
from frequenz.client.microgrid import ComponentMetricId
1110

12-
from ...actor import ChannelRegistry, ComponentMetricRequest
11+
from ...actor import ChannelRegistry, ComponentMetricId, ComponentMetricRequest
1312
from .._quantities import Power, Quantity
1413
from ..formula_engine import FormulaEngine
1514
from ..formula_engine._formula_engine_pool import FormulaEnginePool

0 commit comments

Comments
 (0)