Skip to content

Commit

Permalink
Merge branch 'master' into add-array_namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
antonwolfy authored Jan 11, 2025
2 parents 6ed5822 + 303a203 commit 34f0671
Show file tree
Hide file tree
Showing 13 changed files with 111 additions and 92 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
build-and-deploy:
name: Build and Deploy Docs

runs-on: ubuntu-latest
runs-on: ubuntu-22.04

permissions:
# Needed to cancel any previous runs that are not completed for a given workflow
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/check-mkl-interfaces.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ env:
jobs:
test_by_tag:
name: Run on ['${{ matrix.os }}', python='${{ matrix.python }}'] with oneMKL tag
name: Run tests with oneMKL tag

strategy:
matrix:
python: ['3.12']
python: ['3.13']
os: [ubuntu-22.04] # windows-2019 - no DFT support for Windows in oneMKL

permissions:
Expand Down Expand Up @@ -121,11 +121,11 @@ jobs:
SYCL_CACHE_PERSISTENT: 1

test_by_branch:
name: Run on ['${{ matrix.os }}', python='${{ matrix.python }}'] with oneMKL develop branch
name: Run tests with oneMKL develop branch

strategy:
matrix:
python: ['3.12']
python: ['3.13']
os: [ubuntu-22.04] # windows-2019 - no DFT support for Windows in oneMKL

permissions:
Expand Down
63 changes: 45 additions & 18 deletions .github/workflows/conda-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ env:
# Follow oneAPI installation instruction for conda, since intel channel is not longer available
# CHANNELS: '-c dppy/label/dev -c intel -c conda-forge --override-channels'
CHANNELS: '-c dppy/label/dev -c https://software.repos.intel.com/python/conda/ -c conda-forge --override-channels'
CONDA_BUILD_INDEX_ENV_PY_VER: '3.12' # conda does not support python 3.13
CONDA_BUILD_VERSION: '24.11.2'
CONDA_INDEX_VERSION: '0.5.0'
RERUN_TESTS_ON_FAILURE: 'true'
Expand All @@ -24,11 +25,11 @@ env:

jobs:
build:
name: Build ['${{ matrix.os }}', python='${{ matrix.python }}']
name: Build

strategy:
matrix:
python: ['3.9', '3.10', '3.11', '3.12']
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
os: [ubuntu-22.04, windows-2019]

permissions:
Expand All @@ -55,18 +56,27 @@ jobs:
fetch-depth: 0

- name: Setup miniconda
id: setup_miniconda
continue-on-error: true
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
with:
miniforge-version: latest
use-mamba: 'true'
channels: conda-forge
conda-remove-defaults: 'true'
python-version: ${{ matrix.python }}
python-version: ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER}}
activate-environment: 'build'

# Sometimes `mamba install ...` fails due to slow download speed rate, so disable the check in mamba
- name: Disable speed limit check in mamba
run: echo "MAMBA_NO_LOW_SPEED_LIMIT=1" >> $GITHUB_ENV
- name: ReSetup miniconda
if: steps.setup_miniconda.outcome == 'failure'
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
with:
miniforge-version: latest
use-mamba: 'true'
channels: conda-forge
conda-remove-defaults: 'true'
python-version: ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER}}
activate-environment: 'build'

- name: Store conda paths as envs
shell: bash -el {0}
Expand All @@ -75,6 +85,12 @@ jobs:
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE${{ runner.os == 'Linux' && '/' || '\\' }}" >> $GITHUB_ENV
- name: Install conda-build
id: install_conda_build
continue-on-error: true
run: mamba install conda-build=${{ env.CONDA_BUILD_VERSION}}

- name: ReInstall conda-build
if: steps.install_conda_build.outcome == 'failure'
run: mamba install conda-build=${{ env.CONDA_BUILD_VERSION}}

- name: Build conda package
Expand All @@ -95,19 +111,20 @@ jobs:
path: ${{ env.WHEELS_OUTPUT_FOLDER }}${{ env.PACKAGE_NAME }}-*.whl

test_linux:
name: Test ['ubuntu-latest', python='${{ matrix.python }}']
name: Test

