-
Notifications
You must be signed in to change notification settings - Fork 5
Use IDs from frequenz-client-common #156
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Centralize ID types by importing them from the frequenz-client-common package instead of defining them locally in the microgrid client.
- Replaced local
SensorId,ComponentId, andMicrogridIddefinitions with imports fromfrequenz-client-common - Removed the
id.pymodule and updated all code and tests accordingly - Added
frequenz-client-commonas a dependency inpyproject.tomland documented the change inRELEASE_NOTES.md
Reviewed Changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_sensor_proto.py | Swapped local SensorId import for frequenz.client.common |
| tests/test_sensor.py | Swapped local SensorId import for frequenz.client.common |
| tests/test_metadata.py | Swapped local MicrogridId import for frequenz.client.common |
| tests/test_id.py | Swapped local MicrogridId, ComponentId, SensorId imports |
| tests/test_connection.py | Swapped local ComponentId import for frequenz.client.common |
| tests/test_component_data.py | Swapped local ComponentId import for frequenz.client.common |
| tests/test_component.py | Swapped local ComponentId import for frequenz.client.common |
| tests/test_client.py | Swapped local ID imports for frequenz.client.common |
| src/frequenz/client/microgrid/sensor.py | Swapped local SensorId import for frequenz.client.common |
| src/frequenz/client/microgrid/_sensor_proto.py | Swapped local SensorId import for frequenz.client.common |
| src/frequenz/client/microgrid/_metadata.py | Swapped local MicrogridId import for frequenz.client.common |
| src/frequenz/client/microgrid/_connection.py | Swapped local ComponentId import for frequenz.client.common |
| src/frequenz/client/microgrid/_component_data.py | Swapped local ComponentId import for frequenz.client.common |
| src/frequenz/client/microgrid/_component.py | Swapped local ComponentId import for frequenz.client.common |
| src/frequenz/client/microgrid/_client.py | Swapped local ID imports for frequenz.client.common |
| src/frequenz/client/microgrid/id.py | Removed local ID definitions |
| pyproject.toml | Added frequenz-client-common dependency |
| RELEASE_NOTES.md | Documented ID import changes |
This commit updates the microgrid client to use IDs from the `frequenz-client-common` package instead of defining them in the microgrid client itself. This change is part of a broader effort to centralize common functionality and types across different clients. We also bump some minimum dependency versions of some other dependencies to be able to work with the new `frequenz-client-common` dependency. Signed-off-by: Leandro Lucarella <[email protected]>
These are just warnings and we are already aware, and will upgrade as needed when we are 2 majors behind. Signed-off-by: Leandro Lucarella <[email protected]>
Signed-off-by: Leandro Lucarella <[email protected]>
shsms
approved these changes
Jun 10, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
part:client
Affects the client code
part:docs
Affects the documentation
part:tests
Affects the unit, integration and performance (benchmarks) tests
part:tooling
Affects the development tooling (CI, deployment, dependency management, etc.)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR updates the microgrid client to use IDs from the
frequenz-client-commonpackage instead of defining them in the microgrid client itself. This change is part of a broader effort to centralize common functionality and types across different clients.