Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
janiversen committed Jul 20, 2023
2 parents bff39f6 + 6b795f1 commit 14d9c37
Show file tree
Hide file tree
Showing 102 changed files with 3,576 additions and 4,194 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ jobs:
integreation_test:
name: pytest - ${{ matrix.os.on }} - ${{ matrix.python.version }}
runs-on: ${{ matrix.os.on }}
needs: linters
timeout-minutes: 10
strategy:
fail-fast: false
Expand All @@ -75,16 +74,6 @@ jobs:
- version: '3.9'
- version: '3.10'
- version: '3.11'
- version: pypy-3.8
exclude:
- os:
on: macos-latest
python:
version: pypy-3.8
- os:
on: windows-latest
python:
version: pypy-3.8
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -105,12 +94,29 @@ jobs:
run: pip install -e . -r requirements.txt

- name: pytest
run: pytest --cov=pymodbus --cov=test --cov-report=term-missing --cov-report=xml -v --full-trace --timeout=20
run: pytest -n0 --cov=pymodbus --cov=test --cov-report=term-missing --cov-report=xml -v --full-trace --timeout=20

analyze:
name: Analyze Python
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3

- uses: github/codeql-action/init@v2
with:
languages: python

- uses: github/codeql-action/autobuild@v2

- uses: github/codeql-action/analyze@v2

ci_complete:
name: ci_complete
runs-on: ubuntu-latest
needs:
- linters
- analyze
- integreation_test
timeout-minutes: 1
steps:
Expand Down
14 changes: 0 additions & 14 deletions .github/workflows/clean_workflow_runs.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
name: Clean workflow runs
on:
# schedule:
# # Monthly day 1 at 0:35 UTC.
# - cron: '35 0 1 1-12 *'
workflow_dispatch:
inputs:
retain_days:
description: 'retain days (default 14)'
required: true
default: 14
keep_minimum_runs:
description: 'keep minimum runs (default 6)'
required: true
default: 6

permissions:
actions: write
Expand All @@ -26,8 +14,6 @@ jobs:
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: ${{ github.events.inputs.retain_days }}
keep_minimum_runs: ${{ github.events.inputs.keep_minimum_runs }}

clear-cache:
runs-on: ubuntu-latest
Expand Down
58 changes: 0 additions & 58 deletions .github/workflows/docker-publish.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/lock.yaml

This file was deleted.

12 changes: 12 additions & 0 deletions .github/workflows/stale.yml → .github/workflows/stale_lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
- cron: "30 1 * * *"
workflow_dispatch:

permissions:
issues: write
pull-requests: write

concurrency:
group: lock

jobs:
stale:
runs-on: ubuntu-latest
Expand All @@ -24,3 +31,8 @@ jobs:
exempt-issue-labels: 'Bug,Enhancements,Investigating'
stale-pr-label: 'no-pr-activity'
remove-stale-when-updated: true
- uses: dessant/lock-threads@v4
with:
github-token: ${{ github.token }}
issue-inactive-days: '10'
pr-inactive-days: '10'
12 changes: 12 additions & 0 deletions API_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
PyModbus - API changes.
=======================

-------------
Version 3.4.0
-------------
- Modbus<x>Client .connect() returns True/False (connected or not)
- Modbue<x>Server handler=, allow_reuse_addr=, backlog= are no longer accepted
- ModbusTcpClient / AsyncModbusTcpClient no longer support unix path
- StartAsyncUnixServer / ModbusUnixServer removed (never worked on Windows)
- ModbusTlsServer reqclicert= is no longer accepted
- ModbusSerialServer auto_connect= is no longer accepted
- ModbusSimulatorServer.serve_forever(only_start=False) added to allow return


