Skip to content

Commit

Permalink
Update metric names (#30)
Browse files Browse the repository at this point in the history
Update of metric names in `__init__` from api-common release
[v0.6.0](https://github.com/frequenz-floss/frequenz-api-common/releases/tag/v0.6.0)
  • Loading branch information
flora-hofmann-frequenz authored May 16, 2024
2 parents de8d68c + 5ed6b32 commit 0d6e0eb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Upgrading

<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->
* Upgrading metric `__init__` to names from api-common release [v0.6.0](https://github.com/frequenz-floss/frequenz-api-common/releases/tag/v0.6.0)

## New Features

Expand Down
33 changes: 22 additions & 11 deletions src/frequenz/client/common/metric/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,16 @@ class Metric(Enum):
# General AC electricity metrics
AC_FREQUENCY = PBMetric.METRIC_AC_FREQUENCY
AC_VOLTAGE = PBMetric.METRIC_AC_VOLTAGE
AC_VOLTAGE_PHASE_1 = PBMetric.METRIC_AC_VOLTAGE_PHASE_1
AC_VOLTAGE_PHASE_2 = PBMetric.METRIC_AC_VOLTAGE_PHASE_2
AC_VOLTAGE_PHASE_3 = PBMetric.METRIC_AC_VOLTAGE_PHASE_3
AC_APPARENT_CURRENT = PBMetric.METRIC_AC_APPARENT_CURRENT
AC_APPARENT_CURRENT_PHASE_1 = PBMetric.METRIC_AC_APPARENT_CURRENT_PHASE_1
AC_APPARENT_CURRENT_PHASE_2 = PBMetric.METRIC_AC_APPARENT_CURRENT_PHASE_2
AC_APPARENT_CURRENT_PHASE_3 = PBMetric.METRIC_AC_APPARENT_CURRENT_PHASE_3
AC_VOLTAGE_PHASE_1_N = PBMetric.METRIC_AC_VOLTAGE_PHASE_1_N
AC_VOLTAGE_PHASE_2_N = PBMetric.METRIC_AC_VOLTAGE_PHASE_2_N
AC_VOLTAGE_PHASE_3_N = PBMetric.METRIC_AC_VOLTAGE_PHASE_3_N
AC_VOLTAGE_PHASE_1_PHASE_2 = PBMetric.METRIC_AC_VOLTAGE_PHASE_1_PHASE_2
AC_VOLTAGE_PHASE_2_PHASE_3 = PBMetric.METRIC_AC_VOLTAGE_PHASE_2_PHASE_3
AC_VOLTAGE_PHASE_3_PHASE_1 = PBMetric.METRIC_AC_VOLTAGE_PHASE_3_PHASE_1
AC_CURRENT = PBMetric.METRIC_AC_CURRENT
AC_CURRENT_PHASE_1 = PBMetric.METRIC_AC_CURRENT_PHASE_1
AC_CURRENT_PHASE_2 = PBMetric.METRIC_AC_CURRENT_PHASE_2
AC_CURRENT_PHASE_3 = PBMetric.METRIC_AC_CURRENT_PHASE_3

# AC power metrics
AC_APPARENT_POWER = PBMetric.METRIC_AC_APPARENT_POWER
Expand Down Expand Up @@ -89,10 +92,18 @@ class Metric(Enum):
AC_REACTIVE_ENERGY_PHASE_3 = PBMetric.METRIC_AC_REACTIVE_ENERGY_PHASE_3

# AC harmonics
AC_THD_CURRENT = PBMetric.METRIC_AC_THD_CURRENT
AC_THD_CURRENT_PHASE_1 = PBMetric.METRIC_AC_THD_CURRENT_PHASE_1
AC_THD_CURRENT_PHASE_2 = PBMetric.METRIC_AC_THD_CURRENT_PHASE_2
AC_THD_CURRENT_PHASE_3 = PBMetric.METRIC_AC_THD_CURRENT_PHASE_3
AC_TOTAL_HARMONIC_DISTORTION_CURRENT = (
PBMetric.METRIC_AC_TOTAL_HARMONIC_DISTORTION_CURRENT
)
AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_1 = (
PBMetric.METRIC_AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_1
)
AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_2 = (
PBMetric.METRIC_AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_2
)
AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_3 = (
PBMetric.METRIC_AC_TOTAL_HARMONIC_DISTORTION_CURRENT_PHASE_3
)

# General BMS metrics
BATTERY_CAPACITY = PBMetric.METRIC_BATTERY_CAPACITY
Expand Down

0 comments on commit 0d6e0eb

Please sign in to comment.