Skip to content

Commit f0edef3

Browse files
authored
Merge pull request #348 from riptideio/dev
v2.1.0
2 parents fa724ab + 26d9ac2 commit f0edef3

28 files changed

+1010
-258
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ test/__pycache__/
3636
/doc/html/
3737
/doc/_build/
3838
.pytest_cache/
39-
/.pymodhis
39+
**/.pymodhis

CHANGELOG.rst

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
Version 2.1.0
2+
-----------------------------------------------------------
3+
* Fix Issues with Serial client where in partial data was read when the response size is unknown.
4+
* Fix Infinite sleep loop in RTU Framer.
5+
* Add pygments as extra requirement for repl.
6+
* Add support to modify modbus client attributes via repl.
7+
* Update modbus repl documentation.
8+
* More verbose logs for repl.
9+
110
Version 2.0.1
211
-----------------------------------------------------------
312
* Fix unicode decoder error with BinaryPayloadDecoder in some platforms
@@ -36,13 +45,14 @@ Version 1.5.1
3645
* Added REPR statements for all syncchronous clients
3746
* Added `isError` method to exceptions, Any response received can be tested for success before proceeding.
3847

39-
```
48+
.. code-block:: python
49+
4050
res = client.read_holding_registers(...)
4151
if not res.isError():
4252
# proceed
4353
else:
4454
# handle error or raise
45-
```
55+
4656
* Add examples for MEI read device information request
4757

4858
Version 1.5.0

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ tox: install
4747

4848
docs: install
4949
@pip install --quiet --requirement=requirements-docs.txt
50-
@cd doc && make html
50+
@cd doc && make clean && make html
5151

5252
publish: install
5353
git push origin && git push --tags origin

README.rst

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
================================
2+
PyModbus - A Python Modbus Stack
3+
================================
4+
15
.. image:: https://travis-ci.org/riptideio/pymodbus.svg?branch=master
26
:target: https://travis-ci.org/riptideio/pymodbus
37
.. image:: https://badges.gitter.im/Join%20Chat.svg
@@ -12,9 +16,9 @@
1216
.. important::
1317
**Note This is a Major release and might affect your existing Async client implementation. Refer examples on how to use the latest async clients.**
1418

15-
============================================================
19+
------------------------------------------------------------
1620
Summary
17-
============================================================
21+
------------------------------------------------------------
1822

1923
Pymodbus is a full Modbus protocol implementation using twisted for its
2024
asynchronous communications core. It can also be used without any third
@@ -23,13 +27,13 @@ needed. Furthermore, it should work fine under any python version > 2.7
2327
(including python 3+)
2428

2529

26-
============================================================
30+
------------------------------------------------------------
2731
Features
28-
============================================================
29-
3032
------------------------------------------------------------
33+
34+
~~~~~~~~~~~~~~~~~~~~
3135
Client Features
32-
------------------------------------------------------------
36+
~~~~~~~~~~~~~~~~~~~~
3337

3438
* Full read/write protocol on discrete and register
3539
* Most of the extended protocol (diagnostic/file/pipe/setting/information)
@@ -38,19 +42,19 @@ Client Features
3842
* Payload builder/decoder utilities
3943
* Pymodbus REPL for quick tests
4044

41-
------------------------------------------------------------
45+
~~~~~~~~~~~~~~~~~~~~
4246
Server Features
43-
------------------------------------------------------------
47+
~~~~~~~~~~~~~~~~~~~~
4448

4549
* Can function as a fully implemented modbus server
4650
* TCP, UDP, Serial ASCII, Serial RTU, and Serial Binary
4751
* asynchronous(powered by twisted) and synchronous versions
4852
* Full server control context (device information, counters, etc)
4953
* A number of backing contexts (database, redis, sqlite, a slave device)
5054

51-
============================================================
55+
------------------------------------------------------------
5256
Use Cases
53-
============================================================
57+
------------------------------------------------------------
5458

5559
Although most system administrators will find little need for a Modbus
5660
server on any modern hardware, they may find the need to query devices on
@@ -94,21 +98,24 @@ trace them. I get a lot of email and sometimes these requests
9498
get lost in the noise: http://groups.google.com/group/pymodbus or
9599
at gitter: https://gitter.im/pymodbus_dev/Lobby
96100

97-
============================================================
101+
------------------------------------------------------------
98102
Pymodbus REPL (Read Evaluate Procee Loop)
99-
============================================================
103+
------------------------------------------------------------
100104
Starting with Pymodbus 2.x, pymodbus library comes with handy
101105
Pymodbus REPL to quickly run the modbus clients in tcp/rtu modes.
102106

103107
Pymodbus REPL comes with many handy features such as payload decoder
104108
to directly retrieve the values in desired format and supports all
105109
the diagnostic function codes directly .
106110

