File tree Expand file tree Collapse file tree
src/frequenz/client/assets
tests/client_test_cases/list_market_topology_relations Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Frequenz Assets API Client Release Notes
22
3- ## Summary
4-
5- <!-- Here goes a general summary of what this release is about -->
6-
73## Upgrading
84
9- <!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->
10-
11- ## New Features
12-
13- <!-- Here goes the main new features and examples or instructions on how to use them -->
14-
15- ## Bug Fixes
16-
17- <!-- Here goes notable bug fixes that are worth a special mention or explanation -->
5+ - Bumped ` frequenz-api-common ` from ` v0.8.9 ` to ` v0.8.11 ` and ` frequenz-api-assets ` from ` v0.3.0 ` to ` v0.4.0 ` .
6+ - Renamed ` MarketLocation ` to ` MarketLocationRef ` to match the upstream protobuf rename in ` frequenz-api-common ` v0.8.11. The ` market_location_from_proto ` helper was renamed to ` market_location_ref_from_proto ` accordingly.
7+ - Renamed the ` MarketTopologyRelation.market_location ` field to ` market_location_ref ` to match the upstream protobuf field rename in ` frequenz-api-assets ` v0.4.0.
Original file line number Diff line number Diff line change @@ -37,11 +37,11 @@ classifiers = [
3737requires-python = " >= 3.11, < 4"
3838dependencies = [
3939 " typing-extensions >= 4.13.0, < 5" ,
40- " frequenz-api-assets >= 0.3 .0, < 0.4 .0" ,
41- " frequenz-api-common >= 0.8.9 , < 1" ,
40+ " frequenz-api-assets >= 0.4 .0, < 0.5 .0" ,
41+ " frequenz-api-common >= 0.8.11 , < 1" ,
4242 " frequenz-client-base >= 0.11.0, < 0.12.0" ,
4343 " frequenz-client-common >= 0.3.8, < 0.5.0" ,
44- " grpcio >= 1.81.0 , < 2" ,
44+ " grpcio >= 1.81.1 , < 2" ,
4545]
4646dynamic = [" version" ]
4747
Original file line number Diff line number Diff line change 1616from ._interval import Interval
1717from ._lifetime import Lifetime
1818from ._location import Location
19- from ._market_location import MarketLocation , MarketLocationId , MarketLocationIdType
19+ from ._market_location import MarketLocationId , MarketLocationIdType , MarketLocationRef
2020from ._market_topology import (
2121 MarketParticipation ,
2222 MarketParticipationType ,
4040 "MicrogridStatus" ,
4141 "Location" ,
4242 "Lifetime" ,
43- "MarketLocation" ,
4443 "MarketLocationId" ,
4544 "MarketLocationIdType" ,
45+ "MarketLocationRef" ,
4646 "MarketParticipation" ,
4747 "MarketParticipationType" ,
4848 "MarketTopologyRelation" ,
Original file line number Diff line number Diff line change @@ -68,8 +68,8 @@ class MarketLocationId:
6868
6969
7070@dataclass (frozen = True , kw_only = True )
71- class MarketLocation :
72- """A market-facing metering point in a specific market area."""
71+ class MarketLocationRef :
72+ """A reference to a market-facing metering point in a specific market area."""
7373
7474 market_area : int
7575 """The market area in which this market location is registered."""
Original file line number Diff line number Diff line change 11# License: MIT
22# Copyright © 2026 Frequenz Energy-as-a-Service GmbH
33
4- """Conversion of MarketLocation objects to/from protobuf messages."""
4+ """Conversion of MarketLocationRef objects to/from protobuf messages."""
55
66from frequenz .api .common .v1alpha8 .grid import market_location_pb2
77from frequenz .client .common .proto import enum_from_proto
88
9- from ._market_location import MarketLocation , MarketLocationId , MarketLocationIdType
9+ from ._market_location import MarketLocationId , MarketLocationIdType , MarketLocationRef
1010
1111
1212def market_location_id_from_proto (
@@ -19,11 +19,11 @@ def market_location_id_from_proto(
1919 )
2020
2121
22- def market_location_from_proto (
23- message : market_location_pb2 .MarketLocation ,
24- ) -> MarketLocation :
25- """Convert a protobuf market location message to a domain object."""
26- return MarketLocation (
22+ def market_location_ref_from_proto (
23+ message : market_location_pb2 .MarketLocationRef ,
24+ ) -> MarketLocationRef :
25+ """Convert a protobuf market location ref message to a domain object."""
26+ return MarketLocationRef (
2727 market_area = message .market_area ,
2828 market_location_id = (
2929 market_location_id_from_proto (message .market_location_id )
Original file line number Diff line number Diff line change 1111
1212from ._delivery_area import DeliveryArea
1313from ._interval import Interval
14- from ._market_location import MarketLocation
14+ from ._market_location import MarketLocationRef
1515
1616
1717@enum .unique
@@ -46,7 +46,7 @@ class MarketTopologyRelation:
4646 microgrid_id : MicrogridId | None
4747 """The microgrid associated with this relation."""
4848
49- market_location : MarketLocation | None
49+ market_location_ref : MarketLocationRef | None
5050 """The market location associated with this relation."""
5151
5252 gridpool_id : int | None
Original file line number Diff line number Diff line change 99
1010from ._delivery_area_proto import delivery_area_from_proto
1111from ._interval_proto import interval_from_proto
12- from ._market_location_proto import market_location_from_proto
12+ from ._market_location_proto import market_location_ref_from_proto
1313from ._market_topology import (
1414 MarketParticipation ,
1515 MarketParticipationType ,
@@ -41,9 +41,9 @@ def market_topology_relation_from_proto(
4141 if message .HasField ("microgrid_id" )
4242 else None
4343 ),
44- market_location = (
45- market_location_from_proto (message .market_location )
46- if message .HasField ("market_location " )
44+ market_location_ref = (
45+ market_location_ref_from_proto (message .market_location_ref )
46+ if message .HasField ("market_location_ref " )
4747 else None
4848 ),
4949 gridpool_id = message .gridpool_id if message .HasField ("gridpool_id" ) else None ,
Original file line number Diff line number Diff line change 1717 DeliveryArea ,
1818 EnergyMarketCodeType ,
1919 Interval ,
20- MarketLocation ,
2120 MarketLocationId ,
2221 MarketLocationIdType ,
22+ MarketLocationRef ,
2323 MarketParticipation ,
2424 MarketParticipationType ,
2525 MarketTopologyRelation ,
@@ -64,7 +64,7 @@ def assert_stub_method_call(stub_method: Any) -> None:
6464 relations = [
6565 assets_pb2 .MarketTopologyRelation (
6666 microgrid_id = 1234 ,
67- market_location = market_location_pb2 .MarketLocation (
67+ market_location_ref = market_location_pb2 .MarketLocationRef (
6868 market_area = market_area_pb2 .MarketArea .ValueType (1 ),
6969 market_location_id = market_location_pb2 .MarketLocationId (
7070 id = market_location_pb2 .MarketLocationIdValue (value = "DE001" ),
@@ -94,7 +94,7 @@ def assert_client_result(result: Any) -> None:
9494 assert result == [
9595 MarketTopologyRelation (
9696 microgrid_id = MicrogridId (1234 ),
97- market_location = MarketLocation (
97+ market_location_ref = MarketLocationRef (
9898 market_area = 1 ,
9999 market_location_id = MarketLocationId (
100100 value = "DE001" , type = MarketLocationIdType .MALO_ID
You can’t perform that action at this time.
0 commit comments