|
| 1 | +#!/usr/bin/env python |
| 2 | +# -*- coding: utf-8 -*- |
| 3 | +# |
| 4 | +# diffpy.srfit documentation build configuration file, created by # noqa: E501 |
| 5 | +# sphinx-quickstart on Thu Jan 30 15:49:41 2014. |
| 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 | +import sys |
| 17 | +import time |
| 18 | +from importlib.metadata import version |
| 19 | +from pathlib import Path |
| 20 | + |
| 21 | +# Attempt to import the version dynamically from GitHub tag. |
| 22 | +try: |
| 23 | + fullversion = version("diffpy.srfit") |
| 24 | +except Exception: |
| 25 | + fullversion = "No version found. The correct version will appear in the released version." # noqa: E501 |
| 26 | + |
| 27 | +# If extensions (or modules to document with autodoc) are in another directory, |
| 28 | +# add these directories to sys.path here. If the directory is relative to the |
| 29 | +# documentation root, use Path().resolve() to make it absolute, like shown here. # noqa: E501 |
| 30 | +# sys.path.insert(0, str(Path(".").resolve())) |
| 31 | +sys.path.insert(0, str(Path("../..").resolve())) |
| 32 | +sys.path.insert(0, str(Path("../../src").resolve())) |
| 33 | + |
| 34 | +# abbreviations |
| 35 | +ab_authors = "Christopher Farrow, Pavol Juhas, and members of the Billinge Group" |
| 36 | + |
| 37 | +# -- General configuration ------------------------------------------------ |
| 38 | + |
| 39 | +# If your documentation needs a minimal Sphinx version, state it here. |
| 40 | +# needs_sphinx = '1.0' |
| 41 | + |
| 42 | +# Add any Sphinx extension module names here, as strings. They can be |
| 43 | +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom |
| 44 | +# ones. |
| 45 | +extensions = [ |
| 46 | + "sphinx.ext.autodoc", |
| 47 | + "sphinx.ext.napoleon", |
| 48 | + "sphinx.ext.todo", |
| 49 | + "sphinx.ext.viewcode", |
| 50 | + "sphinx.ext.intersphinx", |
| 51 | + "sphinx_rtd_theme", |
| 52 | + "sphinx_copybutton", |
| 53 | + "m2r", |
| 54 | +] |
| 55 | + |
| 56 | +# Add any paths that contain templates here, relative to this directory. |
| 57 | +templates_path = ["_templates"] |
| 58 | + |
| 59 | +# The suffix(es) of source filenames. |
| 60 | +# You can specify multiple suffix as a list of string: |
| 61 | +# |
| 62 | +source_suffix = [".rst", ".md"] |
| 63 | + |
| 64 | +# The encoding of source files. |
| 65 | +# source_encoding = 'utf-8-sig' |
| 66 | + |
| 67 | +# The master toctree document. |
| 68 | +master_doc = "index" |
| 69 | + |
| 70 | +# General information about the project. |
| 71 | +project = "diffpy.srfit" |
| 72 | +copyright = "%Y, The Trustees of Columbia University in the City of New York" |
| 73 | + |
| 74 | +# The version info for the project you're documenting, acts as replacement for |
| 75 | +# |version| and |release|, also used in various other places throughout the |
| 76 | +# built documents. |
| 77 | + |
| 78 | +# The short X.Y version. |
| 79 | +version = "".join(fullversion.split(".post")[:1]) |
| 80 | +# The full version, including alpha/beta/rc tags. |
| 81 | +release = fullversion |
| 82 | + |
| 83 | +# The language for content autogenerated by Sphinx. Refer to documentation |
| 84 | +# for a list of supported languages. |
| 85 | +# language = None |
| 86 | + |
| 87 | +# There are two options for replacing |today|: either, you set today to some |
| 88 | +# non-false value, then it is used: |
| 89 | +# today = '' |
| 90 | +today = time.strftime("%B %d, %Y", time.localtime()) |
| 91 | +year = today.split()[-1] |
| 92 | +# Else, today_fmt is used as the format for a strftime call. |
| 93 | +# today_fmt = '%B %d, %Y' |
| 94 | +# substitute YEAR in the copyright string |
| 95 | +copyright = copyright.replace("%Y", year) |
| 96 | + |
| 97 | +# For sphinx_copybutton extension. |
| 98 | +# Do not copy "$" for shell commands in code-blocks. |
| 99 | +copybutton_prompt_text = r"^\$ " |
| 100 | +copybutton_prompt_is_regexp = True |
| 101 | + |
| 102 | +# List of patterns, relative to source directory, that match files and |
| 103 | +# directories to ignore when looking for source files. |
| 104 | +exclude_patterns = ["build"] |
| 105 | + |
| 106 | +# The reST default role (used for this markup: `text`) to use for all |
| 107 | +# documents. |
| 108 | +# default_role = None |
| 109 | + |
| 110 | +# If true, '()' will be appended to :func: etc. cross-reference text. |
| 111 | +# add_function_parentheses = True |
| 112 | + |
| 113 | +# If true, the current module name will be prepended to all description |
| 114 | +# unit titles (such as .. function::). |
| 115 | +# add_module_names = True |
| 116 | + |
| 117 | +# If true, sectionauthor and moduleauthor directives will be shown in the |
| 118 | +# output. They are ignored by default. |
| 119 | +# show_authors = False |
| 120 | + |
| 121 | +# The name of the Pygments (syntax highlighting) style to use. |
| 122 | +pygments_style = "sphinx" |
| 123 | + |
| 124 | +# A list of ignored prefixes for module index sorting. |
| 125 | +modindex_common_prefix = ["diffpy.srfit"] |
| 126 | + |
| 127 | +# Display all warnings for missing links. |
| 128 | +nitpicky = True |
| 129 | + |
| 130 | +# -- Options for HTML output ---------------------------------------------- |
| 131 | + |
| 132 | +# The theme to use for HTML and HTML Help pages. See the documentation for |
| 133 | +# a list of builtin themes. |
| 134 | +# |
| 135 | +html_theme = "sphinx_rtd_theme" |
| 136 | + |
| 137 | +html_context = { |
| 138 | + "display_github": True, |
| 139 | + "github_user": "diffpy", |
| 140 | + "github_repo": "diffpy.srfit", |
| 141 | + "github_version": "main", |
| 142 | + "conf_py_path": "/doc/source/", |
| 143 | +} |
| 144 | + |
| 145 | +# Theme options are theme-specific and customize the look and feel of a theme |
| 146 | +# further. For a list of options available for each theme, see the |
| 147 | +# documentation. |
| 148 | +# |
| 149 | +html_theme_options = { |
| 150 | + "navigation_with_keys": "true", |
| 151 | +} |
| 152 | + |
| 153 | +# Add any paths that contain custom themes here, relative to this directory. |
| 154 | +# html_theme_path = [] |
| 155 | + |
| 156 | +# The name for this set of Sphinx documents. If None, it defaults to |
| 157 | +# "<project> v<release> documentation". |
| 158 | +# html_title = None |
| 159 | + |
| 160 | +# A shorter title for the navigation bar. Default is the same as html_title. |
| 161 | +# html_short_title = None |
| 162 | + |
| 163 | +# The name of an image file (relative to this directory) to place at the top |
| 164 | +# of the sidebar. |
| 165 | +# html_logo = None |
| 166 | + |
| 167 | +# The name of an image file (within the static path) to use as favicon of the |
| 168 | +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 |
| 169 | +# pixels large. |
| 170 | +# html_favicon = None |
| 171 | + |
| 172 | +# Add any paths that contain custom static files (such as style sheets) here, |
| 173 | +# relative to this directory. They are copied after the builtin static files, |
| 174 | +# so a file named "default.css" will overwrite the builtin "default.css". |
| 175 | +# html_static_path = ['_static'] |
| 176 | + |
| 177 | +# Add any extra paths that contain custom files (such as robots.txt or |
| 178 | +# .htaccess) here, relative to this directory. These files are copied |
| 179 | +# directly to the root of the documentation. |
| 180 | +# html_extra_path = [] |
| 181 | + |
| 182 | +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
| 183 | +# using the given strftime format. |
| 184 | +# html_last_updated_fmt = '%b %d, %Y' |
| 185 | + |
| 186 | +# If true, SmartyPants will be used to convert quotes and dashes to |
| 187 | +# typographically correct entities. |
| 188 | +# html_use_smartypants = True |
| 189 | + |
| 190 | +# Custom sidebar templates, maps document names to template names. |
| 191 | +# html_sidebars = {} |
| 192 | + |
| 193 | +# Additional templates that should be rendered to pages, maps page names to |
| 194 | +# template names. |
| 195 | +# html_additional_pages = {} |
| 196 | + |
| 197 | +# If false, no module index is generated. |
| 198 | +# html_domain_indices = True |
| 199 | + |
| 200 | +# If false, no index is generated. |
| 201 | +# html_use_index = True |
| 202 | + |
| 203 | +# If true, the index is split into individual pages for each letter. |
| 204 | +# html_split_index = False |
| 205 | + |
| 206 | +# If true, links to the reST sources are added to the pages. |
| 207 | +# html_show_sourcelink = True |
| 208 | + |
| 209 | +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. |
| 210 | +# html_show_sphinx = True |
| 211 | + |
| 212 | +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. |
| 213 | +# html_show_copyright = True |
| 214 | + |
| 215 | +# If true, an OpenSearch description file will be output, and all pages will |
| 216 | +# contain a <link> tag referring to it. The value of this option must be the |
| 217 | +# base URL from which the finished HTML is served. |
| 218 | +# html_use_opensearch = '' |
| 219 | + |
| 220 | +# This is the file name suffix for HTML files (e.g. ".xhtml"). |
| 221 | +# html_file_suffix = None |
| 222 | + |
| 223 | +# Output file base name for HTML help builder. |
| 224 | +basename = "diffpy.srfit".replace(" ", "").replace(".", "") |
| 225 | +htmlhelp_basename = basename + "doc" |
| 226 | + |
| 227 | + |
| 228 | +# -- Options for LaTeX output --------------------------------------------- |
| 229 | + |
| 230 | +latex_elements = { |
| 231 | + # The paper size ('letterpaper' or 'a4paper'). |
| 232 | + # 'papersize': 'letterpaper', |
| 233 | + # The font size ('10pt', '11pt' or '12pt'). |
| 234 | + # 'pointsize': '10pt', |
| 235 | + # Additional stuff for the LaTeX preamble. |
| 236 | + # 'preamble': '', |
| 237 | +} |
| 238 | + |
| 239 | +# Grouping the document tree into LaTeX files. List of tuples |
| 240 | +# (source start file, target name, title, |
| 241 | +# author, documentclass [howto, manual, or own class]). |
| 242 | +latex_documents = [ |
| 243 | + ( |
| 244 | + "index", |
| 245 | + "diffpy.srfit.tex", |
| 246 | + "diffpy.srfit Documentation", |
| 247 | + ab_authors, |
| 248 | + "manual", |
| 249 | + ), |
| 250 | +] |
| 251 | + |
| 252 | +# The name of an image file (relative to this directory) to place at the top of |
| 253 | +# the title page. |
| 254 | +# latex_logo = None |
| 255 | + |
| 256 | +# For "manual" documents, if this is true, then toplevel headings are parts, |
| 257 | +# not chapters. |
| 258 | +# latex_use_parts = False |
| 259 | + |
| 260 | +# If true, show page references after internal links. |
| 261 | +# latex_show_pagerefs = False |
| 262 | + |
| 263 | +# If true, show URL addresses after external links. |
| 264 | +# latex_show_urls = False |
| 265 | + |
| 266 | +# Documents to append as an appendix to all manuals. |
| 267 | +# latex_appendices = [] |
| 268 | + |
| 269 | +# If false, no module index is generated. |
| 270 | +# latex_domain_indices = True |
| 271 | + |
| 272 | + |
| 273 | +# -- Options for manual page output --------------------------------------- |
| 274 | + |
| 275 | +# One entry per manual page. List of tuples |
| 276 | +# (source start file, name, description, authors, manual section). |
| 277 | +man_pages = [ |
| 278 | + ( |
| 279 | + "index", |
| 280 | + "diffpy.srfit", |
| 281 | + "diffpy.srfit Documentation", |
| 282 | + ab_authors, |
| 283 | + 1, |
| 284 | + ) |
| 285 | +] |
| 286 | + |
| 287 | +# If true, show URL addresses after external links. |
| 288 | +# man_show_urls = False |
| 289 | + |
| 290 | + |
| 291 | +# -- Options for Texinfo output ------------------------------------------- |
| 292 | + |
| 293 | +# Grouping the document tree into Texinfo files. List of tuples |
| 294 | +# (source start file, target name, title, author, |
| 295 | +# dir menu entry, description, category) |
| 296 | +texinfo_documents = [ |
| 297 | + ( |
| 298 | + "index", |
| 299 | + "diffpy.srfit", |
| 300 | + "diffpy.srfit Documentation", |
| 301 | + ab_authors, |
| 302 | + "diffpy.srfit", |
| 303 | + "One line description of project.", |
| 304 | + "Miscellaneous", |
| 305 | + ), |
| 306 | +] |
| 307 | + |
| 308 | +# Documents to append as an appendix to all manuals. |
| 309 | +# texinfo_appendices = [] |
| 310 | + |
| 311 | +# If false, no module index is generated. |
| 312 | +# texinfo_domain_indices = True |
| 313 | + |
| 314 | +# How to display URL addresses: 'footnote', 'no', or 'inline'. |
| 315 | +# texinfo_show_urls = 'footnote' |
| 316 | + |
| 317 | +# If true, do not generate a @detailmenu in the "Top" node's menu. |
| 318 | +# texinfo_no_detailmenu = False |
| 319 | + |
| 320 | + |
| 321 | +# Example configuration for intersphinx: refer to the Python standard library. |
| 322 | +# intersphinx_mapping = {'http://docs.python.org/': None} |
0 commit comments