From 9c23dca235555376a9bfc7ccd6e2a00902df0497 Mon Sep 17 00:00:00 2001 From: James Bourbeau Date: Sat, 5 Jun 2021 14:49:27 -0500 Subject: [PATCH 01/15] Add compatibility for Dask 2021.06.0 --- spatialpandas/dask.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/spatialpandas/dask.py b/spatialpandas/dask.py index c09f76e..d10fb03 100644 --- a/spatialpandas/dask.py +++ b/spatialpandas/dask.py @@ -15,7 +15,12 @@ from dask import delayed from dask.dataframe.core import get_parallel_type from dask.dataframe.partitionquantiles import partition_quantiles -from dask.dataframe.utils import make_array_nonempty, make_meta, meta_nonempty +from dask.dataframe.extensions import make_array_nonempty +try: + from dask.dataframe.dispatch import make_meta_dispatch + from dask.dataframe.backends import meta_nonempty +except ImportError: + from dask.dataframe.utils import make_meta as make_meta_dispatch, meta_nonempty from .geodataframe import GeoDataFrame from .geometry.base import GeometryDtype, _BaseCoordinateIndexer @@ -99,7 +104,7 @@ def persist(self, **kwargs): ) -@make_meta.register(GeoSeries) +@make_meta_dispatch.register(GeoSeries) def make_meta_series(s, index=None): result = s.head(0) if index is not None: @@ -546,7 +551,7 @@ def __getitem__(self, key): return result -@make_meta.register(GeoDataFrame) +@make_meta_dispatch.register(GeoDataFrame) def make_meta_dataframe(df, index=None): result = df.head(0) if index is not None: From 07a99fb48ec615e43af81326f97fed4ee145e288 Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Mon, 7 Jun 2021 10:40:54 +0200 Subject: [PATCH 02/15] Pin recent pyarrow --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 23849e8..4f0309d 100644 --- a/setup.py +++ b/setup.py @@ -29,9 +29,9 @@ install_requires = [ 'fsspec', 'numba', - 'pandas>=0.25', + 'pandas >=0.25', 'param', - 'pyarrow>=0.15', + 'pyarrow >=2.0', 'python-snappy', 'retrying', ] From c3b25f2422e1c5b28a77259520b32cb765eb0cf7 Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Mon, 7 Jun 2021 10:47:03 +0200 Subject: [PATCH 03/15] Switch to conda-forge --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 42a00ff..64f9719 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,7 +28,7 @@ jobs: shell: bash -l {0} env: PYTHON_VERSION: ${{ matrix.python-version }} - CHANS_DEV: "-c pyviz/label/dev" + CHANS_DEV: "-c pyviz/label/dev -c conda-forge" CHANS_OSX: "-c pyviz/label/dev -c conda-forge" CHANS: "-c pyviz" GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 250b48878ae0f0b34270736977ceba7bba7efe6d Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Mon, 7 Jun 2021 11:37:19 +0200 Subject: [PATCH 04/15] Losen pyarrow pin --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 4f0309d..7685163 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ 'numba', 'pandas >=0.25', 'param', - 'pyarrow >=2.0', + 'pyarrow >=1.0', 'python-snappy', 'retrying', ] From 00c3bd19f61c0e1d7a2d7bc0d268509a841b6eaf Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Mon, 7 Jun 2021 12:55:27 +0200 Subject: [PATCH 05/15] Adjust timeout --- .github/workflows/test.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 64f9719..1ab33e1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,9 +20,7 @@ jobs: exclude: - os: macos-latest python-version: 3.6 - - os: macos-latest - python-version: 3.8 - timeout-minutes: 40 + timeout-minutes: 60 defaults: run: shell: bash -l {0} From a6b131013b65da9c83b8a19d3bd8efb09a545c0b Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Mon, 7 Jun 2021 14:34:06 +0200 Subject: [PATCH 06/15] Simplify dependencies --- .github/workflows/test.yml | 10 ++-------- setup.py | 19 +++---------------- 2 files changed, 5 insertions(+), 24 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1ab33e1..5e48195 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,6 +20,8 @@ jobs: exclude: - os: macos-latest python-version: 3.6 + - os: macos-latest + python-version: 3.8 timeout-minutes: 60 defaults: run: @@ -48,15 +50,7 @@ jobs: conda install -c pyviz "pyctdev>=0.5" doit ecosystem_setup doit env_create ${{ env.CHANS_DEV}} --python=${{ matrix.python-version }} - - name: doit develop_install osx - if: contains(matrix.os, 'macos') - run: | - eval "$(conda shell.bash hook)" - conda activate test-environment - doit develop_install ${{ env.CHANS_OSX }} -o tests - pip install hilbertcurve - name: doit develop_install - if: (!contains(matrix.os, 'macos')) run: | eval "$(conda shell.bash hook)" conda activate test-environment diff --git a/setup.py b/setup.py index 7685163..02127ab 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,5 @@ -import sys - import param + from setuptools import find_packages, setup extras_require = { @@ -34,22 +33,10 @@ 'pyarrow >=1.0', 'python-snappy', 'retrying', + 'numpy', + 'dask[complete] >=2.0' ] -# Checking for platform explicitly because -# pyctdev does not handle dependency conditions -# such as 'numpy<1.20;platform_system=="Darwin"' -if sys.platform == 'darwin': - install_requires.extend([ - 'dask[complete]>=2.0,<2020.12', - 'numpy<1.20', - ]) -else: - install_requires.extend([ - 'dask[complete]>=2.0', - 'numpy', - ]) - setup_args = dict( name='spatialpandas', version=param.version.get_setup_version( From dcac8c48b998fb6402f34822de644797f7441ac0 Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Mon, 7 Jun 2021 19:26:58 +0200 Subject: [PATCH 07/15] Set channel-priority to strict --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5e48195..a457077 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,6 +42,7 @@ jobs: - uses: conda-incubator/setup-miniconda@v2 with: miniconda-version: "latest" + channel-priority: strict - name: Fetch run: git fetch --prune --tags - name: conda setup From 1fdd9dfbe34948692677f8b439c6befb35d9f73f Mon Sep 17 00:00:00 2001 From: James Bourbeau Date: Mon, 7 Jun 2021 15:54:52 -0500 Subject: [PATCH 08/15] Use same Python version --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a457077..21775b6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -42,6 +42,7 @@ jobs: - uses: conda-incubator/setup-miniconda@v2 with: miniconda-version: "latest" + python-version: ${{ matrix.python-version }} channel-priority: strict - name: Fetch run: git fetch --prune --tags From f5d5b6762ec76563445c1ad833b003306e60855f Mon Sep 17 00:00:00 2001 From: James Bourbeau Date: Mon, 7 Jun 2021 16:13:31 -0500 Subject: [PATCH 09/15] Have setup-miniconda and 'doit env_create' use the same conda environment --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 21775b6..75b3fe2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,6 +44,7 @@ jobs: miniconda-version: "latest" python-version: ${{ matrix.python-version }} channel-priority: strict + activate-environment: test-environment - name: Fetch run: git fetch --prune --tags - name: conda setup From 6a4f77d279077f959017f44810c5db8498fe0bab Mon Sep 17 00:00:00 2001 From: James Bourbeau Date: Tue, 8 Jun 2021 14:18:13 -0500 Subject: [PATCH 10/15] Install hilbertcurve from conda-forge --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 75b3fe2..6728535 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,7 +59,7 @@ jobs: conda activate test-environment conda list doit develop_install ${{ env.CHANS_DEV }} -o tests - pip install hilbertcurve + conda install -c conda-forge hilbertcurve - name: doit env_capture run: | eval "$(conda shell.bash hook)" From bdf52f38d89eae0943badf02978e23ee08df2c3a Mon Sep 17 00:00:00 2001 From: James Bourbeau Date: Tue, 8 Jun 2021 15:52:50 -0500 Subject: [PATCH 11/15] Skip Windows 3.6 CI build due to fiona issue on conda-forge --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6728535..aee8d2f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,6 +22,10 @@ jobs: python-version: 3.6 - os: macos-latest python-version: 3.8 + # Fiona for Python 3.6 on Windows has build issues + # See https://github.com/conda-forge/fiona-feedstock/issues/171 for more details + - os: windows-latest + python-version: 3.6 timeout-minutes: 60 defaults: run: From 595e328c6d955e5ea8e8285e1dfee31477329b2d Mon Sep 17 00:00:00 2001 From: James Bourbeau Date: Tue, 8 Jun 2021 16:57:35 -0500 Subject: [PATCH 12/15] Prioritize conda-forge --- .github/workflows/test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index aee8d2f..9254692 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,8 +32,7 @@ jobs: shell: bash -l {0} env: PYTHON_VERSION: ${{ matrix.python-version }} - CHANS_DEV: "-c pyviz/label/dev -c conda-forge" - CHANS_OSX: "-c pyviz/label/dev -c conda-forge" + CHANS_DEV: "-c conda-forge -c pyviz/label/dev" CHANS: "-c pyviz" GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: From 0e976a0569cfe0fddd207fa100d1bc08a9833dff Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Wed, 9 Jun 2021 17:04:29 +0200 Subject: [PATCH 13/15] Attempt using geopandas-base --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 02127ab..b8f0732 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ 'tests': [ 'codecov', 'flake8', - 'geopandas', + 'geopandas-base', 'hypothesis', 'pytest-cov', 'pytest', From dc132def9644e585c04d2fb96ebf1f8e30e85844 Mon Sep 17 00:00:00 2001 From: James Bourbeau Date: Wed, 9 Jun 2021 11:19:52 -0500 Subject: [PATCH 14/15] Trigger CI From 69720f8fd32d094bcbbad02dbef1bdab1502c3a7 Mon Sep 17 00:00:00 2001 From: Philipp Rudiger Date: Wed, 9 Jun 2021 18:56:28 +0200 Subject: [PATCH 15/15] Another attempt at fixing test env --- .github/workflows/test.yml | 3 --- setup.py | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9254692..a166abc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -46,8 +46,6 @@ jobs: with: miniconda-version: "latest" python-version: ${{ matrix.python-version }} - channel-priority: strict - activate-environment: test-environment - name: Fetch run: git fetch --prune --tags - name: conda setup @@ -62,7 +60,6 @@ jobs: conda activate test-environment conda list doit develop_install ${{ env.CHANS_DEV }} -o tests - conda install -c conda-forge hilbertcurve - name: doit env_capture run: | eval "$(conda shell.bash hook)" diff --git a/setup.py b/setup.py index b8f0732..3c880bc 100644 --- a/setup.py +++ b/setup.py @@ -6,6 +6,7 @@ 'tests': [ 'codecov', 'flake8', + 'hilbertcurve', 'geopandas-base', 'hypothesis', 'pytest-cov',