Skip to content

Commit 95e8308

Browse files
Remove unnecessary items and add a test (#132)
2 parents 3ad73be + 8a75fc2 commit 95e8308

File tree

4 files changed

+13
-212
lines changed

4 files changed

+13
-212
lines changed

RELEASE_NOTES.md

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

6262
- Added messages to support pagination in APIs.
6363

64+
- Removed `metrics/electrical.proto`, since it is no longer needed.
65+
6466
## New Features
6567

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

proto/frequenz/api/common/v1/metrics/electrical.proto

Lines changed: 0 additions & 199 deletions
This file was deleted.

proto/frequenz/api/common/v1/metrics/metric_sample.proto

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,7 @@ enum Metric {
134134
// General BMS metrics.
135135
METRIC_BATTERY_CAPACITY = 101;
136136
METRIC_BATTERY_SOC_PCT = 102;
137-
METRIC_BATTERY_SOP_CHARGE = 103;
138-
METRIC_BATTERY_SOP_DISCHARGE = 104;
139-
METRIC_BATTERY_TEMPERATURE = 105;
137+
METRIC_BATTERY_TEMPERATURE = 103;
140138

141139
// General inverter metrics.
142140
METRIC_INVERTER_TEMPERATURE = 120;

pytests/test_common.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,30 +12,30 @@ def test_package_import() -> None:
1212
assert v1 is not None
1313

1414

15-
def test_module_import_metrics_electrical() -> None:
15+
def test_module_import_metrics_bounds() -> None:
1616
"""Test that the modules can be imported."""
1717
# pylint: disable=import-outside-toplevel
18-
from frequenz.api.common.v1.metrics import electrical_pb2
18+
from frequenz.api.common.v1.metrics import bounds_pb2
1919

20-
assert electrical_pb2 is not None
20+
assert bounds_pb2 is not None
2121

2222
# pylint: disable=import-outside-toplevel
23-
from frequenz.api.common.v1.metrics import electrical_pb2_grpc
23+
from frequenz.api.common.v1.metrics import bounds_pb2_grpc
2424

25-
assert electrical_pb2_grpc is not None
25+
assert bounds_pb2_grpc is not None
2626

2727

28-
def test_module_import_metrics_bounds() -> None:
28+
def test_module_import_metrics_metric_sample() -> None:
2929
"""Test that the modules can be imported."""
3030
# pylint: disable=import-outside-toplevel
31-
from frequenz.api.common.v1.metrics import bounds_pb2
31+
from frequenz.api.common.v1.metrics import metric_sample_pb2
3232

33-
assert bounds_pb2 is not None
33+
assert metric_sample_pb2 is not None
3434

3535
# pylint: disable=import-outside-toplevel
36-
from frequenz.api.common.v1.metrics import bounds_pb2_grpc
36+
from frequenz.api.common.v1.metrics import metric_sample_pb2_grpc
3737

38-
assert bounds_pb2_grpc is not None
38+
assert metric_sample_pb2_grpc is not None
3939

4040

4141
def test_module_import_grid() -> None:

0 commit comments

Comments
 (0)