Skip to content

Commit 9f45d04

Browse files
update
1 parent 41a93be commit 9f45d04

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+4413
-2254
lines changed

.github/workflows/array-api-tests-dask.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@ jobs:
77
uses: ./.github/workflows/array-api-tests.yml
88
with:
99
package-name: dask
10-
package-version: '>= 2024.9.0'
1110
module-name: dask.array
1211
extra-requires: numpy
13-
pytest-extra-args: --disable-deadline --max-examples=5
12+
# Dask is substantially slower then other libraries on unit tests.
13+
# Reduce the number of examples to speed up CI, even though this means that this
14+
# workflow is barely more than a smoke test, and one should expect extreme
15+
# flakiness. Before changes to dask-xfails.txt or dask-skips.txt, please run
16+
# the full test suite with at least 200 examples.
17+
pytest-extra-args: --max-examples=200 -n 4
18+
python-versions: '[''3.10'', ''3.13'']'
19+
extra-env-vars: |
20+
ARRAY_API_TESTS_XFAIL_MARK=skip

.github/workflows/array-api-tests-numpy-1-21.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Array API Tests (NumPy 1.22)
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
array-api-tests-numpy-1-22:
7+
uses: ./.github/workflows/array-api-tests.yml
8+
with:
9+
package-name: numpy
10+
package-version: '== 1.22.*'
11+
xfails-file-extra: '-1-22'
12+
python-versions: '[''3.10'']'
13+
pytest-extra-args: -n 4
14+
extra-env-vars: |
15+
ARRAY_API_TESTS_XFAIL_MARK=skip

.github/workflows/array-api-tests-numpy-1-26.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ jobs:
99
package-name: numpy
1010
package-version: '== 1.26.*'
1111
xfails-file-extra: '-1-26'
12+
python-versions: '[''3.10'', ''3.12'']'
13+
pytest-extra-args: -n 4
14+
extra-env-vars: |
15+
ARRAY_API_TESTS_XFAIL_MARK=skip

.github/workflows/array-api-tests-numpy-dev.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ jobs:
99
package-name: numpy
1010
extra-requires: '--pre --extra-index https://pypi.anaconda.org/scientific-python-nightly-wheels/simple'
1111
xfails-file-extra: '-dev'
12+
python-versions: '[''3.11'', ''3.13'']'
13+
pytest-extra-args: -n 4
14+
extra-env-vars: |
15+
ARRAY_API_TESTS_XFAIL_MARK=skip
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Array API Tests (NumPy Latest)
1+
name: Array API Tests (NumPy latest)
22

33
on: [push, pull_request]
44

@@ -7,3 +7,7 @@ jobs:
77
uses: ./.github/workflows/array-api-tests.yml
88
with:
99
package-name: numpy
10+
python-versions: '[''3.10'', ''3.13'']'
11+
pytest-extra-args: -n 4
12+
extra-env-vars: |
13+
ARRAY_API_TESTS_XFAIL_MARK=skip
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Array API Tests (PyTorch Latest)
1+
name: Array API Tests (PyTorch CPU)
22

33
on: [push, pull_request]
44

@@ -7,5 +7,9 @@ jobs:
77
uses: ./.github/workflows/array-api-tests.yml
88
with:
99
package-name: torch
10+
extra-requires: '--index-url https://download.pytorch.org/whl/cpu'
1011
extra-env-vars: |
1112
ARRAY_API_TESTS_SKIP_DTYPES=uint16,uint32,uint64
13+
ARRAY_API_TESTS_XFAIL_MARK=skip
14+
python-versions: '[''3.10'', ''3.13'']'
15+
pytest-extra-args: -n 4

.github/workflows/array-api-tests.yml

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ on:
1616
required: false
1717
type: string
1818
default: '>= 0'
19+
python-versions:
20+
required: true
21+
type: string
22+
description: JSON array of Python versions to test against.
1923
pytest-extra-args:
2024
required: false
2125
type: string
@@ -30,52 +34,57 @@ on:
3034
extra-env-vars:
3135
required: false
3236
type: string
33-
description: "Multiline string of environment variables to set for the test run."
37+
description: Multiline string of environment variables to set for the test run.
3438

