Skip to content
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
6 changes: 5 additions & 1 deletion .github/workflows/modsim-acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,13 @@ jobs:
with:
version: 0.11.19
python-version: '3.12'
- name: Build and install isolated wheel
# The candidate set is this commit: modsim with the modpoll-wot it pins, built from the workspace, so a
# modpoll-wot release and the modsim that pins it can be accepted before either is on PyPI.
- name: Build and install isolated wheels
shell: bash
run: |
uv build --wheel --no-sources --out-dir dist
uv build --wheel --no-sources --package modpoll-wot --out-dir dist
uv venv "$RUNNER_TEMP/installed-modsim"
if [ "$RUNNER_OS" = Windows ]; then python_path="$RUNNER_TEMP/installed-modsim/Scripts/python.exe"; else python_path="$RUNNER_TEMP/installed-modsim/bin/python"; fi
uv pip install --python "$python_path" dist/*.whl pytest
Expand Down Expand Up @@ -84,6 +87,7 @@ jobs:
- name: Test fixed public model with independent clients
run: |
uv build --wheel --no-sources --out-dir dist
uv build --wheel --no-sources --package modpoll-wot --out-dir dist
uv venv "$RUNNER_TEMP/modsim"
uv pip install --python "$RUNNER_TEMP/modsim/bin/python" dist/*.whl
mkdir -p "$RUNNER_TEMP/catalog-acceptance/tools" "$RUNNER_TEMP/catalog-acceptance/examples"
Expand Down
2 changes: 1 addition & 1 deletion packages/modpoll-wot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

An independently versioned TM/TD configuration interpreter for
[Modpoll](https://github.com/top-maker/modpoll),
[Modsim](https://github.com/top-maker/modsim) and future compatible consumers.
[Modsim](https://github.com/top-maker/modpoll/tree/v2/packages/modsim) and future compatible consumers.
No Modbus execution, scheduler or MQTT service is included.

Releases up to `0.2.0a4` were developed in the Modpoll repository under
Expand Down
6 changes: 3 additions & 3 deletions packages/modpoll-wot/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "modpoll-wot"
version = "0.6.0a2"
version = "0.6.0a3"
description = "Shared WoT Modbus configuration interpreter"
authors = [{ name = "Ying Shaodong", email = "helloysd@gmail.com" }]
readme = "README.md"
Expand All @@ -13,8 +13,8 @@ dependencies = [
]

[project.urls]
Repository = "https://github.com/top-maker/modpoll-wot"
Documentation = "https://github.com/top-maker/modpoll-wot#readme"
Repository = "https://github.com/top-maker/modpoll"
Documentation = "https://github.com/top-maker/modpoll/tree/v2/packages/modpoll-wot#readme"

[project.scripts]
modpoll-wot = "modpoll_wot.__main__:main"
Expand Down
8 changes: 4 additions & 4 deletions packages/modpoll/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ Both preserve the four original blocks and 37 output references. `--unit-id`
overrides the Unit ID declared consistently in Forms (fallback 1); a concrete TD's Forms must agree before overrides.
The existing transport, polling, output and MQTT arguments remain available.

See the [current profile](https://github.com/top-maker/modpoll-wot/blob/main/profile.md) for field mapping,
See the [current profile](https://github.com/top-maker/modpoll/blob/v2/packages/modpoll-wot/profile.md) for field mapping,
access flags, byte order, multiplier semantics and supported limits; the
[execution contract](https://github.com/top-maker/modpoll-wot/blob/main/CONTRACT.md) defines the profile 0.2-only input policy.
[execution contract](https://github.com/top-maker/modpoll/blob/v2/packages/modpoll-wot/CONTRACT.md) defines the profile 0.2-only input policy.
The configuration loader detects the format from the content and reports invalid
model fields before polling. Each model describes one device; use multiple
`--config` paths for multiple devices. Give each model a unique `title`, which is
Expand Down Expand Up @@ -122,7 +122,7 @@ The report records, per point, whether the read worked (`ok`, a Modbus `exceptio
`--confirm POINT...` (or `all`) and `--reject POINT...` for values you compared with the device, otherwise
`unchecked`. The report holds no address, Unit
ID, serial number or value; review it before sharing. It is checked with
[modpoll-wot](https://github.com/top-maker/modpoll-wot) (`modpoll-wot validate-report report.json --model
[modpoll-wot](https://github.com/top-maker/modpoll/tree/v2/packages/modpoll-wot) (`modpoll-wot validate-report report.json --model
model.tm.json`), and `--export` still writes the snapshot of the same read. ModioHub resolves the product
from the model fingerprint, so you never name the product. The exit
code is 1 unless every point was read.
Expand Down Expand Up @@ -164,7 +164,7 @@ writes `null` for that point in the JSON snapshot. Snapshots from multiple
configuration files are combined and replaced atomically. When `--timestamp` is
enabled, the timestamp is the start time of the poll cycle in Unix seconds; a
device with a point named `timestamp` cannot use it. A snapshot is
[simulation data](https://github.com/top-maker/modpoll-wot/blob/main/profile.md#simulation-data),
[simulation data](https://github.com/top-maker/modpoll/blob/v2/packages/modpoll-wot/profile.md#simulation-data),
so `modsim --config device.tm.json --data snapshot.json` replays it locally.


Expand Down
5 changes: 5 additions & 0 deletions packages/modpoll/docs/preview-notes.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Modpoll 2.0.0a11 preview

Modpoll 2.0.0a11 pins modpoll-wot 0.6.0a3 and is the first release after modsim and modpoll-wot joined this
repository as one workspace (`packages/`). It changes nothing in modpoll. Release tags are now `modpoll-v<version>`.

# Modpoll 2.0.0a10 preview

Modpoll 2.0.0a10 keeps modpoll-wot 0.6.0a2:
Expand Down
4 changes: 2 additions & 2 deletions packages/modpoll/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "modpoll"
version = "2.0.0a10"
version = "2.0.0a11"
description = "A New Command-line Tool for Modbus and MQTT"
authors = [{ name = "Ying Shaodong", email = "helloysd@gmail.com" }]
readme = "README.md"
Expand All @@ -10,7 +10,7 @@ dependencies = [
"paho-mqtt>=2.1.0,<3.0.0",
"prettytable>=3.9.0,<4.0.0",
"requests>=2.32.5,<3.0.0",
"modpoll-wot==0.6.0a2",
"modpoll-wot==0.6.0a3",
]

[project.optional-dependencies]
Expand Down
6 changes: 3 additions & 3 deletions packages/modsim/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ they are not included in the published `2.0.0a1` release. Clone the `v2`
branch and install its dependencies with uv:

```bash
git clone --branch v2 https://github.com/top-maker/modsim.git
cd modsim
git clone --branch v2 https://github.com/top-maker/modpoll.git
cd modpoll/packages/modsim
uv sync --all-groups
```

Expand Down Expand Up @@ -167,7 +167,7 @@ Compose deployment with `docker compose down`.

A deployment has a stable ID per device, a TM path, instance parameters and
optional simulation data. TD IDs and Modbus Unit IDs must be unique.
[Simulation data](https://github.com/top-maker/modpoll-wot/blob/main/profile.md#simulation-data)
[Simulation data](https://github.com/top-maker/modpoll/blob/v2/packages/modpoll-wot/profile.md#simulation-data)
gives static initial values, seeded generators and bindings, and carries no
code; a local Python behavior is a separate `script` that requires
`--allow-scripts`. Neither duplicates the Thing Model's point mappings. See
Expand Down
8 changes: 7 additions & 1 deletion packages/modsim/docs/preview-notes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Modsim 2.0.0a12 preview
# Modsim 2.0.0a13 preview

Modsim 2.0.0a13 pins modpoll-wot 0.6.0a3 and is the first release from the
[modpoll repository](https://github.com/top-maker/modpoll/tree/v2/packages/modsim), where modsim, modpoll and
modpoll-wot now share one workspace. It changes nothing in the simulator. Release tags are now `modsim-v<version>`.

## Modsim 2.0.0a12 preview

Modsim 2.0.0a12 keeps modpoll-wot 0.6.0a2 and changes how a simulator is reached:

Expand Down
2 changes: 1 addition & 1 deletion packages/modsim/modsim/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.0.0a12"
__version__ = "2.0.0a13"
6 changes: 3 additions & 3 deletions packages/modsim/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[project]
name = "modsim"
version = "2.0.0a12"
version = "2.0.0a13"
description = "A Simple Modbus TCP Device Simulator used for modpoll tool"
authors = [{ name = "Ying Shaodong", email = "helloysd@gmail.com" }]
readme = "README.md"
requires-python = ">=3.10,<4.0"
dependencies = [
"pymodbus~=3.16.1",
"pyserial>=3.5,<4.0",
"modpoll-wot==0.6.0a2",
"modpoll-wot==0.6.0a3",
"jsonschema>=4.21,<5",
"PyYAML>=6,<7",
]
Expand Down Expand Up @@ -44,7 +44,7 @@ module-root = ""
modpoll-wot = { workspace = true }

[project.urls]
Repository = "https://github.com/top-maker/modsim"
Repository = "https://github.com/top-maker/modpoll"
Documentation = "https://top-maker.github.io/modsim/"

[tool.mypy]
Expand Down
2 changes: 1 addition & 1 deletion packages/modsim/tests/fixtures/io-module/generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"source_sha256": "4c2aee3334faf6622f4ee34a23108fa0ec100a6b3110a78200eee79da8935596",
"generator": {
"package": "modpoll-wot",
"version": "0.6.0a2"
"version": "0.6.0a3"
},
"instance": {
"host": "127.0.0.1",
Expand Down
6 changes: 3 additions & 3 deletions uv.lock

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

Loading