Skip to content

Commit 8e6c753

Browse files
committed
Merge branch 'dev'
2 parents c30bda4 + 5dd5576 commit 8e6c753

File tree

124 files changed

+2092
-2242
lines changed

Some content is hidden

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

124 files changed

+2092
-2242
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
<!--
2-
32
Before opening a new issue, make sure you do the following:
4-
* check that your issue isn't already filed: https://github.com/pymodbus-dev/pymodbus/issues
5-
* check the discussions forum https://github.com/pymodbus-dev/pymodbus/discussions
6-
* prepare a short, runnable example that reproduce the issue with the latest development version of Pymodbus
3+
4+
- Check that your issue isn't already filed: https://github.com/pymodbus-dev/pymodbus/issues
5+
- Check the discussions forum https://github.com/pymodbus-dev/pymodbus/discussions
6+
- Prepare a short, runnable example that reproduce the issue with the latest development version of Pymodbus
77
-->
88

99
### Versions
1010

11-
* Python:
12-
* OS:
13-
* Pymodbus:
14-
* Modbus Hardware (if used):
11+
- Python:
12+
- OS:
13+
- Pymodbus:
14+
- Modbus Hardware (if used):
1515

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

2021
### Description
2122

22-
What were you trying, what has happened, what went wrong, and what did you expect?
23+
<!-- What were you trying, what has happened, what went wrong, and what did you expect? -->
2324

2425
### Code and Logs
2526

@@ -28,5 +29,6 @@ What were you trying, what has happened, what went wrong, and what did you expec
2829

2930
# please use the following to format logs when posting them here
3031
import pymodbus
32+
3133
pymodbus.pymodbus_apply_logging_config()
3234
```

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ jobs:
3737
- name: flake8
3838
cmd: flake8
3939
type: lint
40-
- name: isort
41-
cmd: isort --check .
42-
type: lint
43-
- name: black
44-
cmd: black --check --safe --quiet examples/ pymodbus/ test/
40+
- name: precommit (isort and black)
41+
cmd: pre-commit run --all-files
4542
type: lint
4643
- name: docs
4744
cmd: make -C doc/ html
4845
type: lint
46+
- name: mypy
47+
cmd: mypy pymodbus
48+
type: lint
4949
- name: pytest
5050
cmd: pytest --cov=pymodbus --cov=test --cov-report=term-missing --cov-report=xml -v --full-trace --timeout=20
5151
type: test

.github/workflows/docker-publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
tags: ${{ steps.meta.outputs.tags }}
5353
labels: ${{ steps.meta.outputs.labels }}
5454

55-
- name: Sign the published Docker image
56-
env:
57-
COSIGN_EXPERIMENTAL: "true"
58-
run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }}
55+
# - name: Sign the published Docker image
56+
# env:
57+
# COSIGN_EXPERIMENTAL: "true"
58+
# run: echo "${{ steps.meta.outputs.tags }}" | xargs -I {} cosign sign {}@${{ steps.build-and-push.outputs.digest }}

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,14 @@
22
*.pyc
33
*.swp
44
__pycache__/
5-
.cache/
5+
.*cache/
66
.coverage
77
.DS_Store
88
.eggs/
99
.idea
1010
.idea/
1111
.noseids
1212
.pymodhis
13-
.pytest_cache/
1413
.venv
1514
.vscode
1615
.vscode/

.pre-commit-config.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v3.2.0
6+
hooks:
7+
- id: trailing-whitespace
8+
# - id: end-of-file-fixer
9+
- id: check-yaml
10+
- id: check-added-large-files
11+
- repo: https://github.com/pycqa/isort
12+
rev: 5.12.0
13+
hooks:
14+
- id: isort
15+
exclude: ^(doc/_build|venv|.venv|.git|pymodbus/client/serial_asyncio)
16+
- repo: https://github.com/psf/black
17+
rev: 22.12.0
18+
hooks:
19+
- id: black
20+
args: [--safe,--quiet]
21+
files: (examples|pymodbus|test)/

API_changes.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22
PyModbus - API changes.
33
=======================
44

5+
-------------
6+
Version 3.2.0
7+
-------------
8+
- helper to convert values in mixin: convert_from_registers, convert_to_registers
9+
- import pymodbus.version -> from pymodbus import __version__, __version_full__
10+
- pymodbus.pymodbus_apply_logging_config(log_file_name="pymodbus.log") to enable file pymodbus_apply_logging_config
11+
- pymodbus.pymodbus_apply_logging_config have default DEBUG, it not called root settings will be used.
12+
- pymodbus/interfaces/IModbusDecoder removed.
13+
- pymodbus/interfaces/IModbusFramer removed.
14+
- pymodbus/interfaces/IModbusSlaveContext -> pymodbus/datastore/ModbusBaseSlaveContext.
15+
- StartAsync<type>Server, removed defer_start argument, return is None.
16+
instead of using defer_start instantiate the Modbus<type>Server directly.
17+
- `ReturnSlaveNoReponseCountResponse` has been corrected to
18+
`ReturnSlaveNoResponseCountResponse`
19+
- Option `--modbus-config` for REPL server renamed to `--modbus-config-path`
20+
- client.protocol.<something> --> client.<something>
21+
- client.factory.<something> --> client.<something>
22+
523
-------------
624
Version 3.1.0
725
-------------

CHANGELOG.rst

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,56 @@
1+
version 3.2.0
2+
----------------------------------------------------------
3+
* Add value <-> registers converter helpers. (#1413)
4+
* Add pre-commit config (#1406)
5+
* Make baud rate configurable for examples (#1410)
6+
* Clean __init_ and update log module. (#1411)
7+
* Simulator add calls functionality. (#1390)
8+
* Add note about not being thread safe. (#1404)
9+
* Update docker-publish.yml
10+
* Forward retry_on_empty and retries by calling transaction (#1401)
11+
* serial sync recv interval (#1389)
12+
* Add tests for writing multiple writes with a single value (#1402)
13+
* Enable mypy in CI (#1388)
14+
* Limit use of Singleton. (#1397)
15+
* Cleanup interfaces (#1396)
16+
* Add request names. (#1391)
17+
* Simulator, register look and feel. (#1387)
18+
* Fix enum for REPL server (#1384)
19+
* Remove unneeded attribute (#1383)
20+
* Fix mypy errors in reactive server (#1381)
21+
* remove nosec (#1379)
22+
* Fix type hints for http_server (#1369)
23+
* Merge pull request #1380 from pymodbus-dev/requirements
24+
* remove second client instance in async mode. (#1367)
25+
* Pin setuptools to prevent breakage with Version including "X" (#1373)
26+
* Lint and type hints for REPL (#1364)
27+
* Clean mixin execute (#1366)
28+
* Remove unused setup_commands.py. (#1362)
29+
* Run black on top-level files and /doc (#1361)
30+
* repl config path (#1359)
31+
* Fix NoReponse -> NoResponse (#1358)
32+
* Make whole main async. (#1355)
33+
* Fix more typing issues (#1351)
34+
* Test sync task (#1341)
35+
* Fixed text in ModbusClientMixin's writes (#1352)
36+
* lint /doc (#1345)
37+
* Remove unused linters (#1344)
38+
* Allow log level as string or integer. (#1343)
39+
* Sync serial, clean recv. (#1340)
40+
* Test server task, async completed (#1318)
41+
* main() should be sync (#1339)
42+
* Bug: Fixed caused by passing wrong arg (#1336)
43+
44+
Thanks to:
45+
AKJ7,
46+
Alex,
47+
Alex Ruddick,
48+
banana-sun,
49+
cgernert,
50+
Jakob Ruhe,
51+
James Braza,
52+
jan Iversen
53+
154
version 3.1.3
255
----------------------------------------------------------
356
* Solve log problem in payload.

MAKE_RELEASE.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Prepare/make release on dev.
1313
* Update README.rst "Supported versions"
1414
* Update CHANGELOG.rst
1515
* Add commits from last release, but selectively !
16-
git log --oneline v3.1.3..HEAD > commit.log
17-
git log v3.1.3..HEAD | grep Author > contributors.log
16+
git log --oneline v3.2.0..HEAD > commit.log
17+
git log v3.2.0..HEAD | grep Author > contributors.log
1818
* Commit, push and merge.
1919
* Checkout master locally
2020
* git merge dev

README.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Supported versions
2222

2323
Version `2.5.3 <https://github.com/pymodbus-dev/pymodbus/releases/tag/v2.5.3>`_ is the last 2.x release (Supports python 2.7.x - 3.7).
2424

