Skip to content

Commit 91f30b2

Browse files
committed
Merge branch 'dev' of https://github.com/riptideio/pymodbus into async
2 parents 7c47935 + 942e906 commit 91f30b2

File tree

7 files changed

+15
-20
lines changed

7 files changed

+15
-20
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ pymodbus/server/__pycache__/
2222
test/__pycache__/
2323
**/pymodbus.db
2424
/.eggs/
25-
<<<<<<< HEAD
2625
/test/bin/
2726
/test/include/
2827
/test/lib/
@@ -37,3 +36,4 @@ test/__pycache__/
3736
/doc/html/
3837
/doc/_build/
3938

39+
doc/source/example/asynchronous_client.rst

doc/source/example/performance.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1+
==================
12
performance module
23
==================
4+
.. literalinclude:: ../../../examples/common/performance.py
35

4-
.. automodule:: performance
5-
:members:
6-
:undoc-members:
7-
:show-inheritance:

doc/source/library/modules.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pymodbus
1+
Pymodbus
22
========
33

44
.. toctree::

doc/source/library/pymodbus.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pymodbus package
1+
Pymodbus package
22
================
33

44
.. automodule:: pymodbus

examples/common/asynchronous_processor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
STATUS_REGS = (1, 2)
3939
STATUS_COILS = (1, 3)
4040
CLIENT_DELAY = 1
41-
41+
UNIT = 0x01
4242

4343
# --------------------------------------------------------------------------- #
4444
# an example custom protocol
@@ -63,7 +63,7 @@ def fetch_holding_registers(self):
6363
""" Defer fetching holding registers
6464
"""
6565
log.debug("Starting the next cycle")
66-
d = self.read_holding_registers(*STATUS_REGS, unit=1)
66+
d = self.read_holding_registers(*STATUS_REGS, unit=UNIT)
6767
d.addCallbacks(self.send_holding_registers, self.error_handler)
6868

6969
def send_holding_registers(self, response):
@@ -73,7 +73,7 @@ def send_holding_registers(self, response):
7373
"""
7474
self.endpoint.write(response.getRegister(0))
7575
self.endpoint.write(response.getRegister(1))
76-
d = self.read_coils(*STATUS_COILS, unit=1)
76+
d = self.read_coils(*STATUS_COILS, unit=UNIT)
7777
d.addCallbacks(self.start_next_cycle, self.error_handler)
7878

7979
def start_next_cycle(self, response):

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ six
22
# -------------------------------------------------------------------
33
# if want to use the pymodbus serial stack, uncomment these
44
# -------------------------------------------------------------------
5-
# pyserial>=3.4
5+
pyserial>=3.4
66
# -------------------------------------------------------------------
77
# if you want to run the tests and code coverage, uncomment these
88
# -------------------------------------------------------------------

setup.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
line for line in reqs.read().split('\n')
3232
if (line and not line.startswith('--'))
3333
]
34-
# --------------------------------------------------------------------------- #
34+
#---------------------------------------------------------------------------#
3535
# configuration
36-
# --------------------------------------------------------------------------- #
36+
#---------------------------------------------------------------------------#
3737
setup(
3838
name="pymodbus",
3939
version=__version__,
@@ -70,13 +70,11 @@
7070
platforms=['Linux', 'Mac OS X', 'Win'],
7171
include_package_data=True,
7272
zip_safe=True,
73-
install_requires=[
74-
'pyserial >= 2.6'
75-
],
73+
install_requires=install_requires,
7674
extras_require={
7775
'quality': [
7876
'coverage >= 3.5.3',
79-
'nose >= 1.2.1',
77+
'pytest==3.3.1',
8078
'mock >= 1.0.0',
8179
'pep8 >= 1.3.3'
8280
],
@@ -89,8 +87,7 @@
8987
'pycrypto >= 2.6'
9088
],
9189
},
92-
test_suite='nose.collector',
90+
setup_requires=['pytest-runner'],
91+
tests_require=['pytest'],
9392
cmdclass=command_classes,
9493
)
95-
96-

0 commit comments

Comments
 (0)