diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index b7717a6..2902876 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -12,6 +12,10 @@ Raise `ValueError` when `start_time` passed to `create()` is neither a `datetime +- `TargetCategories` now supports the `STEAM_BOILER` component category. This + requires `frequenz-client-common` 0.3.8 or newer. The minimum supported + `grpcio` version is now 1.80.0, as required by its `frequenz-api-common` + dependency. - `dispatch-cli` accepts `FREQUENZ_API_KEY` and `FREQUENZ_API_SECRET` as a fallback pair for `DISPATCH_API_AUTH_KEY` and `DISPATCH_API_SIGN_SECRET`. diff --git a/pyproject.toml b/pyproject.toml index 5dc4416..7581429 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,9 +39,9 @@ dependencies = [ "typing-extensions >= 4.13.0, < 5", "frequenz-api-dispatch >= 1.0.0, < 2", "frequenz-client-base >= 0.11.0, < 0.12.0", - "frequenz-client-common >= 0.3.6, < 0.4.0", + "frequenz-client-common >= 0.3.8, < 0.4.0", "frequenz-core >= 1.0.2, < 2.0.0", - "grpcio >= 1.72.1, < 2", + "grpcio >= 1.80.0, < 2", "python-dateutil >= 2.8.2, < 3.0", ] dynamic = ["version"] diff --git a/tests/test_proto.py b/tests/test_proto.py index f1668a9..c2efb05 100644 --- a/tests/test_proto.py +++ b/tests/test_proto.py @@ -56,6 +56,16 @@ def test_target_components() -> None: assert _target_components_from_protobuf(protobuf) == components +def test_steam_boiler_target_round_trip() -> None: + """Test targeting steam boilers by their named component category.""" + target = TargetCategories(ElectricalComponentCategory.STEAM_BOILER) + + protobuf = _target_components_to_protobuf(target) + category = protobuf.component_categories_types.categories[0].category + assert category == 19 + assert _target_components_from_protobuf(protobuf) == target + + def test_end_criteria() -> None: """Test the end criteria.""" for end_criteria in (