Skip to content

Commit

Permalink
MAINT: Dependency management updates (#141)
Browse files Browse the repository at this point in the history
* MAINT: bump scikit-image and scipy version.

Fix deprecation warnings on scipy access patterns.

* WIP: Pin Cython.
  • Loading branch information
rossbar authored Aug 1, 2023
1 parent 5b1a799 commit 2fd19e9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions deepcell_toolbox/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

import numpy as np
import cv2
import scipy.signal
from scipy.signal import windows

from skimage import transform
from skimage.measure import regionprops
Expand Down Expand Up @@ -281,10 +281,10 @@ def spline_window(window_size, overlap_left, overlap_right, power=2):

def _spline_window(w_size):
intersection = int(w_size / 4)
wind_outer = (abs(2 * (scipy.signal.triang(w_size))) ** power) / 2
wind_outer = (abs(2 * (windows.triang(w_size))) ** power) / 2
wind_outer[intersection:-intersection] = 0

wind_inner = 1 - (abs(2 * (scipy.signal.triang(w_size) - 1)) ** power) / 2
wind_inner = 1 - (abs(2 * (windows.triang(w_size) - 1)) ** power) / 2
wind_inner[:intersection] = 0
wind_inner[-intersection:] = 0

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ requires = [
"wheel",
"setuptools>=40.8.0",
"numpy>=1.16.6",
"Cython>=0.28.0"
"Cython>=0.28.0,<3.0"
]

[tool.ruff]
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ def run(self, *args, **kwargs):
about['__url__'], about['__version__']),
cmdclass={'build_ext': BuildExtension},
install_requires=[
'cython>=0.28.0',
'cython>=0.28.0,<3.0',
'opencv-python-headless<=4.2.0.32; python_version < "3"',
'opencv-python-headless; python_version >= "3"',
'pandas',
'networkx>=2.1',
'numpy>=1.16.6',
'scipy>=1.3.0',
'scikit-image>=0.15.0',
'scipy>=1.7',
'scikit-image>=0.19',
'scikit-learn',
'tqdm'],
extras_require={
Expand All @@ -114,7 +114,7 @@ def run(self, *args, **kwargs):
long_description_content_type='text/markdown',
packages=find_packages(),
ext_modules=extensions,
setup_requires=['cython>=0.28', 'numpy>=1.16.6'],
setup_requires=['cython>=0.28,<3.0', 'numpy>=1.16.6'],
python_requires='>=3.7, <3.11',
classifiers=[
'Programming Language :: Python',
Expand Down

0 comments on commit 2fd19e9

Please sign in to comment.