Newer
Older
from importlib.metadata import distribution
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
# 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.todo",
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.doctest",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
"sphinx.ext.intersphinx",
# Ignores stuff we can't easily resolve on other project's sphinx manuals
nitpick_ignore = []
# Allows the user to override warnings from a separate file
if os.path.exists("nitpick-exceptions.txt"):
for line in open("nitpick-exceptions.txt"):
if line.strip() == "" or line.startswith("#"):
continue
dtype, target = line.split(None, 1)
target = target.strip()
nitpick_ignore.append((dtype, target))
# Always includes todos
todo_include_todos = True
# Generates auto-summary automatically
autosummary_generate = True
# Create numbers on figures with captions
numfig = True
# If we are on OSX, the 'dvipng' path maybe different
dvipng_osx = "/Library/TeX/texbin/dvipng"
if os.path.exists(dvipng_osx):
pngmath_dvipng = dvipng_osx
# Add any paths that contain templates here, relative to this directory.
# General information about the project.
package = distribution(project)
copyright = "%s, Idiap Research Institute" % time.strftime("%Y")
version = package.version
# The full version, including alpha/beta/rc tags.
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# The name of the Pygments (syntax highlighting) style to use.
pygments_dark_style = "monokai"
# A list of ignored prefixes for module index sorting.
# Some variables which are useful for generated material
short_description = package.metadata["Summary"]
# -- Options for HTML output ---------------------------------------------------
html_title = f"{project} {release}"
html_logo = "img/logo.png"
html_favicon = "img/favicon.ico"
# -- Post configuration --------------------------------------------------------
# Default processing flags for sphinx

Amir MOHAMMADI
committed
autodoc_default_options = {
"members": True,
"undoc-members": True,
"show-inheritance": True,

Amir MOHAMMADI
committed
}
auto_intersphinx_packages = [
("python", "3"),
"numpy",
"matplotlib",
"PIL",
]
auto_intersphinx_catalog = "catalog.json"