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