-
Notifications
You must be signed in to change notification settings - Fork 0
Develop #8
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
base: main
Are you sure you want to change the base?
Develop #8
Conversation
…enderer, and LocationRenderer classes
…derers Refactor/modular renderers
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 refactors the visualization system by extracting rendering logic into separate classes and improving code organization. The changes introduce a modular renderer architecture that separates concerns for environment, grid, and location rendering.
- Refactored main.py to use dedicated renderer classes instead of inline drawing functions
- Created new renderer classes (EnvironmentRenderer, GridRenderer, LocationRenderer) with proper separation of concerns
- Updated variable naming from camelCase to snake_case for Python conventions
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| up.bat | Added Python execution command to the startup script |
| main.py | Refactored to use new renderer architecture and improved variable naming |
| locationRenderer.py | New class for rendering individual locations with random colors |
| gridRenderer.py | New class for rendering grids with location caching |
| environmentRenderer.py | New class for rendering environments using grid renderer |
| Viron | Updated subproject commit reference |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| log("No existing environments found.") | ||
| return {} | ||
|
|
||
| def load_existing_environment(graphik, env_key, environments, environmentService): |
Copilot
AI
Sep 21, 2025
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.
This function doesn't return a value when an exception occurs (lines 51-57), but the caller on line 90 expects a return value. Consider returning None or raising the exception instead of just logging and returning from the function.
| def create_environment(graphik, num_grids, grid_size): | ||
| environmentService = EnvironmentService(url, port) |
Copilot
AI
Sep 21, 2025
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.
The EnvironmentService is created inside this function but also created in main() on line 86. Consider passing the service as a parameter to avoid duplicate instantiation and improve consistency.
| def create_environment(graphik, num_grids, grid_size): | |
| environmentService = EnvironmentService(url, port) | |
| def create_environment(graphik, num_grids, grid_size, environmentService): |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.