Debian Codegraph @

doc/conf.py

raw symbols SCIP
1 # -*- coding: utf-8 -*-
2 #
3 # samtools documentation build configuration file, created by
4 # sphinx-quickstart on Wed Aug 12 14:43:42 2009.
5 #
6 # This file is execfile()d with the current directory set to its containing dir.
7 #
8 # Note that not all possible configuration values are present in this
9 # autogenerated file.
10 #
11 # All configuration values have a default; values that are commented out
12 # serve to show the default.
13
14 import sys, os, re, setuptools
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 _build_obj = setuptools.dist.Distribution().get_command_obj('build')
20 _build_obj.ensure_finalized()
21
22 _libdir = os.path.join('..', _build_obj.build_platlib)
23 if os.path.exists(_libdir):
24 sys.path.insert(0, os.path.abspath(_libdir))
25
26 # -- General configuration -----------------------------------------------------
27
28 # Add any Sphinx extension module names here, as strings. They can be extensions
29 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
30 extensions = ['sphinx.ext.autodoc',
31 'sphinx.ext.autosummary',
32 'sphinx.ext.extlinks',
33 'sphinx.ext.todo',
34 'sphinx.ext.ifconfig',
35 'sphinx.ext.intersphinx',
36 'sphinx.ext.napoleon']
37
38 intersphinx_mapping = {'python': ('https://docs.python.org/%d.%d' % sys.version_info[:2], None)}
39
40 # Add any paths that contain templates here, relative to this directory.
41 templates_path = ['_templates']
42
43 # The suffix of source filenames.
44 source_suffix = '.rst'
45
46 # The encoding of source files.
47 #source_encoding = 'utf-8'
48
49 # The master toctree document.
50 master_doc = 'index'
51
52 # General information about the project.
53 project = u'pysam'
54 copyright = '2009–2025 Andreas Heger, John Marshall, Kevin Jacobs, et al'
55
56 # Included at the end of each rst file
57 rst_epilog = '''
58 .. _pysam: https://github.com/pysam-developers/pysam
59 .. _samtools: https://www.htslib.org/doc/1.21/samtools.html
60 .. _bcftools: https://www.htslib.org/doc/1.21/bcftools.html
61 .. _htslib: https://www.htslib.org/
62 .. _tabix: https://www.htslib.org/doc/tabix.html
63 .. _Galaxy: https://usegalaxy.org/
64 .. _cython: https://cython.org/
65 .. _python: https://www.python.org/
66 .. _PyPI: https://pypi.org/
67 .. _pip: https://pip.pypa.io/
68 .. _pyximport: https://github.com/cython/cython/tree/master/pyximport
69 .. _conda: https://conda.io/docs/
70 .. _bioconda: https://bioconda.github.io/
71 .. _sphinx: https://www.sphinx-doc.org/en/master/usage/installation.html
72 '''
73
74 autosummary_generate = True
75
76 # The version info for the project you're documenting, acts as replacement for
77 # |version| and |release|, also used in various other places throughout the
78 # built documents.
79 #
80 import pysam.version
81 # The short X.Y version.
82 version = pysam.version.__version__
83 # The full version, including alpha/beta/rc tags.
84 release = version
85
86 # The language for content autogenerated by Sphinx. Refer to documentation
87 # for a list of supported languages.
88 # language = None
89
90 # There are two options for replacing |today|: either, you set today to some
91 # non-false value, then it is used:
92 # today = ''
93 # Else, today_fmt is used as the format for a strftime call.
94 # today_fmt = '%B %d, %Y'
95
96 # List of documents that shouldn't be included in the build.
97 # unused_docs = []
98
99 # List of directories, relative to source directory, that shouldn't be searched
100 # for source files.
101 exclude_trees = ['_build']
102
103 # The reST default role (used for this markup: `text`) to use for all documents.
104 # default_role = None
105
106 # If true, '()' will be appended to :func: etc. cross-reference text.
107 # add_function_parentheses = True
108
109 # If true, the current module name will be prepended to all description
110 # unit titles (such as .. function::).
111 # add_module_names = True
112
113 # If true, sectionauthor and moduleauthor directives will be shown in the
114 # output. They are ignored by default.
115 # show_authors = False
116
117 # The name of the Pygments (syntax highlighting) style to use.
118 pygments_style = 'sphinx'
119
120 # A list of ignored prefixes for module index sorting.
121 #modindex_common_prefix = []
122
123 # -- Rewrite "PR #NNN" and "#NNN" in NEWS as URL links -------------------------
124
125 extlinks = {
126 'issue': ('https://github.com/pysam-developers/pysam/issues/%s', '#%s'),
127 'pull': ('https://github.com/pysam-developers/pysam/pull/%s', 'PR #%s'),
128 }
129
130 def expand_github_references(text):
131 text = re.sub(r'PR\s*#(\d+)', r':pull:`\1`', text)
132 text = re.sub(r'#(\d+)', r':issue:`\1`', text)
133 return text
134
135 def include_read(app, relative_path, parent_docname, source):
136 if relative_path.name == 'NEWS':
137 source[0] = expand_github_references(source[0])
138
139 def setup(app):
140 try:
141 app.connect('include-read', include_read)
142 except:
143 pass # Sphinx is too old to link issues/PRs
144
145 # -- Options for HTML output ---------------------------------------------------
146
147 # The theme to use for HTML and HTML Help pages. Major themes that come with
148 # Sphinx are currently 'default' and 'sphinxdoc'.
149 html_theme = 'sphinx_rtd_theme'
150
151 # Theme options are theme-specific and customize the look and feel of a theme
152 # further. For a list of options available for each theme, see the
153 # documentation.
154 # html_theme_options = {}
155
156 # Add any paths that contain custom themes here, relative to this directory.
157 # html_theme_path = []
158
159 # The name for this set of Sphinx documents. If None, it defaults to
160 # "<project> v<release> documentation".
161 # html_title = None
162
163 # A shorter title for the navigation bar. Default is the same as html_title.
164 # html_short_title = None
165
166 # The name of an image file (relative to this directory) to place at the top
167 # of the sidebar.
168 # html_logo = None
169
170 # The name of an image file (within the static path) to use as favicon of the
171 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
172 # pixels large.
173 # html_favicon = None
174
175 # Add any paths that contain custom static files (such as style sheets) here,
176 # relative to this directory. They are copied after the builtin static files,
177 # so a file named "default.css" will overwrite the builtin "default.css".
178 html_static_path = []
179
180 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
181 # using the given strftime format.
182 # html_last_updated_fmt = '%b %d, %Y'
183
184 # If true, SmartyPants will be used to convert quotes and dashes to
185 # typographically correct entities.
186 # html_use_smartypants = True
187
188 # Custom sidebar templates, maps document names to template names.
189 # html_sidebars = {}
190
191 # Additional templates that should be rendered to pages, maps page names to
192 # template names.
193 # html_additional_pages = {}
194
195 # If false, no module index is generated.
196 # html_use_modindex = True
197
198 # If false, no index is generated.
199 # html_use_index = True
200
201 # If true, the index is split into individual pages for each letter.
202 # html_split_index = False
203
204 # If true, links to the reST sources are added to the pages.
205 # html_show_sourcelink = True
206
207 # If true, an OpenSearch description file will be output, and all pages will
208 # contain a <link> tag referring to it. The value of this option must be the
209 # base URL from which the finished HTML is served.
210 # html_use_opensearch = ''
211
212 # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
213 # html_file_suffix = ''
214
215 # Output file base name for HTML help builder.
216 htmlhelp_basename = 'samtoolsdoc'
217
218
219 # -- Options for LaTeX output --------------------------------------------------
220
221 # The paper size ('letter' or 'a4').
222 # latex_paper_size = 'letter'
223
224 # The font size ('10pt', '11pt' or '12pt').
225 # latex_font_size = '10pt'
226
227 # Grouping the document tree into LaTeX files. List of tuples
228 # (source start file, target name, title, author, documentclass [howto/manual]).
229 latex_documents = [
230 ('index', 'pysam.tex', u'pysam documentation',
231 'Andreas Heger, John Marshall, Kevin Jacobs, et al', 'manual'),
232 ]
233
234 # The name of an image file (relative to this directory) to place at the top of
235 # the title page.
236 # latex_logo = None
237
238 # For "manual" documents, if this is true, then toplevel headings are parts,
239 # not chapters.
240 # latex_use_parts = False
241
242 # Additional stuff for the LaTeX preamble.
243 # latex_preamble = ''
244
245 # Documents to append as an appendix to all manuals.
246 # latex_appendices = []
247
248 # If false, no module index is generated.
249 # latex_use_modindex = True