/ docs / conf.py
conf.py
  1  # -*- coding: utf-8 -*-
  2  #
  3  # Adafruit DS1307 Library documentation build configuration file, created by
  4  # sphinx-quickstart on Fri Nov 11 07:42:21 2016.
  5  #
  6  # This file is execfile()d with the current directory set to its
  7  # containing dir.
  8  #
  9  # Note that not all possible configuration values are present in this
 10  # autogenerated file.
 11  #
 12  # All configuration values have a default; values that are commented out
 13  # serve to show the default.
 14  
 15  # If extensions (or modules to document with autodoc) are in another directory,
 16  # add these directories to sys.path here. If the directory is relative to the
 17  # documentation root, use os.path.abspath to make it absolute, like shown here.
 18  #
 19  import os
 20  import sys
 21  
 22  sys.path.insert(0, os.path.abspath(".."))
 23  
 24  # -- General configuration ------------------------------------------------
 25  
 26  # If your documentation needs a minimal Sphinx version, state it here.
 27  #
 28  # needs_sphinx = '1.0'
 29  
 30  # Add any Sphinx extension module names here, as strings. They can be
 31  # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
 32  # ones.
 33  extensions = [
 34      "sphinx.ext.autodoc",
 35      "sphinx.ext.intersphinx",
 36      "sphinx.ext.viewcode",
 37  ]
 38  
 39  # Uncomment the below if you use native CircuitPython modules such as
 40  # digitalio, micropython and busio. List the modules you use. Without it, the
 41  # autodoc module docs will fail to generate with a warning.
 42  # autodoc_mock_imports = ["adafruit_register", "adafruit_bus_device"]
 43  
 44  # Add any paths that contain templates here, relative to this directory.
 45  templates_path = ["_templates"]
 46  
 47  # The suffix(es) of source filenames.
 48  # You can specify multiple suffix as a list of string:
 49  #
 50  # source_suffix = ['.rst', '.md']
 51  source_suffix = ".rst"
 52  
 53  # The encoding of source files.
 54  #
 55  # source_encoding = 'utf-8-sig'
 56  
 57  # The master toctree document.
 58  master_doc = "index"
 59  
 60  # General information about the project.
 61  project = "Adafruit DS1307 Library"
 62  copyright = "2016, Philip Moyer and Adafruit Industries"
 63  author = "Philip Moyer"
 64  
 65  # The version info for the project you're documenting, acts as replacement for
 66  # |version| and |release|, also used in various other places throughout the
 67  # built documents.
 68  #
 69  # The short X.Y version.
 70  version = "1.0"
 71  # The full version, including alpha/beta/rc tags.
 72  release = "1.0"
 73  
 74  # The language for content autogenerated by Sphinx. Refer to documentation
 75  # for a list of supported languages.
 76  #
 77  # This is also used if you do content translation via gettext catalogs.
 78  # Usually you set "language" from the command line for these cases.
 79  language = None
 80  
 81  # There are two options for replacing |today|: either, you set today to some
 82  # non-false value, then it is used:
 83  #
 84  # today = ''
 85  #
 86  # Else, today_fmt is used as the format for a strftime call.
 87  #
 88  # today_fmt = '%B %d, %Y'
 89  
 90  # List of patterns, relative to source directory, that match files and
 91  # directories to ignore when looking for source files.
 92  # This patterns also effect to html_static_path and html_extra_path
 93  exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", ".env", "CODE_OF_CONDUCT.md"]
 94  
 95  # The reST default role (used for this markup: `text`) to use for all
 96  # documents.
 97  #
 98  default_role = "any"
 99  
