|
1 | 1 | # Configuration file for the Sphinx documentation builder.
|
2 | 2 | #
|
3 |
| -# For the full list of built-in configuration values, see the documentation: |
| 3 | +# This file only contains a selection of the most common options. For a full |
| 4 | +# list see the documentation: |
4 | 5 | # https://www.sphinx-doc.org/en/master/usage/configuration.html
|
5 | 6 |
|
| 7 | +# -- Path setup -------------------------------------------------------------- |
| 8 | +import sys |
| 9 | + |
| 10 | +# Docs require Python 3.6+ to generate |
| 11 | +from pathlib import Path |
| 12 | + |
| 13 | +DIR = Path(__file__).parent.parent.parent.resolve() |
| 14 | +BASEDIR = DIR.parent |
| 15 | + |
| 16 | +sys.path.append(str(BASEDIR / "src")) |
| 17 | + |
6 | 18 | # -- Project information -----------------------------------------------------
|
7 |
| -# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information |
8 | 19 |
|
9 | 20 | project = "Modelspec"
|
10 |
| -copyright = "2023, ModECI" |
11 |
| -author = "ModECI" |
| 21 | +copyright = "2023, ModECI Project" |
| 22 | +author = "ModECI Project" |
12 | 23 | release = "0.3.1"
|
13 | 24 |
|
14 | 25 | # -- General configuration ---------------------------------------------------
|
15 |
| -# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration |
16 | 26 |
|
17 |
| -extensions = [] |
| 27 | +# Add any Sphinx extension module names here, as strings. They can be |
| 28 | +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 29 | +# ones. |
| 30 | +extensions = [ |
| 31 | + "sphinx.ext.autodoc", # auto generate docstrings |
| 32 | + "sphinx.ext.autosummary", # auto generate summary tables |
| 33 | + "sphinx.ext.napoleon", # napoleon docstring style |
| 34 | + # "sphinx.ext.mathjax", |
| 35 | + "sphinx_copybutton", # create copy buttons |
| 36 | + "sphinx_rtd_theme", # html theme |
| 37 | + "sphinx_markdown_tables", # include markdown style tables |
| 38 | + # "sphinx.ext.intersphinx", |
| 39 | + "sphinx.ext.viewcode", |
| 40 | + "sphinx.ext.autosectionlabel", |
| 41 | + # "sphinx.ext.todo", |
| 42 | + "myst_parser", |
| 43 | + "sphinx.ext.githubpages", |
| 44 | +] |
| 45 | + |
| 46 | +autodoc_member_order = "bysource" |
| 47 | +autosummary_generate = True |
| 48 | +autoclass_content = "both" # Add __init__ doc (ie. params) to class summaries |
| 49 | +html_show_sourcelink = ( |
| 50 | + False # Remove 'view source code' from top of page (for html, not python) |
| 51 | +) |
| 52 | + |
| 53 | +master_doc = "index" |
| 54 | +napoleon_use_ivar = True |
| 55 | +autosectionlabel_prefix_document = True |
18 | 56 |
|
| 57 | +# Source Suffix |
| 58 | +source_suffix = { |
| 59 | + ".rst": "restructuredtext", |
| 60 | + ".txt": "restructuredtext", |
| 61 | + ".md": "markdown", |
| 62 | +} |
| 63 | + |
| 64 | +source_parsers = {".md": "myst_parser"} |
| 65 | + |
| 66 | +# Add any paths that contain templates here, relative to this directory. |
19 | 67 | templates_path = ["_templates"]
|
| 68 | + |
| 69 | +# List of patterns, relative to source directory, that match files and |
| 70 | +# directories to ignore when looking for source files. |
| 71 | +# This pattern also affects html_static_path and html_extra_path. |
20 | 72 | exclude_patterns = []
|
21 | 73 |
|
22 | 74 |
|
23 | 75 | # -- Options for HTML output -------------------------------------------------
|
24 |
| -# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output |
25 | 76 |
|
26 |
| -html_theme = "alabaster" |
| 77 | +# The theme to use for HTML and HTML Help pages. See the documentation for |
| 78 | +# a list of builtin themes. |
| 79 | +# |
| 80 | +html_theme = "sphinx_rtd_theme" |
| 81 | + |
| 82 | +# Add any paths that contain custom static files (such as style sheets) here, |
| 83 | +# relative to this directory. They are copied after the builtin static files, |
| 84 | +# so a file named "default.css" will overwrite the builtin "default.css". |
27 | 85 | html_static_path = ["_static"]
|
0 commit comments