Passed
Push — master ( bc9f46...7fdfbc )
by Daniel
01:17
created

setup()   A

Complexity

Conditions 2

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
1
#!/usr/bin/env python3
2
# -*- coding: utf-8 -*-
3
#
4
# groundwork documentation build configuration file, created by
5
# sphinx-quickstart on Tue Sep 19 13:29:32 2017.
6
#
7
# This file is execfile()d with the current directory set to its
8
# containing dir.
9
#
10
# Note that not all possible configuration values are present in this
11
# autogenerated file.
12
#
13
# All configuration values have a default; values that are commented out
14
# serve to show the default.
15
16
# If extensions (or modules to document with autodoc) are in another directory,
17
# add these directories to sys.path here. If the directory is relative to the
18
# documentation root, use os.path.abspath to make it absolute, like shown here.
19
#
20
import os
21
import sys
22
# sys.path.insert(0, os.path.abspath('.'))
23
24
25
# -- General configuration ------------------------------------------------
26
27
# If your documentation needs a minimal Sphinx version, state it here.
28
#
29
# needs_sphinx = '1.0'
30
31
# Add any Sphinx extension module names here, as strings. They can be
32
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
33
# ones.
34
extensions = ['sphinxjp.themes.revealjs',
35
              'sphinxcontrib.plantuml']
36
37
38
# Adds custom css to remove some annoying revealjs layouts.
39
def setup(app):
40
    if os.path.exists('_static/css/gw_custom.css'):
41
        app.add_stylesheet('css/gw_custom.css')
42
    else:
43
        print("Missing _static/css/gw_custom.css")
44
        sys.exit()
45
46
# PLANTUML config
47
cwd = os.getcwd()
48
plantuml = 'java -jar %s' % os.path.join(cwd, "utils/plantuml.jar")
49
50
# If we are running on windows, we need to manipulate the path,
51
# otherwise plantuml will have problems.
52
if os.name == "nt":
53
    plantuml = plantuml.replace("/", "\\")
54
    plantuml = plantuml.replace("\\", "\\\\")
55
56
plantuml_output_format = 'png'
57
58
# Add any paths that contain templates here, relative to this directory.
59
templates_path = ['_templates']
60
61
# The suffix(es) of source filenames.
62
# You can specify multiple suffix as a list of string:
63
#
64
# source_suffix = ['.rst', '.md']
65
source_suffix = '.rst'
66
67
# The master toctree document.
68
master_doc = 'index'
69
70
# General information about the project.
71
project = 'groundwork'
72
copyright = '2017, team useblocks'
73
author = 'team useblocks'
74
75
# The version info for the project you're documenting, acts as replacement for
76
# |version| and |release|, also used in various other places throughout the
77
# built documents.
78
#
79
# The short X.Y version.
80
version = '1.0'
81
# The full version, including alpha/beta/rc tags.
82
release = '1.0'
83
84
# The language for content autogenerated by Sphinx. Refer to documentation
85
# for a list of supported languages.
86
#
87
# This is also used if you do content translation via gettext catalogs.
88
# Usually you set "language" from the command line for these cases.
89
language = None
90
91
# List of patterns, relative to source directory, that match files and
92
# directories to ignore when looking for source files.
93
# This patterns also effect to html_static_path and html_extra_path
94
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
95
96
# The name of the Pygments (syntax highlighting) style to use.
97
pygments_style = 'sphinx'
98
99
# If true, `todo` and `todoList` produce output, else they produce nothing.
100
todo_include_todos = False
101
102
103
# -- Options for HTML output ----------------------------------------------
104
105
# The theme to use for HTML and HTML Help pages.  See the documentation for
106
# a list of builtin themes.
107
#
108
html_theme = 'revealjs'
109
html_use_index = False
110
111
# Theme options are theme-specific and customize the look and feel of a theme
112
# further.  For a list of options available for each theme, see the
113
# documentation.
114
#
115
html_theme_options = {
116
    # The "normal" size of the presentation, aspect ratio will be preserved
117
    # when the presentation is scaled to fit different resolutions
118
    "width": 1500,
119
    "height": 900,
120
121
    # Factor of the display size that should remain empty around the content
122
    "margin": 0.1,
123
124
    # Bounds for smallest/largest possible scale to apply to content
125
    "min_scale": 0.2,
126
    "max_scale": 1.0,
127
}
128
129
# Add any paths that contain custom static files (such as style sheets) here,
130
# relative to this directory. They are copied after the builtin static files,
131
# so a file named "default.css" will overwrite the builtin "default.css".
132
html_static_path = ['_static']
133
134
# Custom sidebar templates, must be a dictionary that maps document names
135
# to template names.
136
#
137
# This is required for the alabaster theme
138
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
139
html_sidebars = {
140
    '**': [
141
        'about.html',
142
        'navigation.html',
143
        'relations.html',  # needs 'show_related': True theme option to display
144
        'searchbox.html',
145
        'donate.html',
146
    ]
147
}
148
149
150
# -- Options for HTMLHelp output ------------------------------------------
151
152
# Output file base name for HTML help builder.
153
htmlhelp_basename = 'groundworkdoc'
154
155
156
# -- Options for LaTeX output ---------------------------------------------
157
158
latex_elements = {
159
    # The paper size ('letterpaper' or 'a4paper').
160
    #
161
    # 'papersize': 'letterpaper',
162
163
    # The font size ('10pt', '11pt' or '12pt').
164
    #
165
    # 'pointsize': '10pt',
166
167
    # Additional stuff for the LaTeX preamble.
168
    #
169
    # 'preamble': '',
170
171
    # Latex figure (float) alignment
172
    #
173
    # 'figure_align': 'htbp',
174
}
175
176
# Grouping the document tree into LaTeX files. List of tuples
177
# (source start file, target name, title,
178
#  author, documentclass [howto, manual, or own class]).
179
latex_documents = [
180
    (master_doc, 'groundwork.tex', 'groundwork Documentation',
181
     'team useblocks', 'manual'),
182
]
183
184
185
# -- Options for manual page output ---------------------------------------
186
187
# One entry per manual page. List of tuples
188
# (source start file, name, description, authors, manual section).
189
man_pages = [
190
    (master_doc, 'groundwork', 'groundwork Documentation',
191
     [author], 1)
192
]
193
194
195
# -- Options for Texinfo output -------------------------------------------
196
197
# Grouping the document tree into Texinfo files. List of tuples
198
# (source start file, target name, title, author,
199
#  dir menu entry, description, category)
200
texinfo_documents = [
201
    (master_doc, 'groundwork', 'groundwork Documentation',
202
     author, 'groundwork', 'One line description of project.',
203
     'Miscellaneous'),
204
]
205
206
207
208