Skip to content

Commit

Permalink
Update supported python versions to 3.8, 3.9, 3.10, & 3.11 (drop pyth…
Browse files Browse the repository at this point in the history
…on 3.7) (#284)

* Supported python versions should match main dask/dask repo

* Update python versions mentioned in pull request template

* Drop python 3.7 env, add envs for python 3.10 & 3.11

* np.bool & np.int deprecated, replace with np.bool_ & int

* threshold_local doesn't raise error for gaussians with nan block size in later versions
  • Loading branch information
GenevieveBuckley committed Mar 13, 2023
1 parent 3668e93 commit b43e6cb
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Before you submit a pull request, check that it meets these guidelines:
2. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
feature to the list in README.rst.
3. The pull request should work for Python 3.7, 3.8, and 3.9.
3. The pull request should work for Python 3.8, 3.9, 3.10 and 3.1.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
fail-fast: true
matrix:
os: ["windows-latest", "ubuntu-latest", "macos-latest"]
python-version: ["3.7", "3.8", "3.9"]
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- name: Checkout source
Expand Down
20 changes: 20 additions & 0 deletions continuous_integration/environment-3.10.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: dask-image-testenv

channels:
- conda-forge

dependencies:
- python=3.10.*
- pip==23.0.1
- wheel==0.38.4
- coverage==7.2.1
- flake8==6.0.0
- pytest==7.2.2
- pytest-cov==4.0.0
- pytest-flake8==1.1.1
- dask==2023.3.1
- numpy==1.24.2
- scipy==1.10.1
- scikit-image==0.19.3
- pims==0.6.1
- slicerator==1.1.0
20 changes: 20 additions & 0 deletions continuous_integration/environment-3.11.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: dask-image-testenv-py311

channels:
- conda-forge

dependencies:
- python=3.11.*
- pip
- wheel
- coverage
- flake8
- pytest
- pytest-cov
- pytest-flake8
- dask
- numpy
- scipy
- scikit-image
- pims
- slicerator
20 changes: 0 additions & 20 deletions continuous_integration/environment-3.7.yml

This file was deleted.

1 change: 0 additions & 1 deletion tests/test_dask_image/test_ndfilters/test__threshold.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ def setup(self):
[4, 5, 1, 0, 0]], dtype=int), chunks=(5, 5))

@pytest.mark.parametrize("method, block_size, error_type", [
('gaussian', np.nan, ValueError),
('median', np.nan, TypeError),
])
def test_nan_blocksize(self, method, block_size, error_type):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_dask_image/test_ndmeasure/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_measure_props_err(funcname):
"datatype", [
int,
float,
np.bool,
np.bool_,
np.uint8,
np.uint16,
np.uint32,
Expand Down Expand Up @@ -445,7 +445,7 @@ def test_labeled_comprehension_struct(shape, chunks, ind):
)
d_lbls = da.from_array(lbls, chunks=d.chunks)

dtype = np.dtype([("val", np.float64), ("pos", np.int)])
dtype = np.dtype([("val", np.float64), ("pos", int)])
default = np.array((np.nan, -1), dtype=dtype)

def func_max(val):
Expand Down

0 comments on commit b43e6cb

Please sign in to comment.