-
Notifications
You must be signed in to change notification settings - Fork 4
Add component graph renderer #41
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
Add component graph renderer #41
Conversation
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 adds a new CLI command render-graph to visualize microgrid component graphs. The implementation includes a ComponentGraphRenderer class that uses networkx and matplotlib to build and render component graphs fetched from the Assets API.
Key changes:
- New
ComponentGraphRendererclass with methods to build, layout, and render component graphs - New CLI command
gridpool-cli render-graphwith options for output file and interactive display - Optional graph dependencies (matplotlib and networkx) added to pyproject.toml
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| src/frequenz/gridpool/cli/_render_graph.py | New module implementing graph rendering functionality with networkx and matplotlib |
| src/frequenz/gridpool/cli/main.py | Added render-graph CLI command with output and show options |
| pyproject.toml | Added optional graph dependencies for matplotlib and networkx |
| RELEASE_NOTES.md | Documented the new render-graph CLI feature |
| README.md | Added comprehensive CLI documentation including setup and usage examples |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
9473219 to
3e8ac3a
Compare
cwasicki
left a comment
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.
Cool, LGTM! The visualization libraries shouldn't pollute the dependencies of other apps though.
Signed-off-by: Mohammad Tayyab <[email protected]>
Signed-off-by: Mohammad Tayyab <[email protected]>
Signed-off-by: Mohammad Tayyab <[email protected]>
3e8ac3a to
199072a
Compare
This PR adds a new CLI command render-graph to visualize microgrid component graphs. The implementation includes a ComponentGraphRenderer class that uses networkx and matplotlib to build and render component graphs fetched from the Assets API.
Key changes: