Skip to content

Change references to Seneca K107 to Z-8AI#947

Merged
alexdewar merged 1 commit intomainfrom
rename-senecak107
Mar 27, 2026
Merged

Change references to Seneca K107 to Z-8AI#947
alexdewar merged 1 commit intomainfrom
rename-senecak107

Conversation

@alexdewar
Copy link
Copy Markdown
Collaborator

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

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Documentation (non-breaking change that adds or improves the documentation)
  • Optimisation (non-breaking, back-end change that speeds up the code)

Key checklist

  • Pre-commit hooks run successfully (pre-commit run -a)
  • All tests pass (pytest)
  • The documentation builds without warnings (mkdocs build -s)
  • Check the GUI still works (if relevant)
  • Check the code works with actual hardware (if relevant)
  • Check the pyinstaller-built executable works (if relevant)

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests have been added or an issue has been opened to tackle that in the future. (Indicate issue here: # (issue))

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.
@alexdewar alexdewar requested review from Copilot and dc2917 March 26, 2026 14:49
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

❌ Patch coverage is 92.85714% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.58%. Comparing base (ad5ceed) to head (d5ef66a).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
src/frog/hardware/plugins/temperature/z8ai.py 83.33% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/SenecaK107Error to Z8AI/Z8AIError.
  • Renames related configuration constants from SENECA_* to Z8AI_*.
  • 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, so crc != check relies 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.

Copy link
Copy Markdown
Contributor

@dc2917 dc2917 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense!

@alexdewar alexdewar merged commit 001c567 into main Mar 27, 2026
11 checks passed
@alexdewar alexdewar deleted the rename-senecak107 branch March 27, 2026 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SenecaK107 is misnamed

3 participants