Switch to unified view

a b/docs-source/source/conf.py
1
#!/home/shawarma/venv/bin/python3
2
# -*- coding: utf-8 -*-
3
#
4
# slideflow documentation build configuration file, created by
5
# sphinx-quickstart on Mon Jan 14 19:42:39 2019.
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 directory,
17
# add these directories to sys.path here. If the directory is relative to the
18
# documentation root, use os.path.abspath to make it absolute, like shown here.
19
#
20
import os
21
import sys
22
sys.path.insert(0, os.path.abspath('../../'))
23
import slideflow as sf
24
25
26
# -- General configuration ------------------------------------------------
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
34
# ones.
35
extensions = [
36
    'sphinx.ext.autodoc',
37
    'sphinx.ext.autosummary',
38
    'sphinx.ext.intersphinx',
39
    'sphinx.ext.todo',
40
    'sphinx.ext.mathjax',
41
    'sphinx.ext.napoleon',
42
    'sphinx.ext.viewcode',
43
    'sphinx_markdown_tables',
44
    'sphinxcontrib.video'
45
]
46
47
autoclass_content = 'both'
48
autosummary_generate = False
49
add_module_names = False
50
51
# Add any paths that contain templates here, relative to this directory.
52
templates_path = ['_templates']
53
54
# The suffix(es) of source filenames.
55
# You can specify multiple suffix as a list of string:
56
#
57
# source_suffix = ['.rst', '.md']
58
source_suffix = '.rst'
59
60
# The master toctree document.
61
master_doc = 'index'
62
63
# General information about the project.
64
project = 'slideflow'
65
copyright = '2023, James M Dolezal'
66
author = 'James M Dolezal'
67
68
# The version info for the project you're documenting, acts as replacement for
69
# |version| and |release|, also used in various other places throughout the
70
# built documents.
71
#
72
# The short X.Y version.
73
version = '.'.join(sf.__version__.split('.')[:2])
74
# The full version, including alpha/beta/rc tags.
75
release = sf.__version__.split('+')[0]
76
77
# The language for content autogenerated by Sphinx. Refer to documentation
78
# for a list of supported languages.
79
#
80
# This is also used if you do content translation via gettext catalogs.
81
# Usually you set "language" from the command line for these cases.
82
language = 'en'
83
84
# List of patterns, relative to source directory, that match files and
85
# directories to ignore when looking for source files.
86
# This patterns also effect to html_static_path and html_extra_path
87
exclude_patterns = []
88
89
# The name of the Pygments (syntax highlighting) style to use.
90
pygments_style = 'sphinx'
91
92
# If true, `todo` and `todoList` produce output, else they produce nothing.
93
todo_include_todos = True
94
95
# -- Options for HTML output ----------------------------------------------
96
97
# The theme to use for HTML and HTML Help pages.  See the documentation for
98
# a list of builtin themes.
99
#
100
html_theme = 'pytorch_sphinx_theme'
101
html_theme_path = ['../pytorch_sphinx_theme']
102
103
# Theme options are theme-specific and customize the look and feel of a theme
104
# further.  For a list of options available for each theme, see the
105
# documentation.
106
#
107
# html_theme_options = {}
108
109
# Add any paths that contain custom static files (such as style sheets) here,
110
# relative to this directory. They are copied after the builtin static files,
111
# so a file named "default.css" will overwrite the builtin "default.css".
112
html_static_path = ['_static']
113
114
# Custom sidebar templates, must be a dictionary that maps document names
115
# to template names.
116
#
117
# This is required for the alabaster theme
118
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
119
html_sidebars = {
120
    '**': [
121
        'relations.html',  # needs 'show_related': True theme option to display
122
        'searchbox.html',
123
    ]
124
}
125
126
# Remove the .html from links
127
#html_link_suffix = ''
128
129
# -- Options for HTMLHelp output ------------------------------------------
130
131
# Output file base name for HTML help builder.
132
htmlhelp_basename = 'slideflowdoc'
133
134
135
# -- Options for LaTeX output ---------------------------------------------
136
137
latex_elements = {
138
    # The paper size ('letterpaper' or 'a4paper').
139
    #
140
    # 'papersize': 'letterpaper',
141
142
    # The font size ('10pt', '11pt' or '12pt').
143
    #
144
    # 'pointsize': '10pt',
145
146
    # Additional stuff for the LaTeX preamble.
147
    #
148
    # 'preamble': '',
149
150
    # Latex figure (float) alignment
151
    #
152
    # 'figure_align': 'htbp',
153
}
154
155
# Grouping the document tree into LaTeX files. List of tuples
156
# (source start file, target name, title,
157
#  author, documentclass [howto, manual, or own class]).
158
latex_documents = [
159
    (master_doc, 'slideflow.tex', 'Slideflow Documentation',
160
     'James M Dolezal', 'manual'),
161
]
162
163
164
# -- Options for manual page output ---------------------------------------
165
166
# One entry per manual page. List of tuples
167
# (source start file, name, description, authors, manual section).
168
man_pages = [
169
    (master_doc, 'slideflow', 'Slideflow Documentation',
170
     [author], 1)
171
]
172
173
174
# -- Options for Texinfo output -------------------------------------------
175
176
# Grouping the document tree into Texinfo files. List of tuples
177
# (source start file, target name, title, author,
178
#  dir menu entry, description, category)
179
texinfo_documents = [
180
    (master_doc, 'slideflow', 'Slideflow Documentation',
181
     author, 'slideflow', 'Machine learning histology pipeline and toolset.',
182
     'Miscellaneous'),
183
]
184
185
186
# Example configuration for intersphinx: refer to the Python standard library.
187
intersphinx_mapping = {'python': ('https://docs.python.org/', None)}
188
189
def skip(app, what, name, obj, would_skip, options):
190
    if name == "__init__":
191
        return False
192
    return would_skip
193
194
def setup(app):
195
    app.connect("autodoc-skip-member", skip)