needs: build

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}

defaults:
run:
shell: bash -el {0}

strategy:
matrix:
python: ['3.9', '3.10', '3.11', '3.12']
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
os: [ubuntu-latest]

continue-on-error: true

Expand Down Expand Up @@ -136,7 +153,7 @@ jobs:
use-mamba: 'true'
channels: conda-forge
conda-remove-defaults: 'true'
python-version: ${{ matrix.python }}
python-version: ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER}}
activate-environment: ${{ env.TEST_ENV_NAME }}

- name: Install conda-index
Expand All @@ -158,8 +175,13 @@ jobs:
echo PACKAGE_VERSION=${PACKAGE_VERSION}
echo "PACKAGE_VERSION=$PACKAGE_VERSION" >> $GITHUB_ENV
# conda-index does not support python 3.13
- name: Remove conda-index
run: mamba remove conda-index

- name: Install dpnp
run: mamba install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest python=${{ matrix.python }} ${{ env.TEST_CHANNELS }}
run: |
mamba install ${{ env.PACKAGE_NAME }}=${{ env.PACKAGE_VERSION }} pytest python=${{ matrix.python }} ${{ env.TEST_CHANNELS }}
env:
TEST_CHANNELS: '-c ${{ env.channel-path }} ${{ env.CHANNELS }}'
MAMBA_NO_LOW_SPEED_LIMIT: 1
Expand Down Expand Up @@ -193,19 +215,20 @@ jobs:
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
test_windows:
name: Test ['windows-2019', python='${{ matrix.python }}']
name: Test

needs: build

runs-on: windows-2019
runs-on: ${{ matrix.os }}

defaults:
run:
shell: cmd /C CALL {0}

strategy:
matrix:
python: ['3.9', '3.10', '3.11', '3.12']
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
os: [windows-2019]

continue-on-error: true

Expand Down Expand Up @@ -244,7 +267,7 @@ jobs:
use-mamba: 'true'
channels: conda-forge
conda-remove-defaults: 'true'
python-version: ${{ matrix.python }}
python-version: ${{ env.CONDA_BUILD_INDEX_ENV_PY_VER}}
activate-environment: ${{ env.TEST_ENV_NAME }}

- name: Store conda paths as envs
Expand Down Expand Up @@ -279,6 +302,10 @@ jobs:
echo PACKAGE_VERSION: %PACKAGE_VERSION%
(echo PACKAGE_VERSION=%PACKAGE_VERSION%) >> %GITHUB_ENV%
# conda-index does not support python 3.13
- name: Remove conda-index
run: mamba remove conda-index

- name: Install dpnp
run: |
@echo on
Expand Down Expand Up @@ -325,13 +352,13 @@ jobs:
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
upload:
name: Upload ['${{ matrix.os }}', python='${{ matrix.python }}']
name: Upload

needs: [test_linux, test_windows]

strategy:
matrix:
python: ['3.9', '3.10', '3.11', '3.12']
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
os: [ubuntu-22.04, windows-2019]

runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -406,7 +433,7 @@ jobs:
channels: conda-forge
conda-remove-defaults: 'true'
run-post: 'false'
python-version: '3.12'
python-version: '3.13'
activate-environment: 'cleanup'

- name: Install anaconda-client
Expand Down
40 changes: 30 additions & 10 deletions .github/workflows/cron-run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ env:
PACKAGE_NAME: dpnp
CHANNELS: '-c dppy/label/dev -c https://software.repos.intel.com/python/conda/ -c conda-forge --override-channels'
TEST_ENV_NAME: test
RERUN_TESTS_ON_FAILURE: 'true'
RUN_TESTS_MAX_ATTEMPTS: 2

jobs:
test:
name: Test ['${{ matrix.runner }}', python='${{ matrix.python }}']
name: Test

# disable scheduled workflow to be run in forks
if: github.event.repository.fork == false

runs-on: ${{ matrix.runner }}

Expand All @@ -33,12 +35,11 @@ jobs:
actions: write

