conf   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 100
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 39
dl 0
loc 100
rs 10
c 0
b 0
f 0

1 Function

Rating   Name   Duplication   Size   Complexity  
A get_version() 0 7 2
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
16
import toml
17
18
sys.path.append(os.path.abspath(os.path.dirname(__file__)))
19
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__name__), "..")))
20
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__name__), "..", "async_rx")))
21
22
23
# -- Project information -----------------------------------------------------
24
25
26
def get_version():
27
    """Return current project version from pyproject.toml."""
28
29
    toml_path = os.path.join(os.path.dirname(__file__), "..", "pyproject.toml")
30
    with open(toml_path, "r") as fopen:
31
        pyproject = toml.load(fopen)
32
    return pyproject["tool"]["poetry"]["version"]
33
34
35
project = 'async_rx'
36
copyright = '2020, Jerome Guibert'
37
author = 'Jerome Guibert <[email protected]>'
38
39
# The full version, including alpha/beta/rc tags
40
release = get_version()
41
42
43
# -- General configuration ---------------------------------------------------
44
45
# Add any Sphinx extension module names here, as strings. They can be
46
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
47
# ones.
48
extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon", "sphinx.ext.viewcode", "sphinx.ext.ifconfig", "sphinx.ext.autosummary", "m2r", "autodocsumm"]
49
50
autoclass_content = "both"  # include both class docstring and __init__
51
autosummary_generate = True
52
53
# Napoleon settings
54
napoleon_google_docstring = True
55
napoleon_numpy_docstring = True
56
napoleon_include_init_with_doc = False
57
napoleon_include_private_with_doc = False
58
napoleon_include_special_with_doc = True
59
napoleon_use_admonition_for_examples = False
60
napoleon_use_admonition_for_notes = False
61
napoleon_use_admonition_for_references = False
62
napoleon_use_ivar = False
63
napoleon_use_param = True
64
napoleon_use_rtype = True
65
66
# autodocsumm settings
67
autodoc_default_options = {'autosummary': True}
68
69
# Autodoc Settings
70
autodoc_default_options = {"member-order": "bysource", "undoc-members": True, "members": True, "show-inheritance": True}
71
72
source_suffix = ['.rst', '.md']
73
74
# Autodoc Settings
75
autodoc_default_options = {"member-order": "bysource", "undoc-members": True}
76
77
# Add any paths that contain templates here, relative to this directory.
78
templates_path = ['_templates']
79
80
# List of patterns, relative to source directory, that match files and
81
# directories to ignore when looking for source files.
82
# This pattern also affects html_static_path and html_extra_path.
83
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
84
85
86
# -- Options for HTML output -------------------------------------------------
87
88
# The theme to use for HTML and HTML Help pages.  See the documentation for
89
# a list of builtin themes.
90
#
91
html_theme = "sphinx_rtd_theme"
92
93
# Add any paths that contain custom static files (such as style sheets) here,
94
# relative to this directory. They are copied after the builtin static files,
95
# so a file named "default.css" will overwrite the builtin "default.css".
96
html_static_path = ['_static']
97
98
# Set master doc
99
master_doc = "index"
100