Skip to content

Commit

Permalink
GeoJSON functions (#301)
Browse files Browse the repository at this point in the history
* 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 actions/setup-python#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>
  • Loading branch information
3 people committed Dec 30, 2023
1 parent c2a20d1 commit 831d50b
Show file tree
Hide file tree
Showing 32 changed files with 2,157 additions and 755 deletions.
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ ignore =
E241,
# E731 do not assign a lambda expression, use a def
E731,
# https://stackoverflow.com/questions/67942075/w504-line-break-after-binary-operator
W503,W504
2 changes: 1 addition & 1 deletion .github/workflows/coverage-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [master]
pull_request:
branches: [master]
branches: ['*']

jobs:
tests:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [master]
pull_request:
branches: [master]
branches: ['*']

jobs:
tests:
Expand All @@ -23,7 +23,7 @@ jobs:

- uses: actions/setup-python@v4.5.0
with:
python-version: "${{ matrix.python-version }}"
python-version: '${{ matrix.python-version }}'

## Start Windows stuff
- uses: ilammy/msvc-dev-cmd@v1.12.0
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches: [master]
pull_request:
branches: [master]
branches: ['*']
types:
# Opened, synchronize, and reopened are the default types
# We add ready_for_review to additionally trigger when converting from draft to non-draft
Expand All @@ -19,7 +19,7 @@ on:

jobs:
make_sdist:
name: "SDist: ${{ matrix.os }}"
name: 'SDist: ${{ matrix.os }}'
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -57,41 +57,41 @@ jobs:
path: ./dist

make_cibw_v2_wheels:
name: "cibuildwheel v2: ${{ matrix.name }}"
name: 'cibuildwheel v2: ${{ matrix.name }}'
if: ${{ github.event_name != 'pull_request' || !github.event.pull_request.draft }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-latest
build: "cp*-macosx*"
build: 'cp*-macosx*'
name: macOS
- os: windows-latest
build: "cp3*-win_amd64"
build: 'cp3*-win_amd64'
name: Windows 64-bit
- os: ubuntu-20.04
build: "cp*-manylinux_x86_64"
build: 'cp*-manylinux_x86_64'
name: Linux Intel glibc 64-bit
- os: ubuntu-20.04
build: "cp*-musllinux_x86_64"
build: 'cp*-musllinux_x86_64'
name: Linux Intel musl 64-bit
- os: ubuntu-20.04
build: "cp36-manylinux_aarch64"
build: 'cp36-manylinux_aarch64'
name: Linux Aarch64 3.6
- os: ubuntu-20.04
build: "cp37-manylinux_aarch64"
build: 'cp37-manylinux_aarch64'
name: Linux Aarch64 3.7
- os: ubuntu-20.04
build: "cp38-manylinux_aarch64"
build: 'cp38-manylinux_aarch64'
name: Linux Aarch64 3.8
- os: ubuntu-20.04
build: "cp39-manylinux_aarch64"
build: 'cp39-manylinux_aarch64'
name: Linux Aarch64 3.9
- os: ubuntu-20.04
build: "cp310-manylinux_aarch64"
build: 'cp310-manylinux_aarch64'
name: Linux Aarch64 3.10
- os: ubuntu-20.04
build: "cp311-manylinux_aarch64"
build: 'cp311-manylinux_aarch64'
name: Linux Aarch64 3.11

steps:
Expand Down
Loading

0 comments on commit 831d50b

Please sign in to comment.