|
| 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 | +# -- Path setup -------------------------------------------------------------- |
| 8 | + |
| 9 | +# If extensions (or modules to document with autodoc) are in another directory, |
| 10 | +# add these directories to sys.path here. If the directory is relative to the |
| 11 | +# documentation root, use os.path.abspath to make it absolute, like shown here. |
| 12 | +# |
| 13 | +import os |
| 14 | +import sys |
| 15 | +# import avaframe |
| 16 | +# sys.path.insert(0, os.path.abspath('.')) |
| 17 | +sys.path.insert(0, os.path.abspath('../avaframe')) |
| 18 | +# sys.path.insert(0, os.path.abspath('../avaframe')) |
| 19 | +import sphinx_rtd_theme |
| 20 | + |
| 21 | +# -- Project information ----------------------------------------------------- |
| 22 | + |
| 23 | +project = 'AvaFrame' |
| 24 | +copyright = '2021, AvaFrame developers' |
| 25 | +author = 'AvaFrame developers' |
| 26 | + |
| 27 | + |
| 28 | +# -- General configuration --------------------------------------------------- |
| 29 | + |
| 30 | +# Add any Sphinx extension module names here, as strings. They can be |
| 31 | +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 32 | +# ones. |
| 33 | +extensions = [ |
| 34 | + 'sphinx.ext.autodoc', |
| 35 | + 'sphinx.ext.napoleon', |
| 36 | + 'sphinx.ext.autosummary', |
| 37 | + 'sphinx.ext.viewcode', |
| 38 | + 'sphinx_rtd_theme', |
| 39 | + 'sphinx.ext.autosectionlabel', |
| 40 | + 'sphinx.ext.extlinks', |
| 41 | + 'sphinxcontrib.bibtex', |
| 42 | + 'sphinx.ext.graphviz', |
| 43 | +] |
| 44 | +# -- GraphViz configuration ---------------------------------- |
| 45 | +graphviz_output_format = 'svg' |
| 46 | + |
| 47 | +bibtex_bibfiles = ['references_all.bib'] |
| 48 | + |
| 49 | +# alternative: use base requirements.txt in readthedocs.yml files to install |
| 50 | +# missing modules on rtd |
| 51 | +autosummary_mock_imports = [ |
| 52 | + 'avaframe', |
| 53 | + 'numpy', |
| 54 | + 'shapefile', |
| 55 | + 'scipy', |
| 56 | + 'matplotlib', |
| 57 | + 'glob', |
| 58 | + 'subprocess', |
| 59 | + 'shutil', |
| 60 | + 'math', |
| 61 | + 'pandas', |
| 62 | + 'copy', |
| 63 | + 'os', |
| 64 | + 'logging', |
| 65 | + 'time', |
| 66 | + 'mpl_toolkits', |
| 67 | + 'make_axes_locatable', |
| 68 | +] |
| 69 | +autosummary_generate = True |
| 70 | + |
| 71 | +napoleon_google_docstring = True |
| 72 | +napoleon_use_param = False |
| 73 | +napoleon_use_ivar = True |
| 74 | + |
| 75 | +# Turn off prepending module names |
| 76 | +add_module_names = False |
| 77 | + |
| 78 | +# make referencing unique if the same section heading exists doubly |
| 79 | +autosectionlabel_prefix_document = True |
| 80 | +autosectionlabel_maxdepth = 4 |
| 81 | + |
| 82 | +# Add any paths that contain templates here, relative to this directory. |
| 83 | +templates_path = ['_templates'] |
| 84 | + |
| 85 | +# List of patterns, relative to source directory, that match files and |
| 86 | +# directories to ignore when looking for source files. |
| 87 | +# This pattern also affects html_static_path and html_extra_path. |
| 88 | +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'run*', '*run*', 'run'] |
| 89 | + |
| 90 | +# Set the master document name for readthedocs builds |
| 91 | +master_doc = 'index' |
| 92 | + |
| 93 | +# -- Options for HTML output ------------------------------------------------- |
| 94 | + |
| 95 | +# The theme to use for HTML and HTML Help pages. See the documentation for |
| 96 | +# a list of builtin themes. |
| 97 | +# |
| 98 | +html_theme = "sphinx_rtd_theme" |
| 99 | + |
| 100 | +# Theme options are theme-specific and customize the look and feel of a theme |
| 101 | +# further. For a list of options available for each theme, see the |
| 102 | +# documentation. |
| 103 | +html_theme_options = { |
| 104 | + 'logo_only': True, |
| 105 | + 'style_nav_header_background': '#343131', |
| 106 | + # 'display_version': False, |
| 107 | +} |
| 108 | + |
| 109 | +# The name of an image file (relative to this directory) to place at the top |
| 110 | +# of the sidebar. |
| 111 | +html_logo = '_static/logo.png' |
| 112 | + |
| 113 | +# The name of an image file (within the static path) to use as favicon of the |
| 114 | +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 |
| 115 | +# pixels large. |
| 116 | +html_favicon = '_static/favicon.png' |
| 117 | + |
| 118 | +# Add any paths that contain custom static files (such as style sheets) here, |
| 119 | +# relative to this directory. They are copied after the builtin static files, |
| 120 | +# so a file named "default.css" will overwrite the builtin "default.css". |
| 121 | +html_static_path = ['_static'] |
| 122 | + |
| 123 | +# -- Options for LaTeX output --------------------------------------------- |
| 124 | +latex_logo = '_static/logo.png' |
| 125 | + |
| 126 | +# -- Options for referencing ------------------------------------------- |
| 127 | +numfig = True |
| 128 | +math_numfig = True |
| 129 | +math_eqref_format = "Eq.{number}" |
| 130 | + |
| 131 | + |
| 132 | +def setup(app): |
| 133 | + app.add_css_file('css/custom.css') |
0 commit comments