conf   A
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 145
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 0
eloc 89
dl 0
loc 145
rs 10
c 0
b 0
f 0
1
# -*- coding: utf-8 -*-
2
from __future__ import unicode_literals
3
4
from os import getenv
5
6
from sciapy import __version__
7
8
project = u'sciapy'
9
copyright = u'2018, 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
    'sphinx_markdown_tables',
27
    'recommonmark',
28
    'nbsphinx',
29
    'numpydoc'
30
]
31
if getenv('SPELLCHECK'):
32
    extensions += 'sphinxcontrib.spelling',
33
    spelling_show_suggestions = True
34
    spelling_lang = 'en_GB'
35
36
source_suffix = ['.md', '.rst']
37
master_doc = 'index'
38
39
language = None
40
41
htmlhelp_basename = 'sciapydoc'
42
43
autosummary_generate = True
44
45
napoleon_custom_sections = [
46
    ("Arguments", "params_style"),
47
    ("Attributes", "params_style"),
48
]
49
napoleon_custom_section_rename = False
50
napoleon_use_param = False
51
52
latex_elements = {
53
    "papersize": "a4paper",
54
    "pointsize": "11pt",
55
}
56
57
# Grouping the document tree into LaTeX files. List of tuples
58
# (source start file, target name, title,
59
#  author, documentclass [howto, manual, or own class]).
60
latex_documents = [
61
    (master_doc, 'sciapy.tex', u'sciapy Documentation',
62
     u'Stefan Bender', 'manual'),
63
]
64
65
# One entry per manual page. List of tuples
66
# (source start file, name, description, authors, manual section).
67
man_pages = [
68
    (master_doc, 'sciapy', u'sciapy Documentation',
69
     [author], 1)
70
]
71
72
# Grouping the document tree into Texinfo files. List of tuples
73
# (source start file, target name, title, author,
74
#  dir menu entry, description, category)
75
texinfo_documents = [
76
    (master_doc, 'sciapy', u'sciapy Documentation',
77
     author, 'sciapy', 'SCIAMACHY data tools.',
78
     'Miscellaneous'),
79
]
80
81
nbsphinx_prolog = r"""
82
{% set docname = 'docs/' + env.doc2path(env.docname, base=None) %}
83
84
.. module:: sciapy
85
86
.. note:: This tutorial was generated from an IPython notebook that can be
87
          downloaded `here <https://github.com/st-bender/sciapy/blob/master/{{ docname }}>`_.
88
          Try a live version: |binderbadge|, or |nbviewer|__.
89
90
.. |binderbadge| image:: https://mybinder.org/badge_logo.svg
91
    :target: https://mybinder.org/v2/gh/st-bender/sciapy/master?filepath={{ docname }}
92
93
.. |nbviewer| replace:: view in *nbviewer*
94
__ https://nbviewer.jupyter.org/github/st-bender/sciapy/tree/master/{{ docname }}
95
96
.. _{{ docname }}:
97
"""
98
99
# on_rtd is whether we are on readthedocs.org
100
on_rtd = getenv("READTHEDOCS", None) == "True"
101
if not on_rtd:
102
    import sphinx_rtd_theme
103
    html_theme = "sphinx_rtd_theme"
104
    html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
105
106
exclude_patterns = [u'_build', 'Thumbs.db', '.DS_Store', '**.ipynb_checkpoints']
107
pygments_style = 'default'
108
templates_path = ['_templates']
109
html_use_smartypants = True
110
html_last_updated_fmt = '%b %d, %Y'
111
html_split_index = True
112
html_sidebars = {
113
    '**': ['searchbox.html', 'localtoc.html', 'relations.html',
114
          'globaltoc.html', 'sourcelink.html'],
115
}
116
html_short_title = '%s-%s' % (project, version)
117
html_context = dict(
118
    display_github=True,
119
    github_user="st-bender",
120
    github_repo="sciapy",
121
    github_version="master",
122
    conf_py_path="/docs/",
123
)
124
html_static_path = ["_static"]
125
# Switch to old behavior with html4, for a good display of references,
126
# as described in https://github.com/sphinx-doc/sphinx/issues/6705
127
html4_writer = True
128
129
# If true, `todo` and `todoList` produce output, else they produce nothing.
130
todo_include_todos = True
131
# Example configuration for intersphinx: refer to the Python standard library.
132
intersphinx_mapping = {
133
    'python': ('https://docs.python.org/3/', None),
134
    'pandas': ('https://pandas.pydata.org/pandas-docs/stable/', None),
135
    'iris': ('https://scitools-iris.readthedocs.io/en/stable/', None),
136
    'numpy': ('https://numpy.org/doc/stable/', None),
137
    'scipy': ('https://docs.scipy.org/doc/scipy/', None),
138
    'numba': ('https://numba.pydata.org/numba-doc/latest/', None),
139
    'matplotlib': ('https://matplotlib.org/stable/', None),
140
    'astropy': ('https://docs.astropy.org/en/stable/', None),
141
    'xarray': ('https://xarray.pydata.org/en/stable/', None),
142
    'celerite': ('https://celerite.readthedocs.io/en/stable/', None),
143
    'george': ('https://george.readthedocs.io/en/stable/', None),
144
    'emcee': ('https://emcee.readthedocs.io/en/stable/', None),
145
}
146