blob: da4ec33face0aa4190164dcbb8b785dcad22c474 [file] [log] [blame]
# pylint:disable=missing-docstring,redefined-builtin
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
import unittest.mock
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
# Mock modules not needed for docs
sys.modules.update([('tflite_runtime', unittest.mock.MagicMock())])
sys.modules.update([('tflite_runtime.interpreter', unittest.mock.MagicMock())])
sys.modules.update([('pyaudio', unittest.mock.MagicMock())])
# -- Project information -----------------------------------------------------
project = 'AIY Maker Kit API'
copyright = '2021, Google LLC'
author = 'Google LLC'
# The short X.Y version
version = '1.0'
# The full version, including alpha/beta/rc tags
release = ''
# -- General configuration ---------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.intersphinx', # Enables linking to other libs like Pillow
'sphinx.ext.coverage',
'sphinx.ext.napoleon', # Converts Google-style code comments to RST
]
# Autodoc configurations
autoclass_content = 'both'
# Intersphinx config; Controls external linking to other python libraries
intersphinx_mapping = {
'python': ('https://docs.python.org/', None)
}
# Disable rtype return values; output return type inline with description
napoleon_use_rtype = False
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
source_parsers = {
'.md': 'recommonmark.parser.CommonMarkParser',
}
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = ['.rst', '.md']
# The master toctree document.
master_doc = 'index'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'README*']
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = None
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'coral_theme'
html_theme_path = ['.']
html_file_suffix = '.md'
html_link_suffix = '/'