|
| 1 | +"""Sphinx configuration for ReMoDe docs.""" |
| 2 | + |
| 3 | +from __future__ import annotations |
| 4 | + |
| 5 | +from importlib.metadata import PackageNotFoundError, version as pkg_version |
| 6 | +from pathlib import Path |
| 7 | +import sys |
| 8 | + |
| 9 | +ROOT = Path(__file__).resolve().parents[1] |
| 10 | +sys.path.insert(0, str(ROOT)) |
| 11 | + |
| 12 | +project = "ReMoDe" |
| 13 | +author = "ReMoDe contributors" |
| 14 | + |
| 15 | +try: |
| 16 | + release = pkg_version("remode") |
| 17 | +except PackageNotFoundError: |
| 18 | + release = "0+unknown" |
| 19 | +version = release |
| 20 | + |
| 21 | +extensions = [ |
| 22 | + "myst_nb", |
| 23 | + "sphinx.ext.autodoc", |
| 24 | + "sphinx.ext.napoleon", |
| 25 | + "sphinx_copybutton", |
| 26 | + "sphinx_design", |
| 27 | +] |
| 28 | + |
| 29 | +templates_path = ["_templates"] |
| 30 | +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] |
| 31 | + |
| 32 | +autodoc_member_order = "bysource" |
| 33 | +autodoc_mock_imports = ["numpy", "pandas", "scipy", "matplotlib"] |
| 34 | +suppress_warnings = ["myst.header"] |
| 35 | + |
| 36 | +myst_enable_extensions = ["colon_fence", "deflist"] |
| 37 | + |
| 38 | +nb_execution_mode = "off" |
| 39 | +nb_execution_show_tb = False |
| 40 | + |
| 41 | +html_theme = "pydata_sphinx_theme" |
| 42 | +html_title = "ReMoDe documentation" |
| 43 | +html_static_path = ["_static"] |
| 44 | +html_css_files = ["custom.css"] |
| 45 | +html_theme_options = { |
| 46 | + "github_url": "https://github.com/sodascience/remode", |
| 47 | + "show_toc_level": 2, |
| 48 | + "navigation_with_keys": True, |
| 49 | +} |
0 commit comments