diff --git a/src/frequenz/sdk/simulate/__init__.py b/src/frequenz/sdk/simulate/__init__.py new file mode 100644 index 000000000..a023dd7a0 --- /dev/null +++ b/src/frequenz/sdk/simulate/__init__.py @@ -0,0 +1,4 @@ +# License: MIT +# Copyright © 2023 Frequenz Energy-as-a-Service GmbH + +"""Classes and functions to help simulate running of a microgrid or parts of it.""" diff --git a/src/frequenz/sdk/simulate/utils/__init__.py b/src/frequenz/sdk/simulate/utils/__init__.py new file mode 100644 index 000000000..c27946f7d --- /dev/null +++ b/src/frequenz/sdk/simulate/utils/__init__.py @@ -0,0 +1,4 @@ +# License: MIT +# Copyright © 2023 Frequenz Energy-as-a-Service GmbH + +"""Utility classes and functions to help simulate aspects of a microgrid.""" diff --git a/tests/utils/component_data_wrapper.py b/src/frequenz/sdk/simulate/utils/component_data_wrapper.py similarity index 100% rename from tests/utils/component_data_wrapper.py rename to src/frequenz/sdk/simulate/utils/component_data_wrapper.py diff --git a/tests/actor/test_battery_status.py b/tests/actor/test_battery_status.py index 084ede217..b43ef4912 100644 --- a/tests/actor/test_battery_status.py +++ b/tests/actor/test_battery_status.py @@ -32,8 +32,11 @@ ComponentCategory, InverterData, ) +from frequenz.sdk.simulate.utils.component_data_wrapper import ( + BatteryDataWrapper, + InverterDataWrapper, +) -from ..utils.component_data_wrapper import BatteryDataWrapper, InverterDataWrapper from ..utils.mock_microgrid import MockMicrogridClient diff --git a/tests/power/test_distribution_algorithm.py b/tests/power/test_distribution_algorithm.py index 885310baf..843ca8f30 100644 --- a/tests/power/test_distribution_algorithm.py +++ b/tests/power/test_distribution_algorithm.py @@ -12,8 +12,10 @@ from frequenz.sdk.microgrid.component import BatteryData, InverterData from frequenz.sdk.power import DistributionAlgorithm, InvBatPair - -from ..utils.component_data_wrapper import BatteryDataWrapper, InverterDataWrapper +from frequenz.sdk.simulate.utils.component_data_wrapper import ( + BatteryDataWrapper, + InverterDataWrapper, +) @dataclass diff --git a/tests/timeseries/_battery_pool/test_battery_pool.py b/tests/timeseries/_battery_pool/test_battery_pool.py index 135631e8b..67a486d71 100644 --- a/tests/timeseries/_battery_pool/test_battery_pool.py +++ b/tests/timeseries/_battery_pool/test_battery_pool.py @@ -22,6 +22,10 @@ ) from frequenz.sdk.actor.power_distributing import BatteryStatus from frequenz.sdk.microgrid.component import ComponentCategory +from frequenz.sdk.simulate.utils.component_data_wrapper import ( + BatteryDataWrapper, + InverterDataWrapper, +) from frequenz.sdk.timeseries.battery_pool import ( BatteryPool, Bound, @@ -34,7 +38,6 @@ ) from ...utils.component_data_streamer import MockComponentDataStreamer -from ...utils.component_data_wrapper import BatteryDataWrapper, InverterDataWrapper from ...utils.component_graph_utils import ( ComponentGraphConfig, create_component_graph_structure, diff --git a/tests/timeseries/mock_microgrid.py b/tests/timeseries/mock_microgrid.py index a16d35596..b5be9d275 100644 --- a/tests/timeseries/mock_microgrid.py +++ b/tests/timeseries/mock_microgrid.py @@ -31,14 +31,13 @@ EVChargerComponentState, InverterType, ) -from tests.utils.mock_microgrid import MockMicrogridClient - -from ..utils.component_data_wrapper import ( +from frequenz.sdk.simulate.utils.component_data_wrapper import ( BatteryDataWrapper, EvChargerDataWrapper, InverterDataWrapper, MeterDataWrapper, ) +from tests.utils.mock_microgrid import MockMicrogridClient class MockMicrogrid: # pylint: disable=too-many-instance-attributes