Add support for Array API in NamedArray #375
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: NamedArray._array_api | |
| on: [push, pull_request] | |
| env: | |
| PYTEST_ARGS: "-v -rxXfE --ci --hypothesis-disable-deadline --hypothesis-verbosity=verbose --max-examples 2" | |
| API_VERSIONS: "2025.12" | |
| jobs: | |
| array-api-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.13"] | |
| exclude: | |
| - python-version: "3.10" | |
| fail-fast: false | |
| steps: | |
| - name: Checkout xarray | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| path: xarray | |
| - name: Checkout array-api-tests | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| repository: data-apis/array-api-tests | |
| submodules: "true" | |
| path: array-api-tests | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install pytest==8.4.2 | |
| python -m pip install ${GITHUB_WORKSPACE}/xarray | |
| python -m pip install -r ${GITHUB_WORKSPACE}/array-api-tests/requirements.txt | |
| python -m pip install hypothesis pytest-xdist | |
| python -m pip install array-api-strict | |
| python -m pip install array-api-compat | |
| - name: Run the array API testsuite | |
| env: | |
| ARRAY_API_TESTS_MODULE: xarray.namedarray._array_api | |
| run: | | |
| cd ${GITHUB_WORKSPACE}/array-api-tests | |
| pytest array_api_tests/ --skips-file ${GITHUB_WORKSPACE}/xarray/xarray/tests/namedarray_array_api_skips.txt ${PYTEST_ARGS} |