Skip to content

Commit

Permalink
Merge pull request #301 from riptideio/dev
Browse files Browse the repository at this point in the history
Pymodbus V2.0.0
  • Loading branch information
dhoomakethu authored Sep 21, 2018
2 parents 13de8ab + 2ecf7ff commit 65c3baf
Show file tree
Hide file tree
Showing 119 changed files with 6,656 additions and 765 deletions.
5 changes: 3 additions & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[report]
show_missing = True
[run]
omit =
pymodbus/repl/*
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ pymodbus/server/__pycache__/
test/__pycache__/
**/pymodbus.db
/.eggs/
/test/bin/
/test/include/
/test/lib/
/test/pip-selfcheck.json
/test/.Python
/.cache/
/doc/sphinx/doctrees/
/doc_new/
Expand All @@ -31,3 +36,4 @@ test/__pycache__/
/doc/html/
/doc/_build/
.pytest_cache/
/.pymodhis
2 changes: 2 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ requirements_file: requirements-docs.txt
python:
extra_requirements:
- twisted
- tornado
- documents
version: 3.5
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ matrix:
- os: linux
python: "3.6"
- os: osx
osx_image: xcode8.3
language: generic
before_install:
- if [ $TRAVIS_OS_NAME = osx ]; then brew update; fi
- if [ $TRAVIS_OS_NAME = osx ]; then brew install openssl; fi

install:
# - scripts/travis.sh pip install pip-accel
- scripts/travis.sh pip install -U setuptools
- scripts/travis.sh pip install coveralls
- scripts/travis.sh pip install --requirement=requirements-checks.txt
- scripts/travis.sh pip install --requirement=requirements-tests.txt
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
Version 2.0.0
-----------------------------------------------------------
**Note This is a Major release and might affect your existing Async client implementation. Refer examples on how to use the latest async clients.**

* Async client implementation based on Tornado, Twisted and asyncio with backward compatibility support for twisted client.
* Allow reusing existing[running] asyncio loop when creating async client based on asyncio.
* Allow reusing address for Modbus TCP sync server.
* Add support to install tornado as extra requirement while installing pymodbus.
* Support Pymodbus REPL
* Add support to python 3.7.
* Bug fix and enhancements in examples.


Version 2.0.0rc1
-----------------------------------------------------------
**Note This is a Major release and might affect your existing Async client implementation. Refer examples on how to use the latest async clients.**

* Async client implementation based on Tornado, Twisted and asyncio


Version 1.5.2
------------------------------------------------------------
* Fix serial client `is_socket_open` method
Expand Down
3 changes: 3 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include requirements.txt
include README.rst
include CHANGELOG.rst
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ check: install

test: install
@pip install --quiet --requirement=requirements-tests.txt
@py.test
@pytest --cov=pymodbus/ --cov-report term-missing
@coverage report --fail-under=90

tox: install
Expand Down
57 changes: 43 additions & 14 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
.. image:: https://travis-ci.org/riptideio/pymodbus.svg?branch=master
:target: https://travis-ci.org/riptideio/pymodbus

.. image:: https://badges.gitter.im/Join%20Chat.svg
:target: https://gitter.im/pymodbus_dev/Lobby

.. image:: https://readthedocs.org/projects/pymodbus-n/badge/?version=latest
:target: http://pymodbus.readthedocs.io/en/latest/?badge=latest
:target: https://gitter.im/pymodbus_dev/Lobby
.. image:: https://readthedocs.org/projects/pymodbus/badge/?version=latest
:target: http://pymodbus.readthedocs.io/en/async/?badge=latest
:alt: Documentation Status
.. image:: http://pepy.tech/badge/pymodbus
:target: http://pepy.tech/project/pymodbus
:alt: Downloads

.. important::
**Note This is a Major release and might affect your existing Async client implementation. Refer examples on how to use the latest async clients.**

