Skip to content

smappy: one command, with gui options, info and convert - #184

Merged
jries merged 3 commits into
mainfrom
smappy-command
Nov 17, 2026
Merged

jries merged 3 commits into
mainfrom
smappy-command

Conversation

@lanceXwq

Copy link
Copy Markdown
Collaborator

smappy names everything SMAPpy runs from a terminal, and two new commands do what otherwise needs a script or a window.

smappy -- smappy gui, smappy info, smappy convert, smappy fit, smappy batch, ... Each subcommand is the module its smappy-xxx script runs, given the rest of the line, so smappy fit -h is smappy-fit -h and its usage line says smappy fit. smappy -h lists them without importing Qt, numpy or torch; a mistyped one is answered with the nearest. python -m smappy is the same. The smappy-xxx names stay -- scripts, MCP clients and the batch window start them by those -- and a test holds each to its command.

smappy gui reads its options. Every argument used to be a file to open: smappy-gui -h opened the windows and failed to read a file called "-h". Now argparse reads them, with --help and --version, and:

  • --workspace FILE.yaml -- start with a saved workspace (File > Workspace > Open)
  • --restore -- one smappy HDF5 file, with its saved session (File > Open and restore)
  • --open PLUGIN -- a plugin in a window of its own, by its path or its name (--open RCC), repeatable

A missing file, an unknown plugin or a misused option is said in the terminal before any window opens. The handoff (--handoff) and the updater's restart start it as before.

smappy info FILE ... -- what a file holds: its files with their localizations, pixel size and frame time, the cameras, the columns, the ROIs and results. Read through a Session, so a SMAP or smappy file of several files shows as those files.

smappy convert IN [OUT] -- smappy HDF5 by default, beside the input (X_sml.mat -> X.hdf5), keeping the files, cameras, ROIs and results; --format csv | ThunderSTORM | Picasso through Save localizations, every localization and column, saying what the format cannot hold. Writes over nothing without --force, and never over its input.

Three commits: the GUI's options, info and convert, then smappy over them all and a README section.

--slow -n auto: 3648 passed, 5 failed, 30 skipped

  • 4 are DECODE's (test_fit_decode, the DECODE pages in test_plugin_docs / test_panel_docs), which need torch: not installed here, and they fail the same on main.
  • test_drop_files::test_a_stack_goes_to_the_fitter_open_on_the_localize_tab failed once under -n auto; it passes alone three times and with its file, on this branch and on main.

Tried by hand: info and convert on a real 18-file SMAP _sml.mat (2.9 M localizations, 50 sites) and its converted HDF5, which give the same summary; the GUI started offscreen on it with --open RCC --open "Analysis/Drift/COMET" ran without an error.

🤖 Generated with Claude Code

lanceXwq and others added 3 commits November 17, 2026 17:31
Every argument was a file to open: `smappy-gui -h` opened the windows and
failed to read a file called "-h".  Now argparse reads them, with --help
and --version, and three options that do at the start what the menus do:
--workspace (File > Workspace > Open), --restore (File > Open and restore)
and --open PLUGIN, a plugin in a window of its own, by its path or its
name.  A missing file, a plugin no one has or --restore on anything but
one smappy HDF5 file is said in the terminal before any window opens.

The GUI's main takes the options as arguments; `start_with` does them in
the windows, so a test can.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`info` says what a file holds -- its files, each one's localizations,
pixel size and frame time, the cameras, the columns, the ROIs and the
results -- read through a Session as the GUI reads it, so a SMAP or
smappy file of several files is shown as those files.  It is the check
that otherwise means opening the file and looking.

`convert` writes it as File > Save does (smappy HDF5, the default:
files, cameras, ROIs and results kept) or as Save localizations does
(csv, ThunderSTORM, Picasso: every localization and column), and says
what those formats cannot hold.  It names its output after the input
with the reader's suffix off (X_sml.mat -> X.hdf5), and writes over no
file unless --force, and never over the one it reads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`smappy gui`, `smappy info`, `smappy convert`, `smappy fit`, `smappy batch`
and the rest: each subcommand is the module its smappy-xxx script runs,
given the rest of the line, so `smappy fit -h` is `smappy-fit -h` and the
usage lines say `smappy fit`.  `smappy -h` lists them all without
importing Qt, numpy or torch; a mistyped one is answered with the
nearest.  `python -m smappy` is the same, for an environment whose
scripts are not on the PATH.

The smappy-xxx names stay: scripts, MCP clients' settings and the batch
window start them by those, and a test holds each to its command.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jries
jries merged commit deff688 into main Nov 17, 2026
13 checks passed
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.

2 participants