Skip to content

Commit 42b9edd

Browse files
committed
CI: add a build against numpy nightly
1 parent c9b4c64 commit 42b9edd

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/test.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,23 @@ jobs:
2323
python-version: 3.9
2424
- uses: pre-commit/action@v3.0.0
2525
build:
26-
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
26+
name: ${{ matrix.os }} Python ${{ matrix.python-version }} numpy-nightly=${{ matrix.numpy-nightly }}
2727
runs-on: ${{ matrix.os }}
2828
strategy:
2929
matrix:
3030
os: ["ubuntu-latest"]
3131
python-version: ["3.9", "3.10", "3.11", "3.12"]
32+
numpy-nightly: [false]
3233
include:
34+
- os: ubuntu-latest
35+
python-version: "3.12"
36+
numpy-nightly: true
3337
- os: macOS-11
3438
python-version: "3.11"
39+
numpy-nightly: false
3540
- os: windows-2019
3641
python-version: "3.11"
42+
numpy-nightly: false
3743

3844
steps:
3945
- uses: actions/checkout@v3
@@ -47,6 +53,12 @@ jobs:
4753
run: |
4854
python -m pip install --upgrade pip
4955
pip install .[dev]
56+
- name: Install numpy nightly
57+
if: ${{ matrix.numpy-nightly == true }}
58+
run: |
59+
pip install -U --pre numpy \
60+
-i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
61+
5062
- name: Run tests
5163
run: |
5264
pytest -n auto

ml_dtypes/tests/custom_float_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,7 @@ def testCasts(self, float_type):
703703
self.assertTrue(np.all(x == z))
704704
self.assertEqual(dtype, z.dtype)
705705

706-
@ignore_warning(category=np.ComplexWarning)
706+
@ignore_warning(category=np.exceptions.ComplexWarning)
707707
def testConformNumpyComplex(self, float_type):
708708
for dtype in [np.complex64, np.complex128, np.clongdouble]:
709709
x = np.array([1.5, 2.5 + 2.0j, 3.5], dtype=dtype)

pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[pytest]
22
filterwarnings =
33
error
4+
ignore:numpy.core._multiarray_umat.*:DeprecationWarning

0 commit comments

Comments
 (0)