Add holospy
and exspy
#1033
Workflow file for this run
This file contains 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: Integration tests | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '10 0 * * *' | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
integration_test: | |
name: rs_${{ matrix.RSIO_VERSION }}-hs_${{ matrix.HYPERSPY_VERSION }}-ext_${{ matrix.EXTENSION_VERSION }}${{ matrix.LABEL }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
#: ['release', 'RnPatch', 'RnMinor', 'RnMajor'] | |
HYPERSPY_VERSION: ['RnMajor', 'RnPatch'] | |
RSIO_VERSION: ['release', 'dev'] | |
EXTENSION_VERSION: ['release', 'dev'] | |
DEPENDENCIES_DEV: [false] | |
DEPENDENCIES_PRE_RELEASE: [false] | |
DEPENDENCIES_NUMBA_DEV: [false] | |
USE_MAMBA: [true] | |
PYTHON_VERSION: ['3.11'] | |
include: | |
# test against upstream dev | |
- DEPENDENCIES_DEV: true | |
# Install dev version from https://anaconda.org/scientific-python-nightly-wheels/ | |
LABEL: -dependencies_dev | |
HYPERSPY_VERSION: 'RnPatch' | |
RSIO_VERSION: 'dev' | |
EXTENSION_VERSION: 'dev' | |
# numba dev version is installed separately from numba/label/dev channel | |
# others are installed as wheels from | |
# https://anaconda.org/scientific-python-nightly-wheels/ | |
# see https://scientific-python.org/specs/spec-0004/ | |
DEPENDENCIES: matplotlib scipy scikit-image scikit-learn | |
USE_MAMBA: false | |
PYTHON_VERSION: '3.11' | |
- DEPENDENCIES_DEV: true | |
# Install dev version from https://anaconda.org/scientific-python-nightly-wheels/ | |
LABEL: -dependencies_dev | |
HYPERSPY_VERSION: 'RnMajor' | |
RSIO_VERSION: 'dev' | |
EXTENSION_VERSION: 'dev' | |
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 | |
HYPERSPY_VERSION: 'RnPatch' | |
RSIO_VERSION: 'dev' | |
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 | |
RSIO_VERSION: 'dev' | |
HYPERSPY_VERSION: 'RnMajor' | |
EXTENSION_VERSION: 'dev' | |
DEPENDENCIES: numba | |
USE_MAMBA: true | |
PYTHON_VERSION: '3.11' | |
exclude: | |
# Don't test RELEASE_next_major with released version of extension as | |
# they don't support the hyperspy 2.0 API changes | |
- HYPERSPY_VERSION: 'RnMajor' | |
EXTENSION_VERSION: 'release' | |
env: | |
EXTENSION: hyperspy-gui-ipywidgets hyperspy-gui-traitsui kikuchipy lumispy pyxem | |
TEST_DEPS: pytest pytest-xdist pytest-rerunfailures pytest-mpl | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: conda-incubator/setup-miniconda@main | |
with: | |
miniforge-variant: Mambaforge | |
miniforge-version: latest | |
python-version: ${{ matrix.PYTHON_VERSION }} | |
# use base environment, so that when using pip, this is from the | |
# mambaforge distribution | |
# auto-activate-base: true | |
activate-environment: "test" | |
- name: Install pip pyqt and Test dependencies | |
run: | | |
mamba install pip pyqt ${{ env.TEST_DEPS }} | |
- name: Conda info | |
run: | | |
conda info | |
conda list | |
- name: Install numba development version | |
if: ${{ matrix.DEPENDENCIES_NUMBA_DEV }} | |
run: | | |
# Install numba dev version | |
mamba install -c numba/label/dev ${{ matrix.DEPENDENCIES }} | |
- name: Install dependencies development version | |
if: ${{ matrix.DEPENDENCIES_DEV }} | |
run: | | |
pip install --upgrade --pre --extra-index-url \ | |
https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ | |
${{ matrix.DEPENDENCIES }} | |
- name: Install dependencies pre release version | |
if: ${{ matrix.DEPENDENCIES_PRE_RELEASE }} | |
run: | | |
pip install --upgrade --pre ${{ matrix.DEPENDENCIES }} | |
- name: Conda list | |
run: | | |
conda list | |
- name: Install Extension Release | |
if: contains(matrix.EXTENSION_VERSION, 'release') | |
run: | | |
mamba install ${{ env.EXTENSION }} | |
- name: Install Extension Dev (RnPatch) | |
if: ${{ contains(matrix.EXTENSION_VERSION, 'dev') && contains(matrix.HYPERSPY_VERSION, 'RnPatch') }} | |
run: | | |
pip install "hyperspy_gui_ipywidgets @ git+https://github.com/hyperspy/hyperspy_gui_ipywidgets.git" | |
pip install "hyperspy_gui_traitsui @ git+https://github.com/hyperspy/hyperspy_gui_traitsui.git" | |
pip install "kikuchipy @ git+https://github.com/pyxem/kikuchipy.git" | |
pip install "lumispy @ git+https://github.com/lumispy/lumispy.git" | |
pip install "pyxem @ git+https://github.com/pyxem/pyxem.git" | |
- name: Install Extension Dev (RnMajor) | |
if: ${{ contains(matrix.EXTENSION_VERSION, 'dev') && contains(matrix.HYPERSPY_VERSION, 'RnMajor') }} | |
run: | | |
pip install "exspy @ git+https://github.com/hyperspy/exspy.git" | |
pip install "holospy @ git+https://github.com/hyperspy/holospy.git" | |
pip install "hyperspy_gui_ipywidgets @ git+https://github.com/hyperspy/[email protected]" | |
pip install "hyperspy_gui_traitsui @ git+https://github.com/hyperspy/[email protected]" | |
pip install "kikuchipy @ git+https://github.com/pyxem/kikuchipy.git@develop" | |
pip install "lumispy @ git+https://github.com/lumispy/lumispy.git" | |
pip install "pyxem @ git+https://github.com/CSSFrancis/pyxem.git@hyperspy_2.0.0_update" | |
- name: Install RosettaSciIO release | |
if: ${{ contains(matrix.RSIO_VERSION, 'release') && contains(matrix.HYPERSPY_VERSION, 'RnMajor') }} | |
run: | | |
mamba install rosettasciio[all] | |
- name: Install RosettaSciIO dev | |
if: ${{ contains(matrix.RSIO_VERSION, 'dev') && contains(matrix.HYPERSPY_VERSION, 'RnMajor') }} | |
run: | | |
pip install "rosettasciio[all] @ git+https://github.com/hyperspy/rosettasciio.git" | |
- name: Install HyperSpy release | |
if: contains(matrix.HYPERSPY_VERSION, 'release') | |
run: | | |
mamba install hyperspy-base | |
- name: Install HyperSpy RnPatch | |
if: contains(matrix.HYPERSPY_VERSION, 'RnPatch') | |
run: | | |
pip install "hyperspy[all] @ git+https://github.com/hyperspy/hyperspy.git@RELEASE_next_patch" | |
- name: Install HyperSpy RnMinor | |
if: contains(matrix.HYPERSPY_VERSION, 'RnMinor') | |
run: | | |
pip install "hyperspy[all] @ git+https://github.com/hyperspy/hyperspy.git@RELEASE_next_minor" | |
- name: Install HyperSpy RnMajor | |
if: contains(matrix.HYPERSPY_VERSION, 'RnMajor') | |
run: | | |
pip install "hyperspy[all] @ git+https://github.com/hyperspy/hyperspy.git@RELEASE_next_major" | |
- name: Clear conda and pip cache | |
run: | | |
conda clean --all | |
pip cache purge | |
- name: Conda list | |
run: | | |
conda list | |
- name: Run HyperSpy Test Suite | |
run: | | |
python -m pytest --pyargs hyperspy --reruns 3 -n 2 | |
- name: Run RosettaScio Test Suite | |
if: contains(matrix.HYPERSPY_VERSION, 'RnMajor') | |
run: | | |
# Not possible to use "-n 2" because downloading test files will be ignored | |
# Test fixed in dev branch but not release yet | |
python -m pytest --pyargs rsciio | |
- name: Run hyperspy_gui_ipywidgets Test Suite | |
if: ${{ always() }} | |
run: | | |
python -m pytest --pyargs hyperspy_gui_ipywidgets -k "not test_spikes_removal_tool and not test_eels_table_tool" | |
- name: Run hyperspy_gui_traitsui Test Suite | |
if: ${{ always() }} | |
# run the tests headlessly | |
run: | | |
xvfb-run python -m pytest --pyargs hyperspy_gui_traitsui | |
- name: Run exspy Test Suite | |
if: ${{ always() && contains(matrix.HYPERSPY_VERSION, 'RnMajor') }} | |
run: | | |
python -m pytest --pyargs exspy | |
- name: Run holospy Test Suite | |
if: ${{ always() && contains(matrix.HYPERSPY_VERSION, 'RnMajor') }} | |
run: | | |
python -m pytest --pyargs holospy | |
- name: Run kikuchipy Test Suite | |
if: ${{ always() }} | |
#if: ${{ contains(matrix.HYPERSPY_VERSION, 'RnMajor') == false }} | |
run: | | |
python -m pytest --pyargs kikuchipy | |
- name: Run LumiSpy Test Suite | |
if: ${{ always() }} | |
#if: ${{ always() && contains(matrix.EXTENSION_VERSION, 'dev') }} # Tests only against development version, if a fix is not released yet. | |
run: | | |
python -m pytest --pyargs lumispy | |
- name: Run Pyxem Test Suite | |
if: ${{ always() }} | |
run: | | |
# Failure most likely related to numpy 1.25 | |
python -m pytest --pyargs pyxem -k "not (TestMake4dPeakArrayTestData and test_rotation)" |