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