Skip to content

Commit

Permalink
Installing h3 and ratelimit dependencies locally
Browse files Browse the repository at this point in the history
  • Loading branch information
sindhu-ranga committed Feb 6, 2025
1 parent 06b1ede commit 0c87003
Show file tree
Hide file tree
Showing 188 changed files with 24,711 additions and 35 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/build-and-deploy-release-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,41 +24,13 @@ jobs:
run: |
python -m pip install --upgrade pip setuptools wheel build twine
- name: Build wheels for selected dependencies
run: |
pip wheel -r requirements-build.txt -w dist
- name: Build distribution
run: |
python -m build --sdist
python -m build --wheel
- name: Check distribution
run: twine check dist/*

- name: Set up .pypirc
run: |
cat <<EOF > ~/.pypirc
[distutils]
index-servers =
pypi
placekey
testpypi
[pypi]
username = __token__
password = ${{ secrets.PYPI_API_TOKEN }}
[placekey]
repository = https://upload.pypi.org/legacy/
username = __token__
password = ${{ secrets.PYPI_API_TOKEN }}
[testpypi]
repository = https://test.pypi.org/legacy/
username = __token__
password = ${{ secrets.TEST_PYPI_API_TOKEN }}
EOF

- name: Upload to TestPyPI
env:
Expand Down
2 changes: 1 addition & 1 deletion placekey/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.0.27'
__version__ = '0.0.28'
3 changes: 2 additions & 1 deletion placekey/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import backoff
import requests
from backoff import on_exception, fibo
from ratelimit import limits, RateLimitException
from .vendor import ratelimit
from .vendor.ratelimit import limits, RateLimitException

from .__version__ import __version__

Expand Down
4 changes: 2 additions & 2 deletions placekey/placekey.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import json
from math import asin, cos, radians, sqrt

import h3
import h3.api.basic_int as h3_int
from .vendor import h3
from .vendor.h3.api import basic_int as h3_int
from shapely.geometry import mapping, shape, Polygon, polygon
from shapely.ops import transform
from shapely.strtree import STRtree
Expand Down
2 changes: 1 addition & 1 deletion placekey/tests/test_placekey.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""

import unittest
import h3.api.basic_int as h3_int
from ..vendor.h3.api import basic_int as h3_int
from shapely.wkt import loads as wkt_loads
from shapely.geometry import shape
from shapely.ops import transform
Expand Down
115 changes: 115 additions & 0 deletions placekey/vendor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Versioning

The H3 core library adheres to [Semantic Versioning](http://semver.org/).
H3-Py has a `major.minor.patch` version scheme. The major and minor version
numbers of H3-Py are the major and minor version of the bound core library,
respectively. The patch version is incremented independently of the core
library.

We use [this changelog structure](http://keepachangelog.com/).

Because H3-Py is versioned in lockstep with the H3 core library, please
avoid adding features or APIs which do not map onto the
[H3 core API](https://uber.github.io/h3/#/documentation/api-reference/).

## Unreleased

- None

## [3.7.7] - 2024-03-09

- Build Python 3.12 wheels (#344)

## [3.7.6] - 2022-11-23

- Build Python 3.11 wheels (#299)

## [3.7.5] - 2022-11-23

- BAD RELEASE

## [3.7.4] - 2022-04-14

- Website and API documentation; along with docstring cleanup.
- Add support for linters and IDE tooling (#213)
- Remove Py 3.5 wheel for Windows (#214)
- Py 3.10 wheels and on more architectures (#220, #221, #223, #225)
- Greatly reduce sdist size (#227, #229)

## [3.7.3] - 2021-06-12

- Wheels for Linux Aarch64 (#189)

## [3.7.2] - 2021-03-01

- Add vectorized h3_to_parent and h3_get_resolution (#166)

## [3.7.1] - 2020-12-18

- fix for #169: `h3_distance` error reporting (#175)
- build Python 3.9 wheel for Mac (#175)
- bump h3lib version to v3.7.1 (#175)

## [3.7.0] - 2020-10-02

- Add functions (#171)
+ `cell_area`
+ `exact_edge_length`
+ `point_dist`

## [3.6.4] - 2020-07-20

- Add `requirements.in` for `pip-compile` usage (#157)
- Update `h3-c` to v3.6.4 (#157)
- Add functions:
+ `experimental_local_ij_to_h3` (#155)
+ `experimental_h3_to_local_ij` (#155)
+ `h3.unstable.vect.cell_haversine` (#147)
+ `h3.unstable.vect.geo_to_h3` (#147)
+ Prototype v4 names under `h3.unstable.v4` (#146)

## [3.6.3] - 2020-06-04

- Add functions:
+ `get_res0_indexes`
+ `h3_to_center_child`
+ `h3_get_faces`

## [3.6.2] - 2020-06-02

- Improve error reporting on `hex2int` (https://github.com/uber/h3-py/pull/127)
- Build Linux wheels for Python 2.7

## [3.6.1] - 2020-05-29

- Switch to Cython wrapper implementation
- Pre-built wheels on PyPI for Linux/Mac/Windows
- Provide multiple APIs:
+ `h3.api.basic_str`
+ `h3.api.basic_int`
+ `h3.api.numpy_int`
+ `h3.api.memview_int`

## [3.4.3] - 2019-04-18

- Removed null values in k_ring_distances.
- Support on Windows Platform
- Fixed some install problems

## [3.4.2] - 2019-03-13

- Added h3_line support.

## [3.1.0] - 2018-09-06

### Added
- Added h3_distance function.

### Changed
- Updated the core library to v3.1.0.

## [3.0.0] - 2018-07-24

### Added
- First public release.

33 changes: 33 additions & 0 deletions placekey/vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
cmake_minimum_required(VERSION 3.7.2)

project(h3)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

# Always make a release build
set(CMAKE_BUILD_TYPE Release)

# Avoid building tooling we won't need for release
# See all options with `cmake -LA` in an `h3/build` directory,
# or at https://h3geo.org/docs/next/core-library/compilation-options/
macro(turn_off option_name)
set(${option_name} OFF CACHE BOOL "" FORCE)
endmacro()
turn_off(BUILD_ALLOC_TESTS)
turn_off(BUILD_BENCHMARKS)
turn_off(BUILD_FILTERS)
turn_off(BUILD_FUZZERS)
turn_off(BUILD_GENERATORS)
turn_off(BUILD_TESTING)
turn_off(ENABLE_COVERAGE)
turn_off(ENABLE_DOCS)
turn_off(ENABLE_FORMAT)
turn_off(ENABLE_LIBFUZZER)
turn_off(ENABLE_LINTING)

# Build the core library as static
set(BUILD_SHARED_LIBS OFF)
add_subdirectory(src/h3lib)

# Build the rest (other than the core library dependency) as shared
set(BUILD_SHARED_LIBS ON)
add_subdirectory(src/h3)
Loading

0 comments on commit 0c87003

Please sign in to comment.