Repository navigation
feat: restore v1 CSV configurations behind content detection - #132
Merged
Merged
Conversation
--config accepts v1 CSV and WoT TM/TD JSON side by side; the format is detected from the content, not the filename. New --thing-model/--tm and --thing-description/--td flags assert the JSON document kind explicitly. The CSV loader keeps v1 row semantics (device/poll/ref rows, space-to- underscore point names, blank access defaulting to r, multiplicative scale, eight-bit bit-table groups) and feeds the same Device/Poller/Point engine as the WoT path. Usage mistakes (kind mismatch, --param with CSV, duplicate device names) exit 2 with one error line. --precision stays in the default auto rendering mode.
# Conflicts: # README.md # modpoll/arg_parser.py # modpoll/modbus_task.py
This was referenced Nov 12, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
--configaccepts v1 CSV and WoT TM/TD JSON side by side; the format is detected from the content (first non-whitespace byte{/[selects JSON), not the filename or URL suffix. Existing v1 commands keep working unchanged, and existing v2 commands passing TM/TD to--configare unaffected.--thing-model/--tmand--thing-description/--tdflags assert the JSON document kind explicitly; a kind mismatch, CSV content under these flags, or duplicate device names is a one-line configuration error with exit code 2.r, multiplicative scale, eight-bit bit-table groups) and feeds the same Device/Poller/Point engine as the WoT path.--unit-idoverrides the device-row ID;--paramremains TM-only.autoprecision mode.This reverses the earlier "CSV runtime support is intentionally removed" boundary (maintainer decision 2026-11-12); docs (configure, csv-migration, v1-compatibility, usage, README, validation record) are updated accordingly. Tracked as POLL-05 in the modiohub master plan.
Verification
make checkpasses (lock, pre-commit, deptry).pytest tests -m "not integration": 210 passed, 58 deselected, including new CSV loader, content-detection, kind-assertion and CLI exit-code tests.modpoll --once --config examples/modsim.csvand--config examples/modsim.tm.jsonboth exit 0 and export byte-identical snapshots of all 37 points; poller structures match exactly.