3539
env:
36-
PYTEST_ARGS: "--max-examples 200 -v -rxXfE --ci ${{ inputs.pytest-extra-args }} --hypothesis-disable-deadline"
40+
PYTEST_ARGS: "--max-examples 1000 -v -rxXfE ${{ inputs.pytest-extra-args }} --hypothesis-disable-deadline --durations 20"
3741

3842
jobs:
3943
tests:
4044
runs-on: ubuntu-latest
4145
strategy:
46+
fail-fast: false
4247
matrix:
43-
# min version of dask we needs drops support for python 3.9
44-
python-version: ${{ inputs.package-name == 'dask' && fromJson('[''3.10'', ''3.11'', ''3.12'']') || fromJson('[''3.9'', ''3.10'', ''3.11'', ''3.12'']') }}
48+
python-version: ${{ fromJson(inputs.python-versions) }}
4549

4650
steps:
4751
- name: Checkout array-api-compat
48-
uses: actions/checkout@v4
52+
uses: actions/checkout@v5
4953
with:
5054
path: array-api-compat
55+
5156
- name: Checkout array-api-tests
52-
uses: actions/checkout@v4
57+
uses: actions/checkout@v5
5358
with:
5459
repository: data-apis/array-api-tests
5560
submodules: 'true'
5661
path: array-api-tests
62+
5763
- name: Set up Python ${{ matrix.python-version }}
58-
uses: actions/setup-python@v5
64+
uses: actions/setup-python@v6
5965
with:
6066
python-version: ${{ matrix.python-version }}
67+
6168
- name: Set Extra Environment Variables
6269
# Set additional environment variables if provided
6370
if: inputs.extra-env-vars
6471
run: |
6572
echo "${{ inputs.extra-env-vars }}" >> $GITHUB_ENV
73+
6674
- name: Install dependencies
67-
# NumPy 1.21 doesn't support Python 3.11. There doesn't seem to be a way
68-
# to put this in the numpy 1.21 config file.
69-
if: "! ((matrix.python-version == '3.11' || matrix.python-version == '3.12') && inputs.package-name == 'numpy' && contains(inputs.package-version, '1.21'))"
7075
run: |
7176
python -m pip install --upgrade pip
7277
python -m pip install '${{ inputs.package-name }} ${{ inputs.package-version }}' ${{ inputs.extra-requires }}
7378
python -m pip install -r ${GITHUB_WORKSPACE}/array-api-tests/requirements.txt
79+
python -m pip install pytest-xdist
80+
81+
- name: Dump pip environment
82+
run: pip freeze
83+
7484
- name: Run the array API testsuite (${{ inputs.package-name }})
75-
if: "! ((matrix.python-version == '3.11' || matrix.python-version == '3.12') && inputs.package-name == 'numpy' && contains(inputs.package-version, '1.21'))"
7685
env:
7786
ARRAY_API_TESTS_MODULE: array_api_compat.${{ inputs.module-name || inputs.package-name }}
78-
ARRAY_API_TESTS_VERSION: 2023.12
87+
ARRAY_API_TESTS_VERSION: 2024.12
7988
# This enables the NEP 50 type promotion behavior (without it a lot of
8089
# tests fail on bad scalar type promotion behavior)
8190
NPY_PROMOTION_STATE: weak

.github/workflows/docs-build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ jobs:
66
docs-build:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v4
10-
- uses: actions/setup-python@v5
9+
- uses: actions/checkout@v5
10+
- uses: actions/setup-python@v6
1111
- name: Install Dependencies
1212
run: |
13-
python -m pip install -r docs/requirements.txt
13+
python -m pip install .[docs]
1414
- name: Build Docs
1515
run: |
1616
cd docs

.github/workflows/docs-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
environment:
1212
name: docs-deploy
1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v5
1515
- name: Download Artifact
16-
uses: dawidd6/action-download-artifact@v6
16+
uses: dawidd6/action-download-artifact@v11
1717
with:
1818
workflow: docs-build.yml
1919
name: docs-build

0 commit comments

Comments
 (0)