Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Depend on dask-core not dask #17

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .azure-pipelines/azure-pipelines-linux.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 14 additions & 6 deletions .scripts/build_steps.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .scripts/logging_utils.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .scripts/run_docker_build.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

88 changes: 88 additions & 0 deletions recipe/346.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
From a24adc9a2721f566d6d87e2db1f8682e6822a9ae Mon Sep 17 00:00:00 2001
From: Mark Harfouche <[email protected]>
Date: Mon, 27 Nov 2023 15:16:11 -0500
Subject: [PATCH 1/3] Get rid of distutils dependency -- Depend on newer scipy

---
tests/test_dask_image/test_ndmeasure/test_core.py | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/tests/test_dask_image/test_ndmeasure/test_core.py b/tests/test_dask_image/test_ndmeasure/test_core.py
index 57add8cf..f7b8b299 100644
--- a/tests/test_dask_image/test_ndmeasure/test_core.py
+++ b/tests/test_dask_image/test_ndmeasure/test_core.py
@@ -1,6 +1,5 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-from distutils.version import LooseVersion
import itertools as it
import warnings as wrn

@@ -107,13 +106,7 @@ def test_center_of_mass(datatype):
]
)
def test_measure_props(funcname, shape, chunks, has_lbls, ind):
- # early scipy version uses a different name sum insted of sum_labels.
- if funcname == 'sum_labels' and scipy.__version__ < LooseVersion('1.6.0'):
- scipy_funcname = 'sum'
- else:
- scipy_funcname = funcname
-
- sp_func = getattr(scipy.ndimage, scipy_funcname)
+ sp_func = getattr(scipy.ndimage, funcname)
da_func = getattr(dask_image.ndmeasure, funcname)

a = np.random.random(shape)

From a5b9e58368d65590b0ea663cfd125e69dad35cba Mon Sep 17 00:00:00 2001
From: Mark Harfouche <[email protected]>
Date: Mon, 27 Nov 2023 16:36:13 -0500
Subject: [PATCH 2/3] Update setup.py

---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index eae610b4..1b8cf830 100644
--- a/setup.py
+++ b/setup.py
@@ -32,7 +32,7 @@ def run_tests(self):
"dask[array] >=2023.2.0",
"dask[dataframe] >=2023.2.0",
"numpy >=1.18",
- "scipy >=0.19.1",
+ "scipy >=1.7.0",
"pims >=0.4.1",
"tifffile >=2018.10.18",
"pandas >=2.0.0",

From eb04872db0949078505175680c72ac9af8ffece1 Mon Sep 17 00:00:00 2001
From: Mark Harfouche <[email protected]>
Date: Mon, 27 Nov 2023 16:53:30 -0500
Subject: [PATCH 3/3] Update test_core.py

---
tests/test_dask_image/test_ndfourier/test_core.py | 2 --
1 file changed, 2 deletions(-)

diff --git a/tests/test_dask_image/test_ndfourier/test_core.py b/tests/test_dask_image/test_ndfourier/test_core.py
index 6d743570..f457533b 100644
--- a/tests/test_dask_image/test_ndfourier/test_core.py
+++ b/tests/test_dask_image/test_ndfourier/test_core.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numbers
-from distutils.version import LooseVersion

import pytest
import numpy as np
@@ -92,7 +91,6 @@ def test_fourier_filter_identity(funcname, s):
)
def test_fourier_filter_type(funcname, upcast_type, dtype):
if (
- LooseVersion(sp.__version__) >= "1.0.0" and
dtype in [np.int64, np.float64] and
funcname in ["fourier_gaussian", "fourier_uniform"]
):
17 changes: 10 additions & 7 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,30 @@ package:
version: {{ version }}

source:
fn: {{ name }}-{{ version }}.tar.gz
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
sha256: {{ sha256 }}
patches:
# python 3.12 testing compatibility
# https://github.com/dask/dask-image/pull/346
- 346.patch

build:
noarch: python
number: 0
number: 1
script: {{ PYTHON }} -m pip install . --no-deps -vv

requirements:
host:
- pip
- python >=3.9
# hmaarrfk -- 2023/11 The build is not yet compatible with 3.12
# but runtime seems to be OK with 3.12
- python >=3.9,<3.12
- setuptools

run:
- python >=3.9
- dask >=2023.2.0
- dask-core >=2023.2.0
- cytoolz >=0.11.0
- numpy >=1.18
- scipy >=0.19.1
- pims >=0.4.1
Expand All @@ -34,13 +40,10 @@ requirements:
test:
source_files:
- tests

imports:
- dask_image

requires:
- pytest >=3.0.5

commands:
# Disable newer Arrow strings with dask-image.
# xref: https://github.com/dask/dask-image/issues/335
Expand Down