conf.py 1.88 KB
Newer Older
1
2
3
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
Martin Bauer's avatar
Martin Bauer committed
4
5
import datetime
import sphinx_rtd_theme
6
import os
Markus Holzer's avatar
Markus Holzer committed
7
import re
8
9
import sys

Martin Bauer's avatar
Martin Bauer committed
10
sys.path.insert(0, os.path.abspath('.'))
Markus Holzer's avatar
Markus Holzer committed
11
import pystencils
Martin Bauer's avatar
Martin Bauer committed
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

extensions = [
    'sphinx.ext.autodoc',
    'sphinx.ext.doctest',
    'sphinx.ext.intersphinx',
    'sphinx.ext.mathjax',
    'sphinx.ext.napoleon',
    'nbsphinx',
    'sphinxcontrib.bibtex',
    'sphinx_autodoc_typehints',
]

add_module_names = False
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'

Markus Holzer's avatar
Markus Holzer committed
29
copyright = f'{datetime.datetime.now().year}, Martin Bauer'
Martin Bauer's avatar
Martin Bauer committed
30
author = 'Martin Bauer'
Markus Holzer's avatar
Markus Holzer committed
31
32
33
34
35
# The short X.Y version (including .devXXXX, rcX, b1 suffixes if present)
version = re.sub(r'(\d+\.\d+)\.\d+(.*)', r'\1\2', pystencils.__version__)
version = re.sub(r'(\.dev\d+).*?$', r'\1', version)
# The full version, including alpha/beta/rc tags.
release = pystencils.__version__
Martin Bauer's avatar
Martin Bauer committed
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
language = None
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', '**.ipynb_checkpoints']
default_role = 'any'
pygments_style = 'sphinx'
todo_include_todos = False

# Options for HTML output

html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_theme = 'sphinx_rtd_theme'
htmlhelp_basename = 'pystencilsdoc'
html_sidebars = {'**': ['globaltoc.html', 'relations.html', 'sourcelink.html', 'searchbox.html']}

# NbSphinx configuration
nbsphinx_execute = 'never'
nbsphinx_codecell_lexer = 'python3'

# Example configuration for intersphinx: refer to the Python standard library.
54
intersphinx_mapping = {'python': ('https://docs.python.org/3.8', None),
Martin Bauer's avatar
Martin Bauer committed
55
56
                       'numpy': ('https://docs.scipy.org/doc/numpy/', None),
                       'matplotlib': ('https://matplotlib.org/', None),
57
                       'sympy': ('https://docs.sympy.org/latest/', None),
Martin Bauer's avatar
Martin Bauer committed
58
59
60
                       }

autodoc_member_order = 'bysource'
Markus Holzer's avatar
Markus Holzer committed
61
bibtex_bibfiles = ['sphinx/pystencils.bib']
62
63

project = 'pystencils'
Markus Holzer's avatar
Markus Holzer committed
64
html_logo = 'img/logo.png'