Repository navigation
Fix IOC reliability issues - #6
Open
Anthony Sligar (sligara7) wants to merge 6 commits into
Open
Anthony Sligar (sligara7) wants to merge 6 commits into
Anthony Sligar (sligara7) wants to merge 6 commits into
Conversation
Anthony Sligar (sligara7)
commented
Feb 19, 2026
- Fix typo: status_socket_socket -> status_socket in open_experiment_status
- Fix undefined variable: return legend, path in get_legends_data
- Fix case-sensitive legend matching: use h.lower() for mass header filtering
- Add socket reconnection with retry logic on broken pipe instead of silent death
- Make MASsoft host/port configurable via --mas-host and --mas-port CLI args
- Wrap all blocking socket calls in run_in_executor to prevent event loop starvation
- Replace fixed 4096-byte recv with chunked read loop for large responses
- Remove redundant FileHandler logging (procServ handles log capture)
- Remove unused imports (os, closing, PureWindowsPath, EXPERIMENT_DIRECTORY, MOST_RECENT_FILE)
- Fix typo: status_socket_socket -> status_socket in open_experiment_status - Fix undefined variable: return legend, path in get_legends_data - Fix case-sensitive legend matching: use h.lower() for mass header filtering - Add socket reconnection with retry logic on broken pipe instead of silent death - Make MASsoft host/port configurable via --mas-host and --mas-port CLI args - Wrap all blocking socket calls in run_in_executor to prevent event loop starvation - Replace fixed 4096-byte recv with chunked read loop for large responses - Remove redundant FileHandler logging (procServ handles log capture) - Remove unused imports (os, closing, PureWindowsPath, EXPERIMENT_DIRECTORY, MOST_RECENT_FILE) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add from __future__ import annotations - Sort imports per isort conventions - Replace f-strings in logging with lazy % formatting - Assign exception messages to variables before raising (EM101/EM102) - Remove leftover debug print statements - Rename unused args with _ prefix (instance -> _instance, new_file_name -> _new_file_name) - Replace try/except/pass with contextlib.suppress - Remove unnecessary else after break (RET508) - Use unpacking instead of list concatenation (RUF005) - Remove unnecessary intermediate variables before return (RET504) - Replace ambiguous en dash with hyphen in comments (RUF003) - Apply ruff formatter for consistent style Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
Merge behavior from working .txt versions into the .py package structure: - Restore socket timeout=5→20 for network deployment, remove FileHandler - Use .txt's single -xFilename call, error checking, and logging style - Keep .py improvements: chunked recv, reconnect logic, per-socket open methods - Fix swapped close/abort error messages, simplify abort/close putters - Add open_experiment alias for IPython workflow compatibility - Restore TEMPLATE_DICT, separate MID/Mass PV loops, experiment default Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Combines the protocol-correct CRLF framing, hot-link threads, and diagnostic PVs from the rewrite with the working version's reliability patterns (eager connect, polling fallback, reconnect retry, module-level constants). Key changes: - massoft_client.py: merged _CRLFSocket with compat send_command/receive, flexible constructor (cfg, host/port, or config file), compat aliases (initialize, shutdown, run_experiment, etc.), socket property aliases, fixed bug where __init__ used cfg before self.cfg was set - cap2.py: working PV names (RunExp/AbortExp/CloseExp), rewrite diagnostic PVs (Connected/Status/LastError/DataAge/StatusAge), hot-link acquire with polling fallback, dual arg parsing for --mas-host/--mas-port + caproto args - Added hiden_config.json for runtime configuration - Added ARG002 ruff suppression for caproto putter signatures - Deleted cap2.txt and massoft_client.txt (superseded by merged .py files) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds the rewrite-style PVs alongside the existing working-version PVs: - Go: uses GoOD/GoOT/GoFilename config PVs, calls x_go() - Abort: calls safe_abort_and_wait(), updates Status PV - Close: safe abort->wait->close sequence, stops acquire/links The working-version PVs (RunExp, AbortExp, CloseExp) are retained for backward compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This branch has not been deployed
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.