Skip to content

Commit c4b12f9

Browse files
Update location.proto package name
This commit updates the package name of `location.proto` from `frequenz.api.common.v1.location` to `frequenz.api.common.v1`. This sets package name of this proto file to its parent directory name, which seems to be a standard practice. Signed-off-by: Tiyash Basu <[email protected]>
1 parent 4050b0e commit c4b12f9

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

RELEASE_NOTES.md

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

5858
- Added a message `Microgrid` to represent a microgrid.
5959

60+
- Updated the package name of `location.proto` to `frequenz.api.common.v1`.
61+
6062
## New Features
6163

6264
<!-- Here goes the main new features and examples or instructions on how to use them -->

proto/frequenz/api/common/v1/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.location;
10+
package frequenz.api.common.v1;
1111

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ message Microgrid {
5454
frequenz.api.common.v1.grid.DeliveryArea delivery_area = 4;
5555

5656
// Physical location of the microgrid, in geographical co-ordinates.
57-
frequenz.api.common.v1.location.Location location = 5;
57+
frequenz.api.common.v1.Location location = 5;
5858

5959
// The current status of the microgrid.
6060
MicrogridStatus status = 6;

pytests/test_common.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,16 @@ def test_module_import_microgrid_components() -> None:
166166
from frequenz.api.common.v1.microgrid.components import transformer_pb2_grpc
167167

168168
assert transformer_pb2_grpc is not None
169+
170+
171+
def test_module_import_location() -> None:
172+
"""Test that the modules can be imported."""
173+
# pylint: disable=import-outside-toplevel
174+
from frequenz.api.common.v1 import location_pb2
175+
176+
assert location_pb2 is not None
177+
178+
# pylint: disable=import-outside-toplevel
179+
from frequenz.api.common.v1 import location_pb2_grpc
180+
181+
assert location_pb2_grpc is not None

0 commit comments

Comments
 (0)