Skip to content
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

uber h3 is now at version 4.0 with breaking API changes #139

Open
robfitzgerald opened this issue Mar 8, 2023 · 7 comments
Open

uber h3 is now at version 4.0 with breaking API changes #139

robfitzgerald opened this issue Mar 8, 2023 · 7 comments
Labels
good first issue Good for newcomers
Milestone

Comments

@robfitzgerald
Copy link
Collaborator

robfitzgerald commented Mar 8, 2023

noted today that h3 is now at 4.0. the 4.0 API changes the name of methods. straight off the top of the documentation, the 3.x geo_to_h3 and h3_to_geo functions have been renamed latlng_to_cell and cell_to_latlng.

a quick immediate update is to restrict h3 versions to 3.x in our pyproject.toml, and long-term, we should update to the latest version or provide an abstraction to support both versions.

note: most h3 functionality occurs in h3_ops.py.

@robfitzgerald robfitzgerald added this to the FY23 Q2 milestone Mar 8, 2023
@robfitzgerald robfitzgerald changed the title h3 is now at version 4.0 with breaking API changes uber h3 is now at version 4.0 with breaking API changes Mar 8, 2023
@robfitzgerald robfitzgerald modified the milestones: FY23 Q2/Q3, PyCon 2023 Apr 4, 2023
@robfitzgerald robfitzgerald added the good first issue Good for newcomers label Apr 4, 2023
@clintonsteiner
Copy link
Contributor

Would like to move to version 4, import h3
20 files total that need to be updated
rg 'import h3' | wc -l

@clintonsteiner
Copy link
Contributor

https://h3geo.org/docs/library/migration-3.x/functions looks like the functions were just renamed, working on updating now

@clintonsteiner
Copy link
Contributor

3.7.6 is latest stable version
find . -type f -exec sed -i 's/h3.geo_to_h3/h3.latLngToCell/g' {} ;
Here is the sed command I used to begin updating using the reference above
https://github.com/uber/h3-py

@nreinicke
Copy link
Collaborator

Considering that version 4.0 isn't yet stable we should probably hold off on including it as a required dependency. Maybe we defer this until 4.0 is the de-facto version?

@robfitzgerald
Copy link
Collaborator Author

3.7.6 is latest stable version

right. sorry, i only checked the base library when i created this ticket. it appears that the python bindings for the core h3 library haven't caught up to the v4.1.0 c lib. and, ya, let's hold off on committing then until 4+ goes stable for python. should we create a temp branch off the hive repo to merge this work into? thanks for your work @clintonsteiner.

@clintonsteiner
Copy link
Contributor

Going to have a tough time replacing polyfill, leaving that for your team.
Only one usage in geofence.py, replacements are cells_to_polygon or polygon_to_cells

@clintonsteiner
Copy link
Contributor

#181
Put this in draft status here, until uber h3 goes stable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants