Skip to content

Commit 2a57b76

Browse files
committed
Merge branch 'dev' into HEAD to define v3.0.1.
2 parents d7834ac + d5fbb48 commit 2a57b76

File tree

160 files changed

+2514
-1804
lines changed

Some content is hidden

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

160 files changed

+2514
-1804
lines changed

Diff for: .coveragerc

-8
This file was deleted.

Diff for: .github/ISSUE_TEMPLATE.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Before opening a new issue, make sure you do the following:
1313
* Python:
1414
* OS:
1515
* Pymodbus:
16-
* Modbus Hardware (if used):
16+
* Modbus Hardware (if used):
1717

1818
### Pymodbus Specific
1919
* Server: tcp/rtu/ascii - sync/async
@@ -26,6 +26,9 @@ What were you trying, what has happened, what went wrong, and what did you expec
2626
### Code and Logs
2727

2828
```python
29-
# code and logs here.
29+
# code and logs here.
3030

31+
# please use the following to format logs when posting them here
32+
import pymodbus
33+
pymodbus.pymodbus_apply_logging_config()
3134
```

Diff for: .github/workflows/ci.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,11 @@ jobs:
190190
- name: flake8
191191
tox: flake8
192192
# continue_on_error: true
193+
- name: isort
194+
tox: isort_CI
195+
# continue_on_error: true
193196
- name: black
194-
tox: black
197+
tox: black_CI
195198
# continue_on_error: true
196199
- name: Docs
197200
tox: docs

Diff for: .github/workflows/docker-hub.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# GitHub recommends pinning actions to a commit SHA.
7+
# To get a newer version, you will need to update the SHA.
8+
# You can also reference a tag or branch, but the action may change without warning.
9+
10+
name: Publish Docker image
11+
12+
on:
13+
release:
14+
types: [published]
15+
16+
jobs:
17+
push_to_registry:
18+
name: Push Docker image to Docker Hub
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Check out the repo
22+
uses: actions/checkout@v3
23+
24+
-
25+
name: Set up QEMU
26+
uses: docker/setup-qemu-action@v2
27+
28+
-
29+
name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v2
31+
32+
- name: Log in to Docker Hub
33+
uses: docker/login-action@v2
34+
with:
35+
username: ${{ secrets.DOCKER_USERNAME }}
36+
password: ${{ secrets.DOCKER_PASSWORD }}
37+
38+
- name: Extract metadata (tags, labels) for Docker
39+
id: meta
40+
uses: docker/metadata-action@v4
41+
with:
42+
images: ${{ github.repository }}
43+
44+
- name: Build and push Docker image
45+
uses: docker/build-push-action@v3
46+
with:
47+
context: .
48+
platforms: linux/amd64,linux/arm64
49+
push: true
50+
tags: ${{ steps.meta.outputs.tags }}
51+
labels: ${{ steps.meta.outputs.labels }}

Diff for: .github/workflows/package.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# GitHub recommends pinning actions to a commit SHA.
7+
# To get a newer version, you will need to update the SHA.
8+
# You can also reference a tag or branch, but the action may change without warning.
9+
10+
name: Create and publish a Docker image
11+
12+
on:
13+
release:
14+
types: [published]
15+
16+
env:
17+
REGISTRY: ghcr.io
18+
IMAGE_NAME: ${{ github.repository }}
19+
20+
jobs:
21+
build-and-push-image:
22+
runs-on: ubuntu-latest
23+
permissions:
24+
contents: read
25+
packages: write
26+
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v3
30+
31+
- name: Log in to the Container registry
32+
uses: docker/login-action@v2
33+
with:
34+
registry: ${{ env.REGISTRY }}
35+
username: ${{ github.actor }}
36+
password: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Extract metadata (tags, labels) for Docker
39+
id: meta
40+
uses: docker/metadata-action@v4
41+
with:
42+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
43+
44+
- name: Build and push Docker image
45+
uses: docker/build-push-action@v3
46+
with:
47+
context: .
48+
push: true
49+
tags: ${{ steps.meta.outputs.tags }}
50+
labels: ${{ steps.meta.outputs.labels }}

Diff for: .gitignore

