Skip to content

Commit

Permalink
Merge pull request #611 from riptideio/dev
Browse files Browse the repository at this point in the history
pymodbus 2.5.0
  • Loading branch information
dhoomakethu authored Mar 3, 2021
2 parents ff03488 + 4b57def commit ce5d83b
Show file tree
Hide file tree
Showing 74 changed files with 2,618 additions and 425 deletions.
3 changes: 2 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
omit =
pymodbus/repl/*
pymodbus/internal/*
pymodbus/server/asyncio.py
pymodbus/server/asyncio.py
pymodbus/server/reactive/*
259 changes: 259 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,259 @@
name: CI

on:
push:
branches:
- dev
- master
tags:
- v*
pull_request:
branches:
- "*"
schedule:
# Daily at 05:14
- cron: '14 5 * * *'

jobs:
test:
# Should match JOB_NAME below
name: ${{ matrix.task.name }} - ${{ matrix.os.name }} ${{ matrix.python.name }} ${{ matrix.arch.name }}
runs-on: ${{ matrix.os.runs-on }}
container: ${{ matrix.os.container[matrix.python.docker] }}
strategy:
fail-fast: false
matrix:
task:
- name: Test
tox: test
coverage: true
os:
- name: Linux
runs-on: ubuntu-latest
python_platform: linux
matrix: linux
container:
2.7: docker://python:2.7-buster
3.6: docker://python:3.6-buster
3.7: docker://python:3.7-buster
3.8: docker://python:3.8-buster
3.9: docker://python:3.9-buster
pypy2: docker://pypy:2-jessie
pypy3: docker://pypy:3-stretch
# - name: Windows
# runs-on: windows-latest
# python_platform: win32
# matrix: windows
# - name: macOS
# runs-on: macos-latest
# python_platform: darwin
# matrix: macos
python:
- name: CPython 2.7
tox: py27
action: 2.7
docker: 2.7
implementation: cpython
- name: PyPy 2.7
tox: pypy27
action: pypy-2.7
docker: pypy2.7
implementation: pypy
- name: CPython 3.6
tox: py36
action: 3.6
docker: 3.6
implementation: cpython
- name: CPython 3.7
tox: py37
action: 3.7
docker: 3.7
implementation: cpython
- name: CPython 3.8
tox: py38
action: 3.8
docker: 3.8
implementation: cpython
- name: CPython 3.9
tox: py39
action: 3.9
docker: 3.9
implementation: cpython
- name: PyPy 3.6
tox: pypy36
action: pypy-3.6
docker: pypy3.6
implementation: pypy
- name: PyPy 3.7
tox: pypy37
action: pypy-3.7
docker: pypy3.7
implementation: pypy
arch:
- name: x86
action: x86
matrix: x86
- name: x64
action: x64
matrix: x64
exclude:
- os:
matrix: linux
arch:
matrix: x86
- os:
matrix: macos
arch:
matrix: x86
env:
# Should match name above
JOB_NAME: ${{ matrix.task.name }} - ${{ matrix.os.name }} ${{ matrix.python.name }} ${{ matrix.arch.name }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up ${{ matrix.python.name }} (if CPython)
if: ${{ job.container == '' && matrix.python.implementation == 'cpython'}}
uses: actions/setup-python@v2
with:
python-version: '${{ matrix.python.action }}.0-alpha - ${{ matrix.python.action }}.X'
architecture: '${{ matrix.arch.action }}'
- name: Set up ${{ matrix.python.name }} (if PyPy)
if: ${{ job.container == '' && matrix.python.implementation == 'pypy'}}
uses: actions/setup-python@v2
with:
python-version: '${{ matrix.python.action }}'
architecture: '${{ matrix.arch.action }}'
- name: Install
run: |
pip install --upgrade pip setuptools wheel
pip install --upgrade tox
- uses: twisted/python-info-action@v1.0.1
- name: Test
run: |
tox -vv -e ${{ matrix.python.tox }}
- name: Coverage Processing
if: matrix.task.coverage
run: |
mkdir coverage_reports
cp .coverage "coverage_reports/.coverage.${{ env.JOB_NAME }}"
cp coverage.xml "coverage_reports/coverage.${{ env.JOB_NAME }}.xml"
- name: Upload Coverage
if: matrix.task.coverage
uses: actions/upload-artifact@v2
with:
name: coverage
path: coverage_reports/*
check:
# Should match JOB_NAME below
name: ${{ matrix.task.name }} - ${{ matrix.os.name }} ${{ matrix.python.name }} ${{ matrix.arch.name }}
runs-on: ${{ matrix.os.runs-on }}
container: ${{ matrix.os.container[matrix.python.docker] }}
strategy:
fail-fast: false
matrix:
task:
- name: flake8
tox: flake8
continue_on_error: true
- name: Docs
tox: docs
os:
- name: Linux
runs-on: ubuntu-latest
python_platform: linux
matrix: linux
container:
3.8: docker://python:3.8-buster
python:
- name: CPython 3.8
tox: py38
action: 3.8
docker: 3.8
implementation: cpython
arch:
- name: x64
action: x64
matrix: x64
env:
# Should match name above
JOB_NAME: ${{ matrix.task.name }} - ${{ matrix.os.name }} ${{ matrix.python.name }} ${{ matrix.arch.name }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install
run: |
pip install --upgrade pip setuptools wheel
pip install --upgrade tox
- uses: twisted/python-info-action@v1.0.1
- name: Test
continue-on-error: ${{ matrix.task.continue_on_error == true }}
run: |
tox -vv -e ${{ matrix.task.tox }}
coverage:
# Should match JOB_NAME below
name: ${{ matrix.task.name }} - ${{ matrix.os.name }} ${{ matrix.python.name }} ${{ matrix.arch.name }}
runs-on: ${{ matrix.os.runs-on }}
needs:
- test
container: ${{ matrix.os.container[matrix.python.docker] }}
strategy:
fail-fast: false
matrix:
task:
- name: Coverage
tox: combined-coverage
download_coverage: true
os:
- name: Linux
runs-on: ubuntu-latest
python_platform: linux
matrix: linux
container:
3.8: docker://python:3.8-buster
python:
- name: CPython 3.8
tox: py38
action: 3.8
docker: 3.8
implementation: cpython
arch:
- name: x64
action: x64
matrix: x64
env:
# Should match name above
JOB_NAME: ${{ matrix.task.name }} - ${{ matrix.os.name }} ${{ matrix.python.name }} ${{ matrix.arch.name }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install
run: |
pip install --upgrade pip setuptools wheel
pip install --upgrade tox
pip install --upgrade six
- uses: twisted/python-info-action@v1.0.1
- name: Download Coverage
if: matrix.task.download_coverage
uses: actions/download-artifact@v2
with:
name: coverage
path: coverage_reports
- name: Test
continue-on-error: ${{ matrix.task.continue_on_error == true }}
run: |
tox -vv -e ${{ matrix.task.tox }}
all:
name: All
runs-on: ubuntu-latest
needs:
- check
- coverage
- test
steps:
- name: This
shell: python
run: |
import this
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ test/__pycache__/
/doc/_build/
.pytest_cache/
**/.pymodhis
/build/
/dist/
35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