strategy:
fail-fast: false
matrix:
python: ['3.9', '3.10', '3.11', '3.12']
python: ['3.9', '3.10', '3.11', '3.12', '3.13']
runner: [ubuntu-22.04, ubuntu-24.04, windows-2019]

continue-on-error: false

steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@85880fa0301c86cca9da44039ee3bb12d3bedbfa # 0.12.1
Expand All @@ -57,6 +58,19 @@ jobs:
echo "Latest tag is ${{ steps.find_latest_tag.outputs.tag }}"
- name: Setup miniconda
id: setup_miniconda
continue-on-error: true
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
with:
miniforge-version: latest
use-mamba: 'true'
channels: conda-forge
conda-remove-defaults: 'true'
python-version: ${{ matrix.python }}
activate-environment: ${{ env.TEST_ENV_NAME }}

- name: ReSetup miniconda
if: steps.setup_miniconda.outcome == 'failure'
uses: conda-incubator/setup-miniconda@d2e6a045a86077fb6cad6f5adf368e9076ddaa8d # v3.1.0
with:
miniforge-version: latest
Expand All @@ -67,10 +81,15 @@ jobs:
activate-environment: ${{ env.TEST_ENV_NAME }}

- name: Install dpnp
id: install_dpnp
continue-on-error: true
run: |
mamba install ${{ env.PACKAGE_NAME }}=${{ steps.find_latest_tag.outputs.tag }} pytest ${{ env.CHANNELS }}
- name: ReInstall dpnp
if: steps.install_dpnp.outcome == 'failure'
run: |
mamba install ${{ env.PACKAGE_NAME }}=${{ steps.find_latest_tag.outputs.tag }} pytest ${{ env.CHANNELS }}
env:
MAMBA_NO_LOW_SPEED_LIMIT: 1
- name: List installed packages
run: mamba list
Expand All @@ -95,14 +114,15 @@ jobs:
python -c "import dpnp; print(dpnp.__version__)"
- name: Run tests
if: env.RERUN_TESTS_ON_FAILURE != 'true'
id: run_tests
continue-on-error: true
run: |
python -m pytest -ra --pyargs ${{ env.PACKAGE_NAME }}.tests
env:
SYCL_CACHE_PERSISTENT: 1

- name: ReRun tests on Linux
if: env.RERUN_TESTS_ON_FAILURE == 'true' && matrix.runner != 'windows-2019'
if: steps.run_tests.outcome == 'failure' && matrix.runner != 'windows-2019'
id: run_tests_linux
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
with:
Expand All @@ -119,7 +139,7 @@ jobs:
SYCL_CACHE_PERSISTENT: 1

- name: ReRun tests on Windows
if: env.RERUN_TESTS_ON_FAILURE == 'true' && matrix.runner == 'windows-2019'
if: steps.run_tests.outcome == 'failure' && matrix.runner == 'windows-2019'
id: run_tests_win
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ permissions: read-all

jobs:
pre-commit:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Set up clang-format
run: |
Expand All @@ -31,7 +31,7 @@ jobs:
- name: Set up python
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: '3.12'
python-version: '3.13'

- name: Run pre-commit checks
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
2 changes: 1 addition & 1 deletion conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ requirements:
host:
- python
- setuptools
- numpy
- numpy >=1.23
- cython
- cmake >=3.21
- ninja
Expand Down
8 changes: 3 additions & 5 deletions doc/reference/logic.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ Truth value testing

dpnp.all
dpnp.any
dpnp.in1d
dpnp.isin


Infinities and NaNs
-------------------
Array contents
--------------

.. autosummary::
:toctree: generated/
Expand Down Expand Up @@ -45,7 +43,7 @@ Array type testing
dpnp.isscalar


Logic operations
Logical operations
----------------

.. autosummary::
Expand Down
1 change: 0 additions & 1 deletion doc/reference/ufunc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ Floating functions
dpnp.isfinite
dpnp.isinf
dpnp.isnan
dpnp.isnat
dpnp.fabs
dpnp.signbit
dpnp.copysign
Expand Down
Loading

0 comments on commit 34f0671

Please sign in to comment.