Skip to content

Commit e3f6f93

Browse files
kalidkeclaude
andcommitted
Update CLAUDE.md with additional development guidance
- Add command for running specific tests interactively - List available test set names - Document HDF5 data persistence (save_h5, export_state) - Add MCL NanoDrive and LibSerialPort to C library bindings - Document work-in-progress modules (Triggerscope, MCLMicroPositioner) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 068b0c2 commit e3f6f93

1 file changed

Lines changed: 18 additions & 3 deletions

File tree

CLAUDE.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,23 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
55
## Build and Test Commands
66

77
```bash
8-
# Run tests
8+
# Run all tests
99
julia --project -e 'using Pkg; Pkg.test()'
1010

1111
# Run tests with coverage
1212
julia --project -e 'using Pkg; Pkg.test(coverage=true)'
1313

14+
# Run specific test interactively (useful for debugging)
15+
julia --project -e 'using MicroscopeControl, Test; @testset "Simulated Camera" begin cam=SimCamera(); @test initialize(cam)===nothing end'
16+
1417
# Load package in REPL for development
1518
julia --project -e 'using Pkg; Pkg.instantiate(); using MicroscopeControl'
1619

1720
# Install as development package
1821
julia -e 'using Pkg; Pkg.develop(url="https://github.com/LidkeLab/MicroscopeControl.jl.git")'
1922
```
2023

21-
Tests use simulated devices only (`SimCamera`, `SimStage`, `SimLight`) - no hardware required.
24+
Tests use simulated devices only (`SimCamera`, `SimStage`, `SimLight`) - no hardware required. Test sets: "Simulated Camera", "Simulated Stage", "Simulated Light Source", "Export State".
2225

2326
## Architecture
2427

@@ -44,10 +47,14 @@ MicroscopeControl.jl uses a **three-layer architecture** leveraging Julia's mult
4447
All hardware inherits from `AbstractInstrument` (defined in `instrument.jl`):
4548
- `initialize(device)` - setup hardware connection
4649
- `shutdown(device)` - close hardware connection
47-
- `export_state(device)` - returns `(attributes::Dict, data, children::Dict)`
50+
- `export_state(device)` - returns `(attributes::Dict, data, children::Dict)` for HDF5 serialization
4851

4952
Interfaces define method signatures with `@error "not implemented"` stubs. Implementations provide concrete methods that dispatch on the device type.
5053

54+
### Data Persistence
55+
56+
`h5_file_saving.jl` provides `save_h5(filename, device)` and `save_attributes_and_data(group, device)` for saving device state to HDF5 files using the `export_state` tuple format.
57+
5158
### Adding New Hardware
5259

5360
1. Create directory under `hardware_implementations/your_device/`
@@ -77,3 +84,11 @@ Hardware implementations use `ccall` for vendor SDKs:
7784
- `pi_n472/functions_GCS2.jl` - PI GCS2 protocol
7885
- `tcube_laser/tcubeapi.jl` - Thorlabs TCube
7986
- `ok_xem/functions_okFP.jl` - Opal Kelly FrontPanel
87+
- `mcl_stage/*.jl` - Mad City Labs NanoDrive
88+
- Serial devices (CrystaLaser, Vortran, Triggerscope) use `LibSerialPort`
89+
90+
### Work in Progress
91+
92+
Some hardware modules are commented out in `MicroscopeControl.jl` while under development:
93+
- `Triggerscope` - external trigger synchronization
94+
- `MCLMicroPositioner` - Mad City Labs microdrive positioner

0 commit comments

Comments
 (0)