frequenz-floss / frequenz-api-common

Shared protobuf definitions and Python bindings for Frequenz APIs
https://frequenz-floss.github.io/frequenz-api-common/
MIT License
1 stars 12 forks source link

Name metrics and states in `ComponentData` consistently #263

Open tiyash-basu-frequenz opened 2 months ago

tiyash-basu-frequenz commented 2 months ago

What's needed?

Component metrics and component states are named inconsistently in ComponentData:

https://github.com/frequenz-floss/frequenz-api-common/blob/3d0aa691af167f135801ffe58584612127ece6d3/proto/frequenz/api/common/v1/microgrid/components/components.proto#L246-L255

One is called metric_sample, and the other is called state, despite both being sampled data.

Proposed solution

According to our naming convention, since states are sampled, they should be called state_samples. In addition to that, ComponentState should also be called CompoentnStateSample. This will make the naming more consistent, and in line with our naming convention.

Use cases

No response

Alternatives and workarounds

No response

Additional context

No response