Skip to content

Commit 3647770

Browse files
committed
conf
1 parent 7c02fb2 commit 3647770

1 file changed

Lines changed: 181 additions & 0 deletions

File tree

docs/conf.py

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

0 commit comments

Comments
 (0)