-
Notifications
You must be signed in to change notification settings - Fork 132
Major Infra Restructure #271
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
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 pull request represents a major infrastructure overhaul focused on modernizing the codebase for Python 3 compatibility, code formatting standardization, and dependency updates.
Purpose: Modernize the worldengine project by removing Python 2 support, applying consistent code formatting (likely via Black/autopep8), updating dependencies, and regenerating protobuf code with newer compiler versions.
Key Changes:
- Migration from Python 2 to Python 3 (removing
six, updating metaclass syntax, using f-strings) - Code formatting standardization (double quotes, spacing, line wrapping)
- Protobuf code regeneration with version 6.33.1
- Tox configuration updates for Python 3.9-3.14
- Dependency modernization in requirements
Reviewed Changes
Copilot reviewed 63 out of 74 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| worldengine/protobuf/World_pb2.py | Regenerated protobuf code using protoc 6.33.1 with modern API patterns |
| worldengine/biome.py | Removed six dependency, updated metaclass syntax to Python 3 style |
| worldengine/hdf5_serialization.py | Updated HDF5 API calls from deprecated .value to [()] accessor |
| worldengine/draw.py | Added numpy type conversion to prevent uint8 overflow in NumPy 2.x |
| worldengine/step.py | Removed object inheritance, updated to Python 3 class syntax |
| worldengine/simulations/*.py | Standardized formatting and removed object inheritance |
| worldengine/model/world.py | Updated string formatting to f-strings, improved code layout |
| tox.ini | Updated to support Python 3.9-3.14 with modern tox configuration |
| tests/*.py | Updated assertions from assertEquals to assertEqual |
| requirements*.txt | Removed outdated dependency files (consolidated into setup/tox) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
worldengine/simulations/humidity.py
Outdated
| humids = world.humids | ||
| precipitationWeight = 1.0 | ||
| irrigationWeight = 3 | ||
| data = numpy.zeros((world.height, world.width), dtype=float) |
Copilot
AI
Nov 17, 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 assignment to 'data' is unnecessary as it is redefined before this value is used.
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.
@copilot open a new pull request to apply changes based on this feedback
| from worldengine.model.world import * | ||
| from worldengine.draw import * | ||
| from worldengine.image_io import PNGWriter | ||
| from worldengine.model.world import * |
Copilot
AI
Nov 17, 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.
Import pollutes the enclosing namespace, as the imported module worldengine.model.world does not define 'all'.
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.
@copilot open a new pull request to apply changes based on this feedback
| @classmethod | ||
| def from_dict(cls, in_dict): | ||
| instance = World(in_dict['name'], Size(in_dict['width'], in_dict['height'])) | ||
| instance = World(in_dict["name"], Size(in_dict["width"], in_dict["height"])) |
Copilot
AI
Nov 17, 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.
Call to World.init with too few arguments; should be no fewer than 4.
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.
@copilot open a new pull request to apply changes based on this feedback
Co-authored-by: Copilot <[email protected]>
Co-authored-by: psi29a <[email protected]>
Co-authored-by: psi29a <[email protected]>
Replace wildcard imports with explicit imports in blessed image generator
Remove dead code in HumiditySimulation
Uh oh!
There was an error while loading. Please reload this page.