-
Notifications
You must be signed in to change notification settings - Fork 5
Remove timezonefinder dependency #168
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
timezonefinder dependencyThere 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.
Please also update the RELEASE_NOTES.md file to include the change of behavior and dependencies. Recommend users installing timezonefinder themselves if they need to get a timezone from the coordinates (with a small example). Clarify this change is shipped in a patch release even if there is a breaking change because this feature have no known users.
Updated RELEASE_NOTES.md with comprehensive documentation of the breaking change, migration guide with code examples, and clarification that this is shipped in a patch release despite being a breaking change because the feature has no known users. Commit 7958389 |
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 removes the timezonefinder dependency to reduce package size by 66M+ and improve ARM platform compatibility. The automatic timezone lookup functionality in the Location class has been removed as a breaking change due to having no known users.
- Removed
timezonefinderandnumpydependencies (66M+ size reduction) - Eliminated automatic timezone lookup from latitude/longitude coordinates
- Simplified
Locationclass behavior to only use explicitly provided timezone values
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pyproject.toml | Removed timezonefinder dependency from project dependencies |
| src/frequenz/client/microgrid/_metadata.py | Removed timezone lookup logic and simplified Location class |
| tests/test_metadata.py | Updated tests to verify new behavior without timezone lookup |
| RELEASE_NOTES.md | Added comprehensive migration guide and breaking change documentation |
Remove the `timezonefinder` dependency to significantly reduce package size by 66M+ and improve ARM platform support, as no pre-built wheels are available anymore in PyPI. Signed-off-by: Leandro Lucarella <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]>
This PR removes the
timezonefinderdependency that was automatically looking up timezones based on latitude/longitude coordinates in theLocationclass.Problem
The
timezonefinderdependency alone is 50M+ in size and depends onnumpy(another 16M+), resulting in a total bloat of 66M+ for a feature with no known users. This large dependency size also prevents pre-built binaries from being available for ARM platforms.Solution
timezonefinder >= 6.2.0, < 7frompyproject.tomlLocation.timezonenow remainsNoneunless explicitly provided during construction__post_init__method that performed timezone lookup from coordinatesBreaking Change
This is a breaking change shipped in a patch release because this feature has no known users. The timezone lookup is no longer performed automatically.
Migration for Users Who Need Timezone Lookup
If timezone lookup from coordinates is needed, install
timezonefinderseparately and implement manual lookup:Before/After
Before:
After:
Fixes #75.