Repository navigation
update branch - #183
Open
Slautin wants to merge 48 commits into
Open
update branch#183Slautin wants to merge 48 commits into
Slautin wants to merge 48 commits into
Conversation
Checking Gatan EELS
…d fix orphaned device-server processes - Server/MCP GUIs: system light/dark theming, real checkmark glyphs on checkboxes, collapsed-by-default sections, larger/resizable terminal, MCP GUI tool-count badge, Digital Twin/Spectra300 host toggle (MCP GUI only - Server GUI's instrument identity is config-driven, so the toggle would silently mismatch host vs instrument there) - Server GUI: drop the Instrument file selector; it's config-driven now - process_manager.py: stale-PID cleanup now signals the whole process group, not just the recorded PID, so a hard-killed `uv run` wrapper no longer orphans the device-server child it spawned - run_servers.py: request_shutdown is now idempotent, since a duplicate SIGTERM (e.g. relayed by `uv run`) could interrupt shutdown_all() mid- cleanup and leave processes running - Resolve the llm.py/mcp_server.py merge conflicts from the upstream pull in favor of the versions consistent with the rest of each file (recursion_limit/_complete in llm.py; Tiled-backed get_data_from_key in mcp_server.py, dropping the incomplete local-path rewrite it conflicted with) - pyproject.toml: tighten pyqt6 upper bound to <6.10 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Dropped upstream in a change unrelated to process management; without it, the .processes/<name>.json state file is never written during a normal run (save() only fires from stop_process()), so the next launch's _cleanup_stale_state() has nothing to reap after a crash - reopening the orphaned-device-server bug this session's process_manager.py fix addressed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
update branch
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HWQ3GnHuE2uY2yfqKchc6U
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HWQ3GnHuE2uY2yfqKchc6U
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…quisition path get_parameters no longer DevFails on the DigitalTwin: the twin now implements _get_parameters (JSON status), and every abstract stub in ElectronMicroscope raises NotImplementedError naming the class and method instead of silently returning None into a DevString - the old behavior surfaced as "can't translate python object to C char*" with no traceback. PyTango's DeviceMeta bypasses ABCMeta, so @AbstractMethod alone never enforced these overrides. get_parameters reports detectors honestly: device proxy roles under device_proxies, and the names each acquisition path actually accepts under scan_detectors / spectrum_detectors / camera_detectors, instead of publishing "stage" and "data" as detectors. acquire_scanned_image and acquire_spectrum carry doc_in, so the MCP bridge exposes a named, described parameter (detector_list / detector_name) instead of a blind "arg". acquire_spectrum rejects an unknown detector with a clean error naming the configured devices instead of an AttributeError on None. A failed image preview now returns "image preview unavailable: <reason>" as a text block instead of silently degrading to text-only, so a Tiled outage is distinguishable from a command that never produces images. Also rides along: the LLM device's Complete command and tools attribute (the counterpart of sciagentgui's llm_bridge.py), camera proxy + simulated camera acquisition on the twin, and the emptied include_only_functions allowlist in mcp_dt.yaml. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Addresses review feedback on ff77a76: - mcp_gui.py/server_gui.py launched their subprocess via a lightweight ManagedCommand that only sent a single SIGTERM with no wait/escalation, so orphaned children could survive the Stop button. ManagedCommand now delegates to ProcessManager.start_process/stop_process for killpg + bounded wait + SIGKILL escalation, and window close also shuts the managed process down. - Consolidated the duplicated SIGTERM/SIGHUP/SIGBREAK-to-KeyboardInterrupt boilerplate in run_mcp.py and run_servers.py into a single install_shutdown_signal_handler() helper in ProcessManager. - Added on_output callback support to ProcessManager.start_process so the GUI can stream live output while still using the shared process lifecycle. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Fix: route GUI Stop button and startup scripts through ProcessManager
Add segmentation, corrector backends, and advanced acquisition workflows
feat: testing aberrations twin
…acquired spectra Tango's 3000 ms client default killed the first acquire_camera_image mid-run (API_DeviceTimedOut) while the command kept executing server-side; the bridge's tool proxies now allow 30 s, inside SciAgentGUI's 60 s HTTP window, matching the timeout handling auto_script.py already does for its own proxies. acquire_spectrum returned only the saved .h5 key, so a chat client had nothing to display. The bridge now reads the 1D dataset back from Tiled and attaches a matplotlib PNG plot, the same way camera and scanned images already ship their 2D previews. The digital twin saves its per-element composition labels as a dataset attribute so the preview can draw a labeled bar chart; spectra without labels fall back to an honest counts-vs-channel line. Also removes a stray debug print from _create_wrapper. This commit also carries the operator's completed extraction of describe_tiled_node into asyncroscopy/data/data_reader.py: the bridge file in its current state already imports it, so committing one without the other would not build. The unrelated in-progress stage-realism work in digital_twin.py is deliberately left uncommitted. Covered by 8 new offline tests in tests/test_mcp_server.py and verified against the live Tiled server with a previously acquired spectrum. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Both branches reworked the startup GUIs and ProcessManager in parallel. The initial-testing state is the one verified end-to-end against the live digital twin, MCP bridge, and SciAgentGUI today (timeout fix, spectrum previews, and the full offline MCP test suite), so this merge records main's history while keeping the working content unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Update to AutoScript 1.18 wheels.
created pipetting robot folder for pytango implementation, started outlining code for opentrons robot
Feat: GUI updated and using process manager
Collaborator
|
I figured out that tests are failing due to numpy version mismatch. include below in the pyproject.toml fixes it: [tool.uv] |
add: mcp server test notebook
This branch was successfully 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.
No description provided.