Jpp 21.0.0
the software that should make you happy
Loading...
Searching...
No Matches
conf.py
Go to the documentation of this file.
1# Configuration file for the Sphinx documentation builder.
2#
3# This file only contains a selection of the most common options. For a full
4# list see the documentation:
5# https://www.sphinx-doc.org/en/master/usage/configuration.html
6
7# -- Path setup --------------------------------------------------------------
8
9# If extensions (or modules to document with autodoc) are in another directory,
10# add these directories to sys.path here. If the directory is relative to the
11# documentation root, use os.path.abspath to make it absolute, like shown here.
12#
13# import os
14# import sys
15# sys.path.insert(0, os.path.abspath('.'))
16import sys
17from datetime import date
18import sphinx_rtd_theme
19
20if sys.version_info < (3, 10):
21 from pkg_resources import get_distribution
22else:
23 from importlib.metadata import distribution as get_distribution
24
25# -- Project information -----------------------------------------------------
26
27version = get_distribution("km3net_testdata").version
28short_version = ".".join(version.split(".")[:2])
29project = "km3net_testdata {}".format(short_version)
30copyright = "{0}, Tamas Gal".format(date.today().year)
31author = "Tamas Gal"
32
33# -- General configuration ---------------------------------------------------
34
35# Add any Sphinx extension module names here, as strings. They can be
36# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
37# ones.
38extensions = [
39 "sphinx.ext.autodoc",
40 "sphinx.ext.autosummary",
41 "sphinx.ext.viewcode",
42 "autoapi.extension",
43 "numpydoc",
44 "sphinx_gallery.gen_gallery",
45]
46
47# Add any paths that contain templates here, relative to this directory.
48templates_path = ["_templates"]
49
50# List of patterns, relative to source directory, that match files and
51# directories to ignore when looking for source files.
52# This pattern also affects html_static_path and html_extra_path.
53exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "version.py"]
54
55# AutoAPI
56autoapi_type = "python"
57autoapi_dirs = ["../km3net_testdata"]
58autoapi_ignore = ["*version.py*"]
59autoapi_add_toctree_entry = True
60
61# Gallery
62sphinx_gallery_conf = {
63 "backreferences_dir": "modules/generated",
64 "default_thumb_file": "_static/default_gallery_thumbnail.png",
65 "examples_dirs": "../examples", # path to your example scripts
66 "gallery_dirs": "auto_examples", # path to where to save gallery generated output
67 "show_memory": True,
68}
69
70# -- Options for HTML output -------------------------------------------------
71
72# The theme to use for HTML and HTML Help pages. See the documentation for
73# a list of builtin themes.
74#
75html_theme = "sphinx_rtd_theme"
76html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
77
78# Add any paths that contain custom static files (such as style sheets) here,
79# relative to this directory. They are copied after the builtin static files,
80# so a file named "default.css" will overwrite the builtin "default.css".
81html_static_path = ["_static"]
82html_title = "km3net_testdata {}".format(version)