-
Notifications
You must be signed in to change notification settings - Fork 4
Update to the latest component graph #40
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
Signed-off-by: Sahas Subramanian <sahas.subramanian@proton.me>
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 updates the frequenz-microgrid-component-graph dependency from version 0.2.x to 0.3.4 and adjusts test expectations to match the behavioral changes in the new library version.
- Updated the minimum required version of
frequenz-microgrid-component-graphfrom0.2.0to0.3.4 - Adjusted test assertion to reflect the new component ordering in formula generation
- Updated release notes to document the dependency version change
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pyproject.toml | Updated frequenz-microgrid-component-graph dependency version constraint to >= 0.3.4, < 0.4 |
| tests/test_graph_generator.py | Updated expected PV formula output to match new component ordering from the updated library |
| RELEASE_NOTES.md | Documented the minimum required version change for frequenz-microgrid-component-graph |
The changes are consistent and appropriate for a dependency update that introduces behavioral changes in formula generation. The test updates correctly reflect the new expected behavior, and the release notes properly document this breaking change for users.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| graph = await g.get_component_graph(MicrogridId(10)) | ||
|
|
||
| assert graph.grid_formula() == "COALESCE(#2, #4, 0.0) + #3" | ||
| assert graph.pv_formula(None) == "COALESCE(#4, #2, 0.0)" |
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.
Why is this?
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.
Earlier we preferred inverters as primary, and meters as secondary or fallback. Now the order is reversed.
Because some big sites have one meter and 5 inverters behind them etc, we don't need to process 5 components when we can just do one, during normal operation.
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.
It is a config variable now and can be reversed.
No description provided.