Skip to content

Commit

Permalink
Test on Python 3.12 (#683)
Browse files Browse the repository at this point in the history
  • Loading branch information
jarrodmillman committed Sep 15, 2023
1 parent 54e313d commit 74e0cc1
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
34 changes: 24 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
# Ensure that a wheel builder finishes even if another fails
fail-fast: false
matrix:
python-version: [3.9, '3.10', '3.11']
python-version: [3.9, '3.10', '3.11', '3.12']
MINIMUM_REQUIREMENTS: [0]
USE_SCIPY: [0]
USE_SDIST: [0]
Expand Down Expand Up @@ -56,6 +56,13 @@ jobs:
python-version: '3.11'
PIP_FLAGS: "--pre"
OPTIONS_NAME: "pre-releases"
- platform_id: manylinux_x86_64
python-version: '3.12'
PIP_FLAGS: "--pre"
OPTIONS_NAME: "pre-releases"
exclude:
- python-version: '3.12'
PIP_FLAGS: [""]

steps:
- name: Checkout PyWavelets
Expand All @@ -65,6 +72,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version}}
allow-prereleases: true

- name: Build package
env:
Expand All @@ -90,11 +98,11 @@ jobs:
pip install ${NUMPY_MIN}
if [ "${USE_SCIPY}" == "1" ]; then pip install ${SCIPY_MIN}; fi
else
pip install cython
pip install numpy
if [ "${USE_SCIPY}" == "1" ]; then pip install scipy; fi
pip install ${PIP_FLAGS} cython
pip install ${PIP_FLAGS} numpy
if [ "${USE_SCIPY}" == "1" ]; then pip install ${PIP_FLAGS} scipy; fi
fi
pip install matplotlib pytest
pip install ${PIP_FLAGS} matplotlib pytest
set -o pipefail
if [ "${USE_WHEEL}" == "1" ]; then
Expand All @@ -113,7 +121,6 @@ jobs:
- name: Run tests
env:
PIP_FLAGS: ${{ matrix.PIP_FLAGS }}
USE_WHEEL: ${{ matrix.USE_WHEEL }}
USE_SDIST: ${{ matrix.USE_SDIST }}
REFGUIDE_CHECK: ${{ matrix.REFGUIDE_CHECK }}
Expand Down Expand Up @@ -150,7 +157,7 @@ jobs:
# Ensure that a wheel builder finishes even if another fails
fail-fast: false
matrix:
python-version: [3.9, '3.11']
python-version: [3.9, '3.11', '3.12']
MINIMUM_REQUIREMENTS: [0]
USE_SCIPY: [0]
USE_SDIST: [0]
Expand All @@ -165,6 +172,12 @@ jobs:
- python-version: '3.11'
PIP_FLAGS: "--pre"
OPTIONS_NAME: "pre-releases"
- python-version: '3.12'
PIP_FLAGS: "--pre"
OPTIONS_NAME: "pre-releases"
exclude:
- python-version: '3.12'
PIP_FLAGS: [""]

steps:
- name: Checkout PyWavelets
Expand All @@ -174,6 +187,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version}}
allow-prereleases: true

- name: Build package
env:
Expand All @@ -198,10 +212,10 @@ jobs:
pip install ${CYTHON_MIN} ${NUMPY_MIN}
if [ "${USE_SCIPY}" == "1" ]; then pip install ${SCIPY_MIN}; fi
else
pip install cython numpy
if [ "${USE_SCIPY}" == "1" ]; then pip install scipy; fi
pip install ${PIP_FLAGS} cython numpy
if [ "${USE_SCIPY}" == "1" ]; then pip install ${PIP_FLAGS} scipy; fi
fi
pip install matplotlib pytest
pip install ${PIP_FLAGS} matplotlib pytest
set -o pipefail
if [ "${USE_WHEEL}" == "1" ]; then
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ requires = [
# For Python versions which aren't yet officially supported, we specify an
# unpinned NumPy which allows source distributions to be used and allows
# wheels to be used as soon as they become available.
"numpy>=1.26.0b1; python_version>='3.12rc2'",
"numpy>=1.26.0b1; python_version>='3.12'",
"numpy; python_version>='3.9' and platform_python_implementation=='PyPy'",
]

Expand Down
4 changes: 2 additions & 2 deletions pywt/tests/test_wavelet.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ def test_custom_wavelet():
filter_bank=filter_bank)

# check expected default wavelet properties
assert_(~haar_custom2.orthogonal)
assert_(~haar_custom2.biorthogonal)
assert_(not haar_custom2.orthogonal)
assert_(not haar_custom2.biorthogonal)
assert_(haar_custom2.symmetry == 'unknown')
assert_(haar_custom2.family_name == '')
assert_(haar_custom2.short_family_name == '')
Expand Down

0 comments on commit 74e0cc1

Please sign in to comment.