/ docs / conf.py
conf.py
  1  # -*- coding: utf-8 -*-
  2  
  3  # SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
  4  #
  5  # SPDX-License-Identifier: MIT
  6  
  7  import os
  8  import sys
  9  
 10  sys.path.insert(0, os.path.abspath(".."))
 11  
 12  # -- General configuration ------------------------------------------------
 13  
 14  # Add any Sphinx extension module names here, as strings. They can be
 15  # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
 16  # ones.
 17  extensions = [
 18      "autoapi.extension",
 19      "sphinx.ext.intersphinx",
 20      "sphinx.ext.napoleon",
 21      "sphinx.ext.todo",
 22  ]
 23  
 24  autoapi_keep_files = True
 25  autoapi_dirs = ["../jepler_udecimal"]
 26  autoapi_add_toctree_entry = True
 27  autoapi_options = [
 28      "members",
 29      "undoc-members",
 30      "show-inheritance",
 31      "special-members",
 32      "show-module-summary",
 33  ]
 34  autoapi_python_class_content = "both"
 35  autoapi_python_use_implicit_namespaces = True
 36  autoapi_template_dir = "autoapi/templates"
 37  autoapi_root = "api"
 38  
 39  intersphinx_mapping = {
 40      "python": ("https://docs.python.org/3.4", None),
 41      "CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None),
 42  }
 43  
 44  # Add any paths that contain templates here, relative to this directory.
 45  templates_path = ["_templates"]
 46  
 47  source_suffix = ".rst"
 48  
 49  # The master toctree document.
 50  master_doc = "index"
 51  
 52  # General information about the project.
 53  project = "Jepler udecimal Library"
 54  copyright = "2020 jepler"
 55  author = "jepler"
 56  
 57  # The version info for the project you're documenting, acts as replacement for
 58  # |version| and |release|, also used in various other places throughout the
 59  # built documents.
 60  #
 61  # The short X.Y version.
 62  version = "1.0"
 63  # The full version, including alpha/beta/rc tags.
 64  release = "1.0"
 65  
 66  # The language for content autogenerated by Sphinx. Refer to documentation
 67  # for a list of supported languages.
 68  #
 69  # This is also used if you do content translation via gettext catalogs.
 70  # Usually you set "language" from the command line for these cases.
 71  language = "en"
 72  
 73  # List of patterns, relative to source directory, that match files and
 74  # directories to ignore when looking for source files.
 75  # This patterns also effect to html_static_path and html_extra_path
 76  exclude_patterns = [
 77      "_build",
 78      "Thumbs.db",
 79      ".DS_Store",
 80      ".env",
 81      "CODE_OF_CONDUCT.md",
 82      "autoapi",
 83  ]
 84  
 85  # The reST default role (used for this markup: `text`) to use for all
 86  # documents.
 87  #
 88  default_role = "any"
 89  
 90  # If true, '()' will be appended to :func: etc. cross-reference text.
 91  #
 92  add_function_parentheses = True
 93  
 94  # The name of the Pygments (syntax highlighting) style to use.
 95  pygments_style = "sphinx"
 96  
 97  # If true, `todo` and `todoList` produce output, else they produce nothing.
 98  todo_include_todos = False
 99  
100  # If this is True, todo emits a warning for each TODO entries. The default is False.
101  todo_emit_warnings = True
102  
103  napoleon_numpy_docstring = False
104  
105  # -- Options for HTML output ----------------------------------------------
106  
107  # The theme to use for HTML and HTML Help pages.  See the documentation for
108  # a list of builtin themes.
109  #
110  on_rtd = os.environ.get("READTHEDOCS", None) == "True"
111  
112  if not on_rtd:  # only import and set the theme if we're building docs locally
113      try:
114          import sphinx_rtd_theme
115  
116          html_theme = "sphinx_rtd_theme"
117          html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."]
118      except:
119          html_theme = "default"
120          html_theme_path = ["."]
121  else:
122      html_theme_path = ["."]
123  
124  # Add any paths that contain custom static files (such as style sheets) here,
125  # relative to this directory. They are copied after the builtin static files,
126  # so a file named "default.css" will overwrite the builtin "default.css".
127  html_static_path = ["_static"]
128  
129  # The name of an image file (relative to this directory) to use as a favicon of
130  # the docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
131  # pixels large.
132  #
133  html_favicon = "_static/favicon.ico"
134  
135  # Output file base name for HTML help builder.
136  htmlhelp_basename = "JeplerUdecimalLibrarydoc"
137  
138  # -- Options for LaTeX output ---------------------------------------------
139  
140  latex_elements = {
141      # The paper size ('letterpaper' or 'a4paper').
142      # 'papersize': 'letterpaper',
143      # The font size ('10pt', '11pt' or '12pt').
144      # 'pointsize': '10pt',
145      # Additional stuff for the LaTeX preamble.
146      # 'preamble': '',
147      # Latex figure (float) alignment
148      # 'figure_align': 'htbp',
149  }
150  
151  # Grouping the document tree into LaTeX files. List of tuples
152  # (source start file, target name, title,
153  #  author, documentclass [howto, manual, or own class]).
154  latex_documents = [
155      (
156          master_doc,
157          "JeplerudecimalLibrary.tex",
158          "Jeplerudecimal Library Documentation",
159          author,
160          "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      (
170          master_doc,
171          "Jeplerudecimallibrary",
172          "Jepler udecimal Library Documentation",
173          [author],
174          1,
175      ),
176  ]
177  
178  # -- Options for Texinfo output -------------------------------------------
179  
180  # Grouping the document tree into Texinfo files. List of tuples
181  # (source start file, target name, title, author,
182  #  dir menu entry, description, category)
183  texinfo_documents = [
184      (
185          master_doc,
186          "JeplerudecimalLibrary",
187          "Jepler udecimal Library Documentation",
188          author,
189          "JeplerudecimalLibrary",
190          "One line description of project.",
191          "Miscellaneous",
192      ),
193  ]