|
| 1 | +# Configuration file for the Sphinx documentation builder. |
| 2 | +# |
| 3 | +# For the full list of built-in configuration values, see the documentation: |
| 4 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html |
| 5 | + |
| 6 | +# -- Project information ----------------------------------------------------- |
| 7 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information |
| 8 | + |
| 9 | +project = "anyvlm" |
| 10 | +author = "GenomicMedLab" |
| 11 | +html_title = "AnyVLM" |
| 12 | + |
| 13 | +# -- General configuration --------------------------------------------------- |
| 14 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration |
| 15 | + |
| 16 | +extensions = [ |
| 17 | + "sphinx_rtd_theme", |
| 18 | + "sphinx.ext.autodoc", |
| 19 | + "sphinx_autodoc_typehints", |
| 20 | + "sphinx.ext.linkcode", |
| 21 | + "sphinx_copybutton", |
| 22 | + "sphinx.ext.autosummary", |
| 23 | + "sphinx_github_changelog", |
| 24 | +] |
| 25 | + |
| 26 | +templates_path = ["_templates"] |
| 27 | +exclude_patterns = [] |
| 28 | + |
| 29 | +# -- Options for HTML output ------------------------------------------------- |
| 30 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output |
| 31 | + |
| 32 | +html_theme = "sphinx_rtd_theme" |
| 33 | +html_theme_options = { |
| 34 | + "collapse_navigation": False, |
| 35 | +} |
| 36 | + |
| 37 | +# -- autodoc things ---------------------------------------------------------- |
| 38 | +import os |
| 39 | +import sys |
| 40 | + |
| 41 | +sys.path.insert(0, os.path.abspath("../../")) |
| 42 | +autodoc_preserve_defaults = True |
| 43 | + |
| 44 | +# -- get version ------------------------------------------------------------- |
| 45 | +from anyvlm import __version__ # noqa: E402 |
| 46 | + |
| 47 | +version = release = __version__ |
| 48 | + |
| 49 | + |
| 50 | +# -- linkcode ---------------------------------------------------------------- |
| 51 | +def linkcode_resolve(domain, info): |
| 52 | + if domain != "py": |
| 53 | + return None |
| 54 | + if not info["module"]: |
| 55 | + return None |
| 56 | + filename = info["module"].replace(".", "/") |
| 57 | + return f"https://github.com/genomicmedlab/anyvlm/blob/main/src/{filename}.py" |
| 58 | + |
| 59 | + |
| 60 | +# -- code block style -------------------------------------------------------- |
| 61 | +pygments_style = "default" |
| 62 | +pygements_dark_style = "monokai" |
0 commit comments