-------------
Version 3.3.1
-------------
Expand Down
55 changes: 55 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,58 @@
version 3.4.0
----------------------------------------------------------
* Prepare v3.4.0.
* Handle partial local echo. (#1675)
* clarify handle_local_echo. (#1674)
* async_client: add retries/reconnect. (#1672)
* Fix 3.11 problem. (#1673)
* Add new example simulator server/client. (#1671)
* `examples/contrib/explain.py` leveraging Rapid SCADA (#1665)
* _logger missed basicConfig. (#1670)
* Bug fix for #1662 (#1663)
* Bug fix for #1661 (#1664)
* Fix typo in config.rst (#1660)
* test action_increment. (#1659)
* test codeql (#1655)
* mypy complaints. (#1656)
* Remove self.params from async client (#1640)
* Drop test of pypy with python 3.8.
* repair server_async.py (#1644)
* move common framer to base. (#1639)
* Restrict Return diag call to bytes. (#1638)
* use slave= in diag requests. (#1636)
* transport listen in server. (#1628)
* CI test.
* Integrate transport in server. (#1617)
* fix getFrameStart for ExceptionResponse (#1627)
* Add min/min to simulator actions.
* Change to "sync client" in forwarder example (#1625)
* Remove docker (lack of maintenance). (#1623)
* Clean defaults (#1618)
* Reduce CI log with no debug. (#1616)
* prepare server to use transport. (#1607)
* Fix RemoteSlaveContext (#1599)
* Combine stale and lock. (#1608)
* update pytest + extensions. (#1610)
* Change version follow PEP 440. (#1609)
* Fix regression with REPL server not listening (#1604)
* Remove handler= for server classes. (#1602)
* Fix write function codes (#1598)
* transport nullmodem (#1591)
* move test of examples to subdirectory. (#1592)
* transport as object, not base class. (#1572)
* Simple examples. (#1590)
* transport_connect as bool. (#1587)
* Prepare dev (#1588)
* Release corrections. (#1586)

Thanks to:
Alex
Fredo70
Hangyu Fan
James Braza
jan iversen


version 3.3.2
----------------------------------------------------------
* Fix RemoteSlaveContext (#1599)
Expand Down
14 changes: 0 additions & 14 deletions Dockerfile

This file was deleted.

84 changes: 1 addition & 83 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Supported versions

Version `2.5.3 <https://github.com/pymodbus-dev/pymodbus/releases/tag/v2.5.3>`_ is the last 2.x release (python >= 2.7, no longer supported).

Version `3.3.2 <https://github.com/pymodbus-dev/pymodbus/releases/tag/v3.3.2>`_ is the current release (Tested with Python >= 3.8).
Version `3.4.0 <https://github.com/pymodbus-dev/pymodbus/releases/tag/v3.4.0>`_ is the current release (Tested with Python >= 3.8).

.. important::
All API changes after 3.0.0 are documented in `API_changes.rst <https://github.com/pymodbus-dev/pymodbus/blob/dev/API_changes.rst>`_
Expand Down Expand Up @@ -240,88 +240,6 @@ If a maintenance release of an old version is needed (e.g. v2.5.4),
the release tag is used to create a branch with the same name,
and maintenance development is merged here.

-----------------------------------------------------------
Install with Docker
-----------------------------------------------------------
Pull the latest image on ``dev`` branch with ``docker pull ghcr.io/pymodbus-dev/pymodbus:dev``::

❯ docker pull ghcr.io/pymodbus-dev/pymodbus:dev
dev: Pulling from pymodbus-dev/pymodbus
548fcab5fe88: Pull complete
a4d3f9f008ef: Pull complete
eb83acb05730: Pull complete
71cd28d529fd: Pull complete
66607ad8f4f0: Pull complete
64dff4c66d3b: Pull complete
8b26e5718a7a: Pull complete
dc87d8707532: Pull complete
Digest: sha256:cfeee09a87dde5863574779416490fd47cacbb6f37332a3cdaf995c416e16b69
Status: Downloaded newer image for ghcr.io/pymodbus-dev/pymodbus:dev
ghcr.io/pymodbus-dev/pymodbus:dev

The image when run with out any further options supplied will start a repl server in non interactive mode.::

❯ docker run -it --rm -p 8080:8080 -p 5020:5020 ghcr.io/pymodbus-dev/pymodbus:dev

Reactive Modbus Server started.
======== Running on http://127.0.0.1:8080 ========

===========================================================================
Example Usage:
curl -X POST http://127.0.0.1:8080 -d "{"response_type": "error", "error_code": 4}"
===========================================================================

The default command can be overridden by passing any valid command at the end.::

❯ docker run -p 8080:8080 -p 5020:5020 -it --rm ghcr.io/pymodbus-dev/pymodbus:dev bash -c "pymodbus.server --help"

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

Reactive Modbus server

╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --host TEXT Host address [default: localhost] │
│ --web-port INTEGER Web app port [default: 8080] │
│ -b Support broadcast messages │
│ --repl --no-repl Enable/Disable repl for server [default: repl] │
│ --verbose --no-verbose Run with debug logs enabled for pymodbus [default: no-verbose] │
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy it or customize the │
│ installation. │
│ --help Show this message and exit. │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ run Run Reactive Modbus server. │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

To check the repl console.::

❯ docker run -p 8080:8080 -p 5020:5020 -it --rm ghcr.io/pymodbus-dev/pymodbus:dev bash -c "pymodbus.console --help"
Usage: pymodbus.console [OPTIONS] COMMAND [ARGS]...

Run Main.

Options:
--version Show the version and exit.
--verbose Verbose logs
--broadcast-support Support broadcast messages
--retry-on-empty Retry on empty response
--retry-on-error Retry on error response
--retries INTEGER Retry count
--reset-socket / --no-reset-socket
Reset client socket on error
--help Show this message and exit.

Commands:
serial Define serial communication.
tcp Define TCP.

To run examples (assuming server is running). ::

❯ docker run -p 8080:8080 -p 5020:5020 -it --rm ghcr.io/pymodbus-dev/pymodbus:dev bash -c "examples/client_async.py"
14:52:13 INFO client_async:44 ### Create client object
14:52:13 INFO client_async:120 ### Client starting

------------------------------------------------------------
Current Work In Progress
------------------------------------------------------------
Expand Down
Loading

0 comments on commit 14d9c37

Please sign in to comment.