Skip to content

Commit 66b9b3b

Browse files
authored
Exclude testing with scipy in the env with python 3.9 (#2583)
The PR excludes running scipy relating tests from the scope, because there is the scipy import issue: ```bash File "/home/runner/miniconda3/envs/test/lib/python3.9/site-packages/dpctl/__init__.py", line 51, in <module> from ._sycl_queue import ( File "dpctl/_sycl_queue.pyx", line 1, in init dpctl._sycl_queue File "/home/runner/miniconda3/envs/test/lib/python3.9/site-packages/dpctl/memory/__init__.py", line 31, in <module> from ._memory import ( File "dpctl/memory/_memory.pyx", line 69, in init dpctl.memory._memory File "/home/runner/miniconda3/envs/test/lib/python3.9/site-packages/numpy/__init__.py", line 155, in <module> from . import fft File "/home/runner/miniconda3/envs/test/lib/python3.9/site-packages/numpy/fft/__init__.py", line 215, in <module> import mkl_fft.interfaces.numpy_fft as _nfft File "/home/runner/miniconda3/envs/test/lib/python3.9/site-packages/mkl_fft/__init__.py", line 45, in <module> import mkl_fft.interfaces # isort: skip File "/home/runner/miniconda3/envs/test/lib/python3.9/site-packages/mkl_fft/interfaces/__init__.py", line 29, in <module> import scipy.fft File "/home/runner/miniconda3/envs/test/lib/python3.9/site-packages/scipy/__init__.py", line 110, in <module> __all__.remove('linalg') ValueError: list.remove(x): x not in list ``` when installing the packages from `https://software.repos.intel.com/python/conda/` channel. The support of python 3.9 for scipy was stopped to upload there for a long time ago and the latest available is scipy 1.8.1 which is too old and has the import issue.
1 parent b93b328 commit 66b9b3b

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

.github/workflows/cron-run-tests.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@ jobs:
3939
matrix:
4040
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
4141
runner: [ubuntu-22.04, ubuntu-24.04, windows-2022]
42+
include:
43+
- python: 3.9
44+
# do not install scipy due to import issue
45+
test-packages: "pytest"
46+
- python: 3.10
47+
test-packages: "pytest scipy"
48+
- python: 3.11
49+
test-packages: "pytest scipy"
50+
- python: 3.12
51+
test-packages: "pytest scipy"
4252

4353
steps:
4454
- name: Cancel Previous Runs
@@ -84,12 +94,12 @@ jobs:
8494
id: install_dpnp
8595
continue-on-error: true
8696
run: |
87-
mamba install ${{ env.package-name }}=${{ steps.find_latest_tag.outputs.tag }} pytest scipy ${{ env.channels-list }}
97+
mamba install ${{ env.package-name }}=${{ steps.find_latest_tag.outputs.tag }} ${{ matrix.test-packages }} ${{ env.channels-list }}
8898
8999
- name: ReInstall dpnp
90100
if: steps.install_dpnp.outcome == 'failure'
91101
run: |
92-
mamba install ${{ env.package-name }}=${{ steps.find_latest_tag.outputs.tag }} pytest scipy ${{ env.channels-list }}
102+
mamba install ${{ env.package-name }}=${{ steps.find_latest_tag.outputs.tag }} ${{ matrix.test-packages }} ${{ env.channels-list }}
93103
94104
- name: List installed packages
95105
run: mamba list

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6161
* Resolved issue when `dpnp.ndarray` constructor is called with `dpnp.ndarray.data` as `buffer` keyword [#2533](https://github.com/IntelPython/dpnp/pull/2533)
6262
* Fixed `dpnp.linalg.cond` to always return a real dtype [#2547](https://github.com/IntelPython/dpnp/pull/2547)
6363
* Resolved the issue in `dpnp.random` functions to allow any value of `size` where each element is castable to `Py_ssize_t` type [#2578](https://github.com/IntelPython/dpnp/pull/2578)
64+
* Resolved `conda build --test` issue in python 3.9 environment [#2583](https://github.com/IntelPython/dpnp/pull/2583)
6465

6566
### Security
6667

conda-recipe/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ test:
6363
requires:
6464
- pytest
6565
- setuptools
66-
- scipy
66+
- scipy # [py>39]
6767

6868
about:
6969
home: https://github.com/IntelPython/dpnp

0 commit comments

Comments
 (0)