Skip to content

add scipy to runtime dependency #187

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

Open
wants to merge 1 commit into
base: master
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
4 changes: 2 additions & 2 deletions .github/workflows/conda-package-cf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ jobs:
- name: Install mkl_fft
run: |
CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}"
conda create -n ${{ env.TEST_ENV_NAME }} python=${{ matrix.python_ver }} ${{ matrix.numpy }} $PACKAGE_NAME pytest scipy $CHANNELS
conda create -n ${{ env.TEST_ENV_NAME }} python=${{ matrix.python_ver }} ${{ matrix.numpy }} $PACKAGE_NAME pytest $CHANNELS
# Test installed packages
conda list -n ${{ env.TEST_ENV_NAME }}

Expand Down Expand Up @@ -295,7 +295,7 @@ jobs:
FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO (
SET PACKAGE_VERSION=%%F
)
SET "TEST_DEPENDENCIES=pytest scipy"
SET "TEST_DEPENDENCIES=pytest"
conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% %TEST_DEPENDENCIES% python=${{ matrix.python }} ${{ matrix.numpy }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }}

- name: Report content of test environment
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,7 @@ jobs:
- name: Install mkl_fft
run: |
CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}"
conda create -n ${{ env.TEST_ENV_NAME }} python=${{ matrix.python }} "scipy>=1.10" $CHANNELS
conda install -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME pytest $CHANNELS
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME python=${{ matrix.python }} pytest $CHANNELS
# Test installed packages
conda list -n ${{ env.TEST_ENV_NAME }}

Expand Down Expand Up @@ -296,7 +295,7 @@ jobs:
FOR /F "tokens=* USEBACKQ" %%F IN (`python -c "%SCRIPT%"`) DO (
SET PACKAGE_VERSION=%%F
)
SET "TEST_DEPENDENCIES=pytest scipy"
SET "TEST_DEPENDENCIES=pytest"
conda install -n ${{ env.TEST_ENV_NAME }} ${{ env.PACKAGE_NAME }}=%PACKAGE_VERSION% %TEST_DEPENDENCIES% python=${{ matrix.python }} -c ${{ env.workdir }}/channel ${{ env.CHANNELS }}

- name: Report content of test environment
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ __pycache__/

mkl_fft/_pydfti.c
mkl_fft/_pydfti.cpython*.so
mkl_fft/_pydfti.*-win_amd64.pyd
mkl_fft/src/mklfft.c
2 changes: 1 addition & 1 deletion conda-recipe-cf/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ requirements:
- python
- mkl-service
- numpy
- scipy >=1.10.1

test:
commands:
- pytest -v --pyargs mkl_fft
requires:
- pytest
- scipy
imports:
- mkl_fft
- mkl_fft.interfaces
Expand Down
2 changes: 1 addition & 1 deletion conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ requirements:
- python
- mkl-service
- {{ pin_compatible('numpy') }}
- scipy >=1.10.1

test:
commands:
- pytest -v --pyargs mkl_fft
requires:
- pytest
- scipy
imports:
- mkl_fft
- mkl_fft.interfaces
Expand Down
4 changes: 2 additions & 2 deletions mkl_fft/tests/third_party/scipy/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
from pytest import raises as assert_raises

# pylint: disable=possibly-used-before-assignment
if scipy.__version__ < "1.12":
if np.lib.NumpyVersion(scipy.__version__) < "1.12.0":
# scipy from Intel channel is 1.10 with python 3.9 and 3.10
pytest.skip("This test file needs scipy>=1.12", allow_module_level=True)
elif scipy.__version__ < "1.14":
elif np.lib.NumpyVersion(scipy.__version__) < "1.14.0":
# For python-3.11 and 3.12, scipy<1.14 is installed from Intel channel
# For python<=3.9, scipy<1.14 is installed from conda channel
# pylint: disable=no-name-in-module
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ classifiers = [
"Operating System :: POSIX",
"Operating System :: Unix"
]
dependencies = ["numpy>=1.26.4", "mkl-service"]
dependencies = ["numpy>=1.26.4", "mkl-service", "scipy>=1.10.1"]
description = "MKL-based FFT transforms for NumPy arrays"
dynamic = ["version"]
keywords = ["DFTI", "FFT", "Fourier", "MKL"]
Expand All @@ -59,7 +59,7 @@ readme = {file = "README.md", content-type = "text/markdown"}
requires-python = ">=3.9,<3.13"

[project.optional-dependencies]
test = ["pytest", "scipy"]
test = ["pytest"]

[project.urls]
Download = "http://github.com/IntelPython/mkl_fft"
Expand Down
Loading