-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconf.py
More file actions
83 lines (66 loc) · 2.6 KB
/
Copy pathconf.py
File metadata and controls
83 lines (66 loc) · 2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
import os
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
project = 'looptime'
copyright = '2021-2025 Sergey Vasilyev'
author = 'Sergey Vasilyev'
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'sphinx.ext.extlinks',
'sphinx.ext.linkcode',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx_llm.txt',
]
html_theme = 'furo'
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
html_static_path = ['_static']
templates_path = ['_templates']
# -- Options for intersphinx extension ---------------------------------------
intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
}
# -- Options for linkcode extension ------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/extensions/linkcode.html
def linkcode_resolve(domain, info):
if domain != 'py':
return None
if not info['module']:
return None
filename = info['module'].replace('.', '/')
return "https://github.com/nolar/looptime/blob/main/%s.py" % filename
# -- Options for extlinks extension ------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/extensions/extlinks.html
extlinks = {
'issue': ('https://github.com/nolar/looptime/issues/%s', 'issue %s'),
}
###############################################################################
# Ensure the apidoc is always built as part of the build process,
# especially in ReadTheDocs build environment.
# See: https://github.com/rtfd/readthedocs.org/issues/1139
###############################################################################
def run_apidoc(_):
ignore_paths = [
]
docs_path = os.path.relpath(os.path.dirname(__file__))
root_path = os.path.relpath(os.path.dirname(os.path.dirname(__file__)))
argv = [
'--force',
'--no-toc',
'--separate',
'--module-first',
'--output-dir', os.path.join(docs_path, 'packages'),
os.path.join(root_path, 'looptime'),
] + ignore_paths
from sphinx.ext import apidoc
apidoc.main(argv)
def setup(app):
app.connect('builder-inited', run_apidoc)