|
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
|
|
|
|
|
19
|
|
|
sys.path.append(os.path.dirname(__file__)) |
|
20
|
|
|
sys.path.append(os.path.join(os.path.dirname(__name__), "..", "async_btree")) |
|
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_btree' |
|
36
|
|
|
copyright = '2019, 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 = [ |
|
49
|
|
|
"sphinx.ext.autodoc", |
|
50
|
|
|
"sphinx.ext.napoleon", |
|
51
|
|
|
"sphinx.ext.viewcode", |
|
52
|
|
|
"sphinx.ext.ifconfig", |
|
53
|
|
|
"m2r", |
|
54
|
|
|
"autodocsumm", |
|
55
|
|
|
] |
|
56
|
|
|
|
|
57
|
|
|
# Napoleon settings |
|
58
|
|
|
napoleon_google_docstring = True |
|
59
|
|
|
napoleon_numpy_docstring = True |
|
60
|
|
|
napoleon_include_init_with_doc = False |
|
61
|
|
|
napoleon_include_private_with_doc = False |
|
62
|
|
|
napoleon_include_special_with_doc = True |
|
63
|
|
|
napoleon_use_admonition_for_examples = False |
|
64
|
|
|
napoleon_use_admonition_for_notes = False |
|
65
|
|
|
napoleon_use_admonition_for_references = False |
|
66
|
|
|
napoleon_use_ivar = False |
|
67
|
|
|
napoleon_use_param = True |
|
68
|
|
|
napoleon_use_rtype = True |
|
69
|
|
|
|
|
70
|
|
|
# autodocsumm settings |
|
71
|
|
|
autodoc_default_options = {'autosummary': True} |
|
72
|
|
|
|
|
73
|
|
|
autodata_content = 'both' |
|
74
|
|
|
|
|
75
|
|
|
source_suffix = ['.rst', '.md'] |
|
76
|
|
|
|
|
77
|
|
|
# Autodoc Settings |
|
78
|
|
|
autodoc_default_options = {"member-order": "bysource", "undoc-members": True} |
|
79
|
|
|
|
|
80
|
|
|
# Add any paths that contain templates here, relative to this directory. |
|
81
|
|
|
templates_path = ['_templates'] |
|
82
|
|
|
|
|
83
|
|
|
# List of patterns, relative to source directory, that match files and |
|
84
|
|
|
# directories to ignore when looking for source files. |
|
85
|
|
|
# This pattern also affects html_static_path and html_extra_path. |
|
86
|
|
|
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] |
|
87
|
|
|
|
|
88
|
|
|
|
|
89
|
|
|
# -- Options for HTML output ------------------------------------------------- |
|
90
|
|
|
|
|
91
|
|
|
# The theme to use for HTML and HTML Help pages. See the documentation for |
|
92
|
|
|
# a list of builtin themes. |
|
93
|
|
|
# |
|
94
|
|
|
html_theme = "sphinx_rtd_theme" |
|
95
|
|
|
|
|
96
|
|
|
# Add any paths that contain custom static files (such as style sheets) here, |
|
97
|
|
|
# relative to this directory. They are copied after the builtin static files, |
|
98
|
|
|
# so a file named "default.css" will overwrite the builtin "default.css". |
|
99
|
|
|
html_static_path = ['_static'] |
|
100
|
|
|
|
|
101
|
|
|
# Set master doc |
|
102
|
|
|
master_doc = "index" |
|
103
|
|
|
|