Skip to content

Commit b05f52f

Browse files
committed
Bump the frequenz-client-microgrid dependency to 0.5.0
Signed-off-by: Leandro Lucarella <[email protected]>
1 parent beb2b6e commit b05f52f

File tree

7 files changed

+11
-12
lines changed

7 files changed

+11
-12
lines changed

RELEASE_NOTES.md

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

77
## Upgrading
88

9-
<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->
9+
- The `frequenz-client-microgrid` dependency was bumped to `0.5.0`. This can cause dependency issues if you are using other API clients and the `frequenz-client-base` dependencies don't match.
1010

1111
## New Features
1212

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ plugins:
115115
# See https://mkdocstrings.github.io/python/usage/#import for details
116116
- https://docs.python.org/3/objects.inv
117117
- https://frequenz-floss.github.io/frequenz-channels-python/v1.1/objects.inv
118-
- https://frequenz-floss.github.io/frequenz-client-microgrid-python/v0.4/objects.inv
118+
- https://frequenz-floss.github.io/frequenz-client-microgrid-python/v0.5/objects.inv
119119
- https://networkx.org/documentation/stable/objects.inv
120120
- https://numpy.org/doc/stable/objects.inv
121121
- https://typing-extensions.readthedocs.io/en/stable/objects.inv

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,11 @@ dependencies = [
2929
# Make sure to update the mkdocs.yml file when
3030
# changing the version
3131
# (plugins.mkdocstrings.handlers.python.import)
32-
"frequenz-client-microgrid >= 0.4.0, < 0.5.0",
32+
"frequenz-client-microgrid >= 0.5.0, < 0.6.0",
3333
"frequenz-channels >= 1.1.0, < 2.0.0",
3434
"networkx >= 2.8, < 4",
3535
"numpy >= 1.26.4, < 2",
3636
"typing_extensions >= 4.6.1, < 5",
37-
"grpclib >= 0.4.8rc2",
3837
]
3938
dynamic = ["version"]
4039

src/frequenz/sdk/microgrid/_power_distributing/_component_managers/_battery_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
from frequenz.channels import LatestValueCache, Receiver, Sender
1414
from frequenz.client.microgrid import (
15+
ApiClientError,
1516
BatteryData,
16-
ClientError,
1717
ComponentCategory,
1818
InverterData,
1919
OperationOutOfRange,
@@ -670,7 +670,7 @@ def _parse_result(
670670
battery_ids,
671671
err,
672672
)
673-
except ClientError as err:
673+
except ApiClientError as err:
674674
_logger.warning(
675675
"Set power for battery %s failed, mark it as broken. Error: %s",
676676
battery_ids,

src/frequenz/sdk/microgrid/_power_distributing/_component_managers/_ev_charger_manager/_ev_charger_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
)
1919
from frequenz.client.microgrid import (
2020
ApiClient,
21-
ClientError,
21+
ApiClientError,
2222
ComponentCategory,
2323
EVChargerData,
2424
)
@@ -339,7 +339,7 @@ async def _set_api_power(
339339
_logger.warning(
340340
"Timeout while setting power to EV charger %s", component_id
341341
)
342-
except ClientError as exc:
342+
except ApiClientError as exc:
343343
_logger.warning(
344344
"Got a client error while setting power to EV charger %s: %s",
345345
component_id,

src/frequenz/sdk/microgrid/_power_distributing/_component_managers/_pv_inverter_manager/_pv_inverter_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
from frequenz.channels import Broadcast, LatestValueCache, Sender
1212
from frequenz.client.microgrid import (
13-
ClientError,
13+
ApiClientError,
1414
ComponentCategory,
1515
InverterData,
1616
InverterType,
@@ -211,7 +211,7 @@ async def _set_api_power( # pylint: disable=too-many-locals
211211
_logger.warning(
212212
"Timeout while setting power to PV inverter %s", component_id
213213
)
214-
except ClientError as exc:
214+
except ApiClientError as exc:
215215
_logger.warning(
216216
"Got a client error while setting power to PV inverter %s: %s",
217217
component_id,

tests/microgrid/test_microgrid_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def metadata(self) -> Metadata:
104104
),
105105
)
106106

107-
@mock.patch("grpclib.client.Channel")
107+
@mock.patch("grpc.aio.insecure_channel")
108108
async def test_connection_manager(
109109
self,
110110
_insecure_channel_mock: MagicMock,
@@ -185,7 +185,7 @@ async def test_connection_manager(
185185
assert api.microgrid_id == metadata.microgrid_id
186186
assert api.location == metadata.location
187187

188-
@mock.patch("grpclib.client.Channel")
188+
@mock.patch("grpc.aio.insecure_channel")
189189
async def test_connection_manager_another_method(
190190
self,
191191
_insecure_channel_mock: MagicMock,

0 commit comments

Comments
 (0)