-
Notifications
You must be signed in to change notification settings - Fork 31
/
conf.py
132 lines (102 loc) · 3.6 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
import datetime as dt
import os
import sys
# Set variable so that todos are shown in local build
on_rtd = os.environ.get("READTHEDOCS") == "True"
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath(".."))
# -- Project information -----------------------------------------------------
project = "respy"
copyright = f"2015-{dt.datetime.now().year}, The respy Development Team" # noqa: A001
author = "The respy Development Team"
# The full version, including alpha/beta/rc tags.
release = "2.0.0"
version = ".".join(release.split(".")[:2])
# -- General configuration ------------------------------------------------
master_doc = "index"
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.coverage",
"sphinx.ext.doctest",
"sphinx.ext.extlinks",
"sphinx.ext.ifconfig",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
"nbsphinx",
"numpydoc",
"autoapi.extension",
]
autodoc_mock_imports = [
"chaospy",
"estimagic",
"hypothesis",
"joblib",
"numba",
"numpy",
"pandas",
"pytest",
"scipy",
"yaml",
]
extlinks = {
"ghuser": ("https://github.com/%s", "@"),
"gh": ("https://github.com/OpenSourceEconomics/respy/pulls/%s", "#"),
}
intersphinx_mapping = {
"numba": ("http://numba.pydata.org/numba-doc/latest", None),
"numpy": ("https://numpy.org/doc/stable", None),
"pandas": ("https://pandas.pydata.org/pandas-docs/stable", None),
"python": ("https://docs.python.org/3.8", None),
}
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
html_static_path = ["_static"]
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
language = "en"
# 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", "**.ipynb_checkpoints"]
# If true, `todo` and `todoList` produce output, else they produce nothing.
if not on_rtd:
todo_include_todos = True
todo_emit_warnings = True
# Configure Sphinx' linkcheck
linkcheck_ignore = [
r"http://cscubs\.cs\.uni-bonn\.de/*.",
r"https://(dx\.)?doi\.org/*.",
r"https://jstor\.org/*.",
r"https://zenodo\.org/*.",
]
# Configuration for nbsphinx
nbsphinx_execute = "never"
nbsphinx_allow_errors = False
nbsphinx_prolog = r"""
{% set docname = 'docs/' + env.doc2path(env.docname, base=None) %}
.. only:: html
.. nbinfo::
View and download the notebook `here <https://nbviewer.jupyter.org/github/OpenSourceEconomics/respy/tree/v{{ env.config.release }}/{{ docname }}>`_!
"""
# Configuration for numpydoc
numpydoc_xref_param_type = True
numpydoc_xref_ignore = {"type", "optional", "default", "of"}
# Configuration for autodoc
autosummary_generate = True
# Configuration for autoapi
autoapi_type = "python"
autoapi_dirs = ["../respy"]
autoapi_ignore = ["../respy/tests/*"]
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = "pydata_sphinx_theme"
html_theme_options = {
"github_url": "https://github.com/OpenSourceEconomics/respy",
}
html_css_files = ["css/custom.css"]