100  # If true, '()' will be appended to :func: etc. cross-reference text.
101  #
102  add_function_parentheses = True
103  
104  # If true, the current module name will be prepended to all description
105  # unit titles (such as .. function::).
106  #
107  # add_module_names = True
108  
109  # If true, sectionauthor and moduleauthor directives will be shown in the
110  # output. They are ignored by default.
111  #
112  # show_authors = False
113  
114  # The name of the Pygments (syntax highlighting) style to use.
115  pygments_style = "sphinx"
116  
117  # A list of ignored prefixes for module index sorting.
118  # modindex_common_prefix = []
119  
120  # If true, keep warnings as "system message" paragraphs in the built documents.
121  # keep_warnings = False
122  
123  # If true, `todo` and `todoList` produce output, else they produce nothing.
124  todo_include_todos = False
125  
126  # If this is True, todo emits a warning for each TODO entries. The default is False.
127  todo_emit_warnings = True
128  
129  
130  # -- Options for HTML output ----------------------------------------------
131  
132  # The theme to use for HTML and HTML Help pages.  See the documentation for
133  # a list of builtin themes.
134  #
135  on_rtd = os.environ.get("READTHEDOCS", None) == "True"
136  
137  if not on_rtd:  # only import and set the theme if we're building docs locally
138      try:
139          import sphinx_rtd_theme
140  
141          html_theme = "sphinx_rtd_theme"
142          html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."]
143      except:
144          html_theme = "default"
145          html_theme_path = ["."]
146  else:
147      html_theme_path = ["."]
148  
149  # Theme options are theme-specific and customize the look and feel of a theme
150  # further.  For a list of options available for each theme, see the
151  # documentation.
152  #
153  # html_theme_options = {}
154  
155  # Add any paths that contain custom themes here, relative to this directory.
156  # html_theme_path = []
157  
158  # The name for this set of Sphinx documents.
159  # "<project> v<release> documentation" by default.
160  #
161  # html_title = u'Adafruit DS1307 Library v1.0'
162  
163  # A shorter title for the navigation bar.  Default is the same as html_title.
164  #
165  # html_short_title = None
166  
167  # The name of an image file (relative to this directory) to place at the top
168  # of the sidebar.
169  #
170  # html_logo = None
171  
172  # The name of an image file (relative to this directory) to use as a favicon of
173  # the docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
174  # pixels large.
175  #
176  # html_favicon = None
177  
178  # Add any paths that contain custom static files (such as style sheets) here,
179  # relative to this directory. They are copied after the builtin static files,
180  # so a file named "default.css" will overwrite the builtin "default.css".
181  html_static_path = ["_static"]
182  
183  # The name of an image file (relative to this directory) to use as a favicon of
184  # the docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
185  # pixels large.
186  #
187  html_favicon = "_static/favicon.ico"
188  
189  # Add any extra paths that contain custom files (such as robots.txt or
190  # .htaccess) here, relative to this directory. These files are copied
191  # directly to the root of the documentation.
192  #
193  # html_extra_path = []
194  
195  # If not None, a 'Last updated on:' timestamp is inserted at every page
196  # bottom, using the given strftime format.
197  # The empty string is equivalent to '%b %d, %Y'.
198  #
199  # html_last_updated_fmt = None
200  
201  # If true, SmartyPants will be used to convert quotes and dashes to
202  # typographically correct entities.
203  #
204  # html_use_smartypants = True
205  
206  # Custom sidebar templates, maps document names to template names.
207  #
208  # html_sidebars = {}
209  
210  # Additional templates that should be rendered to pages, maps page names to
211  # template names.
212  #
213  # html_additional_pages = {}
214  
215  # If false, no module index is generated.
216  #
217  # html_domain_indices = True
218  
219  # If false, no index is generated.
220  #
221  # html_use_index = True
222  
223  # If true, the index is split into individual pages for each letter.
224  #
225  # html_split_index = False
226  
227  # If true, links to the reST sources are added to the pages.
228  #
229  # html_show_sourcelink = True
230  
231  # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
232  #
233  # html_show_sphinx = True
234  
235  # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
236  #
237  # html_show_copyright = True
238  
239  # If true, an OpenSearch description file will be output, and all pages will
240  # contain a <link> tag referring to it.  The value of this option must be the
241  # base URL from which the finished HTML is served.
242  #
243  # html_use_opensearch = ''
244  
245  # This is the file name suffix for HTML files (e.g. ".xhtml").
246  # html_file_suffix = None
247  
248  # Language to be used for generating the HTML full-text search index.
249  # Sphinx supports the following languages:
250  #   'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
251  #   'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh'
252  #
253  # html_search_language = 'en'
254  
255  # A dictionary with options for the search language support, empty by default.
256  # 'ja' uses this config value.
257  # 'zh' user can custom change `jieba` dictionary path.
258  #
259  # html_search_options = {'type': 'default'}
260  
261  # The name of a javascript file (relative to the configuration directory) that
262  # implements a search results scorer. If empty, the default will be used.
263  #
264  # html_search_scorer = 'scorer.js'
265  
266  # Output file base name for HTML help builder.
267  htmlhelp_basename = "AdafruitDS1307Librarydoc"
268  
269  # -- Options for LaTeX output ---------------------------------------------
270  
271  latex_elements = {
272      # The paper size ('letterpaper' or 'a4paper').
273      #
274      # 'papersize': 'letterpaper',
275      # The font size ('10pt', '11pt' or '12pt').
276      #
277      # 'pointsize': '10pt',
278      # Additional stuff for the LaTeX preamble.
279      #
280      # 'preamble': '',
281      # Latex figure (float) alignment
282      #
283      # 'figure_align': 'htbp',
284  }
285  
286  # Grouping the document tree into LaTeX files. List of tuples
287  # (source start file, target name, title,
288  #  author, documentclass [howto, manual, or own class]).
289  latex_documents = [
290      (
291          master_doc,
292          "AdafruitDS1307Library.tex",
293          "Adafruit DS1307 Library Documentation",
294          "Phiilip Moyer",
295          "manual",
296      ),
297  ]
298  
299  # The name of an image file (relative to this directory) to place at the top of
300  # the title page.
301  #
302  # latex_logo = None
303  
304  # For "manual" documents, if this is true, then toplevel headings are parts,
305  # not chapters.
306  #
307  # latex_use_parts = False
308  
309  # If true, show page references after internal links.
310  #
311  # latex_show_pagerefs = False
312  
313  # If true, show URL addresses after external links.
314  #
315  # latex_show_urls = False
316  
317  # Documents to append as an appendix to all manuals.
318  #
319  # latex_appendices = []
320  
321  # It false, will not define \strong, \code, 	itleref, \crossref ... but only
322  # \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added
323  # packages.
324  #
325  # latex_keep_old_macro_names = True
326  
327  # If false, no module index is generated.
328  #
329  # latex_domain_indices = True
330  
331  
332  # -- Options for manual page output ---------------------------------------
333  
334  # One entry per manual page. List of tuples
335  # (source start file, name, description, authors, manual section).
336  man_pages = [
337      (
338          master_doc,
339          "adafruitds1307library",
340          "Adafruit DS1307 Library Documentation",
341          [author],
342          1,
343      )
344  ]
345  
346  # If true, show URL addresses after external links.
347  #
348  # man_show_urls = False
349  
350  
351  # -- Options for Texinfo output -------------------------------------------
352  
353  # Grouping the document tree into Texinfo files. List of tuples
354  # (source start file, target name, title, author,
355  #  dir menu entry, description, category)
356  texinfo_documents = [
357      (
358          master_doc,
359          "AdafruitDS1307Library",
360          "Adafruit DS1307 Library Documentation",
361          author,
362          "AdafruitDS1307Library",
363          "One line description of project.",
364          "Miscellaneous",
365      ),
366  ]
367  
368  # Documents to append as an appendix to all manuals.
369  #
370  # texinfo_appendices = []
371  
372  # If false, no module index is generated.
373  #
374  # texinfo_domain_indices = True
375  
376  # How to display URL addresses: 'footnote', 'no', or 'inline'.
377  #
378  # texinfo_show_urls = 'footnote'
379  
380  # If true, do not generate a @detailmenu in the "Top" node's menu.
381  #
382  # texinfo_no_detailmenu = False
383  
384  intersphinx_mapping = {
385      "python": ("https://docs.python.org/3.4", None),
386      "CircuitPython": ("https://circuitpython.readthedocs.io/en/latest/", None),
387  }