MATLAB: arguments blocks + auto-detect installed sonpipe by absolute path - #4
Merged
Merged
Conversation
…path Add arguments blocks to the +sonpipe MATLAB functions (read_SOMSMR_*, channelinfo, channels, runcmd, executable, private invoke_*) so the input signature is visible in the editor and inputs are validated. executable() now also probes the default install locations by absolute path (~/.local/bin/sonpipe, the install.sh venv, and the Windows %LOCALAPPDATA% venv) when 'sonpipe' is not on PATH. A MATLAB GUI on macOS/Windows does not inherit the interactive shell PATH, so an otherwise-working ~/.local/bin install was invisible to auto-detection; probing known paths fixes that. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VTQEJGfiSxeVG1J5GSmaTy
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
Two improvements to the
+sonpipeMATLAB client, both prompted by real usage:argumentsblocks on all+sonpipefunctions (read_SOMSMR_header,read_SOMSMR_sampleinterval,read_SOMSMR_datafile,channelinfo,channels,runcmd,executable, and the privateinvoke_binary/invoke_text). This makes each function's input signature visible in the MATLAB editor and validates inputs (mustBeTextScalar,mustBeNumeric), so the package is easier to navigate.Auto-detection of an installed
sonpipeby absolute path.executable()now probes the default install locations —~/.local/bin/sonpipe, theinstall.shvenv (~/.local/share/sonpipe/venv/bin/sonpipe), and the Windows%LOCALAPPDATA%\sonpipe\venv\Scripts\sonpipe.exe— whensonpipeis not found onPATH. A MATLAB GUI on macOS/Windows does not inherit the interactive shellPATH, so an otherwise-working~/.local/bininstall was invisible to auto-detection. Each probed path is existence-checked and quoted before use.Notes
executable()keeps its query-vs-set semantics vianargin(theargumentsdefault does not change the reset-with-''behavior the tests rely on).🤖 Generated with Claude Code
Generated by Claude Code