/ 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      "sphinx.ext.autodoc",
 19      "sphinx.ext.intersphinx",
 20      "sphinx.ext.napoleon",
 21      "sphinx.ext.todo",
 22  ]
 23  
 24  # TODO: Please Read!
 25  # Uncomment the below if you use native CircuitPython modules such as
 26  # digitalio, micropython and busio. List the modules you use. Without it, the
 27  # autodoc module docs will fail to generate with a warning.
 28  autodoc_mock_imports = [
 29      "displayio",
 30      "adafruit_display_shapes",
 31      "vectorio",
 32      "bitmaptools",
 33      "terminalio",
 34      "adafruit_imageload",
 35      "adafruit_display_text",
 36      "bitmaptools",
 37  ]
 38  
 39  
 40  intersphinx_mapping = {
 41      "python": ("https://docs.python.org/3.4", None),
 42      "CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None),
 43  }
 44  
 45  # Show the docstring from both the class and its __init__() method.
 46  autoclass_content = "both"
 47  
 48  # Add any paths that contain templates here, relative to this directory.
 49  templates_path = ["_templates"]
 50  
 51  source_suffix = ".rst"
 52  
 53  # The master toctree document.
 54  master_doc = "index"
 55  
 56  # General information about the project.
 57  project = " CircuitPython equalizer Library"
 58  copyright = "2021 Jose David M."
 59  author = "Jose David M."
 60  
 61  # The version info for the project you're documenting, acts as replacement for
 62  # |version| and |release|, also used in various other places throughout the
 63  # built documents.
 64  #
 65  # The short X.Y version.
 66  version = "1.0"
 67  # The full version, including alpha/beta/rc tags.
 68  release = "1.0"
 69  
 70  # The language for content autogenerated by Sphinx. Refer to documentation
 71  # for a list of supported languages.
 72  #
 73  # This is also used if you do content translation via gettext catalogs.
 74  # Usually you set "language" from the command line for these cases.
 75  language = "en"
 76  
 77  # List of patterns, relative to source directory, that match files and
 78  # directories to ignore when looking for source files.
 79  # This patterns also effect to html_static_path and html_extra_path
 80  exclude_patterns = [
 81      "_build",
 82      "Thumbs.db",
 83      ".DS_Store",
 84      ".env",
 85      "CODE_OF_CONDUCT.md",
 86  ]
 87  
 88  # The reST default role (used for this markup: `text`) to use for all
 89  # documents.
 90  #
 91  default_role = "any"
 92  
 93  # If true, '()' will be appended to :func: etc. cross-reference text.
 94  #
 95  add_function_parentheses = True
 96  
 97  # The name of the Pygments (syntax highlighting) style to use.
 98  pygments_style = "sphinx"
 99  
100  # If true, `todo` and `todoList` produce output, else they produce nothing.
101  todo_include_todos = False
102  
103  # If this is True, todo emits a warning for each TODO entries. The default is False.
104  todo_emit_warnings = True
105  
106  napoleon_numpy_docstring = False
107  
108  # -- Options for HTML output ----------------------------------------------
109  
110  # The theme to use for HTML and HTML Help pages.  See the documentation for
111  # a list of builtin themes.
112  #
113  on_rtd = os.environ.get("READTHEDOCS", None) == "True"
114  
115  if not on_rtd:  # only import and set the theme if we're building docs locally
116      try:
117          import sphinx_rtd_theme
118  
119          html_theme = "sphinx_rtd_theme"
120          html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."]
121      except:
122          html_theme = "default"
123          html_theme_path = ["."]
124  else:
125      html_theme_path = ["."]
126  
127  # Add any paths that contain custom static files (such as style sheets) here,
128  # relative to this directory. They are copied after the builtin static files,
129  # so a file named "default.css" will overwrite the builtin "default.css".
130  html_static_path = ["_static"]
131  
132  # The name of an image file (relative to this directory) to use as a favicon of
133  # the docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
134  # pixels large.
135  #
136  html_favicon = "_static/favicon.ico"
137  
138  # Output file base name for HTML help builder.
139  htmlhelp_basename = "CircuitPython_EqualizerLibrarydoc"
140  
141  # -- Options for LaTeX output ---------------------------------------------
142  
143  latex_elements = {
144      # The paper size ('letterpaper' or 'a4paper').
145      # 'papersize': 'letterpaper',
146      # The font size ('10pt', '11pt' or '12pt').
147      # 'pointsize': '10pt',
148      # Additional stuff for the LaTeX preamble.
149      # 'preamble': '',
150      # Latex figure (float) alignment
151      # 'figure_align': 'htbp',
152  }
153  
154  # Grouping the document tree into LaTeX files. List of tuples
155  # (source start file, target name, title,
156  #  author, documentclass [howto, manual, or own class]).
157  latex_documents = [
158      (
159          master_doc,
160          "CircuitPython_equalizerLibrary.tex",
161          "CircuitPython equalizer Library Documentation",
162          author,
163          "manual",
164      ),
165  ]
166  
167  # -- Options for manual page output ---------------------------------------
168  
169  # One entry per manual page. List of tuples
170  # (source start file, name, description, authors, manual section).
171  man_pages = [
172      (
173          master_doc,
174          "CircuitPython_equalizerLibrary",
175          "CircuitPython equalizer Library Documentation",
176          [author],
177          1,
178      ),
179  ]
180  
181  # -- Options for Texinfo output -------------------------------------------
182  
183  # Grouping the document tree into Texinfo files. List of tuples
184  # (source start file, target name, title, author,
185  #  dir menu entry, description, category)
186  texinfo_documents = [
187      (
188          master_doc,
189          "CircuitPython_equalizerLibrary",
190          "CircuitPython equalizer Library Documentation",
191          author,
192          "CircuitPython_equalizerLibrary",
193          "One line description of project.",
194          "Miscellaneous",
195      ),
196  ]