|
1 |
| -# -*- coding: utf-8 -*- |
| 1 | +# Pymodbus |
2 | 2 | #
|
3 |
| -# PyModbus documentation build configuration file, created by |
4 |
| -# sphinx-quickstart on Tue Apr 14 19:11:16 2009. |
5 |
| -# |
6 |
| -# This file is execfile()d with the current directory set to its containing dir. |
7 |
| -# |
8 |
| -# Note that not all possible configuration values are present in this |
9 |
| -# autogenerated file. |
10 |
| -# |
11 |
| -# All configuration values have a default; values that are commented out |
12 |
| -# serve to show the default. |
| 3 | +# Author: dhoomakethu <[email protected]> |
| 4 | +# Last Change: May 20, 2017 |
| 5 | +# URL: https://pymodbus.readthedocs.io |
| 6 | + |
| 7 | +"""Sphinx documentation configuration for the `pymodbus` package.""" |
| 8 | + |
| 9 | +import os |
| 10 | +import sys |
| 11 | + |
| 12 | +sys.path.insert(0, os.path.abspath(os.pardir)) |
13 | 13 |
|
14 |
| -import sys, os |
15 | 14 |
|
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 |
| -#sys.path.append(os.path.abspath('.')) |
| 15 | +# -- General configuration ---------------------------------------------------- |
20 | 16 |
|
21 |
| -# -- General configuration ----------------------------------------------------- |
| 17 | +# Sphinx extension module names. |
| 18 | +extensions = [ |
| 19 | + 'sphinx.ext.autodoc', |
| 20 | + 'sphinx.ext.intersphinx', |
| 21 | + 'sphinx.ext.viewcode', |
| 22 | + 'humanfriendly.sphinx', |
| 23 | +] |
22 | 24 |
|
23 |
| -# Add any Sphinx extension module names here, as strings. They can be extensions |
24 |
| -# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. |
25 |
| -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage'] |
| 25 | +# Sort members by the source order instead of alphabetically. |
| 26 | +autodoc_member_order = 'bysource' |
26 | 27 |
|
27 |
| -# Add any paths that contain templates here, relative to this directory. |
28 |
| -templates_path = ['_templates'] |
| 28 | +# Paths that contain templates, relative to this directory. |
| 29 | +templates_path = ['templates'] |
29 | 30 |
|
30 | 31 | # The suffix of source filenames.
|
31 | 32 | source_suffix = '.rst'
|
32 | 33 |
|
33 |
| -# The encoding of source files. |
34 |
| -#source_encoding = 'utf-8' |
35 |
| - |
36 | 34 | # The master toctree document.
|
37 | 35 | master_doc = 'index'
|
38 | 36 |
|
39 | 37 | # General information about the project.
|
40 |
| -project = u'Pymodbus' |
41 |
| -copyright = u'2009, Galen Collins' |
| 38 | +project = u'pymodbus' |
| 39 | +copyright = u'2017, riptideio/bashworks' |
42 | 40 |
|
43 | 41 | # The version info for the project you're documenting, acts as replacement for
|
44 | 42 | # |version| and |release|, also used in various other places throughout the
|
45 | 43 | # built documents.
|
46 |
| -# |
| 44 | + |
| 45 | +# Find the package version and make it the release. |
| 46 | +from pymodbus import __version__ as pymodbus_version # noqa |
| 47 | + |
47 | 48 | # The short X.Y version.
|
48 |
| -version = '1.0' |
| 49 | +version = '.'.join(pymodbus_version.split('.')[:2]) |
| 50 | + |
49 | 51 | # The full version, including alpha/beta/rc tags.
|
50 |
| -release = '1.0' |
| 52 | +release = pymodbus_version |
51 | 53 |
|
52 | 54 | # The language for content autogenerated by Sphinx. Refer to documentation
|
53 | 55 | # for a list of supported languages.
|
54 |
| -#language = None |
| 56 | +language = 'en' |
55 | 57 |
|
56 |
| -# There are two options for replacing |today|: either, you set today to some |
57 |
| -# non-false value, then it is used: |
58 |
| -#today = '' |
59 |
| -# Else, today_fmt is used as the format for a strftime call. |
60 |
| -#today_fmt = '%B %d, %Y' |
61 |
| - |
62 |
| -# List of documents that shouldn't be included in the build. |
63 |
| -#unused_docs = [] |
64 |
| - |
65 |
| -# List of directories, relative to source directory, that shouldn't be searched |
66 |
| -# for source files. |
67 |
| -exclude_trees = ['build'] |
68 |
| - |
69 |
| -# The reST default role (used for this markup: `text`) to use for all documents. |
70 |
| -#default_role = None |
| 58 | +# List of patterns, relative to source directory, that match files and |
| 59 | +# directories to ignore when looking for source files. |
| 60 | +exclude_patterns = ['build'] |
71 | 61 |
|
72 | 62 | # If true, '()' will be appended to :func: etc. cross-reference text.
|
73 |
| -#add_function_parentheses = True |
74 |
| - |
75 |
| -# If true, the current module name will be prepended to all description |
76 |
| -# unit titles (such as .. function::). |
77 |
| -#add_module_names = True |
78 |
| - |
79 |
| -# If true, sectionauthor and moduleauthor directives will be shown in the |
80 |
| -# output. They are ignored by default. |
81 |
| -show_authors = True |
| 63 | +add_function_parentheses = True |
82 | 64 |
|
83 | 65 | # The name of the Pygments (syntax highlighting) style to use.
|
84 | 66 | pygments_style = 'sphinx'
|
85 | 67 |
|
86 |
| -# A list of ignored prefixes for module index sorting. |
87 |
| -#modindex_common_prefix = [] |
88 |
| - |
| 68 | +# Refer to the Python standard library. |
| 69 | +# From: http://twistedmatrix.com/trac/ticket/4582. |
| 70 | +intersphinx_mapping = dict( |
| 71 | + python=('https://docs.python.org/2', None), |
| 72 | + capturer=('https://capturer.readthedocs.io/en/latest', None), |
| 73 | + humanfriendly=('https://humanfriendly.readthedocs.io/en/latest', None), |
| 74 | +) |
89 | 75 |
|
90 |
| -# -- Options for extensions --------------------------------------------------- |
91 |
| -autodoc_default_flags = ['members', 'inherited-members', 'show-inheritance'] |
92 |
| -autoclass_content = 'both' |
| 76 | +# -- Options for HTML output -------------------------------------------------- |
93 | 77 |
|
94 |
| -# -- Options for HTML output --------------------------------------------------- |
95 |
| - |
96 |
| -# The theme to use for HTML and HTML Help pages. Major themes that come with |
97 |
| -# Sphinx are currently 'default' and 'sphinxdoc'. |
| 78 | +# The theme to use for HTML and HTML Help pages. See the documentation for |
| 79 | +# a list of builtin themes. |
98 | 80 | html_theme = 'default'
|
99 | 81 |
|
100 |
| -# Theme options are theme-specific and customize the look and feel of a theme |
101 |
| -# further. For a list of options available for each theme, see the |
102 |
| -# documentation. |
103 |
| -#html_theme_options = {} |
104 |
| - |
105 |
| -# Add any paths that contain custom themes here, relative to this directory. |
106 |
| -#html_theme_path = [] |
107 |
| - |
108 |
| -# The name for this set of Sphinx documents. If None, it defaults to |
109 |
| -# "<project> v<release> documentation". |
110 |
| -#html_title = None |
111 |
| - |
112 |
| -# A shorter title for the navigation bar. Default is the same as html_title. |
113 |
| -#html_short_title = None |
114 |
| - |
115 |
| -# The name of an image file (relative to this directory) to place at the top |
116 |
| -# of the sidebar. |
117 |
| -#html_logo = None |
118 |
| - |
119 |
| -# The name of an image file (within the static path) to use as favicon of the |
120 |
| -# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 |
121 |
| -# pixels large. |
122 |
| -#html_favicon = None |
| 82 | +# Output file base name for HTML help builder. |
| 83 | +htmlhelp_basename = 'pymodbusdoc' |
123 | 84 |
|
124 | 85 | # Add any paths that contain custom static files (such as style sheets) here,
|
125 | 86 | # relative to this directory. They are copied after the builtin static files,
|
126 | 87 | # so a file named "default.css" will overwrite the builtin "default.css".
|
127 | 88 | html_static_path = ['static']
|
128 |
| - |
129 |
| -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
130 |
| -# using the given strftime format. |
131 |
| -#html_last_updated_fmt = '%b %d, %Y' |
132 |
| - |
133 |
| -# If true, SmartyPants will be used to convert quotes and dashes to |
134 |
| -# typographically correct entities. |
135 |
| -#html_use_smartypants = True |
136 |
| - |
137 |
| -# Custom sidebar templates, maps document names to template names. |
138 |
| -#html_sidebars = {} |
139 |
| - |
140 |
| -# Additional templates that should be rendered to pages, maps page names to |
141 |
| -# template names. |
142 |
| -#html_additional_pages = {} |
143 |
| - |
144 |
| -# If false, no module index is generated. |
145 |
| -#html_use_modindex = True |
146 |
| - |
147 |
| -# If false, no index is generated. |
148 |
| -#html_use_index = True |
149 |
| - |
150 |
| -# If true, the index is split into individual pages for each letter. |
151 |
| -#html_split_index = False |
152 |
| - |
153 |
| -# If true, links to the reST sources are added to the pages. |
154 |
| -#html_show_sourcelink = True |
155 |
| - |
156 |
| -# If true, an OpenSearch description file will be output, and all pages will |
157 |
| -# contain a <link> tag referring to it. The value of this option must be the |
158 |
| -# base URL from which the finished HTML is served. |
159 |
| -#html_use_opensearch = '' |
160 |
| - |
161 |
| -# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). |
162 |
| -#html_file_suffix = '' |
163 |
| - |
164 |
| -# Output file base name for HTML help builder. |
165 |
| -htmlhelp_basename = 'Pymodbus' |
166 |
| - |
167 |
| - |
168 |
| -# -- Options for LaTeX output -------------------------------------------------- |
169 |
| - |
170 |
| -# The paper size ('letter' or 'a4'). |
171 |
| -#latex_paper_size = 'letter' |
172 |
| - |
173 |
| -# The font size ('10pt', '11pt' or '12pt'). |
174 |
| -#latex_font_size = '10pt' |
175 |
| - |
176 |
| -# Grouping the document tree into LaTeX files. List of tuples |
177 |
| -# (source start file, target name, title, author, documentclass [howto/manual]). |
178 |
| -latex_documents = [ |
179 |
| - ('index', 'Pymodbus.tex', ur'Pymodbus Documentation', |
180 |
| - ur'Galen Collins', 'manual'), |
181 |
| -] |
182 |
| - |
183 |
| -# The name of an image file (relative to this directory) to place at the top of |
184 |
| -# the title page. |
185 |
| -#latex_logo = None |
186 |
| - |
187 |
| -# For "manual" documents, if this is true, then toplevel headings are parts, |
188 |
| -# not chapters. |
189 |
| -#latex_use_parts = False |
190 |
| - |
191 |
| -# Additional stuff for the LaTeX preamble. |
192 |
| -#latex_preamble = '' |
193 |
| - |
194 |
| -# Documents to append as an appendix to all manuals. |
195 |
| -#latex_appendices = [] |
196 |
| - |
197 |
| -# If false, no module index is generated. |
198 |
| -#latex_use_modindex = True |
0 commit comments