0
Fork 0
mirror of https://github.com/uber/h3-py.git synced 2026-11-16 07:44:46 +00:00

Compare commits

..

141 commits

Author SHA1 Message Date
Jongbin Jung
cb852ab893
Merge pull request #515 from jongbinjung/fix-coverage-identity-binding
Exclude identity-binding block from coverage to fix CI on master
2026-11-13 15:54:06 -08:00
Jongbin Jung
bec9b81090 Exclude identity-binding block from coverage
The block added in #504 only runs when `_out_scalar is _in_scalar`, which
is true for basic_int, numpy_int, and memview_int, but not for basic_str.
Coverage is only measured on the basic_str copy of the shared API file,
so the block showed up as uncovered and failed the 100% coverage gate on
master.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-13 15:43:39 -08:00
Jongbin Jung
c00866b555
Merge pull request #504 from connerkup/fix/501-identity-out-scalar-wrapper
perf: bind scalar functions directly to _cy when _out_scalar is identity (#501)
2026-11-13 15:14:23 -08:00
Jongbin Jung
405a1f61d5
Merge pull request #513 from jongbinjung/changelog-unreleased-updates
Add missing items from changelog
2026-11-13 14:08:44 -08:00
Jongbin Jung
9a26dc6477 Add missing items from changelog 2026-11-13 14:08:01 -08:00
Jongbin Jung
87d1ccb8c4
Merge pull request #511 from sebxt/fix/geo-empty-polygon-typeerror
Handle empty GeoJSON Polygon in geo_to_h3shape
2026-11-13 13:39:59 -08:00
Jongbin Jung
cc6f8825ca
Merge pull request #512 from kwy404/fix-multipoly-experimental-duplicates
fix: don't return a cell twice from h3shape_to_cells_experimental for a LatLngMultiPoly
2026-11-13 13:38:19 -08:00
kwy404
8db9a2f962 fix: don't return a cell twice from h3shape_to_cells_experimental for a LatLngMultiPoly 2026-10-23 17:40:02 -03:00
Sebastian Turner
1c84623b12
Handle empty GeoJSON Polygon in geo_to_h3shape
Signed-off-by: Sebastian Turner <sebastiant3484@gmail.com>
2026-10-20 16:47:26 -07:00
Jongbin Jung
b74c0e35c6
Merge pull request #509 from auraseb/fix/average-hexagon-rads-unit
Support rads units in average_hexagon_area and average_hexagon_edge_length
2026-10-19 16:27:37 -07:00
Sebastian Turner
f423ef9b8d
Support rads units in average_hexagon_area and average_hexagon_edge_length
Signed-off-by: Sebastian Turner <sebastiant3484@gmail.com>
2026-10-19 15:56:52 -07:00
Jongbin Jung
f9e35e3944
Merge pull request #506 from shaan-forks/ci/python-3.15
Add CI test and build for Python 3.15 and 3.15t
2026-10-19 14:17:19 -07:00
Jongbin Jung
83fac55493
Merge pull request #507 from kwy404/fix-is-valid-out-of-range-index
fix: return False from is_valid_* for indexes outside the uint64 range
2026-10-19 11:23:25 -07:00
kwy404
b19b0421fe fix: return False from is_valid_* for indexes outside the uint64 range 2026-10-10 21:26:03 -03:00
Shaan Majid
93b40427d0
Add CI test and build for Python 3.15 and 3.15t 2026-10-09 17:49:47 -07:00
Jongbin Jung
169035d81d
Merge pull request #505 from kwy404/fix-latlngpoly-closed-ring-validation
fix: validate LatLngPoly loop length after dropping the closing point
2026-10-08 21:21:49 -07:00
kwy404
c0e89d0ff9 fix: validate LatLngPoly loop length after dropping the closing point 2026-10-01 18:48:06 -03:00
Conner Kupferberg
47efd3266c perf: bind scalar functions directly to _cy when _out_scalar is identity (#501)
In h3.api.basic_int, numpy_int, and memview_int, _out_scalar is the identity
function, incurring unnecessary Python function call frames and wrapper
overhead on every scalar call.

When _out_scalar is _in_scalar (integer-returning flavours), bind scalar
functions directly to their _cy Cython implementations while preserving
original docstrings and signatures.

Eliminates ~18% (and up to 50%+ on ARM) latency on scalar calls.

Fixes #501.
2026-09-22 05:16:00 +00:00
Jongbin Jung
c38c1e42c3
Merge pull request #502 from dyrpsf/fix-geo-type-validation
fix: replace geo input assert with ValueError and add test
2026-09-08 14:32:12 -07:00
dyrpsf
631d8a6e43 test: consolidate test_bad_geo_input to fix linter error 2026-08-27 09:36:30 +05:30
Deepak Yadav
856558d08e
Merge branch 'master' into fix-geo-type-validation 2026-08-26 22:08:55 +05:30
dyrpsf
c7b48389da fix: replace geo input assert with ValueError and add test 2026-08-26 22:04:52 +05:30
Jongbin Jung
871841452f
Merge pull request #499 from jongbinjung/jongbin/freethreading
Add CI test and build for python3.14t
2026-08-24 14:16:37 -07:00
Jongbin Jung
51dbbeb74f
Merge pull request #500 from Hashim1999164/fix/geo-to-h3shape-replace-assert
Raise ValueError instead of assert in geo_to_h3shape
2026-08-24 14:15:06 -07:00
Hashim1999164
a4bc7398f4 Raise ValueError instead of assert in geo_to_h3shape
The leftover assert isinstance check tripped Bandit and was marked for removal. Invalid inputs now get an explicit ValueError.
2026-08-23 01:32:12 +05:00
Jongbin Jung
af962c0ab4
Merge pull request #497 from dyrpsf/test-uncompact-resolution
test: add test for uncompacting to a coarser resolution
2026-08-14 12:01:10 -07:00
Jongbin Jung
e3b0a6d96d Add CI test and build for python3.14t 2026-08-12 12:52:02 -07:00
Jongbin Jung
65f85a58a3
Merge pull request #493 from aureliobarbosa/test_python3.14_freethreaded
Fix wheels for python 3.14 free thread
2026-08-12 10:29:17 -07:00
Isaac Brodsky
70c65945e3
Merge pull request #495 from dyrpsf/feature-geojson-containers
Feat: Add explicit container options for GeoJSON outputs
2026-08-12 09:34:24 -07:00
dyrpsf
5dc46e4f28 test: update comment to match H3ResMismatchError 2026-08-03 21:43:59 +05:30
Isaac Brodsky
c86f442684
Merge pull request #496 from dyrpsf/test-formatting-cleanup 2026-08-03 08:48:18 -07:00
dyrpsf
822320f30b test: restore 0x prefix to match actual exception message 2026-08-02 10:05:10 +05:30
Deepak Yadav
58be699d13
Update tests/test_lib/test_cells_and_edges.py
Co-authored-by: Isaac Brodsky <isaac@isaacbrodsky.com>
2026-08-01 21:11:58 +05:30
Deepak Yadav
8cd64decd0
Update tests/test_lib/test_cells_and_edges.py
Co-authored-by: Isaac Brodsky <isaac@isaacbrodsky.com>
2026-08-01 21:07:42 +05:30
dyrpsf
2f62194f0f test: add test for uncompacting cells to a coarser resolution 2026-07-29 17:09:51 +05:30
dyrpsf
497aa4df24 test: clean up string formatting in test_parent_err 2026-07-26 22:13:45 +05:30
dyrpsf
55530fa42b test: move tests to test_lib for coverage; fix EOF newline 2026-07-26 09:59:02 +05:30
dyrpsf
03678bb3ed test: fix LatLngMultiPoly initialization to resolve CI crash and restore coverage 2026-07-25 23:16:31 +05:30
dyrpsf
a2add15580 test: verify MultiPolygon to MultiPolygon matching; fix line length 2026-07-23 12:26:50 +05:30
dyrpsf
e02b8a6e95 fix: raise ValueError for invalid or insufficient GeoJSON containers 2026-07-22 20:40:46 +05:30
dyrpsf
b1f5f9abc8 test: add unit tests for GeoJSON container options; fix linting 2026-07-22 16:02:28 +05:30
dyrpsf
1d358b275e feat: add container formatting options to GeoJSON outputs 2026-07-22 09:10:15 +05:30
Jongbin Jung
6fd9eff86b
Merge pull request #494 from dyrpsf/fix-android-cross-compile
Fix: Resolve Android cross-compilation failure (Issue #458)
2026-07-13 14:50:35 -07:00
Jongbin Jung
d44676e44f
Merge pull request #490 from arpitjain099/chore/declare-workflow-perms
ci: declare contents:read on lint_and_coverage workflow
2026-07-13 09:42:49 -07:00
dyrpsf
4e9d379a20 build: detect Buildozer environment to fix Android cross-compilation 2026-07-07 15:23:28 +05:30
Marco Barbosa
1ed3273533 adds trove for python free threading and changelog 2026-06-18 00:04:12 +00:00
Marco Barbosa
33badf14f2 annotates .pyx cython files as compatible with freethreading python 2026-06-17 23:44:05 +00:00
Arpit Jain
7d1df6e070
ci: declare contents:read on lint_and_coverage workflow
Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
2026-06-10 16:25:52 +09:00
Jongbin Jung
2883945e34
Merge pull request #492 from uber/jb/4.5.0
Prep for v4.5.0 release
2026-05-29 17:47:53 -07:00
Jongbin Jung
a663439e0e
Prep for v4.5.0 release 2026-05-29 09:15:58 -07:00
AJ Friend
40910c1291
prep for v4.5.0a3 (#491)
* bump C lib to v4.5.0

* add (#491)
2026-05-28 12:36:48 -07:00
Marco Barbosa
f175d06282
updates readme.md clone instructions (#489) 2026-04-19 22:24:41 -07:00
zabop
13c17b5067
make docstring reflect what the function does (#486) 2026-03-26 13:59:38 -07:00
AJ Friend
adba976e22
v4.5.0a2 (#484)
* first pass

* helper

* better tests

* changelog

* better comments

* be robust against os-specific floating point behavior
2026-02-27 19:28:16 -08:00
AJ Friend
9a7d6dfd6f
v4.5a (alpha version) (#483)
* bump h3lib to unreleased a9c0a2e (cellsToMultiPolygon)

* initial changes

* move around dependencies

* update CI

* ci separation

* h3.pc.in

* clean up .gitignore

* changelog

* better changelog

* add cellsToMultiPolygon to h3-py in separate release

* sdist exclude and coverage for version test

* warn that changing some justfile rules will affect CI

* try to silence some CI warnings

* one more warning
2026-02-26 14:12:54 -08:00
Salman Chishti
4d0c33241b
Upgrade GitHub Actions to latest versions (#480)
Signed-off-by: Salman Muin Kayser Chishti <13schishti@gmail.com>
2026-02-15 13:25:25 -08:00
Salman Chishti
3355f53aa6
Upgrade GitHub Actions for Node 24 compatibility (#479)
Signed-off-by: Salman Muin Kayser Chishti <13schishti@gmail.com>
2026-02-11 12:51:02 -08:00
AJ Friend
26084144a2
prep for v4.4.2 release (#478) 2026-01-29 10:20:16 -08:00
AJ Friend
44dd11fd10
check for error from cellsToLinkedMultiPolygon; add test (#477) 2026-01-29 09:35:34 -08:00
AJ Friend
486f6efd39
Prep for v4.4.1 release (#475) 2025-12-15 13:44:12 -08:00
AJ Friend
7d6d37945d
Avoid building duplicate wheels (#474)
* avoid building duplicate wheels

* add additional CI twine check

* add back macos-14 (should fail)

* remove macos-14 (should pass)
2025-12-15 10:56:09 -08:00
AJ Friend
b70122a20e
Update version badge for h3 to v4.4.1 (#473) 2025-12-15 10:44:10 -08:00
AJ Friend
9f52d74458
attempt to fix docs publishing (#472) 2025-12-14 14:17:09 -08:00
AJ Friend
73cd306f07
Prep for release of v4.4.0 (#471) 2025-12-12 13:10:22 -08:00
AJ Friend
f9c1a944d1
Bump h3lib to v4.4.1 and add new functions/errors (#470)
* bump h3lib to v4.4.0

* bump h3lib to v4.4.1

* tests pass with new version

* add new error codes and some helper functions around error codes

* jupyter-book<2

* is_valid_index

* tests for is_valid_index and get_index_digit

* linting

* good set of tests

* lint

* thank you, coverage tests for tests!

* int api test

* function docstrings

* maybe not

* changelog. don't expose error code helper functions (yet)

* ticks

* don't even mention 'em

* `list` rather than `tuple`, since users are likely to mutate result

* remove justfile

* failing tests

* tests should be passing

* more tests

* swap docs order
2025-11-22 08:17:21 -08:00
AJ Friend
23bef19c74
remove macOS13 from wheels. add macOS15 (#468)
* remove macOS13 from wheels. add macOS15

* bump to pypa/cibuildwheel@v3.2.1

* bump actions/setup-python@v6.0.0

* bump actions/upload-artifact@v5.0.0

* bump actions/checkout@v5.0.0

* bump actions/download-artifact@v6.0.0

* bump docker/setup-qemu-action@v3.6.0

* run tests on Python 3.14

* Add a few wheels for Python 3.14

* bump python-version: 3.13

* Revert "bump python-version: 3.13"

This reverts commit 8119c62cb6.
2025-11-02 08:23:06 -08:00
dependabot[bot]
99b62102b0
Bump pypa/gh-action-pypi-publish in /.github/workflows (#466)
Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.10.3 to 1.13.0.
- [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases)
- [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.10.3...v1.13.0)

---
updated-dependencies:
- dependency-name: pypa/gh-action-pypi-publish
  dependency-version: 1.13.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-06 16:46:17 -07:00
AJ Friend
bd455be975
prep for v4.3.1 release (#464) 2025-08-10 12:30:56 -07:00
newyork_loki
4fc8ec9ca6
Add support for building h3-py wheel on WoA (#463)
* Add support for building h3-py wheel on WoA

* Use official MSVC reusable action for Win-builds
2025-08-10 11:34:06 -07:00
AJ Friend
ce0638d7ce
prep for 4.3.0 release (#462) 2025-06-18 09:20:22 -07:00
Isaac Brodsky
cc07b58240
Merge pull request #461 from isaacbrodsky/bump-4.3.0 2025-06-17 20:41:03 -05:00
Isaac Brodsky
a8c5ae7b27 fix version 2025-06-17 17:52:00 -05:00
Isaac Brodsky
45d9c3f482 fix 2025-06-17 17:50:19 -05:00
Isaac Brodsky
f82581f512 pr number 2025-06-17 16:58:26 -05:00
Isaac Brodsky
e80494c8ea readme 2025-06-17 16:57:55 -05:00
Isaac Brodsky
e2744ccbcf update for h3 4.3.0 2025-06-17 16:57:21 -05:00
AJ Friend
856d481de3
prep for v4.2.2 release (#451) 2025-03-10 11:30:25 -07:00
Isaac Brodsky
5b6382d120
bump to h3 4.2.1 (#450) 2025-03-10 09:27:55 -07:00
Sukhdeep Gill
b40bc47f77
reducing width for the H3 Logo so that it comes before the horizontal line (#447) 2025-02-22 09:16:42 -08:00
AJ Friend
ae375a987c
fix links (#444) 2025-01-31 14:32:21 -08:00
Isaac Brodsky
259a915cdd
Merge pull request #443 from uber/isaacbrodsky-patch-1
Update coverage badge in readme.md
2025-01-31 12:05:12 -08:00
Isaac Brodsky
e02cd4f4f9
Update coverage badge in readme.md
Fixes #439
2025-01-30 20:49:51 -08:00
Isaac Brodsky
554aceef60
Merge pull request #441 from isaacbrodsky/update-pyproject-links
Fix pyproject.toml links
2025-01-30 15:30:32 -08:00
Isaac Brodsky
ea05321c1d Fix pyproject.toml links 2025-01-30 13:41:06 -08:00
AJ Friend
e054120e1b
Prep for v4.2.0 release (#438)
* prep for v4.2.0 release

* ensure you update the badge on the readme
2025-01-27 11:38:18 -08:00
AJ Friend
1ac484a8db
h3shape_to_cells_experimental takes string containment modes (#436)
* polygon to cells just takes string arguments

* don't need enum

* docstrings

* have tests use h3shape_to_cells_experimental

* clean up tests

* don't repeat tests

* experimental warning

* Being experimental, try `contain` instead of `containment` in params

* try typing with literal

* add polygon_to_cells_experimental.

Contains coverage and lint errors -- just checking that they raise in CI

* ruff fix

* docs and changelog

* add test_polygon_to_cells_experimental for full coverage

* test notes
2025-01-26 16:57:31 -08:00
AJ Friend
1dc5e51740
drop v4 announcement from readme (#437)
* drop v4 announcement from readme

* drop a todo that never got todone

* codecov todo
2025-01-01 16:07:44 -08:00
AJ Friend
3d5b12a370
Simplify coverage and lint actions v2 (#435)
* simplify coverage and lint actions

* move around the testing for coverage

* try 3.11

* clean up a bit

* separate tests

* run tests twice

* no coverage target for cython tests

* full tests for polygon_to_cells_experimental

* i think that gets the actions how we want
2024-12-29 11:15:46 -08:00
Isaac Brodsky
ef6e897731
upgrade to h3 v4.2.0 (#432)
* upgrade to h3 v4.2.0

* fix lint

* pr number

* split out experimental function to new function

* docs
2024-12-28 19:14:29 -08:00
AJ Friend
e9506ffa6d
2nd attempt at ruff (#428)
* starting

* ruff config

* fix notebook

* more rules

* F rules

* sort rules

* Q rules

* remove F401

* sort

* don't ignore F841

* being ridiculous

* some todo rules

* try gh action

* a few more ideas to try

* gitignore

* clean up toml
2024-10-28 13:31:38 -07:00
AJ Friend
d061d810c6
Build 3.13 wheels (#425)
* Build 3.13 wheels

* bump to pypa/cibuildwheel@v2.21.3

* a few more 3.13s

* uses: actions/setup-python@v5.3.0

* actions/checkout@v4.2.2

* docker/setup-qemu-action@v3.2.0

* actions/upload-artifact@v4.4.3

* actions/download-artifact@v4.1.8

* pypa/gh-action-pypi-publish@v1.10.3

* Steal from #416

* note PR
2024-10-26 20:16:13 -07:00
Isaac Brodsky
4ccb2a2550
Update readme.md to show bound H3 version (#421) 2024-10-14 12:10:57 -07:00
AJ Friend
3c1d235ac7
Make sure docs and PyPI page are up-to-date. (#419) 2024-10-13 17:53:39 -07:00
AJ Friend
a4515def0d
post release notes (#418) 2024-10-13 17:33:40 -07:00
AJ Friend
a8f9a085fd
prep for final v4.1.0 release (#407) 2024-10-13 17:06:08 -07:00
AJ Friend
6d9a5fccd6
Prep for v4.1.0b3 release (#414) 2024-10-05 22:07:36 -07:00
Jongbin Jung
24074aeb15
Allow string subtypes as H3str (#411)
* Add test for string subtypes

* Allow string subtypes as H3str
2024-10-05 18:53:55 -07:00
Jongbin Jung
91ab2bf3ea
Use local lcov for PRs and codecov for push to master (#413) 2024-10-05 14:00:48 -07:00
Jongbin Jung
98bf22a9da
Support str-like values for str_to_int (#408)
* Add failing test

* Explicitly convert to str before calling _cy.str_to_int
2024-10-05 10:43:40 -07:00
AJ Friend
5d9acb06e0
Prep for v4.1.0b2 (#406) 2024-09-27 15:39:09 -07:00
AJ Friend
259f31b6c8
cell_to_child_pos, child_pos_to_cell, cell_to_children_size (#405)
* cell_to_child_pos and child_pos_to_cell

* start exposing cell_to_children_size

* checking resolutions

* cell_to_children_size python function

* adding tests from https://github.com/uber/h3-py/pull/404

* fiddling

* fix test_cell_to_vertex; helps coverage by removing untouched branch

* more tests

* lint

* exhaustive test for a few resolution pairs

* lint

* doc strings

* error messages

* stricter test

* playing with argument order. example code in tests looks nicer

* use parent_res instead of res

* Use `res_*` instead of `*_res`

* fix up changelog
2024-09-27 15:25:56 -07:00
AJ Friend
b168018dae
Prep for v4.1.0b1 release (#403) 2024-09-26 19:08:35 -07:00
AJ Friend
7cea748f5a
bump h3lib to v4.1.0 (#402)
* bump h3lib to v4.1.0

* passing tests
2024-09-26 18:50:06 -07:00
AJ Friend
919aad8b5d
polygon_to_cells alias (#399) 2024-09-26 14:51:27 -07:00
AJ Friend
6c4ae92b24
i like this order better (#400) 2024-09-26 12:44:01 -07:00
AJ Friend
5c8e100fdc
prep for beta 7 release (#397) 2024-09-04 15:24:32 -07:00
AJ Friend
65c3d9e105
Trying pyproject.toml and scikit-build-core (#378)
* trying a scikit-build-core setup

* trying things

* vendor FindCython

* fix build

* remove unused

* cython tests working

* fix lint action

* coverage fix

* drop annotation stuff for now, because i can't get it working

* book building

* all target

* try again

* don't install all

* numpy!

* pip install h3.tar.gz[test]

* drop wheel builds for 3.6 and 3.7

* move coverage config to pyproject.toml

* remove requirements-dev.txt

* remove cmake from the build system requirements

* single sourcing the version number in _version.py

* i think scikitbuild-core doesn't work with dynamic = ['version']. try something else

* uber's

* alphabetical files in cmakelists.txt

* tidy up files in the sdist

* move pytest config to pyproject.toml

* CIBW_TEST_COMMAND: pytest

* CIBW_TEST_COMMAND: pytest {project}/tests

* CIBW_TEST_REQUIRES: pytest pytest-cov numpy

* get better coverage on the testing code

* fix api reference link (#385)

* Added Bindings for Vertex-Related Functions (#388)

* Update CHANGELOG.md

* Update h3lib.pxd

* Update latlng.pxd

* Update latlng.pyx

* Update util.pxd

* Update util.pyx

* Update _version.py

* Update __init__.py

* Update __init__.py

* Update test_h3.py

* Update __init__.py

* Update test_h3.py

* Update CHANGELOG.md

* Update __init__.py

* Update test_h3.py

* Update _version.py

* Update test_h3.py

* Update __init__.py

* Update CMakeLists.txt

* Update latlng.pxd

* Update latlng.pyx

* Create vertex.pxd

* Create vertex.pyx

* Update __init__.py

* Update test_h3.py

* Update __init__.py

* Update api_quick.md

* Bump actions/download-artifact from 4.1.4 to 4.1.7 in /.github/workflows (#392)

Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.1.4 to 4.1.7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4.1.4...v4.1.7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* prep for v4.0.0b6 release (#394)

* alphabetical files in cmakelists.txt

* single

* test with numpy>=2

* drop lower bound on numpy version

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Isaac Brodsky <isaac@isaacbrodsky.com>
Co-authored-by: Pieter Provoost <pieterprovoost@gmail.com>
Co-authored-by: Shiran Yuan <shiran.yuan@outlook.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-04 15:02:35 -07:00
AJ Friend
cec946a879
prep for v4.0.0b6 release (#394) 2024-09-03 17:13:21 -07:00
dependabot[bot]
4ced53da82
Bump actions/download-artifact from 4.1.4 to 4.1.7 in /.github/workflows (#392)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4.1.4 to 4.1.7.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4.1.4...v4.1.7)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-03 16:12:49 -07:00
Shiran Yuan
46a7181b3f
Added Bindings for Vertex-Related Functions (#388)
* Update CHANGELOG.md

* Update h3lib.pxd

* Update latlng.pxd

* Update latlng.pyx

* Update util.pxd

* Update util.pyx

* Update _version.py

* Update __init__.py

* Update __init__.py

* Update test_h3.py

* Update __init__.py

* Update test_h3.py

* Update CHANGELOG.md

* Update __init__.py

* Update test_h3.py

* Update _version.py

* Update test_h3.py

* Update __init__.py

* Update CMakeLists.txt

* Update latlng.pxd

* Update latlng.pyx

* Create vertex.pxd

* Create vertex.pyx

* Update __init__.py

* Update test_h3.py

* Update __init__.py

* Update api_quick.md
2024-08-27 08:05:20 -07:00
Pieter Provoost
e0e269d524
fix api reference link (#385) 2024-08-25 10:35:08 -07:00
AJ Friend
d3f6c1d27d
prep for v4b5 release (#372) 2024-05-19 09:51:59 -07:00
AJ Friend
d1f84f59e6
Handle polygons with z-coordinate (#371)
* failing test

* better test

* lint

* dah! lat/lng order *still* trips me up!

* 3d poly test

* names and notes

* fix accidental replace from when we changed names to LatLngPoly
2024-05-19 08:35:32 -07:00
AJ Friend
f0fc6df6c3
Introduce LatLngPoly and LatLngMultiPoly (#364)
* introduce LatLngPoly

* LatLngPoly in files other than *.py

* drop 3.7 tests

* intro LatLngMultiPoly to .py files

* ...and to non .py files

* h3shape to just shape in .py files

* Class names

* function names

* H3Shape -> Shape

* filename

* Revert "H3Shape -> Shape"

This reverts commit 389725312f.

* Revert "filename"

This reverts commit b263a3e9dc.

* revert

* fix docs

* fix what David found

* rename params from `shape` to `h3shape`

* ...and a few more

* one more

* def cells_to_h3shape(cells, *, tight=True)
2024-05-18 09:46:14 -07:00
AJ Friend
26285eff78
Docs for polygon interface (#362)
* initial stab at documenting polygon interface

* Separate out verbose descriptions

* Nicer flow

* improvements

* avoid using "set"

* move compact functions

* move geo functions

* "grid distance" is better than "H3 distance"

* lint

* units

* clean up contributing

* warning about function name changes

* don't need to specify title

* update copyright

* add a warning about lat/lng order

* try this

* give the geo_interface link

* sphinx 7.3 introduced an issue

* document bug

* better organization of functions

* green is a friendlier color

* don't need this

* sphinx bug is fixed with 7.3.3
2024-04-17 09:32:40 -07:00
AJ Friend
cd59584b83
update cibw (#359)
* docs building correctly again

* drop beta announcement

* cleaning up docs a bit

* i think this is where it was at...

* bump beta in readme announcement

* update action

* pssssst. it's a secret

* separate upload docs step

* setps taken

* want --warningiserror

* need requirements for notebook

* no need to run linter here

* does this default thing work?

* alas, chatgpt led me astray

* gimme an artifact to check

* bump to actions/upload-artifact@v4.3.1

* slightly better names

* artifacts need names now

* set python version for sdist

* try this one

* all unique names

* try cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}

* try merge action

* try combining sdist and wheels into single result

* upload should work

* bump to pypa/gh-action-pypi-publish@v1.8.14

* try pypa/cibuildwheel@v2.17.0

* Revert "try pypa/cibuildwheel@v2.17.0"

This reverts commit fa8f7c9ab3.

* SDist doesn't need a strategy matrix

* shorten names for cibw

* bump actions/download-artifact@v4.1.4

* bump pypa/cibuildwheel@v2.17.0

* .

* shouldn't need CIBW_SKIP

* keep intermediate results for comparison for now

* see if that gets us building the correct subset

* formatting

* split up musllinux because it currently takes 20 minutes

* can still include cp36-manylinux_aarch64

* delete-merged

* test dropping CIBW_ARCHS_MACOS
2024-04-15 15:06:36 -07:00
AJ Friend
b0fe56772d
Fix docs upload (#361)
* try to fix deploy docs step

* should run just on a PR like this

* try it without the separate step

* do it as a step instead of a separate job
2024-04-14 11:41:10 -07:00
AJ Friend
0a588ebef9
release to test PyPI upload works after artifact changes (#360)
* release to test PyPI upload works after artifact changes

* PR for context
2024-04-14 10:38:11 -07:00
AJ Friend
c09c43ef0a
Update docs to include polygon tutorial (#355)
* docs building correctly again

* drop beta announcement

* cleaning up docs a bit

* i think this is where it was at...

* bump beta in readme announcement

* update action

* pssssst. it's a secret

* separate upload docs step

* setps taken

* want --warningiserror

* need requirements for notebook

* no need to run linter here

* does this default thing work?

* alas, chatgpt led me astray

* gimme an artifact to check

* bump to actions/upload-artifact@v4.3.1

* slightly better names

* artifacts need names now

* set python version for sdist

* try this one

* all unique names

* try cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}

* try merge action

* try combining sdist and wheels into single result

* upload should work

* bump to pypa/gh-action-pypi-publish@v1.8.14

* try pypa/cibuildwheel@v2.17.0

* Revert "try pypa/cibuildwheel@v2.17.0"

This reverts commit fa8f7c9ab3.

* SDist doesn't need a strategy matrix

* shorten names for cibw

* bump actions/download-artifact@v4.1.4
2024-04-14 09:36:07 -07:00
AJ Friend
89c3720e13
Prep for v4.0.0b3 release (#351) 2024-03-12 13:43:50 -07:00
Tim Süll
bc9e8857a9
Moved cython tests to own folder (#349)
* fix: moved cython_example.pyx and test_cython.py tests to their own folder

* updated test.yml and makefile

* fix: updated coverage-lint.yml to match new path

* fix: all *.c files in tests/ folder and subfolders of tests/ will now be ignored

---------

Co-authored-by: Tim S <racer4308@gmail.com>
2024-03-11 19:26:56 -07:00
AJ Friend
eda61ba78f
update actions (#348)
* update action to actions/setup-python@v5.0.0

* to actions/upload-artifact@v4.3.1

* to codecov/codecov-action@v4.1.0

* to actions/checkout@v4.1.1

* Revert "to codecov/codecov-action@v4.1.0"

This reverts commit 353f48f1b6.

* Revert "to actions/upload-artifact@v4.3.1"

This reverts commit b6c6a00586.

* ilammy/msvc-dev-cmd@v1.13.0

* docker/setup-qemu-action@v3.0.0

* ubuntu-22.04

* drop 3.6

* peaceiris/actions-gh-pages@v3.9.3

* Revert "Revert "to codecov/codecov-action@v4.1.0""

This reverts commit 63d8eb22d3.

* Revert "Revert "Revert "to codecov/codecov-action@v4.1.0"""

This reverts commit a55a14883b.
2024-03-10 17:58:25 -07:00
AJ Friend
946f698867
trying 3.12 wheels and tests (#347) 2024-03-09 17:08:01 -08:00
AJ Friend
e64ff6731b
Replace _out_unordered and _out_ordered with _out_collection (#339)
* Replace _out_unordered and _out_ordered with _out_collection

* update batch of tests

* lint

* few more tests

* group tests around APIs

* few more tests

* few more tests

* couple few

* final tests

* test_icosahedron_faces

* lint

* remove redundant tests

* consolidate same_set

* same_set

* update makefile

* remove the .so files

* Add note indicating that there is no guaranteed ordering of cells for many functions

* bump to pypa/cibuildwheel@v2.16.5
2024-03-09 16:26:03 -08:00
AJ Friend
158f52d9b6
Use functions instead of methods for the interface functions (#334)
* starting refactor

* remove stuff

* unindent

* remove self from function signatures

* remove self.

* remove staticmethod

* set up symlinks

* some linting

* test for bad H3Shape

* symlink note

* just put everything in __init__.py

* reorganize conversion functions

* rename _api_funcs.py to _convert.py

* use lazy import of numpy so we don't have to special case h3.api.numpy_int

* DRY
2024-01-01 15:15:30 -08:00
AJ Friend
831d50bbe3
GeoJSON functions (#301)
* polygons_to_cells

* Helpers for cells_to_geojson and geojson_to_cells

* ValueError

* Remove gj (#316)

* Remove geojson logic from cell_to_boundary and directed_edge_to_boundary

* fix a warning about return values in tests from pytest

* Remove geo_json logic from cells_to_multi_polygon

* remove some unused tests

* add back in polygons_to_cells

* actions/setup-python@v4.5.0

* Solution copied from https://github.com/actions/setup-python/issues/544

* playing around with polygons

* make a directory

* bah

* start migrating `h3.Polygon` to `H3Poly`

* migrate most

* finish migrating

* H3MultiPoly repr

* shape_to_cells and cells_to_shape

* tests: polygon_to_cells to shape_to_cells

* finish migrating tests

* update util.py and example

* notes

* bah

* fix lint

* fix

* remove X_to_shape

* run tests

* run other CIs too

* don't use f-string

* test update

* change errors per review

* remove unused per review

* fix lint

* test run

* fix exclude logic in tests

* " to ' in yaml

* move conversion logic to geo_to_cells function

* linting

* few more tests

* lint

* clean up

* complete tests

* group geojson/polygon tests into a folder

* move MockGeoInterface into the file that uses it

* move test_input_format to its own file, since it has a lot of helper functions not used elsewhere

* test module description

* rename _polygon.py to _h3shape.py

* make H3Shape an ABC

* shape -> h3shape

* geos to polys

* rename geo files to latlng

* docstrings

* __init__.py

* lint

* notebooks

* more interface tests

* notebooks

* merp

* clean up geo_to_h3shape()

* simplify sydney coords

* simplify far east test

* simplify sf coords

* tuples

* geo interface tests

* more interface tests

* clean up maine lat/lngs

* messed up lat/lng order in tests. this mistake gets made all the time!

* expand geo_to_h3shape test

* plotting with contextily and geoviews

* reprs for H3Shape objects should work better with geopandas

* different representations of the same information. which is best?

* us "loopcode" in H3Poly and H3MultiPoly reprs

* set tight=True as default

* can't use f-strings in python 3.5

* notebooks

* basic plotting

* plotting

* plotting

* tutorial notebook

* cleaning up

* clean up geoviews example

* remove geoviews example

* todos

* reworking tutorial order

* notebook dump

* cleaner

* move tutorial

* Update src/h3/api/_api_template.py

Co-authored-by: Jongbin Jung <jungjongbin86@gmail.com>

* Update src/h3/api/_api_template.py

Co-authored-by: Isaac Brodsky <isaac@isaacbrodsky.com>

* Update src/h3/api/_api_template.py

Co-authored-by: Jongbin Jung <jungjongbin86@gmail.com>

* setting loops

* bug and lint

---------

Co-authored-by: Isaac Brodsky <isaac@isaacbrodsky.com>
Co-authored-by: Jongbin Jung <jungjongbin86@gmail.com>
2023-12-30 15:16:02 -08:00
AJ Friend
c2a20d1c4c
Drop cibuildwheel v1 and 3.5 tests (#325)
* Drop cibuildwheel v1 and 3.5 tests

* try cibuildwheel@v2.15.0

* drop down to cibuildwheel@v2.14.1

* bump ubuntu from 20.04 to 22.04

* Revert "bump ubuntu from 20.04 to 22.04"

This reverts commit f94bea6d87.

* bump Python version from 3.8 to 3.11 for coverage/lint and docs

* bump cibuildwheel
2023-12-03 15:46:07 -08:00
Isaac Brodsky
f3f0144c76
Merge pull request #324 from uber/aj_update
Drop 2.7 tests and avoid Cython warning
2023-08-11 09:18:05 -07:00
AJ Friend
45d1df087e drop 2.7 2023-08-10 16:22:41 -10:00
AJ Friend
a02947be0d avoid cython warning 2023-08-10 16:17:59 -10:00
AJ Friend
ae9865c152
Update github actions (#317)
* actions/setup-python@v4.5.0

* Solution copied from https://github.com/actions/setup-python/issues/544
2023-03-25 21:39:00 -07:00
AJ Friend
c667719e4b
Update readme.md 2022-11-24 13:32:44 -08:00
AJ Friend
1e1459b336 Resetting the submodule 2022-11-24 13:30:31 -08:00
AJ Friend
3eece401ba
Prep for 4.0.0b2 release supporting py3.11 (#297)
* prep for 4.0.0b2 release supporting py3.11

* update cibuildwheel@v2.11.2

* update a few actions

* actions/setup-python@v4.3.0

* ilammy/msvc-dev-cmd@v1.12.0

* docker/setup-qemu-action@v2.1.0

* changelog
2022-11-23 16:25:00 -08:00
SADIK KUZU
939ebaa48e
Fix typos (#287)
* Fix typo

* Fix typo
2022-10-13 18:15:47 -04:00
AJ Friend
2b7ac39aa7
Update _api_template.py (#286) 2022-09-21 21:05:53 -04:00
AJ Friend
454a404fd1
Update readme.md 2022-08-28 16:45:30 -07:00
AJ Friend
d2ca8f31fa
beta announce admonition (#283)
* beta announce

* try this instead

* double the warning!

* meh, let's see how github renders it

* try the quote block again

* try br

* try some hrules

* bah

* move around

* merp

* headers

* revert because it adds a horizontal line in github

* ooofffffff
2022-08-26 16:37:19 -07:00
AJ Friend
5ed4102152
fix TODO issue with docs (#282) 2022-08-23 10:06:02 -07:00
AJ Friend
a12a887b9b
prep for v4.0 beta 1 release (#280) 2022-08-23 09:35:37 -07:00
AJ Friend
6462bf78a3
Merge dev_v4 into master (#250)
* WIP: Starting work on v4, The Sequel (#238)

* cimport for h3fake2 doesn't seem to work

* back to where we were

* meh, close to what i was hoping for

* h3fake2 in github actions

* comment out current bindings that consume the h3c v3 library

* don't need the coveragerc file at the moment; clear out c files in /tests

* sdist needs h3fake2

* try CIBW_BEFORE_BUILD to get h3fake2

* need h3fake2 for cibuildwheel tests

* update h3 C library

* comment out most of h3lib.pxd

* calling from v4 c lib works! (tests dont' work yet tho)

* tests shall pass

* starting to move over first few functions

* little steps

* util submodule fully moved over; some hackery with h3fake2 errors

* getting even trickier with h3fake2 errors

* few more simple functions

* geo_to_h3 and h3_to_geo

* grid_distance function

* grid_disk

* parents and kids

* compact/uncompact

* getNumCells

* comment out sdist test temporarily

* commenting out `make_sdist` seems to have turned off the other CI jobs

* no, it was that we're pushing to the dev branch

* keep the sdist job in there, but commented out

* ajfriend/more v4 funcs (#241)

* get_pentagon_indexes and get_res0_indexes

* line

* cell area functions

* get_faces (#248)

* initial pass

* thoughts

* the results of thinking

* this commit is associated with the previous commits

* nogil

* i'm a bill

* remove the typical nonsense

* v4: local ij functions to v4 cython (#240)

* move local ij functions to v4 implementation

* revert some changes and add gridPathCells

* swap implementation

* revert gridPathCells

* ring (#251)

* Uncomment cython example, and exclude sdist from wheels test temporarilty (#252)

* uncomment cython test

* exclude make_sdist temporarily from the wheels tests

* v4: polygonToCells (#254)

* v4: geo boundary, set to multi polygon (#255)

* v4: cell boundary

* v4: h3_set_to_multi_polygon

* v4: convert edge from h3fake2 (#253)

* v4: convert edge from h3fake2

* on error not neighbors

* except *

* check for neighbor error

* Fix sdist build (#239)

* make sure `make_sdist` CI job still broken

* reproduce locally

* update h3lib

* still seems broken

* try sdist on mac and ubuntu

* pyest!

* debugging

* ensurepath

* Disable building docs

* just build sdist once

* colon

Co-authored-by: Isaac Brodsky <isaac@unfolded.ai>

* remove h3fake2 transitional library (#257)

* Remove more sdist files (#259)

* remove scripts/examples/apps

* BUILD_FUZZERS OFF

* ENABLE_FORMAT off

* turn off all the things (and sort options)

* mac attack

* see if there's a build time difference

* back to the future

* New error system (#260)

* starting to play around with new error system

* move enum to h3lib.pxd

* this structure is weird :(

* error system gets its own file

* go back to using H3ErrorCodes

* extern the H3ErrorCodes

* remove H3Index in favor of just H3int

* " to '

* import ordering

* something

* exception hierarchy

* formatting

* errors list

* remove H3ResolutionError

* remove H3EdgeError

* remove H3CellError

* remove H3DistanceError

* H3FailedError

* domain error

* H3UnrecognizedException

* most of em done

* remove H3ValueError

* remove some checks

* ideas ideas

* document what the function raises?

* thoughts

* lint

* one half idea for DRYing (kinda)

* potentially make the E_SUCCESS path faster

* typos

* maple syrup

* cimport H3ErrorCodes as ec

* clean up

* whitespace

* clarify cases

* trying new error idiom

* thanks comment

* notes

* applied idiom a few times now

* alternative idiom?

* handling some more potential errors

* idioms and ideas

* clean

* removing check

* interesting allocation example

* lint

* just trying to beat 2.7 for sport right now

* works?

* bow to lint

* using enum values directly!

* now that's a hierarchy

* remove raise_with_msg

* ij funcs

* lint

* remove some checks

* remove err

* comment

* cleaned up `ring`, and i think i fixed a memory leak bug

* think i fixed another memory leak bug

* another memory leak bug

* memory leaks!

* clean

* removing some comments

* meh

* H3Exception shouldn't be appearing as a concrete object

* renaming some base exceptions

* clean up

* don't have a test for this anyway

* documented

* puttering around

* words

* backing up this nonsense with an airtight argument

* air toight

* todos

* more words

* skepticism

* rewording

* editing

* ordering

* tests on the error codes

* more error code tests

* note

* address some comments

* we raise!

* lint

* comments

* Squash #261: Use new H3MemoryManager system (#268)

* Squash #261: Use new H3MemoryManager system

Co-authored-by: AJ Friend <ajfriend@gmail.com>

* add some error checks

* comments

* comments

* clearer logical flow

* arrays are different from memoryviews!

* little cleaner

* Revert "comments"

This reverts commit 80c3f4d382.

* Revert "Revert "comments""

This reverts commit a9d6590b04.

* Revert "comments"

This reverts commit 24904bdcea.

* comments

* arrays are different from memoryviews!

* try _copy_to_mv

* i don't get enough opportunities to consider using the word "penultimate"

* ugh, and there i go using it incorrectly...

* hmmm. was this really all it was?

* That's what it was!

This reverts commit 7e72adb590.

* clarify branches

* remove simple_mv

* moving around

* clean up

* comments

* comments

* comments

Co-authored-by: Isaac Brodsky <isaac@unfolded.ai>

* remove: from h3 import h3 (#270)

* is_valid_cell (#269)

* Remove alias functions (#271)

* remove alias function hex_range

* note test_k_ring and test_hex_range are the same

* remove test_hex_range

* duplicate tests

* remove test_hex_range2

* same test

* remove test_hex_range_pentagon

* remove alias: k_ring_distances

* tests are the same!

* same test

* combine tests

* remove alias: h3_is_res_class_iii

* lint

* Update most functions to v4.0 names (#272)

* grid_distance

* cell_to_parent

* get_resolution

* is_pentagon

* is_res_class_III

* get_pentagons

* get_res0_cells

* get_base_cell_number

* compact and uncompact

* get_faces

* cell_to_boundary

* cell_to_latlng

* latlng_to_cell

* cell_to_children

* int_to_string and string_to_int

* cell_to_center_child

* moving things around

* is_valid_directed_edge

* grid_path_cells

* moving around

* cells_to_multi_polygon

* are_neighbor_cells

* cell_to_local_ij and local_ij_to_cell

* get_icosahedron_faces

* great_circle_distance

* get_num_cells

* note

* remove hex_range_distances and hex_ranges (easily implementable by user)

* grid_ring

* grid_disk

* moving around

* origin_to_directed_edges

* directed_edge_to_boundary

* cells_to_directed_edge

* directed_edge_to_cells

* todo: directedEdgeToCells

* get_directed_edge_origin

* get_directed_edge_destination

* grouping functions

* more grouping

* _binding to _b

* todos

* average_hexagon_area

* average_edge_length

* average_edge_length and edge_length

* average_hexagon_edge_length

* ordering

* more ordering

* Get the makefile working on Linux (#274)

* bump core lib to 4.0 rc5 (#275)

* bump core lib to 4.0 rc5

* more pythonic names for string<->int conversion functions

* cython hex2int to str_to_int to match the python functions

* better argument names for great_circle_distance

* great_circle_distance comments

* revert great_circle_distance tuple unpacking since it breaks python2. drop python 2 before release

* polygon_to_cells (#276)

* start converting tests over

* converted main tests

* linting

* better null island test

* test_compact_and_uncompact_cells

* convert a few more tests

* add h3.Polygon class

* lint

* migrating some tests

* this shift_circular_list thing makes these tests too hard to understand...

* remove shift_circular_list and convert a few more tests

* last of the tests in test_h3.py converted

* last of the tests converted

* note for polygons_to_cells in the future

* Try out a __repr__ for h3.Polygon

* test_polygon_class.py

* use `cells` instead of `hexes` throughout the library and tests

* docstring for Polygon

* docstrings for functions

* use `res` convention for resolution parameters

Co-authored-by: Isaac Brodsky <isaac@unfolded.ai>
Co-authored-by: David Ellis <isv.damocles@gmail.com>
2022-08-22 23:31:19 -07:00
109 changed files with 7904 additions and 5032 deletions

89
.gitignore vendored

Some files were not shown because too many files have changed in this diff Show more