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