Skip to content

Fix the cancelled test matrix, the example scripts and stale config - #990

Merged
gijzelaerr merged 6 commits into
masterfrom
claude/ci-examples-config-abad87
Nov 11, 2026
Merged

gijzelaerr merged 6 commits into
masterfrom
claude/ci-examples-config-abad87

Conversation

@gijzelaerr

Copy link
Copy Markdown
Owner

The test workflow showed "cancelled" on recent master pushes, including the 3.4.0 release, because the retired macos-14 runner failed and cancelled the rest of the matrix. example/example.py failed on import, and two examples taught the old ctypes path.

No file under snap7/ or tests/ is changed.

Commits

  • Replace the retired macos-14 runner in CI
  • Make the example scripts import against the current API
  • Document the async client, the heartbeat thread and max_parallel
  • Run the pre-commit mypy hook on s7, tests and example
  • Declare the package OS independent
  • Remove the stale sudo partner command from tox.ini

Testing

  • Docs build and mypy pass locally; pre-commit passes except the Windows-only symlink artefact.
  • One heartbeat test fails locally on this branch although nothing under snap7/ or tests/ is changed; CI on this PR will show whether it is local.
  • The workflow change is only proven by this PR's own CI run.

🤖 Generated with Claude Code

GitHub retired the macos-14 images on 2026-11-02. The job now ends with
"The configuration 'macos-14-arm64-us-default' is not supported", which
marks every push to master as cancelled. Use macos-15 and macos-26 in the
test and post-publish matrices, set fail-fast: false, and only cancel
superseded runs on pull requests so pushes to master always finish.
example.py imported print_row from a util.db module that does not exist,
and most scripts connected to a PLC at import time. Import from s7, move
the connections under a __main__ guard, and size the buffer in boolean.py
so set_int no longer refuses it.

read_multi.py and write_multi.py built ctypes S7DataItem arrays and
checked a Result field the client never sets. Rewrite them around
read_tags and the dict form of read_multi_vars/write_multi_vars, and
lead doc/multi-variable.rst with the same.
Give AsyncClient its own API page with its concurrency model and the
differences from Client. Extend the thread-safety page with what the
heartbeat thread does, what the internal lock covers, where callbacks
run, and how max_parallel is chosen and overridden. Correct the
connecting page, which described snap7 as an alias for s7; it is the
other way round.
The hook only checked snap7, while tox and the contribution guide check
snap7, s7, tests and example. Widen it and give its environment pytest,
pytest-asyncio, pytest-bdd and hypothesis so the test decorators are
typed. Drop the exclude for snap7/protocol.py, which does not exist.
The classifier said POSIX only, but the library is pure Python and CI
tests it on Windows, Linux and macOS.
The commented-out 'sudo pytest -m partner' dates from when the partner
tests needed a privileged port, and allowlist_externals = sudo existed
only for it.
@gijzelaerr
gijzelaerr merged commit a19407c into master Nov 11, 2026
20 checks passed
@gijzelaerr
gijzelaerr deleted the claude/ci-examples-config-abad87 branch November 11, 2026 13:29
@gijzelaerr gijzelaerr mentioned this pull request Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant