1
|
|
|
# -*- coding: utf-8 -*- |
2
|
|
|
from __future__ import unicode_literals |
3
|
|
|
|
4
|
|
|
from pathlib import Path |
5
|
|
|
import io |
6
|
|
|
import os |
7
|
|
|
|
8
|
|
|
|
9
|
|
|
def read_authors(**kwargs): |
10
|
|
|
with io.open( |
11
|
|
|
Path(__file__).parent.parent / "AUTHORS.rst", |
12
|
|
|
encoding=kwargs.get("encoding", "utf8"), |
13
|
|
|
) as fh: |
14
|
|
|
return ( |
15
|
|
|
fh.read() |
16
|
|
|
.replace("\nAuthors\n=======\n\n* ", "") |
17
|
|
|
.replace(" - https://github.com/openego/eGon-data\n", "") |
18
|
|
|
) |
19
|
|
|
|
20
|
|
|
|
21
|
|
|
extensions = [ |
22
|
|
|
"sphinx.ext.autodoc", |
23
|
|
|
"sphinx.ext.autosummary", |
24
|
|
|
"sphinx.ext.coverage", |
25
|
|
|
"sphinx.ext.doctest", |
26
|
|
|
"sphinx.ext.extlinks", |
27
|
|
|
"sphinx.ext.ifconfig", |
28
|
|
|
"sphinx.ext.napoleon", |
29
|
|
|
"sphinx.ext.todo", |
30
|
|
|
"sphinx.ext.viewcode", |
31
|
|
|
"sphinx.ext.autosectionlabel", |
32
|
|
|
] |
33
|
|
|
source_suffix = ".rst" |
34
|
|
|
master_doc = "index" |
35
|
|
|
project = "eGo^N Data" |
36
|
|
|
year = "2020-2022" |
37
|
|
|
author = read_authors() |
38
|
|
|
copyright = "{0}, {1}".format(year, author) |
39
|
|
|
version = release = "1.0.0" |
40
|
|
|
|
41
|
|
|
pygments_style = "trac" |
42
|
|
|
templates_path = ["."] |
43
|
|
|
extlinks = { |
44
|
|
|
"issue": ("https://github.com/openego/eGon-data/issues/%s", "issue #"), |
45
|
|
|
"pr": ("https://github.com/openego/eGon-data/pull/%s", "PR #"), |
46
|
|
|
} |
47
|
|
|
# on_rtd is whether we are on readthedocs.org |
48
|
|
|
# on_rtd = os.environ.get("READTHEDOCS", None) == "True" |
49
|
|
|
|
50
|
|
|
#if not on_rtd: # only set the theme if we're building docs locally |
51
|
|
|
html_theme = "sphinx_rtd_theme" |
52
|
|
|
|
53
|
|
|
html_use_smartypants = True |
54
|
|
|
html_last_updated_fmt = "%b %d, %Y" |
55
|
|
|
html_split_index = False |
56
|
|
|
html_sidebars = {"**": ["searchbox.html", "globaltoc.html", "sourcelink.html"]} |
57
|
|
|
html_short_title = "%s-%s" % (project, version) |
58
|
|
|
|
59
|
|
|
napoleon_use_ivar = True |
60
|
|
|
napoleon_use_rtype = False |
61
|
|
|
napoleon_use_param = False |
62
|
|
|
|
63
|
|
|
add_module_names = False |
64
|
|
|
modindex_common_prefix = ["egon.data.", "egon.data.datasets."] |
65
|
|
|
|
66
|
|
|
autodoc_type_aliases = { |
67
|
|
|
"Dependencies": "egon.data.datasets.Dependencies", |
68
|
|
|
"Tasks": "egon.data.datasets.Tasks" |
69
|
|
|
} |
70
|
|
|
|