Skip to content
Draft
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
12 changes: 11 additions & 1 deletion .github/workflows/docs-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,20 @@ on:

jobs:
docs-test:
runs-on: ubuntu-latest
runs-on: linux.g5.4xlarge.nvidia.gpu
container:
image: nvidia/cuda:12.9.1-devel-ubuntu24.04
options: --gpus all
defaults:
run:
shell: bash -l {0}

steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true

- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v3
Expand All @@ -34,6 +40,10 @@ jobs:
restore-keys: |
${{ runner.os }}-docs-

- name: Set version fallback for setuptools-scm
run: |
echo "SETUPTOOLS_SCM_PRETEND_VERSION=0.1.0.dev0" >> $GITHUB_ENV

- name: Install project with docs dependencies
run: |
pip install -e ".[docs]"
Expand Down
20 changes: 16 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

import os
import sys
from typing import Callable
from typing import Protocol
from typing import Callable, Protocol

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

Expand Down Expand Up @@ -36,7 +35,7 @@ def connect(self, event: str, callback: Callable[..., None]) -> None:
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
"sphinx.ext.intersphinx",
"myst_parser",
"myst_nb",
"sphinx_autodoc_typehints",
"sphinx_gallery.gen_gallery",
]
Expand All @@ -56,6 +55,16 @@ def connect(self, event: str, callback: Callable[..., None]) -> None:
"tasklist",
]

# MyST-NB configuration for executable notebooks
nb_execution_mode = "auto" # Execute if no cache exists, use cache if available
nb_execution_timeout = 180 # Increased timeout for complex operations
nb_execution_raise_on_error = False # Don't fail build on execution errors
nb_execution_allow_errors = True # Allow cells with errors to still show output
nb_execution_show_tb = True # Show tracebacks for debugging

# Disable commonmark-only mode to allow MyST extensions
myst_commonmark_only = False

sphinx_gallery_conf = {
"examples_dirs": [
"../examples",
Expand All @@ -76,9 +85,12 @@ def connect(self, event: str, callback: Callable[..., None]) -> None:
# The suffix(es) of source filenames.
source_suffix = {
".rst": "restructuredtext",
".md": "markdown",
".md": "myst-nb",
}

# Explicitly register myst_nb as the parser for markdown
source_parsers = {".md": "myst_nb"}

# -- Options for HTML output -------------------------------------------------

html_theme = "sphinx_rtd_theme"
Expand Down
Loading
Loading