Skip to content

Commit

Permalink
fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrockhill committed Apr 29, 2024
1 parent 6d3dc6f commit 72837d8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ jobs:
- run:
name: Get Python running
command: |
pip install --upgrade PyQt6!=6.6.0 "PyQt6-Qt6!=6.6.0,!=6.7.0" sphinx-gallery pydata-sphinx-theme numpydoc scikit-learn nilearn mne-bids autoreject pyvista memory_profiler sphinxcontrib.bibtex sphinxcontrib.youtube darkdetect qdarkstyle
# TO DO: sphinx-gallery main -> stable on 0.17 release
pip install --upgrade PyQt6!=6.6.0 "PyQt6-Qt6!=6.6.0,!=6.7.0" git+https://github.com/sphinx-gallery/sphinx-gallery.git pydata-sphinx-theme numpydoc scikit-learn nilearn mne-bids autoreject pyvista memory_profiler sphinxcontrib.bibtex sphinxcontrib.youtube darkdetect qdarkstyle
pip install -ve ./mne-python .
- run:
name: Check Qt
Expand Down
11 changes: 10 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import faulthandler
import os
import sys
from pathlib import Path

import pyvista
import mne_gui_addons
Expand All @@ -11,6 +12,14 @@
os.environ["MNE_BROWSER_THEME"] = "light"
os.environ["MNE_3D_OPTION_THEME"] = "light"

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
curpath = Path(__file__).parent.resolve(strict=True)
sys.path.append(str(curpath / "sphinxext"))

project = "MNE-GUI-Addons"
release = mne_gui_addons.__version__
version = ".".join(release.split(".")[:2])
Expand Down Expand Up @@ -103,7 +112,7 @@
"remove_config_comments": True,
"min_reported_time": 1.0,
"abort_on_example_error": False,
"image_scrapers": ("matplotlib", mne_gui_addons._GUIScraper(), "pyvista"),
"image_scrapers": ("matplotlib", "mne_gui_addons_doc_utils.gui_scraper", "pyvista"),
"show_memory": not sys.platform.startswith(("win", "darwin")),
"line_numbers": False, # messes with style
"capture_repr": ("_repr_html_",),
Expand Down
5 changes: 5 additions & 0 deletions doc/sphinxext/mne_gui_addons_doc_utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""Doc building utils."""

import mne_gui_addons

gui_scraper = mne_gui_addons._GUIScraper()

0 comments on commit 72837d8

Please sign in to comment.