Skip to content

Commit 21c6ba5

Browse files
gijzelaerrlupaulus
andauthored
Cleanup (gijzelaerr#507)
* cleanup & modernise * improve internal naming * Doc: Typo and samples for CPU State and CP State (gijzelaerr#508) * doc: samples for S7CpuInfo and S7CpInfo * doc: doc typo 'E' => 'e' * add context handlers * fix installation instructions * reformat tests * properly destroy object * fix cicd --------- Co-authored-by: Paulus Lucas <[email protected]>
1 parent 004f60d commit 21c6ba5

14 files changed

+382
-338
lines changed

.github/workflows/build-and-test-amd64.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,7 @@ jobs:
129129
130130
test-wheels-windows-86_64:
131131
name: Testing wheels for AMD64 windows
132-
needs: [windows-build,]
133-
continue-on-error: true
132+
needs: [windows-build]
134133
runs-on: ${{ matrix.os }}
135134
strategy:
136135
matrix:

.github/workflows/build-and-test-arm64.yml

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ jobs:
3737
test-wheels-arm64:
3838
name: Testing wheel for arm64
3939
needs: linux-build-arm64
40-
continue-on-error: true
4140
runs-on: ubuntu-20.04
4241
strategy:
4342
matrix:

.github/workflows/docker.yml

-4
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,16 @@ on:
33
push:
44
branches:
55
- master
6-
- container
76
tags:
87
- "*"
9-
pull_request:
108
env:
119
IMAGE_NAME: python-snap7
12-
#
1310
jobs:
1411
push:
1512
runs-on: ubuntu-latest
1613
permissions:
1714
packages: write
1815
contents: read
19-
#
2016
steps:
2117
- uses: actions/checkout@v4
2218

.github/workflows/linux-test-with-deb.yml

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111
python-version: ["3.9", "3.10", "3.11", "3.12"]
1212
runs-on: ["ubuntu-20.04", "ubuntu-22.04"]
1313
runs-on: ${{ matrix.runs-on }}
14-
continue-on-error: true
1514
steps:
1615
- name: Checkout
1716
uses: actions/checkout@v4

.github/workflows/mypy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
branches: [master]
77
jobs:
88
build:
9-
runs-on: ubuntu-20.04
9+
runs-on: ubuntu-22.04
1010
steps:
1111
- name: Checkout
1212
uses: actions/checkout@v4

doc/installation.rst

+13-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ it by using pip::
88

99
$ pip install python-snap7
1010

11+
If you want to use the CLI interface for running an emulator, you should install it with::
12+
13+
$ pip install "python-snap7[cli]"
14+
1115

1216
Manual Installation (not recommended)
1317
=====================================
@@ -65,6 +69,13 @@ Python-Snap7
6569
------------
6670

6771
Once snap7 is available in your library or system path, you can install it from the git
68-
repository or from a source tarball::
72+
repository or from a source tarball. It is recommended to install it in a virtualenv.
73+
74+
To create a virtualenv and activate it::
75+
76+
$ python3 -m venv venv
77+
$ source venv/bin/activate
78+
79+
Now you can install your python-snap7 package::
6980

70-
$ python ./setup.py install
81+
$ pip3 install .

pyproject.toml

+6-5
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "python-snap7"
7-
version = "1.4"
7+
version = "1.4.1"
88
description = "Python wrapper for the snap7 library"
9+
readme = "README.rst"
910
authors = [
1011
{name = "Gijs Molenaar", email = "[email protected]"},
1112
]
@@ -17,14 +18,14 @@ classifiers = [
1718
"Intended Audience :: Manufacturing",
1819
"License :: OSI Approved :: MIT License",
1920
"Operating System :: POSIX",
20-
"Programming Language :: Python :: 3.8",
2121
"Programming Language :: Python :: 3.9",
2222
"Programming Language :: Python :: 3.10",
2323
"Programming Language :: Python :: 3.11",
2424
"Programming Language :: Python :: 3.12",
2525
]
26-
license = {text = "MIT"}
27-
requires-python = ">=3.8"
26+
license = {text = "MIT License"}
27+
requires-python = ">=3.9"
28+
keywords = ["snap7", "s7", "siemens", "plc"]
2829

2930
[project.urls]
3031
Homepage = "https://github.com/gijzelaerr/python-snap7"
@@ -62,7 +63,7 @@ ignore_missing_imports = true
6263
[tool.ruff]
6364
output-format = "full"
6465
line-length = 130
65-
target-version = "py38"
66+
target-version = "py39"
6667

6768
[lint]
6869
ignore = []

0 commit comments

Comments
 (0)