-
-
Notifications
You must be signed in to change notification settings - Fork 137
/
conf.py
159 lines (133 loc) · 4.81 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# pingouin documentation build configuration file, created by
# sphinx-quickstart on Sun Apr 1 17:42:21 2018.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
import os
import sys
import time
import pingouin
import sphinx_bootstrap_theme
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
sys.path.insert(0, os.path.abspath("sphinxext"))
extensions = [
"sphinx.ext.mathjax",
"sphinx.ext.doctest",
# 'sphinx.ext.viewcode',
"sphinx.ext.githubpages",
"sphinx.ext.autosummary",
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"matplotlib.sphinxext.plot_directive",
"numpydoc",
"sphinx_copybutton",
"sphinx_panels",
]
# configure sphinx-copybutton
# https://github.com/executablebooks/sphinx-copybutton
copybutton_prompt_text = r">>> |\.\.\. |\$ "
copybutton_prompt_is_regexp = True
# sphinx_panels
panels_add_bootstrap_css = False
# Generate the API documentation when building
autosummary_generate = True
numpydoc_show_class_members = False
# Include the example source for plots in API docs
plot_include_source = True
plot_formats = [("png", 90)]
plot_html_show_formats = False
plot_html_show_source_link = False
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = ".rst"
# The master toctree document.
master_doc = "index"
# General information about the project.
project = "pingouin"
author = "Raphael Vallat"
copyright = "2018-{}, Raphael Vallat".format(time.strftime("%Y"))
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
# The full version, including alpha/beta/rc tags.
sys.path.insert(0, os.path.abspath(os.path.pardir))
version = pingouin.__version__
release = pingouin.__version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
# -- Options for HTML output ----------------------------------------------
# Bootstrap theme
html_theme = "bootstrap"
html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
html_theme_options = {
"source_link_position": "footer",
# 'navbar_title': ' ', # we replace this with an image
"bootswatch_theme": "readable",
"navbar_sidebarrel": False,
# 'nosidebar': True,
# 'navbar_site_name': "",
"navbar_pagenav": False,
"bootstrap_version": "3",
"navbar_class": "navbar",
"navbar_links": [
("Functions", "api"),
("Guidelines", "guidelines"),
("FAQ", "faq"),
("What's new", "changelog"),
("Contribute", "contributing"),
],
}
html_logo = "pictures/pingouin.png"
html_favicon = "pictures/pingouin_blue.svg"
# IMPORTANT: There is a misalignement of the Navbar when using Sphinx > 3.0!
# -- Options for HTML output ------------------------------------------
# Output file base name for HTML help builder.
htmlhelp_basename = "pingouindoc"
html_static_path = ["_static"]
html_show_sourcelink = False
html_copy_source = False
templates_path = ["templates"] # To remove the searchbar
def setup(app):
"""Add custom CSS"""
app.add_css_file("style.css")
# -- Intersphinx ------------------------------------------------
intersphinx_mapping = {
"numpy": ("http://docs.scipy.org/doc/numpy/", None),
"scipy": ("http://docs.scipy.org/doc/scipy/reference/", None),
"matplotlib": ("http://matplotlib.org/", None),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
"statsmodels": ("http://www.statsmodels.org/stable/", None),
"seaborn": ("https://seaborn.pydata.org/", None),
"sklearn": ("http://scikit-learn.org/stable", None),
}