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