Skip to content

Commit 89f4c33

Browse files
Move location.proto to types/location.proto (#368)
closes #363
2 parents 22b7df1 + 4b64cdb commit 89f4c33

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

RELEASE_NOTES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@
6565

6666
- The minimum allowed version of `protobuf` and `grpcio` has been updated to 6.31.1 and 1.72.1 respectively, you might also need to bump your dependencies accordingly.
6767

68+
- The file `location.proto` has been moved to the `types` package, moving the message `Location` to `types.Location`.
69+
6870
## New Features
6971

7072
Added many new messages and enum values:

proto/frequenz/api/common/v1/microgrid/microgrid.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ syntax = "proto3";
1010
package frequenz.api.common.v1.microgrid;
1111

1212
import "frequenz/api/common/v1/grid/delivery_area.proto";
13-
import "frequenz/api/common/v1/location.proto";
13+
import "frequenz/api/common/v1/types/location.proto";
1414

1515
import "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.Location location = 5;
63+
frequenz.api.common.v1.types.Location location = 5;
6464

6565
// The current status of the microgrid.
6666
MicrogridStatus status = 6;

proto/frequenz/api/common/v1/location.proto renamed to proto/frequenz/api/common/v1/types/location.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
syntax = "proto3";
99

10-
package frequenz.api.common.v1;
10+
package frequenz.api.common.v1.types;
1111

1212
// A pair of geographical co-ordinates, representing the location of a place.
1313
message Location {

pytests/test_common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,12 @@ def test_module_import_microgrid_communication_components() -> None:
212212
def 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 import location_pb2
215+
from frequenz.api.common.v1.types import location_pb2
216216

217217
assert location_pb2 is not None
218218

219219
# pylint: disable=import-outside-toplevel
220-
from frequenz.api.common.v1 import location_pb2_grpc
220+
from frequenz.api.common.v1.types import location_pb2_grpc
221221

222222
assert location_pb2_grpc is not None
223223

0 commit comments

Comments
 (0)