Statistics
| Branch: | Tag: | Revision:

root / docs / source / conf.py @ 235a5968

History | View | Annotate | Download (6.9 kB)

1
# -*- coding: utf-8 -*-
2
#
3
# Iooclient documentation build configuration file
4
#
5
# This file is execfile()d with the current directory set to its containing dir.
6
#
7
# Note that not all possible configuration values are present in this
8
# autogenerated file.
9
#
10
# All configuration values have a default; values that are commented out
11
# serve to show the default.
12

    
13
import sys, os
14

    
15
# If extensions (or modules to document with autodoc) are in another directory,
16
# add these directories to sys.path here. If the directory is relative to the
17
# documentation root, use os.path.abspath to make it absolute, like shown here.
18

    
19

    
20
# -- General configuration -----------------------------------------------------
21

    
22
# If your documentation needs a minimal Sphinx version, state it here.
23
#needs_sphinx = "1.0"
24

    
25
# Add any Sphinx extension module names here, as strings. They can be extensions
26
# coming with Sphinx (named "sphinx.ext.*") or your custom ones.
27
extensions = [
28
  "sphinx.ext.todo",
29
  "sphinx.ext.graphviz",
30
  'sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.coverage', 'sphinx.ext.pngmath', 'sphinx.ext.ifconfig', 'sphinx.ext.autosummary'
31
  ]
32

    
33
# Add any paths that contain templates here, relative to this directory.
34
#templates_path = ["_templates"]
35

    
36
# The suffix of source filenames.
37
source_suffix = ".rst"
38

    
39
# The encoding of source files.
40
source_encoding = "utf-8"
41

    
42
# The master toctree document.
43
master_doc = "index"
44

    
45
# General information about the project.
46
project = u"iooclient"
47
copyright = u"2012, GRNET S.A."
48

    
49
# The version info for the project you're documenting, acts as replacement for
50
# |version| and |release|, also used in various other places throughout the
51
# built documents.
52
#
53
# These next two will be passed via the command line, see the makefile
54
# The short X.Y version
55
version = "0.3"
56
# The full version, including alpha/beta/rc tags.
57
release = "0.3"
58

    
59
# The language for content autogenerated by Sphinx. Refer to documentation
60
# for a list of supported languages.
61
language = "en"
62

    
63
# There are two options for replacing |today|: either, you set today to some
64
# non-false value, then it is used:
65
#today = ""
66
# Else, today_fmt is used as the format for a strftime call.
67
#today_fmt = "%B %d, %Y"
68

    
69
# List of documents that shouldn't be included in the build.
70
#unused_docs = []
71

    
72
# List of directories, relative to source directory, that shouldn't be searched
73
# for source files.
74
#exclude_trees = [
75
 # "_build",
76
 # "api",
77
 # ]
78

    
79
# The reST default role (used for this markup: `text`) to use for all documents.
80
#default_role = None
81

    
82
# If true, "()" will be appended to :func: etc. cross-reference text.
83
#add_function_parentheses = True
84

    
85
# If true, the current module name will be prepended to all description
86
# unit titles (such as .. function::).
87
#add_module_names = True
88

    
89
# If true, sectionauthor and moduleauthor directives will be shown in the
90
# output. They are ignored by default.
91
#show_authors = False
92

    
93
# The name of the Pygments (syntax highlighting) style to use.
94
pygments_style = "sphinx"
95

    
96
# A list of ignored prefixes for module index sorting.
97
#modindex_common_prefix = ['iooclient.']
98

    
99

    
100
# -- Options for HTML output ---------------------------------------------------
101

    
102
# The theme to use for HTML and HTML Help pages.  See the documentation for
103
# a list of builtin themes.
104
html_theme = "default"
105

    
106
# Theme options are theme-specific and customize the look and feel of a theme
107
# further.  For a list of options available for each theme, see the
108
# documentation.
109
#html_theme_options = {}
110

    
111
# Add any paths that contain custom themes here, relative to this directory.
112
#html_theme_path = []
113

    
114
# The name for this set of Sphinx documents.  If None, it defaults to
115
# "<project> v<release> documentation".
116
#html_title = None
117

    
118
# A shorter title for the navigation bar.  Default is the same as html_title.
119
#html_short_title = None
120

    
121
# The name of an image file (relative to this directory) to place at the top
122
# of the sidebar.
123
html_logo = "logo.png"
124

    
125
# The name of an image file (within the static path) to use as favicon of the
126
# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
127
# pixels large.
128
#html_favicon = None
129

    
130
# Add any paths that contain custom static files (such as style sheets) here,
131
# relative to this directory. They are copied after the builtin static files,
132
# so a file named "default.css" will overwrite the builtin "default.css".
133
html_static_path = ['_static']
134

    
135
# If not "", a "Last updated on:" timestamp is inserted at every page bottom,
136
# using the given strftime format.
137
#html_last_updated_fmt = "%b %d, %Y"
138

    
139
# If true, SmartyPants will be used to convert quotes and dashes to
140
# typographically correct entities.
141
#html_use_smartypants = True
142

    
143
# Custom sidebar templates, maps document names to template names.
144
#html_sidebars = {}
145

    
146
# Additional templates that should be rendered to pages, maps page names to
147
# template names.
148
#html_additional_pages = {}
149

    
150
# If false, no module index is generated.
151
html_use_modindex = False
152

    
153
# If false, no index is generated.
154
html_use_index = False
155

    
156
# If true, the index is split into individual pages for each letter.
157
#html_split_index = False
158

    
159
# If true, links to the reST sources are added to the pages.
160
#html_show_sourcelink = True
161

    
162
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
163
#html_show_sphinx = True
164

    
165
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
166
#html_show_copyright = True
167

    
168
# If true, an OpenSearch description file will be output, and all pages will
169
# contain a <link> tag referring to it.  The value of this option must be the
170
# base URL from which the finished HTML is served.
171
#html_use_opensearch = ""
172

    
173
# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
174
#html_file_suffix = ""
175

    
176
# Output file base name for HTML help builder.
177
htmlhelp_basename = "iooclientdoc"
178

    
179
intersphinx_mapping = {'http://docs.python.org/': None}
180

    
181
autoclass_content = 'both'
182

    
183
import re
184

    
185
repl_dict = {
186
             '@param' : ':param',
187
             '@type' : ':type',
188
             '@rtype' : ':rtype',
189
             '@return' : ':return',
190
             }
191

    
192
def dict_replace(text, repl_dict):
193
    repl_expr = re.compile('|'.join(map(re.escape, repl_dict)))
194
    def translate(match):
195
        return repl_dict[match.group(0)]
196
    return repl_expr.sub(translate, text)
197

    
198
#def process_epydoc(app, what, name, obj, options, lines):
199
#    for x in xrange(0, len(lines)):
200
#        if re.match('^@type',lines[x]):
201
#             lines[x] = re.sub('^@type',':type',lines[x])
202
#        if re.match('^@param',lines[x]):
203
#             lines[x] = re.sub('^@param',':param',lines[x])
204
#        if re.match('^@rtype',lines[x]):
205
#             lines[x] = re.sub('^@rtype',':rtype',lines[x])
206
#        if re.match('^@return',lines[x]):
207
#             lines[x] = re.sub('^@return',':return',lines[x])                
208

    
209
def process_epydoc(app, what, name, obj, options, lines):
210
    for x in xrange(0, len(lines)):
211
        lines[x] = dict_replace(lines[x], repl_dict)         
212

    
213

    
214
def setup(app):
215
    app.connect('autodoc-process-docstring', process_epydoc)