Skip to content

Commit

Permalink
Change internal presense of the Grid, eliminating _grid (#747)
Browse files Browse the repository at this point in the history
This is the follow-up PR to PR #707.
  • Loading branch information
christianparpart authored Nov 1, 2023
2 parents 89ca11e + e150d8c commit 300544d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/frequenz/sdk/microgrid/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
""" # noqa: D205, D400

from ..actor import ResamplerConfig
from ..timeseries.grid import initialize as initialize_grid
from . import _data_pipeline, client, component, connection_manager, fuse
from ._data_pipeline import (
battery_pool,
Expand All @@ -131,7 +132,6 @@
grid,
logical_meter,
)
from ._grid import initialize as initialize_grid


async def initialize(host: str, port: int, resampler_config: ResamplerConfig) -> None:
Expand Down
4 changes: 2 additions & 2 deletions src/frequenz/sdk/microgrid/_data_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
from ..actor._actor import Actor
from ..microgrid.component import Component
from ..timeseries._grid_frequency import GridFrequency
from ..timeseries.grid import Grid
from ..timeseries.grid import get as get_grid
from . import connection_manager
from ._grid import Grid
from ._grid import get as get_grid
from .component import ComponentCategory

_logger = logging.getLogger(__name__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
from collections.abc import Iterable
from dataclasses import dataclass

from .component import Component
from .component._component import ComponentCategory
from .fuse import Fuse
from ..microgrid.component import Component
from ..microgrid.component._component import ComponentCategory
from ..microgrid.fuse import Fuse


@dataclass(frozen=True)
Expand Down
2 changes: 1 addition & 1 deletion tests/microgrid/test_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

"""Tests for the `Grid` module."""

from frequenz.sdk.microgrid import _grid
from frequenz.sdk.microgrid.component import Component, ComponentCategory, GridMetadata
from frequenz.sdk.microgrid.fuse import Fuse
from frequenz.sdk.timeseries import Current
from frequenz.sdk.timeseries import grid as _grid


async def test_grid_1() -> None:
Expand Down

0 comments on commit 300544d

Please sign in to comment.