This repository was archived by the owner on Nov 14, 2026. It is now read-only.
Repository navigation
feat!: add simulation data and verification report schema 3 (WOT-04) - #4
Merged
Merged
Conversation
- Simulation data schema 1 (version, initial, generators, bindings, tick, seed, writePolicy) without executable code, load_simulation_data and `modpoll-wot validate --kind data`. A Modpoll --export snapshot, which has no version key, is accepted: the matching device's values become initial, unread (null) points are left out and listed. - scaled_raw recovers the raw integer of a scaled value when it is an exact decimal multiple or exactly the float Modpoll computes, so exported values such as 230.10000000000002 with 0.1 can be served again. - Verification report schema 3 drops model.path: catalog Thing Models sit at model.tm.json, so product ID and catalog commit identify them. Schema 2 had no consumers and is removed. - Version 0.4.0a1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Defines simulation data, the declarative device values Modsim loads with
--data, and fixes the verification report schema for the catalog's fixedmodel.tm.jsonpath. Version0.4.0a1.Simulation data
schemas/simulation-data-1.json:version"1",initial(static values, scalars or arrays of scalars),generators(constant,sine,ramp,noise),bindings,tick,seed,writePolicy. No other fields, so simulation data never carries code; behavior scripts stay a simulator concern.load_simulation_data(document, title=None, properties=None)returns aSimulationData. A document withoutversionis a Modpoll--exportsnapshot: the device entry titled like the model (or the only entry) becomesinitial;nullpoints are left out and listed inunread;timestampcounts as a point only when the model has one. Withproperties, every referenced name must exist.scaled_raw(value, multiplier)recovers the raw integer of a scaled value when it is an exact decimal multiple (230.1with0.1) or exactly the float Modpoll computes (230.10000000000002). No tolerance threshold.modpoll-wot validate FILE --kind datachecks data documents and snapshots.profile.mdgains a Simulation data section; snapshots are instance data and stay on the user's computer.Verification report schema 3
Schema 2 required
model.pathto matchmodels/*.tm.json. Open Modbus Catalog schema 7 keeps each baseline Thing Model atmodel.tm.json, so catalog reports could not validate. Schema 3 dropsmodel.path; product ID and catalog commit identify the model. Schema 2 had no consumers and is removed.Checks
mise run check: 96 tests, build, and installed-wheel smoke checks includingvalidate --kind dataon a snapshot.2.0.0a7(113 tests plus an export → replay → read test with scaled points) and modpoll2.0.0a6(142 tests including modsim interop). Their pins move to0.4.0a1after this is published.🤖 Generated with Claude Code