File tree Expand file tree Collapse file tree 10 files changed +19
-15
lines changed
proto/frequenz/api/common/v1
py/frequenz/api/common/v1/type Expand file tree Collapse file tree 10 files changed +19
-15
lines changed Original file line number Diff line number Diff line change 5757 * ` METRIC_AC_ACTIVE_ENERGY* ` to ` METRIC_AC_ENERGY_ACTIVE* `
5858 * ` METRIC_AC_REACTIVE_ENERGY* ` to ` METRIC_AC_ENERGY_REACTIVE* `
5959
60+ + ` types ` :
61+
62+ * The whole package has been renamed to ` type ` .
63+
6064- Renumbered some enum values to remove unnecessary gaps:
6165
6266 + ` microgrid.components.ComponentCategory ` (` microgrid.electrical_components.ElectricalComponentCategory ` )
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ syntax = "proto3";
99
1010package frequenz.api.common.v1.market ;
1111
12- import "frequenz/api/common/v1/types /decimal.proto" ;
12+ import "frequenz/api/common/v1/type /decimal.proto" ;
1313
1414// Represents a single unit of electricity.
1515//
@@ -20,5 +20,5 @@ import "frequenz/api/common/v1/types/decimal.proto";
2020// production or consumption.
2121message Energy {
2222 // Energy unit in Megawatthours (MWh).
23- frequenz.api.common.v1.types .Decimal mwh = 1 ;
23+ frequenz.api.common.v1.type .Decimal mwh = 1 ;
2424}
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ syntax = "proto3";
99
1010package frequenz.api.common.v1.market ;
1111
12- import "frequenz/api/common/v1/types /decimal.proto" ;
12+ import "frequenz/api/common/v1/type /decimal.proto" ;
1313
1414// Represents a single unit of power.
1515//
@@ -26,5 +26,5 @@ import "frequenz/api/common/v1/types/decimal.proto";
2626// market applications.
2727message Power {
2828 // Power amount in Megawatts (MW).
29- frequenz.api.common.v1.types .Decimal mw = 1 ;
29+ frequenz.api.common.v1.type .Decimal mw = 1 ;
3030}
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ syntax = "proto3";
99
1010package frequenz.api.common.v1.market ;
1111
12- import "frequenz/api/common/v1/types /decimal.proto" ;
12+ import "frequenz/api/common/v1/type /decimal.proto" ;
1313
1414// Represents a monetary price for electricity trading, including
1515// the amount and currency. The currency used should align with the
@@ -46,7 +46,7 @@ message Price {
4646 }
4747
4848 // The amount of the price.
49- frequenz.api.common.v1.types .Decimal amount = 1 ;
49+ frequenz.api.common.v1.type .Decimal amount = 1 ;
5050
5151 // The currency in which the price is denominated.
5252 Currency currency = 2 ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ syntax = "proto3";
1010package frequenz.api.common.v1.microgrid ;
1111
1212import "frequenz/api/common/v1/grid/delivery_area.proto" ;
13- import "frequenz/api/common/v1/types /location.proto" ;
13+ import "frequenz/api/common/v1/type /location.proto" ;
1414
1515import "google/protobuf/timestamp.proto" ;
1616
@@ -60,7 +60,7 @@ message Microgrid {
6060 // Physical location of the microgrid, in geographical co-ordinates.
6161 //
6262 // If the location is not known, this field will be missing.
63- frequenz.api.common.v1.types .Location location = 5 ;
63+ frequenz.api.common.v1.type .Location location = 5 ;
6464
6565 // The current status of the microgrid.
6666 MicrogridStatus status = 6 ;
Original file line number Diff line number Diff line change 77
88syntax = "proto3" ;
99
10- package frequenz.api.common.v1.types ;
10+ package frequenz.api.common.v1.type ;
1111
1212// protolint:disable MAX_LINE_LENGTH
1313// (the link is too long)
Original file line number Diff line number Diff line change 77
88syntax = "proto3" ;
99
10- package frequenz.api.common.v1.types ;
10+ package frequenz.api.common.v1.type ;
1111
1212import "google/protobuf/timestamp.proto" ;
1313
Original file line number Diff line number Diff line change 77
88syntax = "proto3" ;
99
10- package frequenz.api.common.v1.types ;
10+ package frequenz.api.common.v1.type ;
1111
1212// A pair of geographical co-ordinates, representing the location of a place.
1313message Location {
File renamed without changes.
Original file line number Diff line number Diff line change @@ -15,12 +15,12 @@ def test_package_import() -> None:
1515def test_module_import_decimal () -> None :
1616 """Test that the modules can be imported."""
1717 # pylint: disable=import-outside-toplevel
18- from frequenz .api .common .v1 .types import decimal_pb2
18+ from frequenz .api .common .v1 .type import decimal_pb2
1919
2020 assert decimal_pb2 is not None
2121
2222 # pylint: disable=import-outside-toplevel
23- from frequenz .api .common .v1 .types import decimal_pb2_grpc
23+ from frequenz .api .common .v1 .type import decimal_pb2_grpc
2424
2525 assert decimal_pb2_grpc is not None
2626
@@ -212,12 +212,12 @@ def test_module_import_microgrid_communication_components() -> None:
212212def test_module_import_location () -> None :
213213 """Test that the modules can be imported."""
214214 # pylint: disable=import-outside-toplevel
215- from frequenz .api .common .v1 .types import location_pb2
215+ from frequenz .api .common .v1 .type import location_pb2
216216
217217 assert location_pb2 is not None
218218
219219 # pylint: disable=import-outside-toplevel
220- from frequenz .api .common .v1 .types import location_pb2_grpc
220+ from frequenz .api .common .v1 .type import location_pb2_grpc
221221
222222 assert location_pb2_grpc is not None
223223
You can’t perform that action at this time.
0 commit comments