Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
<!-- Here goes a general summary of what this release is about -->

## Upgrading

<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->

## New Features

- Added support for targeting steam boilers by component category.

## Bug Fixes

<!-- Here goes notable bug fixes that are worth a special mention or explanation -->
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
24 changes: 24 additions & 0 deletions pytests/test_dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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