+14-32
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,26 @@
1+
*.db
12
*.pyc
23
*.swp
3-
build/
4-
dist/
5-
venv/
6-
pymodbus.egg-info/
4+
__pycache__/
5+
.cache/
76
.coverage
8-
.vscode
7+
.DS_Store
8+
.eggs/
99
.idea
10-
.noseids
11-
*.db
1210
.idea/
11+
.noseids
12+
.pymodhis
13+
.pytest_cache/
1314
.tox/
14-
doc/api/epydoc/html/
15-
.vscode/
1615
.venv
17-
__pycache__/
18-
pymodbus/__pycache__/
19-
pymodbus/client/__pycache__/
20-
pymodbus/datastore/__pycache__/
21-
pymodbus/internal/__pycache__/
22-
pymodbus/server/__pycache__/
23-
test/__pycache__/
24-
**/pymodbus.db
25-
/.eggs/
26-
/test/bin/
27-
/test/include/
28-
/test/lib/
29-
/test/pip-selfcheck.json
30-
/test/.Python
31-
/.cache/
16+
.vscode
17+
.vscode/
18+
build/
19+
/doc/api/epydoc/html/
3220
/doc/sphinx/doctrees/
33-
/doc_new/
34-
/doc/quality/
35-
/doc/pymodbus.pdf
3621
/doc/sphinx/
3722
/doc/html/
3823
/doc/_build/
39-
.pytest_cache/
40-
**/.pymodhis
41-
/build/
4224
/dist/
43-
**/.DS_Store
44-
/venv
25+
/pymodbus.egg-info/
26+
/venv/

Diff for: .isort.cfg

-21
This file was deleted.

Diff for: .project

-17
This file was deleted.

Diff for: .pydevproject

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
44
<path>/pymodbus</path>
55
</pydev_pathproperty>
6-
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
6+
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 3.8</pydev_property>
77
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Pymodbus Environment</pydev_property>
88
</pydev_project>

Diff for: API_changes.rst

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
=======================
2+
PyModbus - API changes.
3+
=======================
4+
5+
With version 3.0.0 as base, this file will contain a list of all API changes in
6+
each version, including new preferred ways of using the API.
7+
8+
9+
-------------
10+
Version 3.0.1
11+
-------------
12+
13+
Currently no changes.

Diff for: Dockerfile

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# syntax=docker/dockerfile:1
2+
3+
FROM python:3.9-slim-buster
4+
5+
WORKDIR /pymodbus
6+
7+
EXPOSE 8080
8+
EXPOSE 5020
9+
10+
COPY . .
11+
12+
RUN pip3 install -r requirements.txt && pip3 install -e .
13+
14+
CMD [ "pymodbus.server", "--host", "127.0.0.1", "--web-port", "8080", "--no-repl", "run", "--modbus-port", "5020", "--modbus-server", "tcp" ]

Diff for: MAKE_RELEASE.rst

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
================================
2+
PyModbus - A Python Modbus Stack
3+
================================
4+
=================
5+
Making a release.
6+
=================
7+
8+
------------------------------------------------------------
9+
Prepare/make release on dev.
10+
------------------------------------------------------------
11+
* Make pull request "prepare v3.0.x", with the following:
12+
* Update pymodbus/version.py with version number (last line)
13+
* Update README.rst "Supported versions"
14+
* Update CHANGELOG.rst
15+
* Add commits from last release, but selectively !
16+
git log --oneline v3.0.0..HEAD > commit.log
17+
git log v3.0.0..HEAD | grep Author > contributors.log
18+
* Commit, push and merge.
19+
* Checkout master locally
20+
* git merge dev
21+
* git push
22+
* wait for CI to complete on all branches
23+
* On github "prepare release"
24+
* Create tag e.g. v3.0.1dev0
25+
* Title "pymodbus v3.0.1dev0"
26+
* do NOT generate release notes, but copy from CHANGELOG.rst
27+
* make release (remember to mark pre-release if so)
28+
* on local repo
29+
* git pull, check release tag is pulled
30+
* git checkout v3.0.0dev0
31+
* python3 setup.py sdist bdist_wheel --universal
32+
* twine upload dist/* (upload to pypi)
33+
* Double check Read me docs are updated
34+
* trigger build https://readthedocs.org/projects/pymodbus/builds/
35+
* on local repo
36+
* update github pages
37+
git checkout gh-pages
38+
git checkout origin/master -- README.rst
39+
* Convert README.rst to index.md
40+
https://cloudconvert.com/rst-to-md
41+
* commit and push index.md
42+
* Make an announcement in discussions.
43+
44+
45+
------------------------------------------------------------
46+
Prepare release on dev for new commits.
47+
------------------------------------------------------------
48+
* Make pull request "prepare dev", with the following:
49+
* Update pymodbus/version.py with version number (last line)

0 commit comments

Comments
 (0)