fix: Update h3 API calls for v4.x compatibility #175
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request
Description
This PR updates the codebase to be compatible with version 4.x of the
h3-py
library.The
h3-py
library introduced breaking API changes in its v4 release, renaming several core functions (e.g.,uncompact
->uncompact_cells
,geo_to_h3
->latlng_to_cell
,k_ring
->grid_disk
). The existing code was using the old, deprecated function names, which causesAttributeError
exceptions for any user with an up-to-dateh3
installation.This commit updates all calls to the
h3
library ingraph_weather/models/layers/encoder.py
andgraph_weather/models/layers/assimilator_decoder.py
to use the new, correct function names, resolving the dependency conflict.Fixes #
How Has This Been Tested?
This is a direct API update to fix a dependency incompatibility. The changes were validated by confirming that the code now initializes and runs without the
AttributeError
exceptions that were previously occurring. The project's existing CI test suite has provided the final validation for correctness.If your changes affect data processing, have you plotted any changes? i.e. have you done a quick sanity check?
Checklist: