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