-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconf.py
82 lines (69 loc) · 2.11 KB
/
conf.py
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
# -*- coding: utf-8 -*-
import os
def read_version():
path = os.path.join('..', 'src', 'bytesparse', '__init__.py')
with open(path, 'rt') as file:
for line in file:
if line.startswith('__version__'):
return eval(line.split('=')[1])
raise ValueError(f'cannot find __version__ inside of {path}')
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.coverage',
'sphinx.ext.doctest',
'sphinx.ext.extlinks',
'sphinx.ext.ifconfig',
'sphinx.ext.napoleon',
'sphinx_autodoc_typehints',
'sphinx.ext.todo',
'sphinx.ext.viewcode',
]
if os.getenv('SPELLCHECK'):
extensions += 'sphinxcontrib.spelling',
spelling_show_suggestions = True
spelling_lang = 'en_US'
source_suffix = '.rst'
master_doc = 'index'
project = 'bytesparse'
year = '2020-2024'
author = 'Andrea Zoppi'
copyright = f'{year}, {author}'
version = release = read_version()
pygments_style = 'trac'
templates_path = ['_templates']
extlinks = {
'issue': ('https://github.com/TexZK/bytesparse/issues/%s', '#'),
'pr': ('https://github.com/TexZK/bytesparse/pull/%s', 'PR #'),
}
# on_rtd is whether we are on readthedocs.org
# on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
html_theme = 'furo'
html_use_smartypants = True
html_last_updated_fmt = '%Y-%m-%d'
html_split_index = False
html_sidebars = {
"**": [
"sidebar/scroll-start.html",
"sidebar/brand.html",
"sidebar/search.html",
"sidebar/navigation.html",
"sidebar/ethical-ads.html",
"sidebar/scroll-end.html",
],
}
html_short_title = f'{project}-{version}'
html_static_path = ['_static']
autosummary_generate = True
autosummary_generate_overwrite = True
toc_object_entries_show_parents = 'hide'
napoleon_google_docstring = True
napoleon_numpy_docstring = False
napoleon_include_init_with_doc = False
napoleon_use_ivar = True
napoleon_use_rtype = False
napoleon_use_param = True
napoleon_include_private_with_doc = True
napoleon_include_special_with_doc = True
napoleon_custom_sections = [('Method Groups', 'params_style')]
typehints_document_rtype = False