Skip to content

Fixup CI #3

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

Merged
merged 14 commits into from
Jan 23, 2024
Merged
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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
array_api_strict/_version.py export-subst
49 changes: 49 additions & 0 deletions .github/workflows/array-api-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Array API Tests

env:
PYTEST_ARGS: "-v -rxXfE --ci"

jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12']
numpy-version: ['1.26', 'dev']
exclude:
- python-version: '3.8'
numpy-version: 'dev'

steps:
- name: Checkout array-api-strict
uses: actions/checkout@v4
with:
path: array-api-strict
- name: Checkout array-api-tests
uses: actions/checkout@v4
with:
repository: data-apis/array-api-tests
submodules: 'true'
path: array-api-tests
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
if [[ "${{ matrix.numpy-version }}" == "dev" ]]; then
python -m pip install --pre --extra-index https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy;
else
python -m pip install 'numpy>=1.26,<2.0';
fi
- name: Run the array API testsuite
env:
ARRAY_API_TESTS_MODULE: array_api_strict
# This enables the NEP 50 type promotion behavior (without it a lot of
# tests fail in numpy 1.26 on bad scalar type promotion behavior)
NPY_PROMOTION_STATE: weak
run: |
export PYTHONPATH="${GITHUB_WORKSPACE}/array-api-compat"
cd ${GITHUB_WORKSPACE}/array-api-tests
pytest array_api_tests/ --xfails-file ${PYTEST_ARGS}
3 changes: 3 additions & 0 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ jobs:
python -m pip install build twine
python -m pip list

- name: Install dependencies
run: python -m pip install -r requirements.txt

- name: Build a wheel and a sdist
run: |
PYTHONWARNINGS=error,default::DeprecationWarning python -m build .
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
numpy-version: ['1', 'dev']
python-version: ['3.9', '3.10', '3.11', '3.12']
numpy-version: ['1.26', 'dev']
exclude:
- python-version: '3.8'
numpy-version: 'dev'
Expand All @@ -22,11 +22,12 @@ jobs:
if [[ "${{ matrix.numpy-version }}" == "dev" ]]; then
python -m pip install --pre --extra-index https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy;
else
python -m pip install numpy<2.0;
python -m pip install 'numpy>=1.26,<2.0';
fi
python -m pip install -r requirements-dev.txt
- name: Run Tests
run: |
pytest

# Make sure it installs
python setup.py install
pip install .
6 changes: 4 additions & 2 deletions array_api_strict/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@

"""

__version__ = '1.0'

__array_api_version__ = "2022.12"

__all__ = ["__array_api_version__"]
Expand Down Expand Up @@ -384,3 +382,7 @@
from ._utility_functions import all, any

__all__ += ["all", "any"]

from . import _version
__version__ = _version.get_versions()['version']
del _version
Loading