-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconf.py
More file actions
135 lines (112 loc) · 3.57 KB
/
conf.py
File metadata and controls
135 lines (112 loc) · 3.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#!python3
"""
Configuration for project documentation using Sphinx.
"""
# standard
import sys
from datetime import datetime
from os import environ, path
sys.path.insert(0, path.abspath("..")) # move into project package
# 3rd party
import sphinx_rtd_theme # noqa: F401 theme of Read the Docs
# Package
from map2loop import __about__
# -- Build environment -----------------------------------------------------
on_rtd = environ.get("READTHEDOCS", None) == "True"
# -- Project information -----------------------------------------------------
author = __about__.__author__
copyright = __about__.__copyright__
description = __about__.__summary__
project = __about__.__title__
version = release = __about__.__version__
# -- General configuration ---------------------------------------------------
# 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 included
"sphinx.ext.autosectionlabel",
"sphinx.ext.extlinks",
"sphinx.ext.githubpages",
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
# 3rd party
"myst_parser",
"sphinx_copybutton",
"sphinx_rtd_theme",
]
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
source_suffix = {".md": "markdown", ".rst": "restructuredtext"}
autosectionlabel_prefix_document = True
# The master toctree document.
master_doc = "index"
# 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",
".venv",
"Thumbs.db",
".DS_Store",
"_output",
"ext_libs",
"tests",
"demo",
]
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
# -- Options for HTML output -------------------------------------------------
# -- Theme
html_favicon = str(__about__.__icon_path__)
html_logo = str(__about__.__icon_path__)
# uncomment next line if you store some statics which are not directly linked into the markdown/RST files
# html_static_path = ["static/include_additional"]
html_theme = "sphinx_rtd_theme"
html_theme_options = {
"display_version": True,
"logo_only": False,
"prev_next_buttons_location": "both",
"style_external_links": True,
"style_nav_header_background": "SteelBlue",
# Toc options
"collapse_navigation": True,
"includehidden": False,
"navigation_depth": 4,
"sticky_navigation": False,
"titles_only": False,
}
# -- EXTENSIONS --------------------------------------------------------
# Configuration for intersphinx (refer to others docs).
intersphinx_mapping = {
"PyQt5": ("https://www.riverbankcomputing.com/static/Docs/PyQt5", None),
"python": ("https://docs.python.org/3/", None),
"qgis": ("https://qgis.org/pyqgis/master/", None),
}
# MyST Parser
myst_enable_extensions = [
"amsmath",
"colon_fence",
"deflist",
"dollarmath",
"html_image",
"linkify",
"replacements",
"smartquotes",
"substitution",
]
myst_substitutions = {
"author": author,
"date_update": datetime.now().strftime("%d %B %Y"),
"description": description,
"qgis_version_max": __about__.__plugin_md__.get("general").get(
"qgismaximumversion"
),
"qgis_version_min": __about__.__plugin_md__.get("general").get(
"qgisminimumversion"
),
"repo_url": __about__.__uri__,
"title": project,
"version": version,
}
myst_url_schemes = ("http", "https", "mailto")