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