Commit graph

458 commits

Author SHA1 Message Date
Richard Bowman
87c4a2aadf Provide both required arguments to move_in_image_coordinates
The integration test checks that moving in image coordinates fails
before the CSM thing is calibrated.
Unfortunately, it is missing the `y` argument, so it would fail either way.

This commit supplies the extra argument so that the failure should come from the right place.

It also changes the expected error to `ServerActionError` and adds a check
for the message, to verify it is due to missing calibration data.

A future version of the LabThings Client (#89) may raise a different
error if a required argument is missing, so fixing this will ensure
that upstream change doesn't break anything here.
2026-06-30 16:53:11 +01:00
Joe Knapper
8f40f4d4e4 Merge branch 'rename-rom-thing' into 'v3'
Change RangeofMotionThing to StageMeasureThing

See merge request openflexure/openflexure-microscope-server!626
2026-06-29 14:45:28 +00:00
Joe Knapper
d2e19142df Merge branch 'gallery-sidebar' into 'v3'
Add gallery bulk actions and sidebar

See merge request openflexure/openflexure-microscope-server!625
2026-06-29 11:16:02 +00:00
Julian Stirling
f65260b12c Fix temp dir path for data directories in unit tests 2026-06-26 22:02:35 +00:00
Julian Stirling
6a571616c9 Change RangeofMotionThing to StageMeasureThing
Also changing the data tracker and name.
2026-06-25 19:53:53 +01:00
Julian Stirling
cc5ad7c5e7 Add tests to for gallery bulk actions 2026-06-25 17:40:49 +01:00
Julian Stirling
2dcd386661 Add way for gallery providers to specify bulk actions. 2026-06-25 17:01:07 +01:00
Julian Stirling
c77cef1d9c Improve testing of gallery and behaviour if card data not set for a gallery provider 2026-06-25 10:28:02 +01:00
Julian Stirling
366369ee7d Update test cased for gallery 2026-06-24 17:55:55 +01:00
Julian Stirling
a5828fbf41 Add filtering to gallery 2026-06-24 17:55:54 +01:00
Julian Stirling
1255b35635 Add better comments to test_gallery 2026-06-24 11:35:41 +01:00
Julian Stirling
d31d1154cc Apply suggestions from code review of branch image-capture
Co-authored-by: Joe Knapper <joe.knapper@glasgow.ac.uk>
2026-06-24 11:35:41 +01:00
Julian Stirling
0e24bb01f4 Add better testing for camera gallery functions 2026-06-23 15:12:38 +00:00
Julian Stirling
03d74bb044 Improve gallery tests and fix behaviour if a provider errors 2026-06-23 15:12:38 +00:00
Julian Stirling
cc6caa39d7 Gallery can delete all data. 2026-06-23 15:12:38 +00:00
Julian Stirling
6ece96e802 Update gallery test now camera is a gallery thing. 2026-06-23 15:12:38 +00:00
Julian Stirling
267a02d0e8 Test snapshot image is generated 2026-06-21 14:07:00 +01:00
Joe Knapper
9b12d5ca52 Merge branch 'dots-in-dirs' into 'v3'
Allow dots within filepaths if not trailing.

See merge request openflexure/openflexure-microscope-server!606
2026-06-19 10:47:52 +00:00
Beth Probert
cf6fd4ccea Update to cover new logic. Updatee READMEs and Guides with --debug arg information 2026-06-17 16:59:43 +01:00
Beth Probert
b1202723a1 Fix ruff
Add debug test

Add info log message for sanity

Add more useful logs

Edit configure_logging to change OFM level to debug if set in CLI

Update log message

Fix boot and int mix up

Fix string

Change string

Update logging string again

try changing OFM handler level

Change log slice

Fix syntax error

Add in OFMHandler logic, update webapp to show in logging tab and fix ruff
2026-06-17 16:29:50 +01:00
Beth Probert
b235de39f6 Update customise_server to poll the debug flag in the LT server instead of re-reading the value from CLI arguments. 2026-06-17 12:22:12 +01:00
Julian Stirling
071d62e8a0 Apply suggestions from code review of branch camera_modes
Co-authored-by: Joe Knapper <joe.knapper@glasgow.ac.uk>
2026-06-05 16:58:35 +01:00
Julian Stirling
853301ca5d Fix or x-fail integration tests 2026-06-05 16:58:35 +01:00
Julian Stirling
29518e9cb9 Update hardware tests and fix PNG saving with picamera 2026-06-05 16:58:35 +01:00
Julian Stirling
cdab10ae46 Tweak types and fix mock persistence between tests 2026-06-05 16:58:35 +01:00
Julian Stirling
2c215b9f81 Add unit tests for RelativeDataPath and save_from_memory 2026-06-05 16:58:35 +01:00
Julian Stirling
c1915759b4 Update unit tests for capture mode. 2026-06-05 16:58:35 +01:00
Julian Stirling
83ceb82ea8 Use a path object that supports setting a Thing for the data directory.
This allows us to ensure that arbitrary paths are not selected via the API.
2026-06-05 16:58:35 +01:00
Julian Stirling
b9c6071bc7 Start to move tests onto new camera api 2026-06-05 16:58:35 +01:00
Julian Stirling
fe409ccefb Allow dots within filepaths if not trailing. 2026-06-02 14:43:03 +01:00
Julian Stirling
b7ff72a383 Apply suggestions from code review of branch streaming-modes
Co-authored-by: Richard Bowman <richard.bowman@cantab.net>
2026-05-27 15:33:43 +00:00
Julian Stirling
7dd715da88 Update tests for new camera streaming modes 2026-05-27 08:43:11 +01:00
Joe Knapper
4e58d613d0 Merge branch 'stitch-all-logging' into 'v3'
Log during stitch all and handle errors

Closes #710

See merge request openflexure/openflexure-microscope-server!593
2026-05-15 16:36:15 +00:00
jaknapper
0f842c622b Test stitch all with mocking 2026-05-15 17:07:10 +01:00
Joe Knapper
bea1e35d61 Merge branch 'sharpness-monitor-none' into 'v3'
Sharpness monitor accepting 0 as None

Closes #776

See merge request openflexure/openflexure-microscope-server!592
2026-05-15 15:27:52 +00:00
jaknapper
a278b700ef Change check for record 2026-05-15 15:45:04 +01:00
jaknapper
bd796f98a1 Log during stitch all and handle errors 2026-05-15 15:40:15 +01:00
Julian Stirling
49ae6fcd70 Merge branch 'save-rom-data' into 'v3'
Save useful ROM data to data directory

See merge request openflexure/openflexure-microscope-server!590
2026-05-15 14:16:04 +00:00
Julian Stirling
40a9e25e02 Merge branch 'v3-labthings-rename-api-prefix' into 'v3'
Update code to use public `api_prefix` property

See merge request openflexure/openflexure-microscope-server!587
2026-05-15 13:56:19 +00:00
jaknapper
78c01de6d5 Sharpness monitor accepting 0 as None 2026-05-15 14:43:23 +01:00
Richard Bowman
ee6911f4a7 PNG Capture
This adds an additional action to BaseCamera to capture and return a PNG Blob. It makes the PNG using Pillow, in a very similar way to `capture_jpeg`.

I have parametrized the test for `capture_jpeg` so it now tests both jpeg and png with the same code.
2026-05-15 13:14:27 +01:00
Julian Stirling
714435f2d4 Fix unit tests for stage_measrue as an OFMThing 2026-05-14 16:49:29 +01:00
jaknapper
f3f5141e81 Update readme 2026-05-14 11:58:47 +01:00
Julian Stirling
7d84390404 Clean up temporary data dir in LabThingsTestEnv after test 2026-05-14 11:24:05 +01:00
jaknapper
cbfbd84fa9 Changes from review 2026-05-14 10:52:33 +01:00
jaknapper
5be8b0ecab Update tests, including picamera 2026-05-13 18:07:29 +01:00
jaknapper
817c53d1df Data dir in cam_test_utils 2026-05-13 17:54:29 +01:00
jaknapper
5962c80fdc Update testenvs with minimal app config
Worked out by Beth Probert
2026-05-13 17:54:29 +01:00
jaknapper
ab25705edc Move framerate to basecamera, using data_dir 2026-05-13 17:54:29 +01:00
jaknapper
5a8e8f745a Update tests 2026-05-13 17:54:29 +01:00