Skip to content

Commit

Permalink
Cleanup (#507)
Browse files Browse the repository at this point in the history
* cleanup & modernise

* improve internal naming

* Doc: Typo and samples for CPU State and CP State (#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]>
  • Loading branch information
gijzelaerr and lupaulus authored May 10, 2024
1 parent 004f60d commit 21c6ba5
Show file tree
Hide file tree
Showing 14 changed files with 382 additions and 338 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/build-and-test-amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,7 @@ jobs:
test-wheels-windows-86_64:
name: Testing wheels for AMD64 windows
needs: [windows-build,]
continue-on-error: true
needs: [windows-build]
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/build-and-test-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ jobs:
test-wheels-arm64:
name: Testing wheel for arm64
needs: linux-build-arm64
continue-on-error: true
runs-on: ubuntu-20.04
strategy:
matrix:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,16 @@ on:
push:
branches:
- master
- container
tags:
- "*"
pull_request:
env:
IMAGE_NAME: python-snap7
#
jobs:
push:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
#
steps:
- uses: actions/checkout@v4

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/linux-test-with-deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ jobs:
python-version: ["3.9", "3.10", "3.11", "3.12"]
runs-on: ["ubuntu-20.04", "ubuntu-22.04"]
runs-on: ${{ matrix.runs-on }}
continue-on-error: true
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches: [master]
jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
15 changes: 13 additions & 2 deletions doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ it by using pip::

$ pip install python-snap7

If you want to use the CLI interface for running an emulator, you should install it with::

$ pip install "python-snap7[cli]"


Manual Installation (not recommended)
=====================================
Expand Down Expand Up @@ -65,6 +69,13 @@ Python-Snap7
------------

Once snap7 is available in your library or system path, you can install it from the git
repository or from a source tarball::
repository or from a source tarball. It is recommended to install it in a virtualenv.

To create a virtualenv and activate it::

$ python3 -m venv venv
$ source venv/bin/activate

Now you can install your python-snap7 package::

$ python ./setup.py install
$ pip3 install .
11 changes: 6 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ build-backend = "setuptools.build_meta"

[project]
name = "python-snap7"
version = "1.4"
version = "1.4.1"
description = "Python wrapper for the snap7 library"
readme = "README.rst"
authors = [
{name = "Gijs Molenaar", email = "[email protected]"},
]
Expand All @@ -17,14 +18,14 @@ classifiers = [
"Intended Audience :: Manufacturing",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
license = {text = "MIT"}
requires-python = ">=3.8"
license = {text = "MIT License"}
requires-python = ">=3.9"
keywords = ["snap7", "s7", "siemens", "plc"]

[project.urls]
Homepage = "https://github.com/gijzelaerr/python-snap7"
Expand Down Expand Up @@ -62,7 +63,7 @@ ignore_missing_imports = true
[tool.ruff]
output-format = "full"
line-length = 130
target-version = "py38"
target-version = "py39"

[lint]
ignore = []
Expand Down
Loading

0 comments on commit 21c6ba5

Please sign in to comment.