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

Compare commits

...

99 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
75 changed files with 4307 additions and 2834 deletions

85
.gitignore vendored