From 31eb985a26bc546a49742150fc7f2c6386724147 Mon Sep 17 00:00:00 2001 From: brendancol Date: Sun, 14 Apr 2024 12:42:46 -0400 Subject: [PATCH 01/10] updated year in citation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aecb5a2a..44e11e84 100644 --- a/README.md +++ b/README.md @@ -283,4 +283,4 @@ With the introduction of projects like Numba, Python gained new ways to provide #### Citation Cite our code: -`makepath/xarray-spatial, https://github.com/makepath/xarray-spatial, ©2020-2023.` +`makepath/xarray-spatial, https://github.com/makepath/xarray-spatial, ©2020-2024.` From 703b7800f1b6afcac26070cacef54fb50623b554 Mon Sep 17 00:00:00 2001 From: brendancol Date: Thu, 18 Apr 2024 09:49:37 -0400 Subject: [PATCH 02/10] removed links to old docs site --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index 44e11e84..efe2114a 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,8 @@ Downloads
- PyPI downloads per month -
@@ -123,9 +121,6 @@ In all the above, the command will download and store the files into your curren `xarray-spatial` does not depend on GDAL / GEOS, which makes it fully extensible in Python but does limit the breadth of operations that can be covered. xarray-spatial is meant to include the core raster-analysis functions needed for GIS developers / analysts, implemented independently of the non-Python geo stack. -Our documentation is still under construction, but [docs can be found here](https://xarray-spatial.org/). - - #### Raster-huh? Rasters are regularly gridded datasets like GeoTIFFs, JPGs, and PNGs. From 7f96b245f9e323ee8ceb4af92ec8ab791d24aedc Mon Sep 17 00:00:00 2001 From: brendancol Date: Mon, 22 Apr 2024 15:26:49 -0400 Subject: [PATCH 03/10] added dask dataframe to requirements as test --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index ed5544aa..d5ea9d1c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ datashader +dask[dataframe] noise >=1.2.2 numba xarray From ac47118593545476c57428764801dc7217751916 Mon Sep 17 00:00:00 2001 From: brendancol Date: Mon, 22 Apr 2024 15:58:29 -0400 Subject: [PATCH 04/10] added unstable fix for polygonize generated_jit --- xrspatial/experimental/polygonize.py | 29 +++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/xrspatial/experimental/polygonize.py b/xrspatial/experimental/polygonize.py index f16ec466..992fc2bd 100644 --- a/xrspatial/experimental/polygonize.py +++ b/xrspatial/experimental/polygonize.py @@ -39,6 +39,33 @@ _visited_dtype = np.uint8 +def generated_jit(function=None, cache=False, + pipeline_class=None, **options): + """ + This decorator allows flexible type-based compilation + of a jitted function. It works as `@jit`, except that the decorated + function is called at compile-time with the *types* of the arguments + and should return an implementation function for those types. + """ + from numba.extending import overload + jit_options = dict() + if pipeline_class is not None: + jit_options['pipeline_class'] = pipeline_class + jit_options['cache'] = cache + jit_options |= options + + if function is not None: + overload(function, jit_options=jit_options, + strict=False)(function) + return function + else: + def wrapper(func): + overload(func, jit_options=jit_options, + strict=False)(func) + return func + return wrapper + + class Turn(Enum): Left = -1 Straight = 0 @@ -183,7 +210,7 @@ def _follow( # Generator of numba-compatible comparison functions for values. # If both values are integers use a fast equality operator, otherwise use a # slower floating-point comparison like numpy.isclose. -@nb.generated_jit(nogil=True, nopython=True) +@generated_jit(nogil=True, nopython=True) def _is_close( reference: Union[int, float], value: Union[int, float], From 474fb7043212d789313db99e613757ef5a1d13b4 Mon Sep 17 00:00:00 2001 From: brendancol Date: Mon, 22 Apr 2024 16:10:45 -0400 Subject: [PATCH 05/10] added py312 and dropped 3.8 and 3.9 --- .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 2a027b8d..8c567d64 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] - python: [3.8, 3.9, '3.10', 3.11] + python: [3.10, 3.11, 3.12] env: OS: ${{ matrix.os }} PYTHON: ${{ matrix.python }} From 4314c39b70d9472086b580fae0ca71083a82b095 Mon Sep 17 00:00:00 2001 From: brendancol Date: Mon, 22 Apr 2024 16:11:51 -0400 Subject: [PATCH 06/10] changed 3.10 back to string --- .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 8c567d64..14977c39 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] - python: [3.10, 3.11, 3.12] + python: ['3.10', 3.11, 3.12] env: OS: ${{ matrix.os }} PYTHON: ${{ matrix.python }} From 3ff569da23953ed7eee8b7a5a4a919e5e5ec6eb7 Mon Sep 17 00:00:00 2001 From: brendancol Date: Mon, 22 Apr 2024 16:18:11 -0400 Subject: [PATCH 07/10] updated codecov.yml --- .github/workflows/codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index bdbd3cad..22c631f7 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - python: [3.9] + python: [3.12] env: OS: ${{ matrix.os }} PYTHON: ${{ matrix.python }} From 7ec7432c657008739bb93d655e78277f35722ebb Mon Sep 17 00:00:00 2001 From: brendancol Date: Mon, 22 Apr 2024 16:25:03 -0400 Subject: [PATCH 08/10] updated codecov.yml --- .github/workflows/codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 22c631f7..4edba781 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -31,7 +31,7 @@ jobs: run: | NUMBA_DISABLE_JIT=1 pytest --cov=./ --cov-report=xml --ignore ./xrspatial/tests/test_polygonize.py - name: Upload coverage to Codecov - uses: codecov/codecov-action@v2 + uses: codecov/codecov-action@v3 with: env_vars: OS,PYTHON fail_ci_if_error: true From c9fb3a3d40bc544d31d1e94ef81a7c956e1890ae Mon Sep 17 00:00:00 2001 From: brendancol Date: Mon, 22 Apr 2024 16:37:55 -0400 Subject: [PATCH 09/10] if stat upload fails, still pass test --- .github/workflows/codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 4edba781..ed42fb18 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -34,5 +34,5 @@ jobs: uses: codecov/codecov-action@v3 with: env_vars: OS,PYTHON - fail_ci_if_error: true + fail_ci_if_error: false verbose: true From a83bf9bf17f0ecc50480194c6c6bd41f541813b7 Mon Sep 17 00:00:00 2001 From: brendancol Date: Mon, 22 Apr 2024 16:39:37 -0400 Subject: [PATCH 10/10] added code coverage token --- .github/workflows/codecov.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index ed42fb18..9b53c8ab 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -33,6 +33,7 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 with: + token: ${{ secrets.CODECOV_TOKEN }} env_vars: OS,PYTHON - fail_ci_if_error: false + fail_ci_if_error: true verbose: true