Repository: autoreject/autoreject (language: python)

Issue:
CI failures (linux, multiprocessing, pickle)
https://github.com/autoreject/autoreject/actions/runs/6388600854/job/17338706814#step:11:234

- potentially need to resolve a warning
- potentially need to install mne-qt-browser for not skipping one of the tests
- must resolve the multiprocessing failur which curiously only appears on linux

![image](https://github.com/autoreject/autoreject/assets/9084751/b09a99f9-cd36-4e47-b011-bd365e25c449)



Discussion / hints:
The pickling thing is a MNE-Python bug, I'll look into it soon

Fix patch:
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
deleted file mode 100644
index 4510e90..0000000
--- a/azure-pipelines.yml
+++ /dev/null
@@ -1,71 +0,0 @@
-trigger:
-  # start a new build for every push
-  batch: False
-  branches:
-    include:
-      - 'master'
-      - 'maint/*'
-pr:
-  branches:
-    include:
-      - '*'  # must quote since "*" is a YAML reserved character; we want a string
-
-schedules:
-- cron: "0 0 * * *"
-  displayName: 'Daily midnight build'
-  branches:
-    include:
-      - 'master'
-      - 'maint/*'
-  always: 'true'
-
-stages:
-- stage: Main
-  jobs:
-  - job: Pytest
-    variables:
-      DISPLAY: ':99'
-    strategy:
-      matrix:
-        mne-dev:
-          imageName: 'ubuntu-20.04'
-          PYTHON_VERSION: '3.10'
-          MNE: 'dev'
-        mne-stable:
-          imageName: 'ubuntu-20.04'
-          PYTHON_VERSION: '3.10'
-          MNE: 'stable'
-    pool:
-      vmImage: $(imageName)
-    steps:
-    - task: UsePythonVersion@0
-      inputs:
-        versionSpec: $(PYTHON_VERSION)
-        architecture: 'x64'
-        addToPath: true
-    - bash: |
-        set -e
-        pip install -e .[test]
-      displayName: Install autoreject
-    - script: git clone --depth 1 --single-branch --branch main https://github.com/mne-tools/mne-python.git -b main
-      displayName: Clone MNE-Python
-    - bash: source tools/get_testing_version.sh
-      displayName: 'Get testing version'
-      workingDirectory: mne-python
-    - task: Cache@2
-      inputs:
-        key: $(testing_version)
-        path: /home/vsts/mne_data
-      displayName: 'Cache testing data'
-    - script: python -c "import mne; mne.datasets.testing.data_path(verbose=True)"
-      displayName: 'Get test data'
-    - script: pip install -ve mne-python/
-      displayName: Install MNE-Python dev version
-      condition: eq(variables['MNE'], 'dev')
-    - script: mne sys_info
-      displayName: 'Print config'
-    - script: pytest --cov=autoreject --cov-report=xml --cov-config=setup.cfg -v autoreject/
-      displayName: Run pytest
-    - bash: bash <(curl -s https://codecov.io/bash)
-      displayName: 'Codecov'
-      condition: succeededOrFailed()
diff --git a/examples/plot_visualize_bad_epochs.py b/examples/plot_visualize_bad_epochs.py
index 2ba02a9..4d5f408 100644
--- a/examples/plot_visualize_bad_epochs.py
+++ b/examples/plot_visualize_bad_epochs.py
@@ -110,7 +110,7 @@
 import matplotlib.patches as patches  # noqa
 from autoreject import set_matplotlib_defaults  # noqa
 
-set_matplotlib_defaults(plt, style='seaborn-white')
+set_matplotlib_defaults(plt, style='default')
 loss = ar.loss_['eeg'].mean(axis=-1)  # losses are stored by channel type.
 
 plt.matshow(loss.T * 1e6, cmap=plt.get_cmap('viridis'))
diff --git a/setup.cfg b/setup.cfg
index 0b00882..02df2fa 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -2,9 +2,6 @@
 exclude = __init__.py
 ignore = E241, W504
 
-[coverage:run]
-include=autoreject/*
-
 [coverage:report]
 # Regexes for lines to exclude from consideration
 exclude_lines =
diff --git a/setup.py b/setup.py
index eb7295d..ddab3be 100644
--- a/setup.py
+++ b/setup.py
@@ -61,6 +61,8 @@
           ],
           extras_require={
               'test': [
+                  'mne_qt_browser',
+                  'PyQt6',
                   'pytest',
                   'pytest-cov',
                   'pytest-sugar',


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 5bf0d99..8e2d5ef 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -108,6 +108,11 @@ jobs:
       uses: actions/setup-python@v4
       with:
         python-version: ${{ matrix.python-version }}
+    # for plotting headless
+    - uses: pyvista/setup-headless-display-action@main
+      with:
+        qt: true
+        pyvista: false
     # Have to install any extra `main` MNE deps here because we use get_testing_version.sh below
     - name: Install autoreject
       run: |
@@ -117,7 +122,9 @@ jobs:
       run: git clone --depth 1 --single-branch --branch main https://github.com/mne-tools/mne-python.git
     - name: Install mne (master|stable)
       if: "matrix.os == 'ubuntu-latest'"
-      run: python -m pip install -e mne-python/
+      run: |
+        sudo apt update && sudo apt install libegl1 -y
+        python -m pip install -e mne-python/
     - name: Display versions and environment information
       run: |
         echo $TZ