============================================================
Summary
Expand All @@ -30,8 +34,9 @@ Client Features
* Full read/write protocol on discrete and register
* Most of the extended protocol (diagnostic/file/pipe/setting/information)
* TCP, UDP, Serial ASCII, Serial RTU, and Serial Binary
* asynchronous(powered by twisted) and synchronous versions
* asynchronous(powered by twisted/tornado/asyncio) and synchronous versions
* Payload builder/decoder utilities
* Pymodbus REPL for quick tests

------------------------------------------------------------
Server Features
Expand Down Expand Up @@ -89,9 +94,21 @@ trace them. I get a lot of email and sometimes these requests
get lost in the noise: http://groups.google.com/group/pymodbus or
at gitter: https://gitter.im/pymodbus_dev/Lobby

------------------------------------------------------------
============================================================
Pymodbus REPL (Read Evaluate Procee Loop)
============================================================
Starting with Pymodbus 2.x, pymodbus library comes with handy
Pymodbus REPL to quickly run the modbus clients in tcp/rtu modes.

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

For more info on REPL refer `Pymodbus REPL <pymodbus/repl/README.md>`_

============================================================
Installing
------------------------------------------------------------
============================================================

You can install using pip or easy install by issuing the following
commands in a terminal window (make sure you have correct
Expand All @@ -100,6 +117,18 @@ permissions or a virtualenv currently running)::
easy_install -U pymodbus
pip install -U pymodbus

To Install pymodbus with twisted support run::

pip install -U pymodbus[twisted]

To Install pymodbus with tornado support run::

pip install -U pymodbus[tornado]

To Install pymodbus REPL::

pip install -U pymodbus[repl]

Otherwise you can pull the trunk source and install from there::

git clone git://github.com/bashwork/pymodbus.git
Expand All @@ -115,9 +144,9 @@ out all mentions of twisted. It should be noted that without twisted,
one will only be able to run the synchronized version as the
asynchronous versions uses twisted for its event loop.

------------------------------------------------------------
============================================================
Current Work In Progress
------------------------------------------------------------
============================================================

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

------------------------------------------------------------
============================================================
Contributing
------------------------------------------------------------
============================================================
Just fork the repo and raise your PR against `dev` branch.

------------------------------------------------------------
============================================================
License Information
------------------------------------------------------------
============================================================

Pymodbus is built on top of code developed from/by:
* Copyright (c) 2001-2005 S.W.A.C. GmbH, Germany.
Expand Down
1 change: 1 addition & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Welcome to PyModbus's documentation!

readme.rst
changelog.rst
repl.rst
source/example/modules.rst
source/library/modules.rst

Expand Down
4 changes: 4 additions & 0 deletions doc/repl.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Pymodbus REPL
=============

.. mdinclude:: ../pymodbus/repl/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
==================================================
Asynchronous Client Example
Async Asyncio Client Example
==================================================
.. literalinclude:: ../../../examples/common/asynchronous_client.py
.. literalinclude:: ../../../examples/common/async_asyncio_client.py
4 changes: 4 additions & 0 deletions doc/source/example/async_asyncio_serial_client.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
==================================================
Async Asyncio Serial Client Example
==================================================
.. literalinclude:: ../../../examples/common/async_asyncio_serial_client.py
4 changes: 4 additions & 0 deletions doc/source/example/async_tornado_client.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
==================================================
Async Tornado Client Example
==================================================
.. literalinclude:: ../../../examples/common/async_tornado_client.py
4 changes: 4 additions & 0 deletions doc/source/example/async_tornado_client_serial.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
==================================================
Async Tornado Client Serial Example
==================================================
.. literalinclude:: ../../../examples/common/async_tornado_client_serial.py
4 changes: 4 additions & 0 deletions doc/source/example/async_twisted_client.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
==================================================
Async Twisted Client Example
==================================================
.. literalinclude:: ../../../examples/common/async_twisted_client.py
4 changes: 4 additions & 0 deletions doc/source/example/async_twisted_client_serial.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
==================================================
Async Twisted Client Serial Example
==================================================
.. literalinclude:: ../../../examples/common/async_twisted_client_serial.py
4 changes: 4 additions & 0 deletions doc/source/example/asynchronous_asyncio_serial_client.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
==================================================
Asynchronous Asyncio Serial Client Example
==================================================
.. literalinclude:: ../../../examples/contrib/asynchronous_asyncio_serial_client.py
6 changes: 3 additions & 3 deletions doc/source/example/asynchronous_server.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
==================================================
===========================
Asynchronous Server Example
==================================================
.. literalinclude:: ../../../examples/common/asynchronous_server.py
===========================
.. literalinclude:: ../../../examples/common/asynchronous_server.py
4 changes: 2 additions & 2 deletions doc/source/example/callback_server.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
==================================================
===========================
Callback Server Example
==================================================
===========================
.. literalinclude:: ../../../examples/common/callback_server.py
8 changes: 7 additions & 1 deletion doc/source/example/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ Examples
.. toctree::
:maxdepth: 4

