Diff of /docs/conf.py [000000] .. [548210]

Switch to unified view

a b/docs/conf.py
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
#
4
# openomics documentation build configuration file, created by
5
# sphinx-quickstart on Fri Jun  9 13:47:02 2017.
6
#
7
# This file is execfile()d with the current directory set to its
8
# containing dir.
9
#
10
# Note that not all possible configuration values are present in this
11
# autogenerated file.
12
#
13
# All configuration values have a default; values that are commented out
14
# serve to show the default.
15
16
# If extensions (or modules to document with autodoc) are in another
17
# directory, add these directories to sys.path here. If the directory is
18
# relative to the documentation root, use os.path.abspath to make it
19
# absolute, like shown here.
20
#
21
import os
22
import sys
23
24
sys.path.insert(0, os.path.abspath('..'))
25
26
import openomics
27
28
# If your documentation needs a minimal Sphinx version, state it here.
29
#
30
# needs_sphinx = '1.0'
31
32
# Add any Sphinx extension module names here, as strings. They can be
33
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
34
extensions = [
35
    'sphinx.ext.autodoc',
36
    # 'sphinx.ext.autosummary',
37
    'sphinx_autodoc_typehints',
38
    'sphinx.ext.linkcode',
39
    'sphinx.ext.napoleon',
40
    'myst_parser',
41
42
    # User Usability
43
    'sphinx_copybutton',
44
    'sphinx_inline_tabs',
45
46
    'sphinx.ext.coverage',
47
    'sphinx.ext.intersphinx',
48
    "sphinx.ext.viewcode",
49
    'sphinx_automodapi.automodapi',
50
    'sphinx_automodapi.smart_resolver',
51
    'sphinx.ext.graphviz',
52
    'sphinx.ext.inheritance_diagram',
53
]
54
55
autosummary_generate = False
56
autosummary_imported_members = True
57
napoleon_google_docstring = True
58
napoleon_use_param = True
59
napoleon_use_ivar = True
60
61
# Add any paths that contain templates here, relative to this directory.
62
templates_path = ['_templates']
63
exclude_patterns = ['_build', '_templates']
64
65
# The suffix(es) of source filenames.
66
# You can specify multiple suffix as a list of string:
67
#
68
source_suffix = {
69
    '.rst': 'restructuredtext',
70
    '.txt': 'markdown',
71
    '.md': 'markdown',
72
}
73
74
# The master toctree document.
75
master_doc = 'index'
76
77
# General information about the project.
78
project = 'OpenOmics'
79
copyright = "2019, Nhat Tran"
80
author = "Jonny Tran"
81
82
# The version info for the project you're documenting, acts as replacement
83
# for |version| and |release|, also used in various other places throughout
84
# the built documents.
85
#
86
# The short X.Y version.
87
version = openomics.__version__
88
# The full version, including alpha/beta/rc tags.
89
release = openomics.__version__
90
91
# The language for content autogenerated by Sphinx. Refer to documentation
92
# for a list of supported languages.
93
#
94
# This is also used if you do content translation via gettext catalogs.
95
# Usually you set "language" from the command line for these cases.
96
language = None
97
98
# List of patterns, relative to source directory, that match files and
99
# directories to ignore when looking for source files.
100
# This patterns also effect to html_static_path and html_extra_path
101
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
102
103
# The name of the Pygments (syntax highlighting) style to use.
104
pygments_style = 'sphinx'
105
106
# If true, `todo` and `todoList` produce output, else they produce nothing.
107
# todo_include_todos = True
108
109
# -- Options for Markdown files ----------------------------------------------
110
111
myst_enable_extensions = ["colon_fence", "deflist"]
112
myst_heading_anchors = 3
113
114
# -- Options for HTML output -------------------------------------------
115
116
# The theme to use for HTML and HTML Help pages.  See the documentation for
117
# a list of builtin themes.
118
#
119
html_theme = 'furo'
120
121
# Theme options are theme-specific and customize the look and feel of a
122
# theme further.  For a list of options available for each theme, see the
123
# documentation.
124
125
html_theme_options = {
126
    "sidebar_hide_name": False,
127
    "light_css_variables": {
128
        # "color-brand-primary": "#ff5c84",
129
        # "color-brand-content": "#ff5c84",
130
        # "color-admonition-background": "#33cccc",
131
        # "font-stack": "Arial, sans-serif",
132
        # "font-stack--monospace": "Courier, monospace",
133
    },
134
}
135
136
html_logo = "../openomics_web/assets/openomics_logo.png"
137
html_favicon = '_static/favicon.png'
138
139
pygments_style = "sphinx"
140
pygments_dark_style = "monokai"
141
142
# Add any paths that contain custom static files (such as style sheets) here,
143
# relative to this directory. They are copied after the builtin static files,
144
# so a file named "default.css" will overwrite the builtin "default.css".
145
html_static_path = ['_static']
146
graphviz_dot = "/usr/bin/dot"
147
148
# -- Options for HTMLHelp output ---------------------------------------
149
150
# Output file base name for HTML help builder.
151
htmlhelp_basename = 'openomicsdoc'
152
153
154
# -- Options for manual page output ------------------------------------
155
156
# One entry per manual page. List of tuples
157
# (source start file, name, description, authors, manual section).
158
man_pages = [
159
    (master_doc, 'openomics',
160
     u'OpenOmics Documentation',
161
     [author], 1)
162
]
163
164
165
def linkcode_resolve(domain, info):
166
    if domain != 'py':
167
        return None
168
    if not info['module']:
169
        return None
170
    filename = info['module'].replace('.', '/')
171
    return "https://github.com/JonnyTran/OpenOmics/%s.py" % filename