Change references to Seneca K107 to Z-8AI#947
Conversation
I think there was some confusion about the naming here. The Seneca K107 is an RS485 serial converter, which we did indeed use for the temperature monitor, but the device that we're actually communicating with is a Seneca Z-8AI analogue module (connected to a T121 temperature converter). For UNIRAS, we won't use the K107 at all. Change uses of K107 name to Z-8AI in docstrings and code to avoid confusion. Fixes #919.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #947 +/- ##
=======================================
Coverage 87.58% 87.58%
=======================================
Files 70 70
Lines 3712 3712
=======================================
Hits 3251 3251
Misses 461 461 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR resolves naming confusion around the temperature monitoring hardware by updating code and configuration references from “Seneca K107” (serial converter) to the actual device being communicated with: the Seneca Z-8AI analogue module.
Changes:
- Renames the temperature monitor implementation class/error from
SenecaK107/SenecaK107ErrortoZ8AI/Z8AIError. - Renames related configuration constants from
SENECA_*toZ8AI_*. - Updates the FINESSE hardware set YAML and unit tests to use the new module/class names and updated docstrings.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
tests/hardware/plugins/temperature/test_z8ai.py |
Updates imports, type hints, and docstrings to use Z8AI naming. |
src/frog/hardware/plugins/temperature/z8ai.py |
Renames the device interface and error type, updates defaults to Z8AI_* config constants, and refreshes device description/docs. |
src/frog/gui/hardware_set/finesse.yaml |
Switches the configured temperature monitor class path to temperature.z8ai.Z8AI. |
src/frog/config.py |
Renames default limit constants to Z8AI_* and updates their docstrings. |
Comments suppressed due to low confidence (1)
src/frog/hardware/plugins/temperature/z8ai.py:145
- In parse_data(),
check = numpy.frombuffer(...)returns a 1-element ndarray, socrc != checkrelies on NumPy’s scalar truthiness and mixes scalar/array types. This is brittle and obscures intent; consider extracting a scalar CRC value (and ideally reading it from the final two bytes rather than a fixed offset) before comparing, so the comparison is unambiguous and robust if the message length changes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
I think there was some confusion about the naming here. The Seneca K107 is an RS485 serial converter, which we did indeed use for the temperature monitor, but the device that we're actually communicating with is a Seneca Z-8AI analogue module (connected to a T121 temperature converter). For UNIRAS, we won't use the K107 at all.
Change uses of K107 name to Z-8AI in docstrings and code to avoid confusion.
Fixes #919.
Type of change
Key checklist
pre-commit run -a)pytest)mkdocs build -s)pyinstaller-built executable works (if relevant)Further checks