Skip to content

MAINT: Stabilize MxNE tests #13321

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

Merged
merged 1 commit into from
Jul 15, 2025
Merged
Show file tree
Hide file tree
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
23 changes: 23 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ on: # yamllint disable-line rule:truthy
branches: ["main", "maint/*"]
pull_request:
branches: ["main", "maint/*"]
# adapted from spyder-ide/spyder
workflow_dispatch:
inputs:
ssh:
description: 'Enable ssh debugging'
required: false
default: false
type: boolean

permissions:
contents: read
Expand Down Expand Up @@ -87,6 +95,21 @@ jobs:
with:
fetch-depth: 0
persist-credentials: false
- name: Get commit message
run: echo "COMMIT_MESSAGE=$(git show -s --format=%s ${{ github.event.pull_request.head.sha || github.sha }})" | tee -a ${GITHUB_ENV}
- name: Triage SSH
run: |
if [[ "${{ inputs.ssh }}" == "true" ]] || [[ "$COMMIT_MESSAGE" == *"[actions ssh]"* ]]; then
echo "ENABLE_SSH=true" | tee -a $GITHUB_ENV
else
echo "ENABLE_SSH=false" | tee -a $GITHUB_ENV
fi
- name: Setup Remote SSH Connection
if: env.ENABLE_SSH == 'true'
uses: mxschmitt/action-tmate@v3
timeout-minutes: 80
with:
detached: true
- run: ./tools/github_actions_env_vars.sh
# Xvfb/OpenGL
- uses: pyvista/setup-headless-display-action@v4
Expand Down
17 changes: 15 additions & 2 deletions mne/inverse_sparse/tests/test_mxne_inverse.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,13 @@ def test_mxne_vol_sphere():
tstep=stc.tstep,
)
evoked_dip = mne.simulation.simulate_evoked(
fwd, stc, info, cov, nave=1e9, use_cps=True
fwd,
stc,
info,
cov,
nave=1e9,
use_cps=True,
random_state=0,
)

dip_mxne = mixed_norm(
Expand Down Expand Up @@ -587,7 +593,14 @@ def data_fun(times):
assert_array_equal(stc.vertices[1], [70279])
nave = 30
evoked = simulate_evoked(
forward, stc, info, noise_cov, nave=nave, use_cps=False, iir_filter=None
forward,
stc,
info,
noise_cov,
nave=nave,
use_cps=False,
iir_filter=None,
random_state=0,
)
evoked = evoked.crop(tmin=0, tmax=10e-3)
stc_ = mixed_norm(
Expand Down
5 changes: 1 addition & 4 deletions tools/github_actions_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ if [ ! -z "$CONDA_ENV" ]; then
STD_ARGS="--progress-bar off"
fi
elif [[ "${MNE_CI_KIND}" == "pip" ]]; then
# Only used for 3.13 at the moment, just get test deps plus a few extras
# that we know are available
INSTALL_ARGS="nibabel scikit-learn numpydoc PySide6!=6.9.1 mne-qt-browser pandas h5io mffpy defusedxml numba pyvistaqt"
INSTALL_KIND="test"
INSTALL_KIND="full-pyside6,$INSTALL_KIND"
else
test "${MNE_CI_KIND}" == "pip-pre"
STD_ARGS="$STD_ARGS --pre"
Expand Down
Loading