Skip to content

Conversation

@Marenz
Copy link
Contributor

@Marenz Marenz commented Aug 12, 2025

This applies the v0.3 changes done to the frequenz.client.common.* dir to frequenz.client.common.v1alpha8 dir

  • replacing and deprecating from_proto
  • using enum.Enum in favor of Enum
  • using enum.unique
  • addition of base id types

* 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]>
Copilot AI review requested due to automatic review settings August 12, 2025 10:29
@Marenz Marenz requested a review from a team as a code owner August 12, 2025 10:29
@github-actions github-actions bot added the part:tests Affects the unit, integration and performance (benchmarks) tests label Aug 12, 2025
@Marenz Marenz added the cmd:skip-release-notes It is not necessary to update release notes for this PR label Aug 12, 2025
Copy link

Copilot AI left a 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.unique decorators and switching from Enum to enum.Enum
  • Deprecates existing from_proto() methods in favor of a generic enum_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]>
@Marenz Marenz enabled auto-merge August 13, 2025 08:30
@github-actions github-actions bot added the part:docs Affects the documentation label Aug 13, 2025
@Marenz
Copy link
Contributor Author

Marenz commented Aug 13, 2025

I am merging this, as it is basically just already reviewed changes transported to a new path.
We can fix problems with the v1alpha8 path as we discover them, it's not breaking any existing functions.

@Marenz Marenz disabled auto-merge August 13, 2025 08:32
Copy link
Contributor Author

@Marenz Marenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🤡

@Marenz Marenz merged commit 646ee22 into frequenz-floss:v0.x.x Aug 13, 2025
5 checks passed
@Marenz Marenz deleted the mergev3 branch August 13, 2025 08:33
@TalweSingh
Copy link

Looks like my review is to late ⌛

@Marenz
Copy link
Contributor Author

Marenz commented Aug 13, 2025

Looks like my review is to late ⌛

Well, we can still fix anything you find :)-

@TalweSingh
Copy link

lgtm :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmd:skip-release-notes It is not necessary to update release notes for this PR part:docs Affects the documentation part:tests Affects the unit, integration and performance (benchmarks) tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants