conf   A
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 73
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 33
dl 0
loc 73
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 = "ittools - Rudimentary, outdated, everywhere else found iteration tools"
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_execute_code',  # execute code
48
    "sphinx_paramlinks",  # enable :param: cross referencing
49
    # 'sphinxcontrib.excel_table',  # show xlsx exceltables
50
    # 'sphinxcontrib.exceltable',  # show xls exceltables
51
]
52
53
html_theme = "sphinx_rtd_theme"
54
html_theme_options = {
55
    "canonical_url": "https://github.com/tZ3ma/ittools/",
56
    "display_version": True,
57
    "sticky_navigation": True,
58
    # 'style_nav_header_background': '#009682',
59
}
60
61
# Example configuration for intersphinx: refer to the Python standard library.
62
intersphinx_mapping = {
63
    "python": ("https://docs.python.org/3/", None),
64
    "networkx": ("https://networkx.org/documentation/stable/", None),
65
    "pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
66
    "numpy": ("https://numpy.org/doc/stable/", None),
67
    "scipy": ("https://docs.scipy.org/doc/scipy/reference", None),
68
    "matplotlib": ("https://matplotlib.org", None),
69
}
70
71
# Sort the documentation
72
autodoc_member_order = "bysource"
73