Skip to content

Commit 0489d83

Browse files
author
Andrew Ramirez
committed
Fix Sphinx autodoc by setting ANNDATA_CUPY=0 and adding comprehensive mock imports
1 parent f5cf890 commit 0489d83

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.github/workflows/documentation.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
uses: astral-sh/setup-uv@v6
3030
- name: Sphinx build
3131
run: |
32+
export ANNDATA_CUPY=0
3233
uv run --group dev sphinx-build -v docs docs/_build
3334
- name: Setup Pages
3435
uses: actions/configure-pages@v5

docs/conf.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
"""Configuration file for the Sphinx documentation builder."""
22

3+
import os
34
import sys
45
from pathlib import Path
56

7+
# Disable cupy in anndata to avoid import errors during doc build
8+
os.environ['ANNDATA_CUPY'] = '0'
9+
610
# Add the parent directory to the path so we can import RISE
711
# This allows Sphinx to find the RISE package
812
project_root = Path(__file__).parent.parent.resolve()
@@ -57,8 +61,18 @@
5761
"cupy",
5862
"torch",
5963
"scvi",
64+
"datashader",
65+
"colorcet",
66+
"holoviews",
67+
"pacmap",
68+
"parafac2",
69+
"tensorly",
70+
"tlviz",
6071
]
6172

73+
# Suppress warnings during autodoc
74+
suppress_warnings = ["app.add_directive"]
75+
6276
# Intersphinx mapping for external documentation
6377
intersphinx_mapping = {
6478
"python": ("https://docs.python.org/3", None),

0 commit comments

Comments
 (0)