25-
Version `3.1.3 <https://github.com/pymodbus-dev/pymodbus/releases/tag/v3.1.3>`_ is the current release (Supports Python >=3.8).
25+
Version `3.2.0 <https://github.com/pymodbus-dev/pymodbus/releases/tag/v3.2.0>`_ is the current release (Supports Python >=3.8).
2626

2727
.. important::
2828
All API changes after 3.0.0 are documented in `API_changes.rst <https://github.com/pymodbus-dev/pymodbus/blob/dev/API_changes.rst>`_
@@ -224,7 +224,9 @@ Then:
224224

225225
pip install -e .
226226

227-
This installs pymodbus in your virtual environment with pointers directly to the pymodbus directory, so any change you make is immediately available as if installed.
227+
pre-commit --install
228+
229+
This installs pymodbus in your virtual environment with pointers directly to the pymodbus directory, so any change you make is immediately available as if installed. It will also install `pre-commit` git hooks.
228230

229231
Either method will install all the required dependencies
230232
(at their appropriate versions) for your current python distribution.
@@ -277,7 +279,7 @@ The default command can be overridden by passing any valid command at the end.::
277279

278280
Usage: pymodbus.server [OPTIONS] COMMAND [ARGS]...
279281

280-
Reactive modebus server
282+
Reactive Modbus server
281283

282284
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
283285
│ --host TEXT Host address [default: localhost] │

TODO_add_checks

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
1) add .pre-commit and commit-hook
2-
3-
2) new checks
1+
New checks
42
- prettier
5-
- mypy
6-

0 commit comments

Comments
 (0)