107-
For more info on REPL refer `Pymodbus REPL <pymodbus/repl/README.md>`_
111+
For more info on REPL refer `Pymodbus REPL <https://github.com/riptideio/pymodbus/tree/master/pymodbus/repl>`_
112+
113+
.. image:: https://asciinema.org/a/y1xOk7lm59U1bRBE2N1pDIj2o.png
114+
:target: https://asciinema.org/a/y1xOk7lm59U1bRBE2N1pDIj2o
108115

109-
============================================================
116+
------------------------------------------------------------
110117
Installing
111-
============================================================
118+
------------------------------------------------------------
112119

113120
You can install using pip or easy install by issuing the following
114121
commands in a terminal window (make sure you have correct
@@ -144,9 +151,9 @@ out all mentions of twisted. It should be noted that without twisted,
144151
one will only be able to run the synchronized version as the
145152
asynchronous versions uses twisted for its event loop.
146153

147-
============================================================
154+
------------------------------------------------------------
148155
Current Work In Progress
149-
============================================================
156+
------------------------------------------------------------
150157

151158
Since I don't have access to any live modbus devices anymore
152159
it is a bit hard to test on live hardware. However, if you would
@@ -182,14 +189,14 @@ Use make to perform a range of activities
182189
make tox run the tests on all Python versions
183190
make clean cleanup all temporary files
184191

185-
============================================================
192+
------------------------------------------------------------
186193
Contributing
187-
============================================================
194+
------------------------------------------------------------
188195
Just fork the repo and raise your PR against `dev` branch.
189196

190-
============================================================
197+
------------------------------------------------------------
191198
License Information
192-
============================================================
199+
------------------------------------------------------------
193200

194201
Pymodbus is built on top of code developed from/by:
195202
* Copyright (c) 2001-2005 S.W.A.C. GmbH, Germany.

doc/changelog.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
============
2+
CHANGELOGS
3+
============
4+
15
.. include:: ../CHANGELOG.rst

doc/conf.py

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
#
1919
import os
2020
import sys
21+
import recommonmark
22+
from recommonmark.parser import CommonMarkParser
23+
from recommonmark.transform import AutoStructify
24+
from pymodbus import __version__
2125
parent_dir = os.path.abspath(os.pardir)
2226
# examples = os.path.join(parent_dir, "examples")
2327
example_contrib = os.path.join(parent_dir, "examples/contrib")
@@ -31,7 +35,7 @@
3135
# sys.path.extend([examples, example_common, example_contrib, example_gui])
3236
# sys.path.insert(0, os.path.abspath('../'))
3337

34-
38+
github_doc_root = 'https://github.com/riptideio/pymodbus/tree/master/doc/'
3539
# -- General configuration ------------------------------------------------
3640

3741
# If your documentation needs a minimal Sphinx version, state it here.
@@ -41,16 +45,20 @@
4145
# Add any Sphinx extension module names here, as strings. They can be
4246
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
4347
# ones.
44-
extensions = ['sphinx.ext.autodoc']
48+
extensions = ['sphinx.ext.autodoc', 'recommonmark']
4549

4650
# Add any paths that contain templates here, relative to this directory.
4751
templates_path = ['_templates']
4852

4953
# The suffix(es) of source filenames.
5054
# You can specify multiple suffix as a list of string:
5155
#
52-
# source_suffix = ['.rst', '.md']
53-
source_suffix = '.rst'
56+
source_parsers = {
57+
'.md': CommonMarkParser,
58+
}
59+
60+
source_suffix = ['.rst', '.md']
61+
# source_suffix = '.rst'
5462

5563
# The master toctree document.
5664
master_doc = 'index'
@@ -65,9 +73,9 @@
6573
# built documents.
6674
#
6775
# The short X.Y version.
68-
version = u'1.4.0'
76+
version = __version__
6977
# The full version, including alpha/beta/rc tags.
70-
release = u'1.4.0'
78+
release = __version__
7179

7280
# The language for content autogenerated by Sphinx. Refer to documentation
7381
# for a list of supported languages.
@@ -176,4 +184,10 @@
176184
]
177185

178186

187+
def setup(app):
188+
app.add_config_value('recommonmark_config', {
189+
'url_resolver': lambda url: github_doc_root + url,
190+
'auto_toc_tree_section': 'Contents',
191+
}, True)
192+
app.add_transform(AutoStructify)
179193

doc/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Welcome to PyModbus's documentation!
1212

1313
readme.rst
1414
changelog.rst
15-
repl.rst
15+
source/library/REPL
1616
source/example/modules.rst
1717
source/library/modules.rst
1818

doc/repl.rst

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

0 commit comments

Comments
 (0)