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
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Upgrading

<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->
* Updates 'FilterOption' in client to be able to use reporting-api version 0.7.0

## New Features

Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ requires-python = ">= 3.11, < 4"
dependencies = [
"typing_extensions >= 4.6.1, < 5",
"grpc-stubs == 1.53.0.5",
"frequenz-api-reporting >= 0.5.0, < 0.6",
"frequenz-api-reporting >= 0.7.0, < 0.8",
"frequenz-client-common >= 0.3.0, < 0.4",
"grpcio >=1.66.1, < 2",
"grpcio-tools >=1.66.1, < 2",
"protobuf >=5.28.3, < 6",
"grpcio >=1.70.0, < 2",
"grpcio-tools >=1.70.0, < 2",
"protobuf >=5.29.3, < 6",
"frequenz-client-base >= 0.8.0, < 0.10.0",
]
dynamic = ["version"]
Expand Down
12 changes: 6 additions & 6 deletions src/frequenz/client/reporting/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from frequenz.api.reporting.v1.reporting_pb2 import (
AggregationConfig as PBAggregationConfig,
)
from frequenz.api.reporting.v1.reporting_pb2 import IncludeOptions as PBIncludeOptions
from frequenz.api.reporting.v1.reporting_pb2 import FilterOption as PBFilterOption
from frequenz.api.reporting.v1.reporting_pb2 import (
MetricConnections as PBMetricConnections,
)
Expand Down Expand Up @@ -327,16 +327,16 @@ def dt2ts(dt: datetime) -> PBTimestamp:
)

incl_states = (
PBIncludeOptions.FilterOption.FILTER_OPTION_INCLUDE
PBFilterOption.FILTER_OPTION_INCLUDE
if include_states
else PBIncludeOptions.FilterOption.FILTER_OPTION_EXCLUDE
else PBFilterOption.FILTER_OPTION_EXCLUDE
)
incl_bounds = (
PBIncludeOptions.FilterOption.FILTER_OPTION_INCLUDE
PBFilterOption.FILTER_OPTION_INCLUDE
if include_bounds
else PBIncludeOptions.FilterOption.FILTER_OPTION_EXCLUDE
else PBFilterOption.FILTER_OPTION_EXCLUDE
)
include_options = PBIncludeOptions(
include_options = PBReceiveMicrogridComponentsDataStreamRequest.IncludeOptions(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this change necessary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the frequenz-api v0.7.0 has changed so that IncludeOptions is now inside ReceiveMicrogridComponentsDataStreamRequest: frequenz-floss/frequenz-api-reporting@v0.6.0...v0.7.0#diff-1f163e5662a0ad82784b3f2f391169e19f5f89baa3d9f681b934d33d7a6f8a67R246

bounds=incl_bounds,
states=incl_states,
)
Expand Down
Loading