Skip to content

Commit

Permalink
h4 > 4 dependency release (#257)
Browse files Browse the repository at this point in the history
* Update poetry.lock

* add tests for python 3.13

* simplifly pip implementation selection

* Update CHANGELOG.rst

* Update 3_about.rst

* bump version 6.5.4

* remove python 3.13 numba tests
  • Loading branch information
jannikmi authored Oct 22, 2024
1 parent 4b18e9e commit c101b3f
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 17 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
env:
TOXENV: ${{ matrix.tox-env }}
TOX_SKIP_MISSING_INTERPRETERS: False
Expand Down Expand Up @@ -58,7 +59,7 @@ jobs:
matrix:
os: ["ubuntu-latest"]
cibw_arch: ["native"]
cibw_build: ["cp38-* cp39-* cp310-* cp311-* cp312-*"]
cibw_build: ["cp38-* cp39-* cp310-* cp311-* cp312-* cp313-*"]
fail-fast: false

steps:
Expand Down
10 changes: 8 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,22 @@ Changelog
=========


6.5.4 (2024-10-22)
------------------

* using the dependency ``h3>4``. Thanks to `Greg Meyer <https://github.com/gmmeyer>`__


6.5.3 (2024-09-16)
------------------

* updated the data to `2024b <https://github.com/evansiroky/timezone-boundary-builder/releases/tag/2024b>`__.

* refactored C lang point in polygon utils

6.5.2 (2024-06-17)
------------------

* added support for numpy>=2.0 (fixes issue #234)
* added support for ``numpy>=2.0`` (fixes issue #234)


6.5.1 (2024-06-14)
Expand Down
1 change: 1 addition & 0 deletions docs/3_about.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,4 @@ Thanks to:
- `synapticarbors <https://github.com/synapticarbors>`__ for fixing Numba import with py27.
- `zedrdave <https://github.com/zedrdave>`__ for valuable feedback.
- `Tyler Huntley <https://github.com/Ty1776>`__ for adding docstrings
- `Greg Meyer <https://github.com/gmmeyer>`__ for updating h3 to >4
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "timezonefinder"
version = "6.5.3"
version = "6.5.4"
description = "python package for finding the timezone of any point on earth (coordinates) offline"
authors = ["jannikmi <[email protected]>"]
license = "MIT"
Expand Down Expand Up @@ -92,7 +92,8 @@ legacy_tox_ini = """
[tox]
isolated_build = true
envlist =
docs,py{38,39,310,311,312}{,-numba,-pytz}
# TODO python 3.13 with numba
docs,py{38,39,310,311,312}{,-numba,-pytz},py313{,-pytz}
[gh-actions]
python =
Expand All @@ -101,7 +102,8 @@ legacy_tox_ini = """
3.10: py310{,-numba,-pytz}
3.11: py311{,-numba,-pytz}
3.12: py312{,-numba,-pytz}
# TODO also -numba
3.13: py313{,-pytz}
[testenv:docs]
description = build documentation
Expand Down
12 changes: 4 additions & 8 deletions timezonefinder/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import numpy as np
from numpy import int64

from timezonefinder.utils_clang import pt_in_poly_clang, clang_extension_loaded
from timezonefinder.configs import (
COORD2INT_FACTOR,
INT2COORD_FACTOR,
Expand Down Expand Up @@ -138,14 +139,9 @@ def pt_in_poly_python(x: int, y: int, coords: np.ndarray) -> bool:

inside_polygon: Callable[[int, int, np.ndarray], bool]
# at import time fix which "point-in-polygon" implementation will be used
if not using_numba:
# use the C implementation if Numba is not present
try:
from utils_clang import pt_in_poly_clang

inside_polygon = pt_in_poly_clang
except ImportError:
inside_polygon = pt_in_poly_python
if clang_extension_loaded and not using_numba:
# use the C implementation only if Numba is not present
inside_polygon = pt_in_poly_clang
else:
# use the (JIT compiled) python function if Numba is present or the C extension cannot be loaded
inside_polygon = pt_in_poly_python
Expand Down

0 comments on commit c101b3f

Please sign in to comment.