conf   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 189
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 55
dl 0
loc 189
rs 10
c 0
b 0
f 0
wmc 3

1 Function

Rating   Name   Duplication   Size   Complexity  
A setup() 0 2 1
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
#
4
# pyUSIrest documentation build configuration file, created by
5
# sphinx-quickstart on Fri Jun  9 13:47:02 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
17
# directory, add these directories to sys.path here. If the directory is
18
# relative to the documentation root, use os.path.abspath to make it
19
# absolute, like shown here.
20
#
21
import os
22
import sys
23
sys.path.insert(0, os.path.abspath('..'))
24
25
import pyUSIrest
26
27
# -- General configuration ---------------------------------------------
28
29
# If your documentation needs a minimal Sphinx version, state it here.
30
#
31
# needs_sphinx = '1.0'
32
33
# Add any Sphinx extension module names here, as strings. They can be
34
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
35
extensions = [
36
    'sphinx.ext.autodoc',
37
    'sphinx.ext.viewcode',
38
    'sphinx.ext.intersphinx',
39
    'sphinx.ext.napoleon',
40
    'sphinx.ext.imgconverter',
41
]
42
43
# Add any paths that contain templates here, relative to this directory.
44
templates_path = ['_templates']
45
46
# The suffix(es) of source filenames.
47
# You can specify multiple suffix as a list of string:
48
#
49
# source_suffix = ['.rst', '.md']
50
source_suffix = '.rst'
51
52
# The master toctree document.
53
master_doc = 'index'
54
55
# General information about the project.
56
project = 'Python USI submission REST API'
57
copyright = "2018-2020, Paolo Cozzi"
58
author = "Paolo Cozzi"
59
60
# The version info for the project you're documenting, acts as replacement
61
# for |version| and |release|, also used in various other places throughout
62
# the built documents.
63
#
64
# The short X.Y version.
65
version = pyUSIrest.__version__
66
# The full version, including alpha/beta/rc tags.
67
release = pyUSIrest.__version__
68
69
# The language for content autogenerated by Sphinx. Refer to documentation
70
# for a list of supported languages.
71
#
72
# This is also used if you do content translation via gettext catalogs.
73
# Usually you set "language" from the command line for these cases.
74
language = None
75
76
# List of patterns, relative to source directory, that match files and
77
# directories to ignore when looking for source files.
78
# This patterns also effect to html_static_path and html_extra_path
79
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
80
81
# The name of the Pygments (syntax highlighting) style to use.
82
pygments_style = 'sphinx'
83
84
# If true, `todo` and `todoList` produce output, else they produce nothing.
85
todo_include_todos = False
86
87
88
# document __init__ class method
89
# https://stackoverflow.com/questions/5599254/how-to-use-sphinxs-autodoc-to-document-a-classs-init-self-method
90
def skip(app, what, name, obj, skip, options):
91
    if name == "__init__":
92
        return False
93
    return skip
94
95
96
def setup(app):
97
    app.connect("autodoc-skip-member", skip)
98
99
100
# Link to other projects’ documentation
101
intersphinx_mapping = {
102
    'python': (
103
        'https://docs.python.org/3',
104
        (None, 'python-inv.txt')),
105
    'requests': (
106
        'http://requests.kennethreitz.org/en/master/',
107
        (None, 'request-inv.txt')),
108
    }
109
110
111
# -- Options for HTML output -------------------------------------------
112
113
# The theme to use for HTML and HTML Help pages.  See the documentation for
114
# a list of builtin themes.
115
#
116
html_theme = 'alabaster'
117
118
# Theme options are theme-specific and customize the look and feel of a
119
# theme further.  For a list of options available for each theme, see the
120
# documentation.
121
#
122
# html_theme_options = {}
123
124
# Add any paths that contain custom static files (such as style sheets) here,
125
# relative to this directory. They are copied after the builtin static files,
126
# so a file named "default.css" will overwrite the builtin "default.css".
127
html_static_path = ['_static']
128
129
130
# -- Options for HTMLHelp output ---------------------------------------
131
132
# Output file base name for HTML help builder.
133
htmlhelp_basename = 'pyUSIrestdoc'
134
135
136
# -- Options for LaTeX output ------------------------------------------
137
138
latex_elements = {
139
    # The paper size ('letterpaper' or 'a4paper').
140
    #
141
    # 'papersize': 'letterpaper',
142
143
    # The font size ('10pt', '11pt' or '12pt').
144
    #
145
    # 'pointsize': '10pt',
146
147
    # Additional stuff for the LaTeX preamble.
148
    #
149
    # 'preamble': '',
150
151
    # Latex figure (float) alignment
152
    #
153
    # 'figure_align': 'htbp',
154
}
155
156
# Grouping the document tree into LaTeX files. List of tuples
157
# (source start file, target name, title, author, documentclass
158
# [howto, manual, or own class]).
159
latex_documents = [
160
    (master_doc, 'pyUSIrest.tex',
161
     'Python USI submission REST API Documentation',
162
     'Paolo Cozzi', 'manual'),
163
]
164
165
166
# -- Options for manual page output ------------------------------------
167
168
# One entry per manual page. List of tuples
169
# (source start file, name, description, authors, manual section).
170
man_pages = [
171
    (master_doc, 'pyUSIrest',
172
     'Python USI submission REST API Documentation',
173
     [author], 1)
174
]
175
176
177
# -- Options for Texinfo output ----------------------------------------
178
179
# Grouping the document tree into Texinfo files. List of tuples
180
# (source start file, target name, title, author,
181
#  dir menu entry, description, category)
182
texinfo_documents = [
183
    (master_doc, 'pyUSIrest',
184
     'Python USI submission REST API Documentation',
185
     author,
186
     'pyUSIrest',
187
     'One line description of project.',
188
     'Miscellaneous'),
189
]
190