/ 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.viewcode', 16 ] 17 18 # Uncomment the below if you use native CircuitPython modules such as 19 # digitalio, micropython and busio. List the modules you use. Without it, the 20 # autodoc module docs will fail to generate with a warning. 21 # autodoc_mock_imports = ["digitalio", "busio"] 22 23 intersphinx_mapping = {'python': ('https://docs.python.org/3.4', None),'CircuitPython': ('https://circuitpython.readthedocs.io/en/latest/', None)} 24 25 # Add any paths that contain templates here, relative to this directory. 26 templates_path = ['_templates'] 27 28 source_suffix = '.rst' 29 30 # The master toctree document. 31 master_doc = 'README' 32 33 # General information about the project. 34 project = u'Adafruit APDS9960 Library' 35 copyright = u'2017 Michael McWethy' 36 author = u'Michael McWethy' 37 38 # The version info for the project you're documenting, acts as replacement for 39 # |version| and |release|, also used in various other places throughout the 40 # built documents. 41 # 42 # The short X.Y version. 43 version = u'1.0' 44 # The full version, including alpha/beta/rc tags. 45 release = u'1.0' 46 47 # The language for content autogenerated by Sphinx. Refer to documentation 48 # for a list of supported languages. 49 # 50 # This is also used if you do content translation via gettext catalogs. 51 # Usually you set "language" from the command line for these cases. 52 language = None 53 54 # List of patterns, relative to source directory, that match files and 55 # directories to ignore when looking for source files. 56 # This patterns also effect to html_static_path and html_extra_path 57 exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] 58 59 # The reST default role (used for this markup: `text`) to use for all 60 # documents. 61 # 62 default_role = "any" 63 64 # If true, '()' will be appended to :func: etc. cross-reference text. 65 # 66 add_function_parentheses = True 67 68 # The name of the Pygments (syntax highlighting) style to use. 69 pygments_style = 'sphinx' 70 71 # If true, `todo` and `todoList` produce output, else they produce nothing. 72 todo_include_todos = False 73 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 # Output file base name for HTML help builder. 99 htmlhelp_basename = 'AdafruitApds9960Librarydoc' 100 101 # -- Options for LaTeX output --------------------------------------------- 102 103 latex_elements = { 104 # The paper size ('letterpaper' or 'a4paper'). 105 # 106 # 'papersize': 'letterpaper', 107 108 # The font size ('10pt', '11pt' or '12pt'). 109 # 110 # 'pointsize': '10pt', 111 112 # Additional stuff for the LaTeX preamble. 113 # 114 # 'preamble': '', 115 116 # Latex figure (float) alignment 117 # 118 # 'figure_align': 'htbp', 119 } 120 121 # Grouping the document tree into LaTeX files. List of tuples 122 # (source start file, target name, title, 123 # author, documentclass [howto, manual, or own class]). 124 latex_documents = [ 125 (master_doc, 'AdafruitAPDS9960Library.tex', u'AdafruitAPDS9960 Library Documentation', 126 author, 'manual'), 127 ] 128 129 # -- Options for manual page output --------------------------------------- 130 131 # One entry per manual page. List of tuples 132 # (source start file, name, description, authors, manual section). 133 man_pages = [ 134 (master_doc, 'AdafruitAPDS9960library', u'Adafruit APDS9960 Library Documentation', 135 [author], 1) 136 ] 137 138 # -- Options for Texinfo output ------------------------------------------- 139 140 # Grouping the document tree into Texinfo files. List of tuples 141 # (source start file, target name, title, author, 142 # dir menu entry, description, category) 143 texinfo_documents = [ 144 (master_doc, 'AdafruitAPDS9960Library', u'Adafruit APDS9960 Library Documentation', 145 author, 'AdafruitAPDS9960Library', 'One line description of project.', 146 'Miscellaneous'), 147 ]