asynchronous_client
async_asyncio_client
async_asyncio_serial_client
async_tornado_client
async_tornado_client_serial
async_twisted_client
async_twisted_client_serial
asynchronous_processor
asynchronous_server
callback_server
Expand All @@ -22,6 +27,7 @@ Examples
synchronous_client_ext
synchronous_server
updating_server
asynchronous_asyncio_serial_client
bcd_payload
concurrent_client
libmodbus_client
Expand Down
1 change: 1 addition & 0 deletions doc/source/example/performance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
performance module
==================
.. literalinclude:: ../../../examples/common/performance.py

8 changes: 8 additions & 0 deletions doc/source/library/pymodbus.client.async.asyncio.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
pymodbus\.client\.async\.asyncio package
========================================

.. automodule:: pymodbus.client.async.asyncio
:members:
:undoc-members:
:show-inheritance:

36 changes: 36 additions & 0 deletions doc/source/library/pymodbus.client.async.factory.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
pymodbus\.client\.async\.factory package
========================================

.. automodule:: pymodbus.client.async.factory
:members:
:undoc-members:
:show-inheritance:

Submodules
----------

pymodbus\.client\.async\.factory\.serial module
-----------------------------------------------

.. automodule:: pymodbus.client.async.factory.serial
:members:
:undoc-members:
:show-inheritance:

pymodbus\.client\.async\.factory\.tcp module
--------------------------------------------

.. automodule:: pymodbus.client.async.factory.tcp
:members:
:undoc-members:
:show-inheritance:

pymodbus\.client\.async\.factory\.udp module
--------------------------------------------

.. automodule:: pymodbus.client.async.factory.udp
:members:
:undoc-members:
:show-inheritance:


55 changes: 55 additions & 0 deletions doc/source/library/pymodbus.client.async.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
pymodbus\.client\.async package
===============================

.. automodule:: pymodbus.client.async
:members:
:undoc-members:
:show-inheritance:

Subpackages
-----------

.. toctree::

pymodbus.client.async.asyncio
pymodbus.client.async.factory
pymodbus.client.async.schedulers
pymodbus.client.async.tornado
pymodbus.client.async.twisted

Submodules
----------

pymodbus\.client\.async\.serial module
--------------------------------------

.. automodule:: pymodbus.client.async.serial
:members:
:undoc-members:
:show-inheritance:

pymodbus\.client\.async\.tcp module
-----------------------------------

.. automodule:: pymodbus.client.async.tcp
:members:
:undoc-members:
:show-inheritance:

pymodbus\.client\.async\.thread module
--------------------------------------

.. automodule:: pymodbus.client.async.thread
:members:
:undoc-members:
:show-inheritance:

pymodbus\.client\.async\.udp module
-----------------------------------

.. automodule:: pymodbus.client.async.udp
:members:
:undoc-members:
:show-inheritance:


Loading

0 comments on commit 65c3baf

Please sign in to comment.