|
| 1 | +# Configuration file for the Sphinx documentation builder. |
| 2 | +# |
| 3 | +# This file only contains a selection of the most common options. For a full |
| 4 | +# list see the documentation: |
| 5 | +# https://www.sphinx-doc.org/en/master/usage/configuration.html |
| 6 | + |
| 7 | +import os |
| 8 | +from datetime import date |
| 9 | + |
| 10 | +# -- Project information ----------------------------------------------------- |
| 11 | + |
| 12 | +project = "E3SM-Unified" |
| 13 | +copyright = f"{date.today().year}, Energy Exascale Earth System Model Project" |
| 14 | +author = "E3SM Development Team" |
| 15 | + |
| 16 | +# The version info for the project you're documenting, acts as replacement for |
| 17 | +# |version| and |release|, also used in various other places throughout the |
| 18 | +# built documents. |
| 19 | +if 'DOCS_VERSION' in os.environ: |
| 20 | + version = os.environ.get('DOCS_VERSION') |
| 21 | + release = version |
| 22 | +else: |
| 23 | + version = "test" |
| 24 | + release = version |
| 25 | + |
| 26 | +master_doc = "index" |
| 27 | +language = "en" |
| 28 | + |
| 29 | +# -- General configuration --------------------------------------------------- |
| 30 | + |
| 31 | +# Add any Sphinx extension module names here, as strings. They can be |
| 32 | +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 33 | +# ones. |
| 34 | +extensions = [ |
| 35 | + "myst_parser", |
| 36 | + "sphinx_rtd_theme", |
| 37 | + "sphinx.ext.autodoc", |
| 38 | + "sphinx.ext.autosummary", |
| 39 | + "sphinx.ext.intersphinx", |
| 40 | + "sphinx.ext.viewcode", |
| 41 | + "sphinx.ext.mathjax", |
| 42 | + "sphinx.ext.napoleon", |
| 43 | +] |
| 44 | + |
| 45 | +autosummary_generate = ['developers_guide/api.md'] |
| 46 | + |
| 47 | +# Otherwise, the Return parameter list looks different from the Parameters list |
| 48 | +napoleon_use_rtype = False |
| 49 | +# Otherwise, the Attributes parameter list looks different from the Parameters |
| 50 | +# list |
| 51 | +napoleon_use_ivar = True |
| 52 | + |
| 53 | +# Add any paths that contain templates here, relative to this directory. |
| 54 | +templates_path = ["_templates"] |
| 55 | + |
| 56 | +# List of patterns, relative to source directory, that match files and |
| 57 | +# directories to ignore when looking for source files. |
| 58 | +# This pattern also affects html_static_path and html_extra_path. |
| 59 | +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] |
| 60 | + |
| 61 | +intersphinx_mapping = { |
| 62 | + 'mache': ('https://docs.e3sm.org/mache/main', None), |
| 63 | + 'matplotlib': ('https://matplotlib.org/stable', None), |
| 64 | + 'numpy': ('https://numpy.org/doc/stable', None), |
| 65 | + 'python': ('https://docs.python.org', None), |
| 66 | + 'scipy': ('https://docs.scipy.org/doc/scipy/reference', None), |
| 67 | + "sphinx": ("https://www.sphinx-doc.org/en/master", None), |
| 68 | + 'xarray': ('https://xarray.pydata.org/en/stable', None) |
| 69 | +} |
| 70 | + |
| 71 | +# -- MyST settings --------------------------------------------------- |
| 72 | + |
| 73 | +myst_enable_extensions = [ |
| 74 | + 'colon_fence', |
| 75 | + 'deflist', |
| 76 | + 'dollarmath' |
| 77 | +] |
| 78 | +myst_number_code_blocks = ["typescript"] |
| 79 | +myst_heading_anchors = 2 |
| 80 | +myst_footnote_transition = True |
| 81 | +myst_dmath_double_inline = True |
| 82 | +myst_enable_checkboxes = True |
| 83 | + |
| 84 | +# -- HTML output ------------------------------------------------- |
| 85 | + |
| 86 | +html_theme = 'sphinx_rtd_theme' |
| 87 | +html_title = "" |
| 88 | + |
| 89 | +# Add any paths that contain custom static files (such as style sheets) here, |
| 90 | +# relative to this directory. They are copied after the builtin static files, |
| 91 | +# so a file named "default.css" will overwrite the builtin "default.css". |
| 92 | +html_static_path = ["_static"] |
| 93 | + |
| 94 | +html_context = { |
| 95 | + "current_version": version, |
| 96 | +} |
0 commit comments