|
a |
|
b/docs/conf.py |
|
|
1 |
# -*- coding: utf-8 -*- |
|
|
2 |
from __future__ import unicode_literals |
|
|
3 |
|
|
|
4 |
import os |
|
|
5 |
import sys |
|
|
6 |
#import mock |
|
|
7 |
|
|
|
8 |
extensions = [ |
|
|
9 |
'sphinx.ext.autodoc', |
|
|
10 |
'sphinx.ext.autosummary', |
|
|
11 |
'sphinx.ext.coverage', |
|
|
12 |
#'matplotlib.sphinxext.plot_directive', |
|
|
13 |
#'matplotlib.sphinxext.only_directives', |
|
|
14 |
'sphinx.ext.doctest', |
|
|
15 |
'sphinx.ext.extlinks', |
|
|
16 |
'sphinx.ext.ifconfig', |
|
|
17 |
'sphinx.ext.napoleon', |
|
|
18 |
'sphinx.ext.todo', |
|
|
19 |
'sphinx.ext.viewcode', |
|
|
20 |
] |
|
|
21 |
|
|
|
22 |
#MOCK_MODULES = [ |
|
|
23 |
#'tensorflow', |
|
|
24 |
#'pysam', |
|
|
25 |
#'pyBigWig' |
|
|
26 |
#'matplotlib', |
|
|
27 |
#'seaborn', |
|
|
28 |
#'dash_html_components', |
|
|
29 |
#'dash_core_components', |
|
|
30 |
#'dash', |
|
|
31 |
#'dash_renderer', |
|
|
32 |
#'scikit-learn', |
|
|
33 |
#] |
|
|
34 |
# |
|
|
35 |
#for mod_name in MOCK_MODULES: |
|
|
36 |
# sys.modules[mod_name] = mock.Mock() |
|
|
37 |
|
|
|
38 |
autodoc_mock_imports = ["keras", "tensorflow", "matplotlib", "sklearn", "seaborn", "Bio", |
|
|
39 |
"pandas", "compat", "scipy", "scipy.sparse"] |
|
|
40 |
|
|
|
41 |
if os.getenv('SPELLCHECK'): |
|
|
42 |
extensions += 'sphinxcontrib.spelling', |
|
|
43 |
spelling_show_suggestions = True |
|
|
44 |
spelling_lang = 'en_US' |
|
|
45 |
|
|
|
46 |
source_suffix = '.rst' |
|
|
47 |
master_doc = 'index' |
|
|
48 |
project = u'Janggu' |
|
|
49 |
year = u'2017-2021' |
|
|
50 |
author = u'Wolfgang Kopp' |
|
|
51 |
copyright = '{0}, {1}'.format(year, author) |
|
|
52 |
version = release = '0.10.2' |
|
|
53 |
|
|
|
54 |
pygments_style = 'trac' |
|
|
55 |
templates_path = ['.'] |
|
|
56 |
extlinks = { |
|
|
57 |
'issue': ('https://github.com/BIMSBbioinfo/janggu/issues/%s', '#'), |
|
|
58 |
'pr': ('https://github.com/BIMSBbioinfo/janggu/pull/%s', 'PR #'), |
|
|
59 |
} |
|
|
60 |
# on_rtd is whether we are on readthedocs.org |
|
|
61 |
on_rtd = os.environ.get('READTHEDOCS', None) == 'True' |
|
|
62 |
|
|
|
63 |
if not on_rtd: # only set the theme if we're building docs locally |
|
|
64 |
html_theme = 'sphinx_rtd_theme' |
|
|
65 |
|
|
|
66 |
html_use_smartypants = True |
|
|
67 |
html_last_updated_fmt = '%b %d, %Y' |
|
|
68 |
html_split_index = False |
|
|
69 |
html_sidebars = { |
|
|
70 |
'**': ['searchbox.html', 'globaltoc.html', 'sourcelink.html'], |
|
|
71 |
} |
|
|
72 |
html_short_title = '%s-%s' % (project, version) |
|
|
73 |
|
|
|
74 |
napoleon_use_ivar = True |
|
|
75 |
napoleon_use_rtype = False |
|
|
76 |
napoleon_use_param = False |