conf   A
last analyzed

Complexity

Total Complexity 0

Size/Duplication

Total Lines 77
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 0
eloc 29
dl 0
loc 77
rs 10
c 0
b 0
f 0
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
# http://www.sphinx-doc.org/en/master/config
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 re
15
import sys
16
from datetime import date
17
18
sys.path.insert(0, os.path.abspath(".."))
19
20
21
# -- Project information -----------------------------------------------------
22
23
project = "annif"
24
copyright = (
25
    f"2017-{date.today().year}, University Of Helsinki "
26
    + "(The National Library Of Finland)"
27
)
28
29
author = "National Library Of Finland"
30
31
# Get version number from GitHub tag
32
release = re.sub("^v", "", os.popen("git describe --tags").read().strip())
33
# The short X.Y version.
34
version = release
35
html_title = project + " " + release
36
37
# -- General configuration ---------------------------------------------------
38
39
master_doc = "index"
40
41
# Add any Sphinx extension module names here, as strings. They can be
42
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
43
# ones.
44
extensions = [
45
    "sphinx.ext.autodoc",
46
    "sphinxcontrib.apidoc",
47
    "sphinx_click",
48
]
49
50
# Add any paths that contain templates here, relative to this directory.
51
templates_path = ["_templates"]
52
53
# List of patterns, relative to source directory, that match files and
54
# directories to ignore when looking for source files.
55
# This pattern also affects html_static_path and html_extra_path.
56
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "venv"]
57
58
apidoc_module_dir = "../annif"
59
apidoc_output_dir = "source"
60
apidoc_separate_modules = False
61
62
# -- Options for HTML output -------------------------------------------------
63
64
# The theme to use for HTML and HTML Help pages.  See the documentation for
65
# a list of builtin themes.
66
#
67
html_theme = "sphinx_rtd_theme"
68
html_logo = "source/annif-RGB-white.png"
69
html_theme_options = {
70
    "logo_only": True,
71
}
72
73
# Add any paths that contain custom static files (such as style sheets) here,
74
# relative to this directory. They are copied after the builtin static files,
75
# so a file named "default.css" will overwrite the builtin "default.css".
76
html_static_path = [""]
77