Skip to content
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

Add numpy to pre-release dependency build to test against numpy 2.0 #56

Merged
merged 7 commits into from
Jan 2, 2025
Merged
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
35 changes: 17 additions & 18 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
DEPENDENCIES_PRE_RELEASE: [false]
DEPENDENCIES_NUMBA_DEV: [false]
USE_MAMBA: [true]
PYTHON_VERSION: ['3.11']
include:
# test against upstream dev
- DEPENDENCIES_DEV: true
Expand All @@ -41,7 +40,6 @@ jobs:
# see https://scientific-python.org/specs/spec-0004/
DEPENDENCIES: matplotlib scipy scikit-image scikit-learn
USE_MAMBA: false
PYTHON_VERSION: '3.11'
- DEPENDENCIES_PRE_RELEASE: true
# Install RC version available on pypi
LABEL: -dependencies_pre_release
Expand All @@ -50,7 +48,6 @@ jobs:
EXTENSION_VERSION: 'dev'
DEPENDENCIES: matplotlib scipy scikit-learn sympy h5py scikit-image numba
USE_MAMBA: false
PYTHON_VERSION: '3.11'
- DEPENDENCIES_NUMBA_DEV: true
# Install dev version from numba/label/dev channel using mamba
LABEL: -dependencies_numba_dev
Expand All @@ -59,11 +56,11 @@ jobs:
EXTENSION_VERSION: 'dev'
DEPENDENCIES: numba
USE_MAMBA: true
PYTHON_VERSION: '3.11'

env:
EXTENSION: hyperspy-gui-ipywidgets hyperspy-gui-traitsui kikuchipy lumispy pyxem exspy holospy
TEST_DEPS: pytest pytest-xdist pytest-rerunfailures pytest-mpl filelock
PYTHON_VERSION: '3.12'
defaults:
run:
shell: bash -l {0}
Expand All @@ -74,20 +71,21 @@ jobs:
- uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
python-version: ${{ matrix.PYTHON_VERSION }}
python-version: ${{ env.PYTHON_VERSION }}
# use base environment, so that when using pip, this is from the
# miniforge distribution
# auto-activate-base: true
activate-environment: "test"

- name: Install pip pyqt and Test dependencies
- name: Install pip, pyqt, orix and Test dependencies
run: |
mamba install pip pyqt ${{ env.TEST_DEPS }}
mamba install pip pyqt orix ${{ env.TEST_DEPS }}

- name: Install numpy 1.x
- name: Install dask 2024.11.2
run: |
# remove when pyxem support numpy 2
mamba install numpy=1
# remove when tests failure with dask >=2024.12.0 are sorted
# https://github.com/hyperspy/rosettasciio/issues/345
mamba install dask-core=2024.8.0

- name: Conda info
run: |
Expand Down Expand Up @@ -179,7 +177,8 @@ jobs:
- name: Run RosettaScio Test Suite
if: ${{ always() }}
run: |
python -m pytest --pyargs rsciio -n 2
# mrcz and pyusid doesn't support numpy 2
python -m pytest --pyargs rsciio -n 1 -k "not test_mrcz.py and not test_usid.py and not TestOperate"

- name: Run hyperspy_gui_ipywidgets Test Suite
if: ${{ always() }}
Expand All @@ -202,13 +201,13 @@ jobs:
run: |
python -m pytest --pyargs holospy

- name: Run kikuchipy Test Suite
if: ${{ always() }}
# Run the tests headlessly.
# Unskip test when https://github.com/pyxem/kikuchipy/issues/707 is fixed and
# released.
run: |
xvfb-run python -m pytest --pyargs kikuchipy -k "not test_not_allow_download_raises"
# - name: Run kikuchipy Test Suite
# if: ${{ always() }}
# # Run the tests headlessly (pyvista)
# # Unskip test when https://github.com/pyxem/kikuchipy/issues/707 is fixed and
# # released.
# run: |
# xvfb-run python -m pytest --pyargs kikuchipy -k "not test_not_allow_download_raises"

- name: Run LumiSpy Test Suite
if: ${{ always() }}
Expand Down
Loading