conf   A
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 70
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 33
dl 0
loc 70
rs 10
c 0
b 0
f 0
wmc 0
1
# docs/conf.py
2
# pylint: disable=invalid-name
3
"""Sphinx configuration."""
4
5
# Configuration file for the Sphinx documentation builder.
6
#
7
# This file only contains a selection of the most common options. For a full
8
# list see the documentation:
9
# https://www.sphinx-doc.org/en/master/usage/configuration.html
10
11
# pylint flag is added because sphinx needs lowercase attributes.
12
13
# -- Path setup --------------------------------------------------------------
14
15
# If extensions (or modules to document with autodoc) are in another directory,
16
# add these directories to sys.path here. If the directory is relative to the
17
# documentation root, use os.path.abspath to make it absolute, like shown here.
18
19
import os
20
import pathlib
21
import sys
22
23
# Make src and unittest folders knows to sphinx, to allow rtd to build the docs
24
src_path = pathlib.Path(__file__).resolve() / ".." / ".." / "src"
25
unittest_path = pathlib.Path(__file__).resolve() / ".." / ".."
26
27
28
sys.path.insert(0, os.path.abspath(unittest_path))
29
sys.path.insert(0, os.path.abspath(src_path))
30
31
print(unittest_path)
32
print(sys.path)
33
34
# -- Project information -----------------------------------------------------
35
36
project = "fogdb - Forest Garden Database API"
37
author = "Mathias Ammon"
38
copyright = f"2022, {author}"  # pylint: disable=redefined-builtin
39
40
extensions = [
41
    "sphinx.ext.autodoc",  # enable docstring documentation
42
    "sphinx.ext.autosummary",  # create linked tables for documented attributes
43
    "sphinx.ext.intersphinx",  # allow :mod: references to interlinked docs
44
    "sphinx.ext.napoleon",  # enable numpy style docstring syntax
45
    "sphinx.ext.viewcode",  # enable source links
46
    # 3rd party extensions
47
    "sphinx_paramlinks",  # enable :param: cross referencing
48
]
49
50
html_theme = "sphinx_rtd_theme"
51
html_theme_options = {
52
    "canonical_url": "https://github.com/tZ3ma/fogdb/",
53
    "display_version": True,
54
    "sticky_navigation": True,
55
    # 'style_nav_header_background': '#009682',
56
}
57
58
# Example configuration for intersphinx: refer to the Python standard library.
59
intersphinx_mapping = {
60
    "python": ("https://docs.python.org/3/", None),
61
    "networkx": ("https://networkx.org/documentation/stable/", None),
62
    "pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
63
    "numpy": ("https://numpy.org/doc/stable/", None),
64
    "scipy": ("https://docs.scipy.org/doc/scipy/reference", None),
65
    "matplotlib": ("https://matplotlib.org", None),
66
}
67
68
# Sort the documentation
69
autodoc_member_order = "bysource"
70