diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 17459f5..4f523bb 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -2,4 +2,16 @@ ## Summary -This is the v1.0.0 release. It is equivalent to v1.0.0-rc3 and introduces a period of API stabilization. + + +## Upgrading + + + +## New Features + +- Added support for targeting steam boilers by component category. + +## Bug Fixes + + diff --git a/pyproject.toml b/pyproject.toml index c854afa..e21ca18 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ classifiers = [ ] requires-python = ">= 3.11, < 4" dependencies = [ - "frequenz-api-common >= 0.8.0, < 1.0", + "frequenz-api-common >= 0.8.2, < 1.0", "googleapis-common-protos >= 1.75.1, < 2", # We can't widen beyond the current value unless we bump the minimum # requirements too because of protobuf cross-version runtime guarantees: diff --git a/pytests/test_dispatch.py b/pytests/test_dispatch.py index 1b7fa3c..5a216da 100644 --- a/pytests/test_dispatch.py +++ b/pytests/test_dispatch.py @@ -23,3 +23,27 @@ def test_module_import_components() -> None: from frequenz.api.dispatch.v1 import dispatch_pb2_grpc assert dispatch_pb2_grpc is not None + + +def test_steam_boiler_target_round_trip() -> None: + """Test that steam boiler category targets keep their wire value.""" + # pylint: disable=import-outside-toplevel + from frequenz.api.common.v1alpha8.microgrid.electrical_components import ( + electrical_components_pb2, + ) + from frequenz.api.dispatch.v1 import dispatch_pb2 as dispatch_proto + + category = electrical_components_pb2.ELECTRICAL_COMPONENT_CATEGORY_STEAM_BOILER + assert category == 19 + + target = dispatch_proto.TargetComponents( + component_categories_types=dispatch_proto.TargetComponents.CategoryTypeSet( + categories=[ + dispatch_proto.TargetComponents.CategoryAndType(category=category) + ] + ) + ) + + parsed = dispatch_proto.TargetComponents.FromString(target.SerializeToString()) + assert parsed == target + assert parsed.component_categories_types.categories[0].category == 19 diff --git a/submodules/frequenz-api-common b/submodules/frequenz-api-common index 2678cee..b137193 160000 --- a/submodules/frequenz-api-common +++ b/submodules/frequenz-api-common @@ -1 +1 @@ -Subproject commit 2678ceef8a1cc0a30cd0f7847d4b84e1462c403b +Subproject commit b13719359e20c81dc8d2759bd24895bee0884061