Skip to content

Implement ophyd device simulation - #49

Merged
SeijDeLeon merged 12 commits into
stagingfrom
sim-socket
Jul 29, 2026
Merged

Implement ophyd device simulation#49
SeijDeLeon merged 12 commits into
stagingfrom
sim-socket

Conversation

@Prinstar

Copy link
Copy Markdown
Collaborator

Summary

  • Added simulated ophyd motors, detectors, signals, and shutters
  • Implemented beamline simulation scenarios
  • Added EndstationDisplay and shutter controls
  • Updated socket communication for simulated devices
  • Added unit tests for simulated components

Testing

  • Verified simulated devices update correctly
  • Ran simulation tests for beamstop, detector, and shutter

@github-actions

Copy link
Copy Markdown
Contributor

❌ Test Results

Some tests failed.

Complete Test Suite Coverage:

  • Buttons - Button, ButtonIconOnly, ButtonWithIcon, ButtonCopyToClipboard
  • Inputs - InputCheckBox, InputNumber, InputEnumBoxRounded, InputStringBoxRounded
  • Plots - PlotlyHeatmap, PlotlyHeatmapTiled, PlotlyScatter, Histogram, ColormapPicker
  • Layout - Sidebar, SidebarItem, FinchSidebar, FinchAppLayout, FinchHeader, FinchMainContent, Header, Main, Bento, Paper, Widget
  • Tiled - TiledComponents, TiledLinePlotMaker
  • Devices - Camera, Shutter, DeviceControllerBox, DeviceControllerBoxSimple, TableDeviceController, ControllerAbsoluteMove, ControllerRelativeMove, Hexapod, BeamEnergy
  • Services - QueueServer, SignalMonitorPlots, Experiment
  • Misc - IFrame, GoogleDoc, SelectDropdown, ComponentViewer, ComponentViewerUtils

Test Environment: Node.js 20.x
Linting: ❌ ESLint failed
Formatting: ❌ Prettier failed
Type Checking: ❌ TypeScript compilation failed
Build: ❌ Production build successful
Tests: ❌ Some tests failed

@SeijDeLeon

Copy link
Copy Markdown
Collaborator
  • Please fix github actions test error
