1
|
|
|
# -*- coding: utf-8 -*- |
2
|
|
|
from __future__ import unicode_literals |
3
|
|
|
|
4
|
|
|
from os import getenv |
5
|
|
|
|
6
|
|
|
from spaceweather import __version__ |
7
|
|
|
|
8
|
|
|
project = u'pyspaceweather' |
9
|
|
|
copyright = u'2020, Stefan Bender' |
10
|
|
|
author = u'Stefan Bender' |
11
|
|
|
|
12
|
|
|
version = __version__ |
13
|
|
|
release = __version__ |
14
|
|
|
|
15
|
|
|
extensions = [ |
16
|
|
|
'sphinx.ext.autodoc', |
17
|
|
|
'sphinx.ext.autosummary', |
18
|
|
|
'sphinx.ext.intersphinx', |
19
|
|
|
'sphinx.ext.extlinks', |
20
|
|
|
'sphinx.ext.todo', |
21
|
|
|
'sphinx.ext.coverage', |
22
|
|
|
'sphinx.ext.ifconfig', |
23
|
|
|
'sphinx.ext.viewcode', |
24
|
|
|
'sphinx.ext.napoleon', |
25
|
|
|
'sphinx.ext.mathjax', |
26
|
|
|
'recommonmark', |
27
|
|
|
'numpydoc' |
28
|
|
|
] |
29
|
|
|
if getenv('SPELLCHECK'): |
30
|
|
|
extensions += 'sphinxcontrib.spelling', |
31
|
|
|
spelling_show_suggestions = True |
32
|
|
|
spelling_lang = 'en_GB' |
33
|
|
|
|
34
|
|
|
master_doc = 'index' |
35
|
|
|
|
36
|
|
|
language = None |
37
|
|
|
|
38
|
|
|
htmlhelp_basename = 'pyspaceweatherdoc' |
39
|
|
|
|
40
|
|
|
# autodoc_docstring_signature = False |
41
|
|
|
# autodoc_dumb_docstring = True |
42
|
|
|
autosummary_generate = True |
43
|
|
|
|
44
|
|
|
latex_elements = { |
45
|
|
|
"papersize": "a4paper", |
46
|
|
|
"pointsize": "11pt", |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
# Grouping the document tree into LaTeX files. List of tuples |
50
|
|
|
# (source start file, target name, title, |
51
|
|
|
# author, documentclass [howto, manual, or own class]). |
52
|
|
|
latex_documents = [ |
53
|
|
|
(master_doc, 'pyspaceweather.tex', u'pyspaceweather Documentation', |
54
|
|
|
u'Stefan Bender', 'manual'), |
55
|
|
|
] |
56
|
|
|
|
57
|
|
|
# One entry per manual page. List of tuples |
58
|
|
|
# (source start file, name, description, authors, manual section). |
59
|
|
|
man_pages = [ |
60
|
|
|
(master_doc, 'pyspaceweather', u'pyspaceweather Documentation', |
61
|
|
|
[author], 1) |
62
|
|
|
] |
63
|
|
|
|
64
|
|
|
# Grouping the document tree into Texinfo files. List of tuples |
65
|
|
|
# (source start file, target name, title, author, |
66
|
|
|
# dir menu entry, description, category) |
67
|
|
|
texinfo_documents = [ |
68
|
|
|
(master_doc, 'pyspaceweather', u'pyspaceweather Documentation', |
69
|
|
|
author, 'pyspaceweather', 'Space weather indices for python.', |
70
|
|
|
'Miscellaneous'), |
71
|
|
|
] |
72
|
|
|
|
73
|
|
|
# on_rtd is whether we are on readthedocs.org |
74
|
|
|
on_rtd = getenv("READTHEDOCS", None) == "True" |
75
|
|
|
if not on_rtd: |
76
|
|
|
import sphinx_rtd_theme |
77
|
|
|
html_theme = "sphinx_rtd_theme" |
78
|
|
|
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] |
79
|
|
|
|
80
|
|
|
exclude_patterns = [u'_build', 'Thumbs.db', '.DS_Store'] |
81
|
|
|
pygments_style = 'default' |
82
|
|
|
templates_path = ['_templates'] |
83
|
|
|
html_use_smartypants = True |
84
|
|
|
html_last_updated_fmt = '%b %d, %Y' |
85
|
|
|
html_split_index = True |
86
|
|
|
html_sidebars = { |
87
|
|
|
'**': ['searchbox.html', 'localtoc.html', 'relations.html', |
88
|
|
|
'globaltoc.html', 'sourcelink.html'], |
89
|
|
|
} |
90
|
|
|
html_short_title = '%s-%s' % (project, version) |
91
|
|
|
html_context = dict( |
92
|
|
|
display_github=True, |
93
|
|
|
github_user="st-bender", |
94
|
|
|
github_repo="pyspaceweather", |
95
|
|
|
github_version="master", |
96
|
|
|
conf_py_path="/docs/", |
97
|
|
|
) |
98
|
|
|
html_static_path = ["_static"] |
99
|
|
|
# Switch to old behavior with html4, for a good display of references, |
100
|
|
|
# as described in https://github.com/sphinx-doc/sphinx/issues/6705 |
101
|
|
|
html4_writer = True |
102
|
|
|
|
103
|
|
|
# If true, `todo` and `todoList` produce output, else they produce nothing. |
104
|
|
|
todo_include_todos = True |
105
|
|
|
# Example configuration for intersphinx: refer to the Python standard library. |
106
|
|
|
intersphinx_mapping = { |
107
|
|
|
'python': ('https://docs.python.org/3/', None), |
108
|
|
|
'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None), |
109
|
|
|
'numpy': ('https://numpy.org/doc/stable/', None), |
110
|
|
|
} |
111
|
|
|
|