43 changes: 43 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,46 @@
version 2.5.0
----------------------------------------------------------
* Support response types `stray` and `empty` in repl server.
* Minor updates in asyncio server.
* Update reactive server to send stray response of given length.
* Transaction manager updates on retries for empty and invalid packets.
* Test fixes for asyncio client and transaction manager.
* Fix sync client and processing of incomplete frames with rtu framers
* Support synchronous diagnostic client (TCP)
* Server updates (REPL and async)
* Handle Memory leak in sync servers due to socketserver memory leak

version 2.5.0rc3
----------------------------------------------------------
* Minor fix in documentations
* Travis fix for Mac OSX
* Disable unnecessary deprecation warning while using async clients.
* Use Github actions for builds in favor of travis.


version 2.5.0rc2
----------------------------------------------------------
* Documentation updates
* Disable `strict` mode by default.
* Fix `ReportSlaveIdRequest` request
* Sparse datablock initialization updates.

version 2.5.0rc1
----------------------------------------------------------
* Support REPL for modbus server (only python3 and asyncio)
* Fix REPL client for write requests
* Fix examples
* Asyncio server
* Asynchronous server (with custom datablock)
* Fix version info for servers
* Fix and enhancements to Tornado clients (seril and tcp)
* Fix and enhancements to Asyncio client and server
* Update Install instructions
* Synchronous client retry on empty and error enhancments
* Add new modbus state `RETRYING`
* Support runtime response manipulations for Servers
* Bug fixes with logging module in servers
* Asyncio modbus serial server support

Version 2.4.0
----------------------------------------------------------
Expand Down
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,20 @@ check: install
test: install
@pip install --upgrade --quiet --requirement=requirements-tests.txt
ifeq ($(PYVER),3.6)
$(info Running tests on $(PYVER))
@pip install --upgrade pip --quiet
@pytest --cov=pymodbus/ --cov-report term-missing test/test_server_asyncio.py test
@coverage report --fail-under=85 -i
else ifeq ($(PYVER),2.7)
$(info Running tests on $(PYVER))
@pip install pip==20.3.4 --quiet
@pytest --cov-config=.coveragerc --cov=pymodbus/ --cov-report term-missing --ignore test/test_server_asyncio.py --ignore test/test_client_async_asyncio.py test
@coverage report --fail-under=90 -i
else
@pytest --cov=pymodbus/ --cov-report term-missing
@coverage report --fail-under=90 -i
$(info Running tests on $(PYVER))
@pip install --upgrade pip --quiet
@pytest --cov=pymodbus/ --cov-report term-missing test
@coverage report --fail-under=85 -i
endif

tox: install
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PyModbus - A Python Modbus Stack
.. image:: https://badges.gitter.im/Join%20Chat.svg
: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
:target: http://pymodbus.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: http://pepy.tech/badge/pymodbus
:target: http://pepy.tech/project/pymodbus
Expand Down
Loading

0 comments on commit ce5d83b

Please sign in to comment.