diff --git a/.github/workflows/modsim-acceptance.yml b/.github/workflows/modsim-acceptance.yml index c62122e..6a11abb 100644 --- a/.github/workflows/modsim-acceptance.yml +++ b/.github/workflows/modsim-acceptance.yml @@ -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 @@ -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" diff --git a/packages/modpoll-wot/README.md b/packages/modpoll-wot/README.md index 3122840..1f17d4f 100644 --- a/packages/modpoll-wot/README.md +++ b/packages/modpoll-wot/README.md @@ -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 diff --git a/packages/modpoll-wot/pyproject.toml b/packages/modpoll-wot/pyproject.toml index 9c12ade..5e9198f 100644 --- a/packages/modpoll-wot/pyproject.toml +++ b/packages/modpoll-wot/pyproject.toml @@ -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" @@ -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" diff --git a/packages/modpoll/README.md b/packages/modpoll/README.md index 9887e81..46b3466 100644 --- a/packages/modpoll/README.md +++ b/packages/modpoll/README.md @@ -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 @@ -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. @@ -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. diff --git a/packages/modpoll/docs/preview-notes.md b/packages/modpoll/docs/preview-notes.md index d71b871..582f2a2 100644 --- a/packages/modpoll/docs/preview-notes.md +++ b/packages/modpoll/docs/preview-notes.md @@ -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`. + # Modpoll 2.0.0a10 preview Modpoll 2.0.0a10 keeps modpoll-wot 0.6.0a2: diff --git a/packages/modpoll/pyproject.toml b/packages/modpoll/pyproject.toml index 1248faa..07f3167 100644 --- a/packages/modpoll/pyproject.toml +++ b/packages/modpoll/pyproject.toml @@ -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" @@ -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] diff --git a/packages/modsim/README.md b/packages/modsim/README.md index b06775f..3ecfd84 100644 --- a/packages/modsim/README.md +++ b/packages/modsim/README.md @@ -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 ``` @@ -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 diff --git a/packages/modsim/docs/preview-notes.md b/packages/modsim/docs/preview-notes.md index 0e8284a..1b02486 100644 --- a/packages/modsim/docs/preview-notes.md +++ b/packages/modsim/docs/preview-notes.md @@ -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`. + +## Modsim 2.0.0a12 preview Modsim 2.0.0a12 keeps modpoll-wot 0.6.0a2 and changes how a simulator is reached: diff --git a/packages/modsim/modsim/__init__.py b/packages/modsim/modsim/__init__.py index 3a87841..607d0e4 100644 --- a/packages/modsim/modsim/__init__.py +++ b/packages/modsim/modsim/__init__.py @@ -1 +1 @@ -__version__ = "2.0.0a12" +__version__ = "2.0.0a13" diff --git a/packages/modsim/pyproject.toml b/packages/modsim/pyproject.toml index 0369cf3..77f63a3 100644 --- a/packages/modsim/pyproject.toml +++ b/packages/modsim/pyproject.toml @@ -1,6 +1,6 @@ [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" @@ -8,7 +8,7 @@ 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", ] @@ -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] diff --git a/packages/modsim/tests/fixtures/io-module/generated.json b/packages/modsim/tests/fixtures/io-module/generated.json index a563320..15b0440 100644 --- a/packages/modsim/tests/fixtures/io-module/generated.json +++ b/packages/modsim/tests/fixtures/io-module/generated.json @@ -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", diff --git a/uv.lock b/uv.lock index 7dea0e8..2a1eff6 100644 --- a/uv.lock +++ b/uv.lock @@ -1143,7 +1143,7 @@ wheels = [ [[package]] name = "modpoll" -version = "2.0.0a10" +version = "2.0.0a11" source = { editable = "packages/modpoll" } dependencies = [ { name = "modpoll-wot", marker = "python_full_version < '3.15'" }, @@ -1205,7 +1205,7 @@ docs = [ [[package]] name = "modpoll-wot" -version = "0.6.0a2" +version = "0.6.0a3" source = { editable = "packages/modpoll-wot" } dependencies = [ { name = "jsonschema", marker = "python_full_version < '3.15'" }, @@ -1228,7 +1228,7 @@ dev = [{ name = "pytest", specifier = ">=8.2.2,<9" }] [[package]] name = "modsim" -version = "2.0.0a12" +version = "2.0.0a13" source = { editable = "packages/modsim" } dependencies = [ { name = "jsonschema", marker = "python_full_version < '3.15'" },