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