1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
|
# (C) Copyright 2018- ECMWF.
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
# In applying this licence, ECMWF does not waive the privileges and immunities
# granted to it by virtue of its status as an intergovernmental organisation
# nor does it submit to any jurisdiction.
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# pylint: disable=invalid-name,redefined-builtin
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
from importlib import metadata
# -- Project information -----------------------------------------------------
project = 'Loki'
copyright = '2018- European Centre for Medium-Range Weather Forecasts (ECMWF)'
author = 'Michael Lange, Balthasar Reuter'
# The full version, including alpha/beta/rc tags.
release = metadata.version('loki')
# The short X.Y version.
version = release
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc', # create documentation from docstrings
'sphinx.ext.napoleon', # understand docstrings also in other formats
'sphinx.ext.autosummary', # automatically compile lists of classes/functions
'sphinx.ext.intersphinx', # link to docs of other projects
'sphinx.ext.autosectionlabel', # allows to refer to sections using their title
# 'recommonmark', # read markdown
'sphinx_rtd_theme', # read the docs theme
'myst_parser', # parse markdown files
'nbsphinx', # parse Jupyter notebooks
'sphinx_design', # cards, panels and dropdown content
]
autosummary_generate = True # Turn on sphinx.ext.autosummary
html_show_sourcelink = False # Remove 'view source code' from top of page (for html, not python)
add_module_names = False # Remove namespaces from class/method signatures
intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
'pymbolic': ('https://documen.tician.de/pymbolic/', None),
'fparser': ('https://fparser.readthedocs.io/en/latest/', None)
}
# The file extensions of source files. Sphinx considers the files with
# this suffix as sources. The value can be a dictionary mapping file
# extensions to file types.
source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown'
}
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['**/tests/']
# Prefix each section label with the document it is in, followed by a colon
autosectionlabel_prefix_document = True
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = []
html_theme_options = {
'logo_only': False,
'display_version': True,
'prev_next_buttons_location': 'bottom',
'style_external_links': False,
'vcs_pageview_mode': 'view',
'style_nav_header_background': '',
# Toc options
'collapse_navigation': True,
'sticky_navigation': True,
'navigation_depth': 4,
'includehidden': True,
'titles_only': False,
}
# -- Options for todo extension ----------------------------------------------
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = True
# -- Options for autodoc extension -------------------------------------------
autodoc_default_options = {
'members': True, # include members in the documentation
'member-order': 'bysource', # members in the order they appear in source
'show-inheritance': True, # list base classes
'undoc-members': True, # show also undocumented members
}
|