Enh sensitivity UI change (#278) #1491
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: CIs | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.type }} | |
cancel-in-progress: true | |
on: # yamllint disable-line rule:truthy | |
pull_request: | |
push: | |
branches: [main] | |
schedule: | |
- cron: "0 4 * * 1" # At 04:00 on Monday | |
jobs: | |
pytest: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu, windows, macos] | |
mne: [main, maint/1.7] | |
opengl: ['opengl'] | |
python: ['3.12'] | |
name: [matrix] | |
pip: [''] | |
include: | |
- os: ubuntu | |
mne: main | |
opengl: '' | |
python: '3.12' | |
name: no opengl | |
- os: ubuntu | |
mne: maint/1.7 | |
opengl: '' | |
python: '3.12' | |
name: no opengl | |
- os: ubuntu | |
mne: maint/1.5 | |
opengl: 'opengl' | |
python: '3.10' | |
name: old | |
- os: ubuntu | |
mne: main | |
opengl: 'opengl' | |
python: '3.12' | |
pip: pre | |
name: pip-pre | |
name: pytest ${{ matrix.name }} / ${{ matrix.os }} / MNE ${{ matrix.mne }} | |
runs-on: ${{ matrix.os }}-latest | |
env: | |
MNE_LOGGING_LEVEL: 'warning' | |
MKL_NUM_THREADS: '1' | |
PYTHONUNBUFFERED: '1' | |
MNE_BRANCH: ${{ matrix.mne }} | |
PYTHON_VERSION: ${{ matrix.python }} | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install dependencies | |
run: | # use MNE main to ensure test files are available | |
set -eo pipefail | |
python -m pip install --upgrade pip | |
git clone -b ${MNE_BRANCH} --single-branch --branch main https://github.com/mne-tools/mne-python.git ../mne-python | |
python -m pip install -qe ../mne-python | |
if [[ "${{ matrix.opengl }}" == "opengl" ]]; then | |
PIP_OPTION="[opengl,tests]" | |
else | |
PIP_OPTION="[tests]" | |
fi | |
python -m pip install -ve .${PIP_OPTION} "PyQt6!=6.6.1" "PyQt6-Qt6!=6.6.1,!=6.6.2,!=6.6.3" | |
if [[ "${{ matrix.pip }}" == "pre" ]]; then | |
echo "Upgrading to pre-release NumPy, SciPy, and matplotlib" | |
python -m pip install --upgrade --pre --only-binary ":all:" --default-timeout=60 --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" "numpy>=2.0.0.dev0" "scipy>=1.14.0.dev0" "matplotlib>=3.9.0.dev0" "scikit-learn>=1.5.dev0" | |
fi | |
- run: ./tools/get_testing_version.sh | |
working-directory: ../mne-python | |
- uses: actions/cache@v4 | |
with: | |
key: ${{ env.TESTING_VERSION }} | |
path: ~/mne_data | |
- run: python -c 'import mne; print(mne.datasets.testing.data_path(verbose=True))' | |
name: 'Download testing data' | |
- uses: pyvista/setup-headless-display-action@main | |
with: | |
qt: true | |
- run: glxinfo | grep enderer | |
name: Check OpenGL | |
working-directory: ../mne-python | |
if: runner.os == 'Linux' && contains(matrix.opengl, 'opengl') | |
- run: mne sys_info | |
- run: pytest -m pgtest --cov=mne_qt_browser --cov-report=xml ../mne-python/mne/report ../mne-python/mne/viz | |
name: Run MNE-Tests | |
- run: pytest --error-for-skips mne_qt_browser/tests/test_pg_specific.py --cov-report=xml --cov-append | |
name: Run pyqtgraph-specific tests | |
# These are slow on macOS, so skip them | |
- run: pytest mne_qt_browser/tests/test_speed.py --cov-report=xml --cov-append | |
name: Run benchmarks | |
if: runner.os != 'macOS' | |
- uses: codecov/codecov-action@v4 | |
if: always() | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
qt: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu] | |
mne: [main] | |
opengl: [opengl] | |
qt: [PyQt5, PyQt6, PySide6] | |
python: ['3.10'] # When going to 3.11, PySide2 should be removed or special-cased | |
name: [matrix] | |
include: | |
- os: macos | |
mne: main | |
opengl: 'opengl' | |
qt: PySide6 | |
python: '3.11' | |
- os: windows | |
mne: main | |
opengl: 'opengl' | |
qt: PySide6 | |
python: '3.11' | |
name: ${{ matrix.qt }} / ${{ matrix.os }} | |
runs-on: ${{ matrix.os }}-latest | |
env: | |
MNE_LOGGING_LEVEL: 'warning' | |
MKL_NUM_THREADS: '1' | |
PYTHONUNBUFFERED: '1' | |
MNE_BRANCH: ${{ matrix.mne }} | |
PYTHON_VERSION: ${{ matrix.python }} | |
QT_LIB: ${{ matrix.qt }} | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install dependencies | |
run: | # use MNE main to ensure test files are available | |
set -eo pipefail | |
python -m pip install --upgrade pip | |
git clone -b ${MNE_BRANCH} --single-branch --branch main https://github.com/mne-tools/mne-python.git ../mne-python | |
python -m pip install -qe ../mne-python | |
# Avoid a problematic version of PySide6 | |
# https://wiki.qt.io/Qt_for_Python_Development_Notes#1._Juni_2023 | |
if [[ "$QT_LIB" == "PySide6" ]]; then | |
QT_LIB_INSTALL="PySide6!=6.5.1,!=6.7.0,!=6.7.1" | |
else | |
QT_LIB_INSTALL="$QT_LIB" | |
fi | |
if [[ "${{ matrix.opengl }}" == "opengl" ]]; then | |
PIP_OPTION="[opengl,tests]" | |
else | |
PIP_OPTION="[tests]" | |
fi | |
python -m pip install -ve .${PIP_OPTION} ${QT_LIB_INSTALL} | |
- run: bash ./tools/get_testing_version.sh | |
working-directory: ../mne-python | |
- uses: actions/cache@v4 | |
with: | |
key: ${{ env.TESTING_VERSION }} | |
path: ~/mne_data | |
- run: python -c 'import mne; print(mne.datasets.testing.data_path(verbose=True))' | |
name: 'Download testing data' | |
- uses: pyvista/setup-headless-display-action@main | |
with: | |
qt: true | |
- name: Start Qt on its own | |
run: LD_DEBUG=libs python -c "from ${QT_LIB}.QtWidgets import QApplication, QWidget; app = QApplication([]); import matplotlib; matplotlib.use('QtAgg'); import matplotlib.pyplot as plt; plt.figure()" | |
- name: Check Qt | |
run: | | |
mne sys_info -pd | |
echo ${QT_LIB}: | |
mne sys_info -pd | grep "^.*qtpy.*${QT_LIB}=.*$" | |
- run: pytest -m pgtest --cov=mne_qt_browser --cov-report=xml ../mne-python/mne/report ../mne-python/mne/viz | |
name: Run MNE-Tests | |
- run: pytest --error-for-skips mne_qt_browser/tests/test_pg_specific.py --cov-report=xml --cov-append | |
name: Run pyqtgraph-specific tests | |
# For some reason this dies on Linux PySide2. We can live without this | |
# case given our primary target moving forward is Qt6+ | |
- run: pytest mne_qt_browser/tests/test_speed.py --cov-report=xml --cov-append | |
name: Run benchmarks | |
if: runner.os != 'Linux' || matrix.qt != 'PyQt5' | |
- uses: codecov/codecov-action@v4 | |
if: always() | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |