-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconf.py
123 lines (98 loc) · 3.46 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
#!/usr/bin/env python3
import datetime
import sys
from pathlib import Path
import radiotools
if sys.version_info < (3, 11):
import tomli as tomllib
else:
import tomllib
pyproject_path = Path(__file__).parent.parent / "pyproject.toml"
pyproject = tomllib.loads(pyproject_path.read_text())
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.coverage",
"sphinx.ext.viewcode",
"sphinx_automodapi.automodapi",
"sphinx_automodapi.smart_resolver",
"matplotlib.sphinxext.plot_directive",
"numpydoc",
"sphinx_design",
"IPython.sphinxext.ipython_console_highlighting",
]
numpydoc_show_class_members = False
numpydoc_class_members_toctree = False
templates_path = ["_templates"]
exclude_patterns = [
"_build",
"Thumbs.db",
".DS_Store",
"changes",
"*.log",
]
source_suffix = ".rst"
master_doc = "index"
project = pyproject["project"]["name"]
author = pyproject["project"]["authors"][0]["name"]
copyright = "{}. Last updated {}".format(
author, datetime.datetime.now().strftime("%d %b %Y %H:%M")
)
python_requires = pyproject["project"]["requires-python"]
# make some variables available to each page
rst_epilog = f"""
.. |python_requires| replace:: {python_requires}
"""
version = radiotools.__version__
# The full version, including alpha/beta/rc tags.
release = version
# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
html_theme = "pydata_sphinx_theme"
html_static_path = ["_static"]
html_file_suffix = ".html"
html_css_files = ["radiotools.css"]
html_theme_options = {
"github_url": "https://github.com/radionets-project/radiotools",
"header_links_before_dropdown": 5,
"navbar_start": ["navbar-logo"],
"navigation_with_keys": False,
# "use_edit_page_button": True,
"icon_links_label": "Quick Links",
"icon_links": [
{
"name": "Radionets Project",
"url": "https://github.com/radionets-project",
"type": "url",
"icon": "https://avatars.githubusercontent.com/u/77392854?s=200&v=4", # noqa: E501
},
],
"announcement": """
<p>radiotools is not stable yet, so expect large and rapid
changes to structure and functionality as we explore various
design choices before the 1.0 release.</p>
""",
}
html_title = f"{project}"
htmlhelp_basename = project + "docs"
# Configuration for intersphinx
intersphinx_mapping = {
"astropy": ("https://docs.astropy.org/en/stable", None),
"ipywidgets": ("https://ipywidgets.readthedocs.io/en/stable", None),
"joblib": ("https://joblib.readthedocs.io/en/stable", None),
"matplotlib": ("https://matplotlib.org/stable", None),
"numba": ("https://numba.readthedocs.io/en/stable", None),
"numpy": ("https://numpy.org/doc/stable", None),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable", None),
"pytest": ("https://docs.pytest.org/en/stable", None),
"python": ("https://docs.python.org/3", None),
"scipy": ("https://docs.scipy.org/doc/scipy", None),
"setuptools": ("https://setuptools.pypa.io/en/stable", None),
"sklearn": ("https://scikit-learn.org/stable", None),
}
suppress_warnings = [
"intersphinx.external",
]