From 42074ddc027948451c06fcb401fb0800c3d4c582 Mon Sep 17 00:00:00 2001 From: Gavin Ying Date: Thu, 12 Nov 2026 20:02:46 +0800 Subject: [PATCH 1/3] feat: sign in to ModioHub and simulate Workspace Thing Models (POLL-02b) modsim login runs the browser authorization flow and keeps the tool session in the credentials file shared with modpoll; logout forgets it. --config modiohub:@ reads a custom Thing Model with the login (a shared one without), checked against the SHA-256 the server states. Deployment manifests keep refusing it so a hosted deployment never carries a login. Needs modpoll-wot 0.5.0a1, which is not released yet. Co-Authored-By: Claude Sonnet 5.5 --- README.md | 16 ++++ modsim/hub.py | 42 ++++++++ modsim/login.py | 119 +++++++++++++++++++++++ modsim/main.py | 3 + modsim/sources.py | 49 ++++++++++ modsim/utils.py | 7 +- pyproject.toml | 2 +- tests/test_login.py | 229 ++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 464 insertions(+), 3 deletions(-) create mode 100644 modsim/hub.py create mode 100644 modsim/login.py create mode 100644 tests/test_login.py diff --git a/README.md b/README.md index 042daba..6901be8 100644 --- a/README.md +++ b/README.md @@ -207,6 +207,22 @@ the working directory. See [transport details](docs/site/index.md#unconfigured-d The checked-in ADAM-6024 TD and its source hash can be checked with `uv run python tools/generate-td.py --check`; omit `--check` to regenerate. +### Models in your ModioHub Workspace + +`modsim login` signs in to ModioHub with your browser: it prints a code and an address (and opens the address +where a browser can open), you confirm the code there, and the 7-day tool session is kept in a file only you +can read (`~/.config/modiohub/credentials.json`, or `%APPDATA%\modiohub` on Windows). modpoll uses the same +file, so signing in with either tool signs in both. `MODIOHUB_TOKEN` replaces the file for scripts, +`MODIOHUB_URL` selects another server, and `login` and `logout` take `--server URL` for the same. `modsim logout` forgets the login on this computer. + +Then `--config modiohub:@` (the version is a number or `latest`) simulates one of your custom +Thing Models, or a shared one without signing in; the download is checked against the SHA-256 the server states. +Deployment manifests do not take `modiohub:` models, so a hosted deployment never carries your login. + +```sh +modsim --config modiohub:k3x9f2m7q4a8n5bd@latest --port 5020 +``` + ## Development See [CONTRIBUTING.md](CONTRIBUTING.md) for the v2 workflow and checks. The diff --git a/modsim/hub.py b/modsim/hub.py new file mode 100644 index 0000000..076efba --- /dev/null +++ b/modsim/hub.py @@ -0,0 +1,42 @@ +"""Bounded requests to ModioHub, with a tool session token when there is one.""" + +import json +from typing import Any +from urllib.error import HTTPError, URLError +from urllib.request import Request, urlopen + +from modpoll_wot.loading import MAX_BYTES # type: ignore[import-untyped] + +from . import __version__ + +TIMEOUT = 15 + + +def call( + url: str, *, method: str = "GET", body: Any = None, token: str | None = None +) -> tuple[int, bytes]: + """One request; returns the status and at most 1 MiB of the answer. An error status is a result.""" + headers = {"User-Agent": f"modsim/{__version__}", "Accept": "application/json"} + if token: + headers["Authorization"] = f"Bearer {token}" + data = None + if body is not None: + data = json.dumps(body).encode() + headers["Content-Type"] = "application/json" + request = Request(url, data=data, headers=headers, method=method) + try: + with urlopen(request, timeout=TIMEOUT) as response: + return response.status, response.read(MAX_BYTES + 1)[:MAX_BYTES] + except HTTPError as error: + return error.code, error.read(MAX_BYTES + 1)[:MAX_BYTES] + except (URLError, TimeoutError, OSError) as exc: + raise ValueError(f"Could not reach {url}: {exc}") from exc + + +def call_json(url: str, **options: Any) -> tuple[int, dict]: + status, payload = call(url, **options) + try: + document = json.loads(payload) + except ValueError: + document = {} + return status, document if isinstance(document, dict) else {} diff --git a/modsim/login.py b/modsim/login.py new file mode 100644 index 0000000..2006751 --- /dev/null +++ b/modsim/login.py @@ -0,0 +1,119 @@ +"""Sign in to ModioHub with the browser authorization flow (OAuth device authorization grant, RFC 8628). + +``modsim login`` asks for a code, the user confirms it in the browser, and the tool session token that comes +back is kept in the credentials file shared with modpoll (see modpoll_wot.session). ``modsim logout`` removes it. +""" + +import sys +import time +import webbrowser +from typing import Any, Callable, TextIO + +import modpoll_wot # type: ignore[import-untyped] + +from .hub import call_json + +CLIENT_ID = "modsim" +GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code" + + +class LoginError(ValueError): + """The login did not complete; the message says why and what to do.""" + + +def login( + server: str, + *, + sleep: Callable[[float], Any] | None = None, + monotonic: Callable[[], float] | None = None, + open_browser: Callable[[str], bool] | None = None, + out: TextIO | None = None, +) -> Any: + """Run the flow against a server; returns the saved Session.""" + sleep, monotonic = sleep or time.sleep, monotonic or time.monotonic + open_browser, out = open_browser or webbrowser.open, out or sys.stdout + status, grant = call_json( + f"{server}/api/v1/tool-sessions/device-authorization", + method="POST", + body={"client_id": CLIENT_ID}, + ) + if status != 200: + raise LoginError(f"{server} refused the login ({status})") + print( + f"To sign in, confirm the code {grant['user_code']} at:\n {grant['verification_uri_complete']}", + file=out, + flush=True, + ) + # A browser opens only where one can; otherwise the address and code above are all there is. + if not open_browser(grant["verification_uri_complete"]): + print("Open that address in a browser on any computer.", file=out, flush=True) + interval = grant["interval"] + deadline = monotonic() + grant["expires_in"] + while monotonic() < deadline: + sleep(interval) + status, body = call_json( + f"{server}/api/v1/tool-sessions/token", + method="POST", + body={ + "grant_type": GRANT_TYPE, + "device_code": grant["device_code"], + "client_id": CLIENT_ID, + }, + ) + if status == 200: + return _save(server, body) + error = body.get("error") + if error == "authorization_pending": + continue + if error == "slow_down": + interval += 5 + continue + if error == "access_denied": + raise LoginError("The login was denied in the browser.") + if error == "expired_token": + break + raise LoginError(f"The login failed ({error or status}).") + raise LoginError( + "The code expired before it was confirmed; run modsim login again." + ) + + +def _save(server: str, body: dict) -> Any: + token = body["access_token"] + status, me = call_json(f"{server}/api/v1/me", token=token) + modpoll_wot.save_session( + server, + token, + expires_in=body["expires_in"], + github_user=me.get("githubUser") if status == 200 else None, + ) + return modpoll_wot.load_session(server) + + +def command(arguments: list[str], *, out: TextIO | None = None) -> int: + """``login`` or ``logout`` with an optional ``--server``; returns the exit code.""" + out = out or sys.stdout + name, rest = arguments[0], arguments[1:] + try: + if rest[:1] == ["--server"] and len(rest) == 2: + server = modpoll_wot.server_url({"MODIOHUB_URL": rest[1]}) + elif not rest: + server = modpoll_wot.server_url() + else: + raise LoginError(f"usage: modsim {name} [--server URL]") + if name == "logout": + if modpoll_wot.forget_session(server): + print( + f"Signed out of {server} on this computer. The token stays valid on the server until it expires; revoke it in Settings to end it now.", + file=out, + ) + else: + print(f"No stored login for {server}.", file=out) + return 0 + session = login(server, out=out) + who = f" as @{session.github_user}" if session.github_user else "" + print(f"Signed in to {server}{who}. modpoll uses the same login.", file=out) + return 0 + except (LoginError, modpoll_wot.CredentialError) as exc: + print(str(exc), file=sys.stderr) + return 1 diff --git a/modsim/main.py b/modsim/main.py index e228e70..fb81755 100644 --- a/modsim/main.py +++ b/modsim/main.py @@ -233,7 +233,10 @@ async def run_async_server(args: Any) -> Any: def app() -> None: from .commands import ACTIONS, run + from .login import command + if sys.argv[1:2] in (["login"], ["logout"]): + raise SystemExit(command(sys.argv[1:])) if len(sys.argv) > 1 and sys.argv[1] in ACTIONS: run(sys.argv[1:]) return diff --git a/modsim/sources.py b/modsim/sources.py index aa88d3b..e2475eb 100644 --- a/modsim/sources.py +++ b/modsim/sources.py @@ -1,13 +1,16 @@ """Bounded local JSON and HTTPS model and simulation data loading.""" +import hashlib import tempfile from pathlib import Path from urllib.parse import urlparse from urllib.request import Request, urlopen +import modpoll_wot # type: ignore[import-untyped] from modpoll_wot.loading import MAX_BYTES, load_document # type: ignore[import-untyped] from . import __version__ +from .hub import call, call_json # Some CDNs reject the default Python-urllib agent; identify the tool instead. USER_AGENT = f"modsim/{__version__}" @@ -24,11 +27,53 @@ def local_path(base: Path, value: str) -> str: def model_document(source: str) -> dict: + if source.startswith(modpoll_wot.REFERENCE_PREFIX): + return workspace_document(source) if not is_remote(source): return load_document(source) # type: ignore[no-any-return] return remote_document(source) +def workspace_document(text: str) -> dict: + """A custom Thing Model version of the user's ModioHub Workspace: ``modiohub:@``. + + The login is used when there is one; a shared version can be read without it. The token only goes to the + server it was issued for, and the download is checked against the SHA-256 the server states. + """ + reference = modpoll_wot.parse_reference(text) + server = modpoll_wot.server_url() + session = modpoll_wot.load_session(server) + token = session.token if session else None + status, thing_model = call_json( + f"{server}/api/v1/thing-models/{reference.id}", token=token + ) + if status == 401: + raise ValueError("Your ModioHub login is no longer valid; run modsim login") + if status == 404: + raise ValueError( + f"No custom Thing Model {reference.id} is shared" + + (" or yours" if token else "; run modsim login if it is yours") + ) + if status != 200: + raise ValueError(f"{server} answered {status}") + versions = {str(item["version"]): item for item in thing_model["versions"]} + version = ( + thing_model["versions"][0] + if reference.version == "latest" + else versions.get(reference.version) + ) + if version is None: + raise ValueError(f"{text} has no version {reference.version}") + if not version["fileUrl"].startswith(server + "/"): + raise ValueError(f"{server} pointed to another address for {text}") + status, payload = call(version["fileUrl"], token=token) + if status != 200: + raise ValueError(f"{server} answered {status}") + if hashlib.sha256(payload).hexdigest() != version["sha256"]: + raise ValueError(f"{text} does not match the SHA-256 {server} reports for it") + return _bounded_document(payload) + + def remote_document(source: str) -> dict: """Load bounded JSON from an HTTPS URL with the shared loader's rules.""" url = urlparse(source) @@ -47,6 +92,10 @@ def remote_document(source: str) -> dict: payload = response.read(MAX_BYTES + 1) if len(payload) > MAX_BYTES: raise ValueError(f"document exceeds {MAX_BYTES} bytes") + return _bounded_document(payload) + + +def _bounded_document(payload: bytes) -> dict: # Reuse all bounded JSON parsing rules from the public shared loader. with tempfile.TemporaryDirectory(prefix="modsim-model-") as directory: path = Path(directory) / "model.json" diff --git a/modsim/utils.py b/modsim/utils.py index 7737a5d..d15a993 100644 --- a/modsim/utils.py +++ b/modsim/utils.py @@ -16,13 +16,16 @@ def get_parser() -> argparse.ArgumentParser: parser = argparse.ArgumentParser( description=f"Modsim v{__version__} - A Simple Modbus TCP Device Simulator used for modpoll tool", - epilog="Managed commands: up, down, ps, logs, export, reset. Use modsim COMMAND --help.", + epilog="Managed commands: up, down, ps, logs, export, reset. Use modsim COMMAND --help. Sign in to ModioHub with modsim login.", ) parser.add_argument( "-v", "--version", action="version", version=f"{__package__} v{__version__}" ) sources = parser.add_mutually_exclusive_group() - sources.add_argument("--config", help="Profile 0.2 TM/TD local path or HTTPS URL") + sources.add_argument( + "--config", + help="Profile 0.2 TM/TD local path, HTTPS URL, or modiohub:@ for a custom Thing Model in your ModioHub Workspace", + ) parser.add_argument( "--data", help=( diff --git a/pyproject.toml b/pyproject.toml index 7440539..5861c75 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ readme = "README.md" requires-python = ">=3.10,<4.0" dependencies = [ "pymodbus~=3.16.1", - "modpoll-wot==0.4.0a1", + "modpoll-wot==0.5.0a1", "jsonschema>=4.21,<5", "PyYAML>=6,<7", ] diff --git a/tests/test_login.py b/tests/test_login.py new file mode 100644 index 0000000..9b2ae99 --- /dev/null +++ b/tests/test_login.py @@ -0,0 +1,229 @@ +"""Sign in to ModioHub and read Workspace Thing Models (POLL-02b).""" + +import hashlib +import io +import json +import os +import stat +import sys +from unittest.mock import patch +from urllib.error import HTTPError + +import modpoll_wot +import pytest + +from modsim import hub, login, main, sources + +SERVER = "https://hub.test" +ID = "k3x9f2m7q4a8n5bd" + + +@pytest.fixture(autouse=True) +def isolated_login(monkeypatch, tmp_path): + monkeypatch.setenv("MODIOHUB_URL", SERVER) + monkeypatch.setenv("MODIOHUB_CREDENTIALS", str(tmp_path / "credentials.json")) + monkeypatch.delenv("MODIOHUB_TOKEN", raising=False) + return tmp_path / "credentials.json" + + +class Answer(io.BytesIO): + status = 200 + + def __enter__(self): + return self + + def __exit__(self, *exc): + return False + + +def reply(status, body): + payload = body if isinstance(body, bytes) else json.dumps(body).encode() + if status < 400: + answer = Answer(payload) + answer.status = status + return answer + return HTTPError("https://hub.test", status, "error", {}, io.BytesIO(payload)) + + +def fake_hub(routes, calls): + """Answer by URL suffix; a list is consumed in order. Records (method, url, token).""" + + def urlopen(request, timeout=None): + calls.append( + ( + request.get_method(), + request.full_url, + request.get_header("Authorization"), + ) + ) + for suffix, answer in routes.items(): + if request.full_url.endswith(suffix): + result = answer.pop(0) if isinstance(answer, list) else answer + if isinstance(result, HTTPError): + raise result + return result + raise AssertionError(f"unexpected request {request.full_url}") + + return patch.object(hub, "urlopen", urlopen) + + +def grant(): + return reply( + 200, + { + "device_code": "secret", + "user_code": "ABCD1234", + "interval": 5, + "expires_in": 900, + "verification_uri": f"{SERVER}/activate/", + "verification_uri_complete": f"{SERVER}/activate/?user_code=ABCD1234", + }, + ) + + +def test_login_waits_for_the_browser_and_shares_the_login_with_modpoll(isolated_login): + calls = [] + routes = { + "/device-authorization": [grant()], + "/token": [ + reply(400, {"error": "authorization_pending"}), + reply(400, {"error": "slow_down"}), + reply( + 200, + {"access_token": "tok", "token_type": "Bearer", "expires_in": 604800}, + ), + ], + "/api/v1/me": [reply(200, {"githubUser": "octo"})], + } + slept, out = [], io.StringIO() + with fake_hub(routes, calls): + session = login.login( + SERVER, sleep=slept.append, open_browser=lambda url: False, out=out + ) + assert slept == [5, 5, 10] + assert ( + "ABCD1234" in out.getvalue() + and "Open that address in a browser" in out.getvalue() + ) + assert calls[0][:2] == ( + "POST", + f"{SERVER}/api/v1/tool-sessions/device-authorization", + ) + assert ("GET", f"{SERVER}/api/v1/me", "Bearer tok") in calls + assert (session.token, session.github_user) == ("tok", "octo") + assert modpoll_wot.load_session(SERVER).token == "tok" + if os.name == "posix": + assert stat.S_IMODE(isolated_login.stat().st_mode) == 0o600 + + +@pytest.mark.parametrize( + "error, message", + [ + ("access_denied", "denied"), + ("expired_token", "expired"), + ("invalid_grant", "failed"), + ], +) +def test_login_ends_with_a_reason(error, message): + routes = { + "/device-authorization": [grant()], + "/token": [reply(400, {"error": error})], + } + with fake_hub(routes, []), pytest.raises(login.LoginError, match=message): + login.login( + SERVER, + sleep=lambda seconds: None, + open_browser=lambda url: True, + out=io.StringIO(), + ) + assert modpoll_wot.load_session(SERVER) is None + + +def test_commands(capsys): + routes = { + "/device-authorization": [grant()], + "/token": [reply(200, {"access_token": "tok", "expires_in": 60})], + "/api/v1/me": [reply(200, {"githubUser": "octo"})], + } + with ( + fake_hub(routes, []), + patch.object(login.webbrowser, "open", return_value=True), + patch.object(login.time, "sleep"), + ): + assert login.command(["login"]) == 0 + assert ( + "Signed in to https://hub.test as @octo. modpoll uses the same login." + in capsys.readouterr().out + ) + assert login.command(["logout"]) == 0 + assert "revoke it in Settings" in capsys.readouterr().out + assert login.command(["logout"]) == 0 + assert "No stored login" in capsys.readouterr().out + assert login.command(["login", "--server", "http://example.com"]) == 1 + assert login.command(["login", "--bogus"]) == 1 + + +def test_login_and_logout_run_before_the_normal_arguments(monkeypatch): + monkeypatch.setattr(sys, "argv", ["modsim", "logout"]) + with pytest.raises(SystemExit) as exit_info: + main.app() + assert exit_info.value.code == 0 + + +def model( + *, status=200, sha256=None, file_url=None, versions=None, body=b'{"title": "meter"}' +): + versions = versions or [ + { + "version": 2, + "sha256": sha256 or hashlib.sha256(body).hexdigest(), + "fileUrl": file_url or f"{SERVER}/api/v1/thing-models/{ID}/versions/2/file", + } + ] + return { + f"/thing-models/{ID}": reply(status, {"versions": versions}), + "/versions/2/file": reply(200, body), + } + + +def test_a_workspace_model_is_read_with_the_login_and_checked(): + modpoll_wot.save_session(SERVER, "tok", expires_in=3600) + calls = [] + with fake_hub(model(), calls): + assert sources.model_document(f"modiohub:{ID}@latest") == {"title": "meter"} + assert {token for _, _, token in calls} == {"Bearer tok"} + with fake_hub(model(), []), pytest.raises(ValueError, match="no version 5"): + sources.model_document(f"modiohub:{ID}@5") + + +def test_a_shared_model_needs_no_login_and_a_private_one_says_so(): + calls = [] + with fake_hub(model(), calls): + sources.model_document(f"modiohub:{ID}@2") + assert {token for _, _, token in calls} == {None} + with ( + fake_hub(model(status=404), []), + pytest.raises(ValueError, match="run modsim login if it is yours"), + ): + sources.model_document(f"modiohub:{ID}") + + +def test_a_download_that_does_not_match_or_leaves_the_server_is_refused(): + modpoll_wot.save_session(SERVER, "tok", expires_in=3600) + with ( + fake_hub(model(sha256="0" * 64), []), + pytest.raises(ValueError, match="SHA-256"), + ): + sources.model_document(f"modiohub:{ID}@2") + calls = [] + with ( + fake_hub(model(file_url="https://elsewhere.test/m.json"), calls), + pytest.raises(ValueError, match="another address"), + ): + sources.model_document(f"modiohub:{ID}@2") + assert all(url.startswith(SERVER) for _, url, _ in calls) + + +def test_a_bad_reference_and_a_deployment_manifest_do_not_use_the_login(): + with pytest.raises(ValueError, match="modiohub:@"): + sources.model_document("modiohub:nope") From b849397323b132c1539c13925749946c3aa87ac3 Mon Sep 17 00:00:00 2001 From: Gavin Ying Date: Thu, 12 Nov 2026 20:29:06 +0800 Subject: [PATCH 2/3] chore: release 2.0.0a9 with modpoll-wot 0.5.0a1 Co-Authored-By: Claude Sonnet 5.5 --- docs/preview-notes.md | 13 ++++++++++++- modsim/__init__.py | 2 +- pyproject.toml | 2 +- uv.lock | 10 +++++----- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/docs/preview-notes.md b/docs/preview-notes.md index 8e39c7a..b271426 100644 --- a/docs/preview-notes.md +++ b/docs/preview-notes.md @@ -1,4 +1,15 @@ -# Modsim 2.0.0a8 preview +# Modsim 2.0.0a9 preview + +Modsim 2.0.0a9 pins modpoll-wot 0.5.0a1 and connects to ModioHub: + +- `modsim login` signs in with your browser and `modsim logout` forgets the login. The 7-day tool session is + kept in `~/.config/modiohub/credentials.json` and is shared with modpoll 2.0.0a7. +- `--config modiohub:@` simulates a custom Thing Model from your ModioHub Workspace (a shared one + needs no login). Deployment manifests do not accept it. +- It also carries the SIM-06 fixes: only writable points are held after a client write, management requests + and device builds no longer block the event loop, and `script:` paths stay inside the deployment directory. + +## Modsim 2.0.0a8 preview 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 diff --git a/modsim/__init__.py b/modsim/__init__.py index f6d4bb4..ac6d3cf 100644 --- a/modsim/__init__.py +++ b/modsim/__init__.py @@ -1 +1 @@ -__version__ = "2.0.0a8" +__version__ = "2.0.0a9" diff --git a/pyproject.toml b/pyproject.toml index 5861c75..05cf17d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "modsim" -version = "2.0.0a8" +version = "2.0.0a9" description = "A Simple Modbus TCP Device Simulator used for modpoll tool" authors = [{ name = "Ying Shaodong", email = "helloysd@gmail.com" }] readme = "README.md" diff --git a/uv.lock b/uv.lock index af86577..88bda9d 100644 --- a/uv.lock +++ b/uv.lock @@ -829,20 +829,20 @@ wheels = [ [[package]] name = "modpoll-wot" -version = "0.4.0a1" +version = "0.5.0a1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "jsonschema", marker = "python_full_version < '3.15'" }, { name = "referencing", marker = "python_full_version < '3.15'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/f6/19/f27b28a5e50b5ff8c7cb25e3593df58f31c65d4da5f29d051d29ee0f4d2a/modpoll_wot-0.4.0a1.tar.gz", hash = "sha256:81d25997407a64799a034ad4df9c53dbb4f8a7842f4416dacb81a7e26d95b6b6", size = 54976, upload-time = "2026-11-12T03:52:27.323Z" } +sdist = { url = "https://files.pythonhosted.org/packages/2b/a4/477adeef74d9b4ce969ab377e9d00c90c115ab006aea6bb15dd3dd4c3176/modpoll_wot-0.5.0a1.tar.gz", hash = "sha256:c510a352bedf2c01a8d42abf21b394cacab208e46277c82e4531ea3799195cb1", size = 59242, upload-time = "2026-11-12T12:24:59.788Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/e4/d3/4400813559fd11ca7d758d5ab343505366a7dd94c65be0c293b8048d915c/modpoll_wot-0.4.0a1-py3-none-any.whl", hash = "sha256:9708d2cadf65ce93626eb5755905f25e7aedcc1b9746e66277d5d94f08aa4c76", size = 46936, upload-time = "2026-11-12T03:52:26.239Z" }, + { url = "https://files.pythonhosted.org/packages/89/3a/a24f047c949d4b866ea0f511a2d1f7f1c15bbb13249755dfcfb0bdf8e3f3/modpoll_wot-0.5.0a1-py3-none-any.whl", hash = "sha256:59dcd551d95ebd549de3e3e04170d7dec2fe8ea58e643e2b6d5ab6d91b0acb21", size = 50246, upload-time = "2026-11-12T12:24:58.568Z" }, ] [[package]] name = "modsim" -version = "2.0.0a8" +version = "2.0.0a9" source = { editable = "." } dependencies = [ { name = "jsonschema", marker = "python_full_version < '3.15'" }, @@ -872,7 +872,7 @@ docs = [ [package.metadata] requires-dist = [ { name = "jsonschema", specifier = ">=4.21,<5" }, - { name = "modpoll-wot", specifier = "==0.4.0a1" }, + { name = "modpoll-wot", specifier = "==0.5.0a1" }, { name = "pymodbus", specifier = "~=3.16.1" }, { name = "pyyaml", specifier = ">=6,<7" }, ] From 3f824d843cdea5c1bd31c110fdcb8deb6a907664 Mon Sep 17 00:00:00 2001 From: Gavin Ying Date: Thu, 12 Nov 2026 20:30:37 +0800 Subject: [PATCH 3/3] chore: regenerate the io-module Thing Description for modpoll-wot 0.5.0a1 Co-Authored-By: Claude Sonnet 5.5 --- tests/fixtures/io-module/generated.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fixtures/io-module/generated.json b/tests/fixtures/io-module/generated.json index 3a6c337..c7f70cf 100644 --- a/tests/fixtures/io-module/generated.json +++ b/tests/fixtures/io-module/generated.json @@ -3,7 +3,7 @@ "source_sha256": "4c2aee3334faf6622f4ee34a23108fa0ec100a6b3110a78200eee79da8935596", "generator": { "package": "modpoll-wot", - "version": "0.4.0a1" + "version": "0.5.0a1" }, "instance": { "host": "127.0.0.1",