|
| 1 | +"""Configuration file for the Sphinx documentation builder.""" |
| 2 | + |
| 3 | +import sys |
| 4 | +from pathlib import Path |
| 5 | + |
| 6 | +# Add the parent directory to the path so we can import RISE |
| 7 | +# This allows Sphinx to find the RISE package |
| 8 | +project_root = Path(__file__).parent.parent.resolve() |
| 9 | +sys.path.insert(0, str(project_root)) |
| 10 | + |
| 11 | +# Project information |
| 12 | +project = "RISE" |
| 13 | +copyright = "2024, Andrew Ramirez, Aaron Meyer" |
| 14 | +author = "Andrew Ramirez, Aaron Meyer" |
| 15 | + |
| 16 | +# General configuration |
| 17 | +extensions = [ |
| 18 | + "sphinx.ext.autodoc", |
| 19 | + "sphinx.ext.viewcode", |
| 20 | + "sphinx.ext.napoleon", |
| 21 | + "sphinx.ext.intersphinx", |
| 22 | +] |
| 23 | + |
| 24 | +templates_path = ["_templates"] |
| 25 | +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] |
| 26 | + |
| 27 | +# Napoleon settings for NumPy-style docstrings |
| 28 | +napoleon_google_docstring = False |
| 29 | +napoleon_numpy_docstring = True |
| 30 | +napoleon_include_init_with_doc = True |
| 31 | +napoleon_include_private_with_doc = False |
| 32 | +napoleon_include_special_with_doc = True |
| 33 | +napoleon_use_admonition_for_examples = True |
| 34 | +napoleon_use_admonition_for_notes = True |
| 35 | +napoleon_use_admonition_for_references = True |
| 36 | +napoleon_use_ivar = False |
| 37 | +napoleon_use_param = True |
| 38 | +napoleon_use_rtype = True |
| 39 | +napoleon_preprocess_types = False |
| 40 | +napoleon_attr_annotations = True |
| 41 | + |
| 42 | +# Autodoc configuration |
| 43 | +autodoc_default_options = { |
| 44 | + "members": True, |
| 45 | + "member-order": "bysource", |
| 46 | + "undoc-members": True, |
| 47 | + "show-inheritance": True, |
| 48 | + "inherited-members": False, |
| 49 | +} |
| 50 | + |
| 51 | +# Intersphinx mapping for external documentation |
| 52 | +intersphinx_mapping = { |
| 53 | + "python": ("https://docs.python.org/3", None), |
| 54 | + "numpy": ("https://numpy.org/doc/stable/", None), |
| 55 | + "scipy": ("https://docs.scipy.org/doc/scipy/", None), |
| 56 | + "pandas": ("https://pandas.pydata.org/docs/", None), |
| 57 | + "anndata": ("https://anndata.readthedocs.io/en/stable/", None), |
| 58 | + "sklearn": ("https://scikit-learn.org/stable/", None), |
| 59 | + "tensorly": ("http://tensorly.org/stable/", None), |
| 60 | + "scanpy": ("https://scanpy.readthedocs.io/en/stable/", None), |
| 61 | +} |
| 62 | + |
| 63 | +# Options for HTML output |
| 64 | +html_theme = "sphinx_rtd_theme" |
| 65 | +html_static_path = ["_static"] |
| 66 | +html_theme_options = { |
| 67 | + "navigation_depth": 4, |
| 68 | + "collapse_navigation": False, |
| 69 | + "sticky_navigation": True, |
| 70 | + "includehidden": True, |
| 71 | + "titles_only": False, |
| 72 | +} |
0 commit comments