Repository: mne-tools/mne-bids

Issue:
docs: dropdown menu on main no longer working
try selecting a version here: https://mne.tools/mne-bids/dev/index.html


Discussion:
we should apply the same fixes that I currently apply in https://github.com/autoreject/autoreject/pull/304

Resolving patch:
diff --git a/doc/conf.py b/doc/conf.py
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -21,7 +21,7 @@
 
 # If your documentation needs a minimal Sphinx version, state it here.
 #
-# needs_sphinx = '1.0'
+needs_sphinx = '2.0'
 
 # Add any Sphinx extension module names here, as strings. They can be
 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
@@ -125,6 +125,7 @@
 # Theme options are theme-specific and customize the look and feel of a theme
 # further.  For a list of options available for each theme, see the
 # documentation.
+switcher_version_match = "dev" if "dev" in release else version
 html_theme_options = {
     'icon_links': [
         dict(name='GitHub',
@@ -138,26 +139,17 @@
     'use_edit_page_button': False,
     'navigation_with_keys': False,
     'show_toc_level': 1,
-    'navbar_end': ['version-switcher', 'navbar-icon-links'],
+    'navbar_end': ['theme-switcher', 'version-switcher', 'navbar-icon-links'],
     'analytics': dict(google_analytics_id='G-C8SH9E98QC'),
+    "switcher": {
+        "json_url": "https://raw.githubusercontent.com/mne-tools/mne-bids/main/doc/_static/versions.json",  # noqa: E501
+        "version_match": switcher_version_match,
+    },
 }
 
 html_context = {
-    'versions_dropdown': {
-        'dev': 'v0.13 (devel)',
-        'stable': 'v0.12 (stable)',
-        'v0.11': 'v0.11',
-        'v0.10': 'v0.10',
-        'v0.9': 'v0.9',
-        'v0.8': 'v0.8',
-        'v0.7': 'v0.7',
-        'v0.6': 'v0.6',
-        'v0.5': 'v0.5',
-        'v0.4': 'v0.4',
-        'v0.3': 'v0.3',
-        'v0.2': 'v0.2',
-        'v0.1': 'v0.1',
-    },
+    "default_mode": "auto",
+    "doc_path": "doc",
 }
 
 html_sidebars = {}


Test patch:
diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml
--- a/.github/workflows/unit_tests.yml
+++ b/.github/workflows/unit_tests.yml
@@ -21,7 +21,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        python-version: ["3.10"]
+        python-version: ["3.11"]
     steps:
     - uses: actions/checkout@v3
     - name: Set up Python ${{ matrix.python-version }}
@@ -49,7 +49,7 @@ jobs:
       fail-fast: false
       matrix:
         os: [ubuntu-latest]
-        python-version: ["3.8", "3.10"]  # Oldest and newest supported versions
+        python-version: ["3.8", "3.11"]  # Oldest and newest supported versions
     steps:
     - name: Set up Python ${{ matrix.python-version }}
       uses: actions/setup-python@v4
@@ -113,14 +113,14 @@ jobs:
       fail-fast: false
       matrix:
         os: [ubuntu-latest, macos-latest, windows-latest]
-        python-version: ["3.8", "3.10"]  # Oldest and newest supported versions
+        python-version: ["3.8", "3.11"]  # Oldest and newest supported versions
         mne-version: [mne-stable]
         bids-validator-version: [validator-stable]
 
         include:
-          # Only test devel versions with Python 3.10
+          # Only test devel versions with Python 3.11
           - os: ubuntu-latest
-            python-version: "3.10"
+            python-version: "3.11"
             mne-version: mne-main
             bids-validator-version: validator-main
           # Test previous MNE stable only on a single system so save CI resources
@@ -220,7 +220,7 @@ jobs:
     # Only run on a limited set of jobs
     - name: Run pytest without testing data
       run: make test
-      if: ${{ matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest' && matrix.mne-version == 'mne-main' }}
+      if: ${{ matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest' && matrix.mne-version == 'mne-main' }}
 
     # Get testing data
     - run: ./tools/get_testing_version.sh
diff --git a/test_requirements.txt b/test_requirements.txt
--- a/test_requirements.txt
+++ b/test_requirements.txt
@@ -1,9 +1,9 @@
-numpy>=1.18.1
-scipy>=1.5.0
+numpy>=1.20.2
+scipy>=1.6.3
 mne>=1.3
-matplotlib<3.7
-pandas>=1.0.0
-nibabel>=2.5
+matplotlib>=3.4.0
+pandas>=1.2.4
+nibabel>=3.2.1
 pybv>=0.7.5
 openneuro-py>=2022.2
 EDFlib-Python>=1.0.6