Skip to content

Commit 446fc4d

Browse files
authored
Simplify requirements*.txt (#875)
Simplify requirement*.txt.
1 parent 3e6b374 commit 446fc4d

File tree

16 files changed

+238
-227
lines changed

16 files changed

+238
-227
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ reset:
3535
$(MAKE) install
3636

3737
check: install
38-
@pip install --upgrade --quiet --requirement=requirements-checks.txt
38+
@pip install --upgrade --quiet --requirement=requirements-tests.txt
3939
@flake8
4040

4141

README.rst

Lines changed: 41 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ PyModbus - A Python Modbus Stack
1717
Supported versions
1818
------------------------------------------------------------
1919

20-
Version `2.5.3 <https://github.com/riptideio/pymodbus/releases/tag/v2.5.3>`_ is the last 2.x release with support to python2.7.x and is in maintenance mode.
20+
Version `2.5.3 <https://github.com/riptideio/pymodbus/releases/tag/v2.5.3>`_ is the last 2.x release (Supports python 2.7.x - 3.7).
2121

22-
Version `3.0.0dev4 <https://github.com/riptideio/pymodbus/releases/tag/v3.0.0dev3>`_ is the current prerelease of 3.0.0 (Supports only Python >=3.8)
22+
Version `3.0.0dev3 <https://github.com/riptideio/pymodbus/releases/tag/v3.0.0dev3>`_ is the current prerelease of 3.0.0 (Supports Python >=3.8).
2323

24-
Remark: "Supports only" means that we only test with those versions, lower versions (e.g. 3.7) might work typically depending on the actual setup.
24+
Remark: "Supports" means that we only test with those versions, lower versions (e.g. 3.7) might work depending on the functionality used.
2525

2626
.. important::
2727
**Note 3.0.0 is a major release with a number of incompatible changes.**
@@ -32,18 +32,15 @@ Summary
3232

3333
Pymodbus is a full Modbus protocol implementation using a synchronous or asynchronous core. The preferred mode for asynchronous communication is asyncio, however for the moment twisted and tornado are also supported (due to be removed or converted to a plugin in a later version).
3434

35-
Supported modbus communication modes:
36-
- tcp
37-
- rtu-over-tcp
38-
- udp
39-
- serial
40-
- tls
35+
Supported modbus communication modes: tcp, rtu-over-tcp, udp, serial, tls
4136

4237
Pymodbus can be used without any third party dependencies (aside from pyserial) and is a very lightweight project.
4338

44-
Requires Python >= 3.7
39+
Pymodbus also provides a lot os ready to use examples as well as a server/client simulator which can be controlled via REST Api and can be easily integrated into test suites.
4540

46-
The tests are run against Python 3.7, 3.8, 3.9 and 3.10.
41+
Requires Python >= 3.8
42+
43+
The tests are run against Python 3.8, 3.9, 3.10 on Windows, Linux and MacOS.
4744

4845
------------------------------------------------------------
4946
Features
@@ -69,15 +66,15 @@ Server Features
6966
* TCP, RTU-OVER-TCP, UDP, TLS, Serial ASCII, Serial RTU, and Serial Binary
7067
* asynchronous(powered by twisted) and synchronous versions
7168
* Full server control context (device information, counters, etc)
72-
* A number of backing contexts (database, redis, sqlite, a slave device)
69+
* A number of backend contexts (database, redis, sqlite, a slave device) as datastore
7370

7471
^^^^^^^^^^^
7572
Use Cases
7673
^^^^^^^^^^^
7774

7875
Although most system administrators will find little need for a Modbus
7976
server on any modern hardware, they may find the need to query devices on
80-
their network for status (PDU, PDR, UPS, etc). Since the library is written
77+
their network for status (PDU, PDR, UPS, etc). Since the library is written
8178
in python, it allows for easy scripting and/or integration into their existing
8279
solutions.
8380

@@ -125,15 +122,14 @@ Examples Directory structure
125122
If you are looking for UI,checkout `Modbus Simulator <https://github.com/riptideio/modbus-simulator>`_ or
126123
`Modbus Cli <https://github.com/dhoomakethu/modbus_sim_cli>`_
127124

128-
Also, if you have questions, please ask them on the mailing list
129-
so that others can benefit from the results and so that I can
130-
trace them. I get a lot of email and sometimes these requests
131-
get lost in the noise: `pymodbus google group <http://groups.google.com/group/pymodbus>`_ or
132-
at `gitter <https://gitter.im/pymodbus_dev/Lobby>`_ or `github discussions <https://github.com/riptideio/pymodbus/discussions>`_
125+
Also, if you have a question, please `create a post in discussions q&a topic <https://github.com/riptideio/pymodbus/discussions/new?category=q-a>`_,
126+
so that others can benefit from the results.
127+
128+
If you think, that something in the code is broken/not running well, please `open an issue <https://github.com/riptideio/pymodbus/issues/new>`_, read the Template-text first and then post your issue with your setup informations.
133129

134130
.. important::
135131
**Note For async clients, it is recommended to use `asyncio` as the async facilitator.**
136-
**If using tornado make sure the tornado version is `4.5.3`.Other versions of tornado can break the implementation**
132+
**If using tornado make sure the tornado version is `4.5.3` other versions of tornado can break the implementation**
137133

138134

139135
------------------------------------------------------------
@@ -159,27 +155,40 @@ permissions or a virtualenv currently running)::
159155
easy_install -U pymodbus
160156
pip install -U pymodbus
161157