npm error code EUSAGE
npm error
npm error `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
  • It appears there is a missing component used in the TestPage which prevents the app from running (probably exists locally but wasn't added to a commit)
[plugin:vite:import-analysis] Failed to resolve import "@/components/HubHeader" from "src/app/pages/TestPage.tsx". Does the file exist?
/Users/seij/Repos/finch/src/app/pages/TestPage.tsx:20:41
34 |  import EnergyVsCurrentPlotPV from "@/components/EnergyVsCurrentPlotPV";
35 |  import Button from "@/components/Button";
36 |  import { HUB_HEADER_RIGHT_SLOT_ID } from "@/components/HubHeader";

Prinstar and others added 2 commits July 21, 2026 10:50
- Convert single-assignment let bindings to const in createFallbackTransport
- Remove unused imports (TableDeviceController, BluetoothSlash)
- Add missing useMemo dependency in Beamstop
- Finish Hub→Finch rename: FinchHeader component/props and
  FINCH_HEADER_RIGHT_SLOT_ID, fix TestPage import path
- Resync package-lock.json so `npm ci` passes in CI

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Formatting-only changes surfaced by the format:fix pre-commit hook,
which runs across the whole src tree. No behavior changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

✅ Test Results

All tests passed!

Complete Test Suite Coverage:

  • Buttons - Button, ButtonIconOnly, ButtonWithIcon, ButtonCopyToClipboard
  • Inputs - InputCheckBox, InputNumber, InputEnumBoxRounded, InputStringBoxRounded
  • Plots - PlotlyHeatmap, PlotlyHeatmapTiled, PlotlyScatter, Histogram, ColormapPicker
  • Layout - Sidebar, SidebarItem, FinchSidebar, FinchAppLayout, FinchHeader, FinchMainContent, Header, Main, Bento, Paper, Widget
  • Tiled - TiledComponents, TiledLinePlotMaker
  • Devices - Camera, Shutter, DeviceControllerBox, DeviceControllerBoxSimple, TableDeviceController, ControllerAbsoluteMove, ControllerRelativeMove, Hexapod, BeamEnergy
  • Services - QueueServer, SignalMonitorPlots, Experiment
  • Misc - IFrame, GoogleDoc, SelectDropdown, ComponentViewer, ComponentViewerUtils

Test Environment: Node.js 20.x
Linting: ✅ ESLint passed
Formatting: ✅ Prettier passed
Type Checking: ✅ TypeScript compilation successful
Build: ✅ Production build successful
Tests: ✅ All tests passed

@github-actions

Copy link
Copy Markdown
Contributor

✅ Test Results

All tests passed!

Complete Test Suite Coverage:

  • Buttons - Button, ButtonIconOnly, ButtonWithIcon, ButtonCopyToClipboard
  • Inputs - InputCheckBox, InputNumber, InputEnumBoxRounded, InputStringBoxRounded
  • Plots - PlotlyHeatmap, PlotlyHeatmapTiled, PlotlyScatter, Histogram, ColormapPicker
  • Layout - Sidebar, SidebarItem, FinchSidebar, FinchAppLayout, FinchHeader, FinchMainContent, Header, Main, Bento, Paper, Widget
  • Tiled - TiledComponents, TiledLinePlotMaker
  • Devices - Camera, Shutter, DeviceControllerBox, DeviceControllerBoxSimple, TableDeviceController, ControllerAbsoluteMove, ControllerRelativeMove, Hexapod, BeamEnergy
  • Services - QueueServer, SignalMonitorPlots, Experiment
  • Misc - IFrame, GoogleDoc, SelectDropdown, ComponentViewer, ComponentViewerUtils

Test Environment: Node.js 20.x
Linting: ✅ ESLint passed
Formatting: ✅ Prettier passed
Type Checking: ✅ TypeScript compilation successful
Build: ✅ Production build successful
Tests: ✅ All tests passed

@github-actions

Copy link
Copy Markdown
Contributor

✅ Test Results

All tests passed!

Complete Test Suite Coverage:

  • Buttons - Button, ButtonIconOnly, ButtonWithIcon, ButtonCopyToClipboard
  • Inputs - InputCheckBox, InputNumber, InputEnumBoxRounded, InputStringBoxRounded
  • Plots - PlotlyHeatmap, PlotlyHeatmapTiled, PlotlyScatter, Histogram, ColormapPicker
  • Layout - Sidebar, SidebarItem, FinchSidebar, FinchAppLayout, FinchHeader, FinchMainContent, Header, Main, Bento, Paper, Widget
  • Tiled - TiledComponents, TiledLinePlotMaker
  • Devices - Camera, Shutter, DeviceControllerBox, DeviceControllerBoxSimple, TableDeviceController, ControllerAbsoluteMove, ControllerRelativeMove, Hexapod, BeamEnergy
  • Services - QueueServer, SignalMonitorPlots, Experiment
  • Misc - IFrame, GoogleDoc, SelectDropdown, ComponentViewer, ComponentViewerUtils
  • Ophyd Sim - beamstopModel, createFallbackTransport, simCameraSocket, dependencyGraph, detector, hexapod, motor, shutter, signal, state, transport, useOphydPVSocket

Test Environment: Node.js 20.x
Linting: ✅ ESLint passed
Formatting: ✅ Prettier passed
Type Checking: ✅ TypeScript compilation successful
Build: ✅ Production build successful
Tests: ✅ All tests passed

@Prinstar

Copy link
Copy Markdown
Collaborator Author

-Add SimulatedBeamline feature and refactor beamline device table

  • Group the sim beamline (endstation, detector, device table, current
    plot, floating shutter) into a self-contained SimulatedBeamline feature;
    reduce TestPage to render it
  • Move EnergyVsCurrentPlotPV from components to features; add unit tests
  • TableDeviceControllerWithRBV: scroll on fixed height, and collapse the
    relative-move column into a move-mode dropdown
  • Extract OphydSimContext/OphydTransportContext into their own modules

@github-actions

Copy link
Copy Markdown
Contributor

✅ Test Results

All tests passed!

Complete Test Suite Coverage:

  • Buttons - Button, ButtonIconOnly, ButtonWithIcon, ButtonCopyToClipboard
  • Inputs - InputCheckBox, InputNumber, InputEnumBoxRounded, InputStringBoxRounded
  • Plots - PlotlyHeatmap, PlotlyHeatmapTiled, PlotlyScatter, Histogram, ColormapPicker
  • Layout - Sidebar, SidebarItem, FinchSidebar, FinchAppLayout, FinchHeader, FinchMainContent, Header, Main, Bento, Paper, Widget
  • Tiled - TiledComponents, TiledLinePlotMaker
  • Devices - Camera, Shutter, DeviceControllerBox, DeviceControllerBoxSimple, TableDeviceController, ControllerAbsoluteMove, ControllerRelativeMove, Hexapod, BeamEnergy
  • Services - QueueServer, SignalMonitorPlots, Experiment
  • Misc - IFrame, GoogleDoc, SelectDropdown, ComponentViewer, ComponentViewerUtils
  • Ophyd Sim - beamstopModel, createFallbackTransport, simCameraSocket, dependencyGraph, detector, hexapod, motor, shutter, signal, state, transport, useOphydPVSocket

Test Environment: Node.js 20.x
Linting: ✅ ESLint passed
Formatting: ✅ Prettier passed
Type Checking: ✅ TypeScript compilation successful
Build: ✅ Production build successful
Tests: ✅ All tests passed

@github-actions

Copy link
Copy Markdown
Contributor

✅ Test Results

All tests passed!

Complete Test Suite Coverage:

  • Buttons - Button, ButtonIconOnly, ButtonWithIcon, ButtonCopyToClipboard
  • Inputs - InputCheckBox, InputNumber, InputEnumBoxRounded, InputStringBoxRounded
  • Plots - PlotlyHeatmap, PlotlyHeatmapTiled, PlotlyScatter, Histogram, ColormapPicker
  • Layout - Sidebar, SidebarItem, FinchSidebar, FinchAppLayout, FinchHeader, FinchMainContent, Header, Main, Bento, Paper, Widget
  • Tiled - TiledComponents, TiledLinePlotMaker
  • Devices - Camera, Shutter, DeviceControllerBox, DeviceControllerBoxSimple, TableDeviceController, ControllerAbsoluteMove, ControllerRelativeMove, Hexapod, BeamEnergy
  • Services - QueueServer, SignalMonitorPlots, Experiment
  • Misc - IFrame, GoogleDoc, SelectDropdown, ComponentViewer, ComponentViewerUtils
  • Ophyd Sim - beamstopModel, createFallbackTransport, simCameraSocket, dependencyGraph, detector, hexapod, motor, shutter, signal, state, transport, useOphydPVSocket

Test Environment: Node.js 20.x
Linting: ✅ ESLint passed
Formatting: ✅ Prettier passed
Type Checking: ✅ TypeScript compilation successful
Build: ✅ Production build successful
Tests: ✅ All tests passed

@SeijDeLeon
SeijDeLeon merged commit 30680bc into staging Jul 29, 2026
2 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