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 = ["bitops", "rp2pio"] 31 32 33 intersphinx_mapping = { 34 "python": ("https://docs.python.org/3", None), 35 "CircuitPython": ("https://docs.circuitpython.org/en/latest/", None), 36 } 37 38 # Show the docstring from both the class and its __init__() method. 39 autoclass_content = "both" 40 41 # Add any paths that contain templates here, relative to this directory. 42 templates_path = ["_templates"] 43 44 source_suffix = ".rst" 45 46 # The master toctree document. 47 master_doc = "index" 48 49 # General information about the project. 50 project = "Adafruit CircuitPython neopxl8 Library" 51 creation_year = "2022" 52 current_year = str(datetime.datetime.now().year) 53 year_duration = ( 54 current_year 55 if current_year == creation_year 56 else creation_year + " - " + current_year 57 ) 58 copyright = year_duration + " Jeff Epler" 59 author = "Jeff Epler" 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 import sphinx_rtd_theme 114 115 html_theme = "sphinx_rtd_theme" 116 html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."] 117 118 # Add any paths that contain custom static files (such as style sheets) here, 119 # relative to this directory. They are copied after the builtin static files, 120 # so a file named "default.css" will overwrite the builtin "default.css". 121 html_static_path = ["_static"] 122 123 # The name of an image file (relative to this directory) to use as a favicon of 124 # the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 125 # pixels large. 126 # 127 html_favicon = "_static/favicon.ico" 128 129 # Output file base name for HTML help builder. 130 htmlhelp_basename = "Adafruit_CircuitPython_Neopxl8_Librarydoc" 131 132 # -- Options for LaTeX output --------------------------------------------- 133 134 latex_elements = { 135 # The paper size ('letterpaper' or 'a4paper'). 136 # 'papersize': 'letterpaper', 137 # The font size ('10pt', '11pt' or '12pt'). 138 # 'pointsize': '10pt', 139 # Additional stuff for the LaTeX preamble. 140 # 'preamble': '', 141 # Latex figure (float) alignment 142 # 'figure_align': 'htbp', 143 } 144 145 # Grouping the document tree into LaTeX files. List of tuples 146 # (source start file, target name, title, 147 # author, documentclass [howto, manual, or own class]). 148 latex_documents = [ 149 ( 150 master_doc, 151 "Adafruit_CircuitPython_neopxl8_Library.tex", 152 "Adafruit CircuitPython neopxl8 Library Documentation", 153 author, 154 "manual", 155 ), 156 ] 157 158 # -- Options for manual page output --------------------------------------- 159 160 # One entry per manual page. List of tuples 161 # (source start file, name, description, authors, manual section). 162 man_pages = [ 163 ( 164 master_doc, 165 "Adafruit_CircuitPython_neopxl8_Library", 166 "Adafruit CircuitPython neopxl8 Library Documentation", 167 [author], 168 1, 169 ), 170 ] 171 172 # -- Options for Texinfo output ------------------------------------------- 173 174 # Grouping the document tree into Texinfo files. List of tuples 175 # (source start file, target name, title, author, 176 # dir menu entry, description, category) 177 texinfo_documents = [ 178 ( 179 master_doc, 180 "Adafruit_CircuitPython_neopxl8_Library", 181 "Adafruit CircuitPython neopxl8 Library Documentation", 182 author, 183 "Adafruit_CircuitPython_neopxl8_Library", 184 "One line description of project.", 185 "Miscellaneous", 186 ), 187 ]