162-
Or to install a specific release::
158+
This will install a base version of pymodbus.
163159

164-
pip install -U pymodbus==X.Y.Z
165-
easy_install -U pymodbus==X.Y.Z
160+
To install pymodbus with options run:
161+
162+
pip install -U pymodbus[<option>,...]
163+
164+
Available options are:
165+
166+
- **repl**, installs pymodbus REPL.
166167

167-
To Install pymodbus with twisted support run::
168+
- **serial**, installs serial drivers.
168169

169-
pip install -U pymodbus[twisted]
170+
- **datastore**, installs databases (SQLAlchemy and Redit) for datastore.
170171

171-
To Install pymodbus with tornado support run::
172+
- **twisted**, installs twisted as alternative to asyncio (will be removed in a future version).
172173

173-
pip install -U pymodbus[tornado]
174+
- **tornado**, installs tornado as alternative to asyncio (will be removed in a future version).
174175

175-
To Install pymodbus REPL::
176+
- **documentation**, installs tools to generate documentation.
176177

177-
pip install -U pymodbus[repl]
178+
- **development**, installs development tools needed to enable test/check of pymodbus changes.
179+
180+
181+
Or to install a specific release::
182+
183+
pip install -U pymodbus==X.Y.Z
184+
easy_install -U pymodbus==X.Y.Z
178185

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

181188
git clone git://github.com/bashwork/pymodbus.git
182189
cd pymodbus
190+
pip install -r requirements.txt
191+
183192
184193
To get latest release (for now v2.5.3 with python 2.7 support)::
185194

@@ -194,7 +203,9 @@ To get a specific version:
194203
git checkout tags/vX.Y.Z -b vX.Y.Z
195204

196205
Then::
197-
python setup.py install
206+
pip install -e .
207+
208+
This installs pymodbus in your virtual environment with pointers directly to the pymodbus directory, so any change you make is imidiatly available as if installed.
198209

199210
Either method will install all the required dependencies
200211
(at their appropriate versions) for your current python distribution.
@@ -235,7 +246,7 @@ solving issues:
235246
------------------------------------------------------------
236247
Development Instructions
237248
------------------------------------------------------------
238-
The current code base is compatible python >= 3.7.
249+
The current code base is compatible python >= 3.8.
239250
Use make to perform a range of activities
240251

241252
::

doc/api/pydoc/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def classify_class_attrs(cls):
9898
class DefaultFormatter(pydoc.HTMLDoc):
9999
"""Default formatter."""
100100

101-
def docmodule(self, object, name=None, mod=None, packageContext = None, *ignored):
101+
def docmodule(self, object, name=None, mod=None, packageContext = None, *ignored): # noqa C901
102102
"""Produce HTML documentation for a module object."""
103103
my_name = object.__name__ # ignore the passed-in name
104104
parts = split(my_name, '.')

pymodbus/repl/client/completer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def has_selected_completion():
2929
class CmdCompleter(Completer):
3030
"""Completer for Pymodbus REPL."""
3131

32-
def __init__(self, client=None, commands=None, ignore_case=True):
32+
def __init__(self, client=None, commands=None, ignore_case=True): # pylint: disable=super-init-not-called
3333
"""Initialize.
3434
3535
:param client: Modbus Client

pymodbus/repl/client/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def convert(self, value, param, ctx):
105105
return None
106106

107107

108-
def cli(client): # NOSONAR pylint: disable=too-complex
108+
def cli(client): # noqa C901 NOSONAR pylint: disable=too-complex
109109
"""Run client definition."""
110110
use_keys = KeyBindings()
111111
history_file = os.path.normpath(os.path.expanduser("~/.pymodhis"))
@@ -181,7 +181,7 @@ def _process_args(args, string=True):
181181
text = session.prompt('> ', complete_while_typing=True)
182182
if text.strip().lower() == 'help':
183183
print_formatted_text(HTML("<u>Available commands:</u>"))
184-
for cmd, obj in sorted(session.completer.commands.items()):
184+
for cmd, obj in sorted(session.completer.commands.items()): # pylint: disable=no-member
185185
if cmd != 'help':
186186
print_formatted_text(
187187
HTML("<skyblue>{:45s}</skyblue>" # pylint: disable=consider-using-f-string

pymodbus/repl/server/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from prompt_toolkit.styles import Style
1313

1414
from prompt_toolkit import PromptSession, print_formatted_text
15-
from prompt_toolkit.completion import NestedCompleter
15+
from prompt_toolkit.completion import NestedCompleter # pylint: disable=no-name-in-module
1616
from prompt_toolkit.formatted_text import HTML
1717

1818

@@ -130,7 +130,7 @@ async def interactive_shell(server): # NOSONAR pylint: disable=too-complex
130130
while True: # pylint: disable=too-many-nested-blocks
131131
try:
132132
invalid_command = False
133-
result = await session.prompt_async()
133+
result = await session.prompt_async() # pylint: disable=no-member
134134
if result == "exit":
135135
await server.web_app.shutdown()
136136
break

requirements-checks.txt

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

requirements-coverage.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

requirements-docs.txt

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

requirements-tests.txt

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

0 commit comments

Comments
 (0)