-
Notifications
You must be signed in to change notification settings - Fork 5
Apply changes from v0.3 to v1alpha8 #98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* replacing and deprecating from_proto * using enum.Enum in favor of Enum * using enum.unique * addition of base id types * Signed-off-by: Mathias L. Baumann <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR applies changes from v0.3 to v1alpha8, introducing microgrid-related ID types and modernizing the enum implementation. The main focus is on adding new identifier classes and deprecating the existing enum conversion methods in favor of a more generic approach.
- Adds new ID classes for microgrid entities (EnterpriseId, MicrogridId, ElectricalComponentId, SensorId)
- Modernizes enum classes by adding
@enum.uniquedecorators and switching fromEnumtoenum.Enum - Deprecates existing
from_proto()methods in favor of a genericenum_from_proto()function
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/microgrid/test_ids_alpha8.py | Adds comprehensive tests for the new microgrid ID classes |
| src/frequenz/client/common/v1alpha8/microgrid/sensors.py | Introduces SensorId class for microgrid sensors |
| src/frequenz/client/common/v1alpha8/microgrid/electrical_components/init.py | Adds ElectricalComponentId and modernizes enum classes with deprecation warnings |
| src/frequenz/client/common/v1alpha8/microgrid/init.py | Adds EnterpriseId and MicrogridId classes for microgrid entities |
| src/frequenz/client/common/v1alpha8/metric/init.py | Modernizes Metric enum with deprecation warning |
Signed-off-by: Mathias L. Baumann <[email protected]>
|
I am merging this, as it is basically just already reviewed changes transported to a new path. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🤡
|
Looks like my review is to late ⌛ |
Well, we can still fix anything you find :)- |
|
lgtm :) |
This applies the v0.3 changes done to the frequenz.client.common.* dir to frequenz.client.common.v1alpha8 dir