Skip to content

Commit 4ed1f1a

Browse files
authored
Release 1.4.0 (#253)
1.4.0 Release * Bug fix Modbus TCP client reading incomplete data * Check for slave unit id before processing the request for serial clients * Bug fix serial servers with Modbus Binary Framer * Bug fix header size for ModbusBinaryFramer * Bug fix payload decoder with endian Little * Payload builder and decoder can now deal with the wordorder as well of 32/64 bit data. * Support Database slave contexts (SqlStore and RedisStore) * Custom handlers could be passed to Modbus TCP servers * Asynchronous Server could now be stopped when running on a seperate thread (StopServer) * Signal handlers on Asyncronous servers are now handled based on current thread * Registers in Database datastore could now be read from remote clients * Fix examples in contrib (message_parser.py/message_generator.py/remote_server_context) * Add new example for SqlStore and RedisStore (db store slave context) * Fix minor comaptibility issues with utilities. * Update test requirements * Update/Add new unit tests * Move twisted requirements to extra so that it is not installed by default on pymodbus installtion
1 parent 62b1350 commit 4ed1f1a

File tree

450 files changed

+4771
-56973
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

450 files changed

+4771
-56973
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ Before opening a new issue, make sure you do the following:
1414
* Pymodbus:
1515
* Modbus Hardware (if used):
1616

17+
### Pymodbus Specific
18+
* Server: tcp/rtu/ascii - sync/async
19+
* Client: tcp/rtu/ascii - sync/async
1720

1821
### Description
1922

.gitignore

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pymodbus.egg-info/
77
.vscode
88
.idea
99
.noseids
10-
10+
*.db
1111
.idea/
1212
.tox/
1313
doc/api/epydoc/html/
@@ -20,3 +20,13 @@ pymodbus/datastore/__pycache__/
2020
pymodbus/internal/__pycache__/
2121
pymodbus/server/__pycache__/
2222
test/__pycache__/
23+
**/pymodbus.db
24+
/.eggs/
25+
/.cache/
26+
/doc/sphinx/doctrees/
27+
/doc_new/
28+
/doc/quality/
29+
/doc/pymodbus.pdf
30+
/doc/sphinx/
31+
/doc/html/
32+
/doc/_build/

.readthedocs.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Build PDF & ePub
2+
formats:
3+
- epub
4+
- pdf
5+
requirements_file: requirements-docs.txt
6+
python:
7+
extra_requirements:
8+
- twisted
9+
- documents

CHANGELOG.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
Version 1.4.0
2+
------------------------------------------------------------
3+
* Bug fix Modbus TCP client reading incomplete data
4+
* Check for slave unit id before processing the request for serial clients
5+
* Bug fix serial servers with Modbus Binary Framer
6+
* Bug fix header size for ModbusBinaryFramer
7+
* Bug fix payload decoder with endian Little
8+
* Payload builder and decoder can now deal with the wordorder as well of 32/64 bit data.
9+
* Support Database slave contexts (SqlStore and RedisStore)
10+
* Custom handlers could be passed to Modbus TCP servers
11+
* Asynchronous Server could now be stopped when running on a seperate thread (StopServer)
12+
* Signal handlers on Asyncronous servers are now handled based on current thread
13+
* Registers in Database datastore could now be read from remote clients
14+
* Fix examples in contrib (message_parser.py/message_generator.py/remote_server_context)
15+
* Add new example for SqlStore and RedisStore (db store slave context)
16+
* Fix minor comaptibility issues with utilities.
17+
* Update test requirements
18+
* Update/Add new unit tests
19+
* Move twisted requirements to extra so that it is not installed by default on pymodbus installtion
120

221
Version 1.3.2
322
------------------------------------------------------------

Makefile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ default:
1616
@echo ' make check check coding style (PEP-8, PEP-257)'
1717
@echo ' make test run the test suite, report coverage'
1818
@echo ' make tox run the tests on all Python versions'
19-
@echo ' make clean cleanup all temporary files'
19+
@echo ' make docs creates sphinx documentation in html'
20+
@echo ' make clean cleanup all temporary files'
2021
@echo
2122

2223
install:
@@ -45,8 +46,8 @@ tox: install
4546
@pip install --quiet tox && tox
4647

4748
docs: install
48-
@pip install --quiet sphinx
49-
@cd doc/sphinx && sphinx-build -nb html -d doctrees . html
49+
@pip install --quiet --requirement=requirements-docs.txt
50+
@cd doc && make html
5051

5152
publish: install
5253
git push origin && git push --tags origin
@@ -57,8 +58,8 @@ publish: install
5758
$(MAKE) clean
5859

5960
clean:
60-
@rm -Rf *.egg .cache .coverage .tox build dist docs/build htmlcov
61-
@find -depth -type d -name __pycache__ -exec rm -Rf {} \;
62-
@find -type f -name '*.pyc' -delete
61+
@rm -Rf *.egg .eggs *.egg-info *.db .cache .coverage .tox build dist docs/build htmlcov doc/_build test/.Python test/pip-selfcheck.json test/lib/ test/include/ test/bin/
62+
@find . -depth -type d -name __pycache__ -exec rm -Rf {} \;
63+
@find . -type f -name '*.pyc' -delete
6364

6465
.PHONY: default install reset check test tox docs publish clean

doc/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
SPHINXPROJ = PyModbus
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

doc/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.. include:: ../CHANGELOG.rst

doc/conf.py

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# PyModbus documentation build configuration file, created by
4+
# sphinx-quickstart on Wed Dec 20 12:31:10 2017.
5+
#
6+
# This file is execfile()d with the current directory set to its
7+
# containing dir.
8+
#
9+
# Note that not all possible configuration values are present in this
10+
# autogenerated file.
11+
#
12+
# All configuration values have a default; values that are commented out
13+
# serve to show the default.
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+
import os
20+
import sys
21+
parent_dir = os.path.abspath(os.pardir)
22+
# examples = os.path.join(parent_dir, "examples")
23+
example_contrib = os.path.join(parent_dir, "examples/contrib")
24+
example_common = os.path.join(parent_dir, "examples/common")
25+
example_gui = os.path.join(parent_dir, "examples/gui")
26+
27+
sys.path.insert(0, os.path.abspath(os.pardir))
28+
sys.path.append(example_common)
29+
sys.path.append(example_contrib)
30+
sys.path.append(example_gui)
31+
# sys.path.extend([examples, example_common, example_contrib, example_gui])
32+
# sys.path.insert(0, os.path.abspath('../'))
33+
34+
35+
# -- General configuration ------------------------------------------------
36+
37+
# If your documentation needs a minimal Sphinx version, state it here.
38+
#
39+
# needs_sphinx = '1.0'
40+
41+
# Add any Sphinx extension module names here, as strings. They can be
42+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
43+
# ones.
44+
extensions = ['sphinx.ext.autodoc']
45+
46+
# Add any paths that contain templates here, relative to this directory.
47+
templates_path = ['_templates']
48+
49+
# The suffix(es) of source filenames.
50+
# You can specify multiple suffix as a list of string:
51+
#
52+
# source_suffix = ['.rst', '.md']
53+
source_suffix = '.rst'
54+
55+
# The master toctree document.
56+
master_doc = 'index'
57+
58+
# General information about the project.
59+
project = u'PyModbus'
60+
copyright = u'2017, Sanjay'
61+
author = u'Sanjay'
62+
63+
# The version info for the project you're documenting, acts as replacement for
64+
# |version| and |release|, also used in various other places throughout the
65+
# built documents.
66+
#
67+
# The short X.Y version.
68+
version = u'1.4.0'
69+
# The full version, including alpha/beta/rc tags.
70+
release = u'1.4.0'
71+
72+
# The language for content autogenerated by Sphinx. Refer to documentation
73+
# for a list of supported languages.
74+
#
75+
# This is also used if you do content translation via gettext catalogs.
76+
# Usually you set "language" from the command line for these cases.
77+
language = None
78+
79+
# List of patterns, relative to source directory, that match files and
80+
# directories to ignore when looking for source files.
81+
# This patterns also effect to html_static_path and html_extra_path
82+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
83+
84+
# The name of the Pygments (syntax highlighting) style to use.
85+
pygments_style = 'sphinx'
86+
87+
# If true, `todo` and `todoList` produce output, else they produce nothing.
88+
todo_include_todos = False
89+
90+
91+
# -- Options for HTML output ----------------------------------------------
92+
93+
# The theme to use for HTML and HTML Help pages. See the documentation for
94+
# a list of builtin themes.
95+
#
96+
html_theme = 'sphinx_rtd_theme'
97+
98+
# Theme options are theme-specific and customize the look and feel of a theme
99+
# further. For a list of options available for each theme, see the
100+
# documentation.
101+
#
102+
# html_theme_options = {}
103+
104+
# Add any paths that contain custom static files (such as style sheets) here,
105+
# relative to this directory. They are copied after the builtin static files,
106+
# so a file named "default.css" will overwrite the builtin "default.css".
107+
html_static_path = ['_static']
108+
109+
# Custom sidebar templates, must be a dictionary that maps document names
110+
# to template names.
111+
#
112+
# This is required for the alabaster theme
113+
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
114+
html_sidebars = {
115+
'**': [
116+
'relations.html', # needs 'show_related': True theme option to display
117+
'searchbox.html',
118+
]
119+
}
120+
121+
122+
# -- Options for HTMLHelp output ------------------------------------------
123+
124+
# Output file base name for HTML help builder.
125+
htmlhelp_basename = 'PyModbusdoc'
126+
127+
128+
# -- Options for LaTeX output ---------------------------------------------
129+
130+
latex_elements = {
131+
# The paper size ('letterpaper' or 'a4paper').
132+
#
133+
# 'papersize': 'letterpaper',
134+
135+
# The font size ('10pt', '11pt' or '12pt').
136+
#
137+
# 'pointsize': '10pt',
138+
139+
# Additional stuff for the LaTeX preamble.
140+
#
141+
# 'preamble': '',
142+
143+
# Latex figure (float) alignment
144+
#
145+
# 'figure_align': 'htbp',
146+
}
147+
148+
# Grouping the document tree into LaTeX files. List of tuples
149+
# (source start file, target name, title,
150+
# author, documentclass [howto, manual, or own class]).
151+
latex_documents = [
152+
(master_doc, 'PyModbus.tex', u'PyModbus Documentation',
153+
u'Sanjay', 'manual'),
154+
]
155+
156+
157+
# -- Options for manual page output ---------------------------------------
158+
159+
# One entry per manual page. List of tuples
160+
# (source start file, name, description, authors, manual section).
161+
man_pages = [
162+
(master_doc, 'pymodbus', u'PyModbus Documentation',
163+
[author], 1)
164+
]
165+
166+
167+
# -- Options for Texinfo output -------------------------------------------
168+
169+
# Grouping the document tree into Texinfo files. List of tuples
170+
# (source start file, target name, title, author,
171+
# dir menu entry, description, category)
172+
texinfo_documents = [
173+
(master_doc, 'PyModbus', u'PyModbus Documentation',
174+
author, 'PyModbus', 'One line description of project.',
175+
'Miscellaneous'),
176+
]
177+
178+
179+

doc/sphinx/index.rst renamed to doc/index.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
.. PyModbus documentation master file, created by
2-
sphinx-quickstart on Tue Apr 14 19:11:16 2009.
2+
sphinx-quickstart on Wed Dec 20 12:31:10 2017.
33
You can adapt this file completely to your liking, but it should at least
44
contain the root `toctree` directive.
55
66
Welcome to PyModbus's documentation!
77
====================================
88

9-
Contents:
10-
119
.. toctree::
1210
:maxdepth: 2
11+
:caption: Contents:
12+
13+
readme.rst
14+
changelog.rst
15+
source/example/modules.rst
16+
source/library/modules.rst
1317

14-
examples/index.rst
15-
library/index.rst
1618

1719
Indices and tables
1820
==================
1921

2022
* :ref:`genindex`
2123
* :ref:`modindex`
2224
* :ref:`search`
23-

doc/pymodbus.pdf

-497 KB
Binary file not shown.

doc/quality/current.coverage

Lines changed: 0 additions & 41 deletions
This file was deleted.

doc/quality/current.lint

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)