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