Skip to content
This repository was archived by the owner on Nov 15, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/scripts/preview-release.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ def guard(tag):
sha = subprocess.check_output(["git", "rev-parse", "HEAD"], text=True).strip()
subprocess.run(["git", "merge-base", "--is-ancestor", sha, "origin/v2"], check=True)
repo = os.environ["GITHUB_REPOSITORY"]
require_ci(repo, sha, "main.yml", {"quality", "docs", "tox (3.10)", "tox (3.14)"})
require_ci(
repo,
sha,
"main.yml",
{"quality", "docs", "tox (3.10)", "tox (3.14)", "modpoll snapshot replay"},
)
require_ci(
repo,
sha,
Expand Down
9 changes: 6 additions & 3 deletions docs/preview-notes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Modsim 2.0.0a7 preview
# Modsim 2.0.0a8 preview

Modsim 2.0.0a7 loads [simulation data](https://github.com/top-maker/modpoll-wot/blob/main/profile.md#simulation-data)
Modsim 2.0.0a8 loads [simulation data](https://github.com/top-maker/modpoll-wot/blob/main/profile.md#simulation-data)
with `--data` and pins modpoll-wot 0.4.0a1. This preview breaks the previous
command line:

Expand All @@ -15,14 +15,17 @@ command line:

```sh
uvx --prerelease allow modpoll==2.0.0a6 --config device.tm.json --tcp 192.168.1.10 --once --export snapshot.json
uvx --prerelease allow modsim==2.0.0a7 --config device.tm.json --data snapshot.json
uvx --prerelease allow modsim==2.0.0a8 --config device.tm.json --data snapshot.json
```

Scaled values that modpoll exports, such as `230.10000000000002` for a raw
2301 with multiplier 0.1, are served again unchanged. Snapshot points modpoll
could not read keep their defaults and are listed at startup. Snapshots hold
readings of a real device: keep them on your computer.

The `v2.0.0a7` tag points at the same changes but was never published: its
release guard did not yet expect the new snapshot replay CI job.

### Previous preview

#### Modsim 2.0.0a6
Expand Down
2 changes: 1 addition & 1 deletion modsim/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.0.0a7"
__version__ = "2.0.0a8"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "modsim"
version = "2.0.0a7"
version = "2.0.0a8"
description = "A Simple Modbus TCP Device Simulator used for modpoll tool"
authors = [{ name = "Ying Shaodong", email = "helloysd@gmail.com" }]
readme = "README.md"
Expand Down
12 changes: 9 additions & 3 deletions tests/test_preview_guard.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ def test_guard_requires_all_current_ci_jobs(monkeypatch):
monkeypatch.setattr(release.subprocess, "run", lambda *a, **kw: None)
jobs = [
{"name": name, "conclusion": "success"}
for name in ("quality", "docs", "tox (3.10)", "tox (3.14)")
for name in (
"quality",
"docs",
"tox (3.10)",
"tox (3.14)",
"modpoll snapshot replay",
)
]

platform_jobs = [
Expand Down Expand Up @@ -54,10 +60,10 @@ def output(args, **kwargs):

monkeypatch.setattr(release.subprocess, "check_output", output)
release.guard("v" + __import__("modsim").__version__)
jobs.pop()
removed = jobs.pop()
with pytest.raises(ValueError, match="expected CI jobs"):
release.guard("v" + __import__("modsim").__version__)
jobs.append({"name": "tox (3.14)", "conclusion": "failure"})
jobs.append({**removed, "conclusion": "failure"})
with pytest.raises(ValueError, match="expected CI jobs"):
release.guard("v" + __import__("modsim").__version__)

Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading