Commit graph

233 commits

Author SHA1 Message Date
Julian Stirling
7f0745d772 Add some more scan_directories tests 2025-06-28 23:59:35 +01:00
Julian Stirling
2ce2f998fa add tests for helper classes defined by fast stack 2025-06-27 00:34:51 +01:00
Joe Knapper
378998d230 Merge branch 'jpeg-capture-in-stacking' into 'v3'
2MP from 8MP capturing

Closes #364, #413, #298, #303, #288, #358, and #433

See merge request openflexure/openflexure-microscope-server!251
2025-06-25 17:57:51 +00:00
Julian Stirling
0933ece63a Apply suggestions from code review of branch jpeg-capture-in-stacking
Co-authored-by: Beth Probert <beth_probert@outlook.com>
2025-06-25 15:39:36 +01:00
Julian Stirling
0e3f4305b5 Tidy post refactor of cameras 2025-06-23 11:26:24 +01:00
Julian Stirling
b5606984ae Consolidate the BaseCamera, CameraStub, and CameraProtocol, move StreamingPiCamera2 to this repo 2025-06-23 11:25:49 +01:00
Julian Stirling
c70b487a1f Automatically create HTML coverage report each time PyTest runs 2025-06-23 11:00:10 +01:00
Julian Stirling
c43b7cb8b4 Merge branch 'more-checkers' into 'v3'
Enable more lint checkers

See merge request openflexure/openflexure-microscope-server!290
2025-06-12 11:56:29 +00:00
Julian Stirling
37bb9635ad Apply 2 suggestion(s) to 2 file(s)
Co-authored-by: Beth Probert <beth_probert@outlook.com>
2025-06-12 10:29:54 +00:00
Julian Stirling
3019e13c80 Add commented out code check to linters 2025-06-11 23:40:49 +01:00
Julian Stirling
04832892cc Chnge docstring tester from Doc to D as Doc has no effect 2025-06-10 16:07:49 +01:00
Julian Stirling
1c54d25212 Add ruff checking for unnecessary comprehensions 2025-06-10 16:07:49 +01:00
Julian Stirling
2050c2dc7c Add return checker, needed 4 fixes 2025-06-10 16:07:48 +01:00
Julian Stirling
3f0564f253 Turning on more lint checkers, warning for cameras that ignore resolution setting 2025-06-10 16:07:48 +01:00
Julian Stirling
0457978048 Update depedencies and changelog priort to v3.0.0-alpha1 release
Closes #398
2025-06-09 15:39:26 +01:00
Julian Stirling
c79184a6d9 Use same version number for server and webapp, add CI check
- Check webapp and server have same version number
- Use `genversion` on build to create javascript file with version string
from pyproject.toml
- Expose the version number in the js interface
- Correct format of current of alpha version string because javascript complains

Closes #382
2025-06-09 12:13:15 +01:00
Julian Stirling
2aa7d0f6be Update labthings-api dep and also the version number for alpha release 2025-06-06 13:09:04 +01:00
Joe Knapper
0132813b6a update labthings-picamera to most recent release 2025-06-02 14:40:06 +00:00
jaknapper
576161e543 Import openflexure-stitching from pip, updated toml and config jsons 2025-05-20 17:54:17 +01:00
Julian Stirling
51346e45fe Update dependencies to use new OpenCV wheel compiled against numpy v2 2025-05-13 09:03:53 +01:00
Julian Stirling
2ced848695 Add functionality for testing the scan planner on a given sample shape 2025-04-14 11:27:25 +01:00
Julian Stirling
7665d45e09 Make the coverage report touch all files 2025-04-11 23:29:32 +01:00
Julian Stirling
e4cfcc76a7 Add some extra rules to ruff, also add a more complete ruff config that fails
Over time we can enable more rules for `ruff check`
2025-04-11 11:56:55 +01:00
Joe Knapper
d4247235e3 Merge branch 'csm-return-to-start' into 'v3'
CSM always returns to start on error

See merge request openflexure/openflexure-microscope-server!227
2025-04-08 12:49:38 +00:00
Joe Knapper
bf82f37c47 Dependency bump for camera_stage_mapping to 0.1.8
Returns the errors we expect
2025-04-08 12:09:15 +00:00
Julian Stirling
1493f51212 Purge all windows line endings and add check to formatter.
Also changes python version in pyproject.toml as it is incorrect
2025-04-08 10:51:26 +01:00
Julian Stirling
928d5ef300 Try pinning pydantic version as server now fails tests with error 2025-04-02 14:05:38 +01:00
Richard Bowman
e8ae496d08 Use published packages
I've published [pre]releases on PyPI. This commit uses the mos recent releases of labthings-picamera2 and camera-stage-mapping.
2024-12-18 14:26:15 +00:00
Richard Bowman
db11e03321 Constrain numpy < 2
picamera2 fails to import with numpy 2.
2024-12-18 14:23:44 +00:00
Richard Bowman
1d59cddac1 Disable pytest code quality report
Code quality report plugin clashes with the version of pytest specced in labthings.

If we resolve this upstream, we can re-enable it.
2024-12-03 14:19:36 +00:00
Richard Bowman
c3cd30b642 Only rebuild docker for changes
Docker is now only rebuilt when it's changed, and on `v3`  branch.

I've also added code quality reporting for pytest.
2024-12-03 12:54:34 +00:00
Richard Bowman
71e6d84aa4 Build docker image and run ruff/pytest 2024-12-03 12:18:45 +00:00
Richard Bowman
77794c94eb Update documentation on dependencies/dev tools 2024-12-03 11:18:24 +00:00
Richard Bowman
1e7069b375 Add more tests, speed up dummy stage
I've sped up the stage motion, to run tests in a more reasonable time.

CSM doesn't yet calibrate in the test - I suspect debugging of capture_array
is needed.
2024-12-03 00:16:26 +00:00
Richard Bowman
1ba799de22 Migrate to new Blob type and update imports
This now uses the latest version of labthings-fastapi.
2024-11-28 17:35:56 +00:00
Richard Bowman
b8ca12314c Lock labthings/picamera2 deps
v0.0.7 of labthings includes breaking changes, we're not ready for that yet.
2024-11-28 10:30:53 +00:00
Richard Bowman
7b584d3e64 Add labthings version constraint 2024-11-16 10:58:31 +00:00
Richard Bowman
7fb4417ebe Configuration files and other tweaks
The OFM server can now be run in "stub" mode on
my development machine, using an OpenCV
camera feed.
2024-08-09 02:42:32 +01:00
Richard Bowman
e3e248c46e Move server config to a config file
Currently this is "just" a LabThings config file.
2024-08-09 01:51:11 +01:00
Richard Bowman
3f92ed8266 Add a stub OpenCV-based camera
This allows the server to run on a laptop, to some extent. I've not tested if this will make the whole
web app work properly.

As StreamingPiCamera2 is hardcoded in various places, this certainly doesn't make cameras totally
interchangeable - but it is a step towards that.
2024-08-09 00:52:31 +01:00
Richard Bowman
3abddc3b39 Fix labthings dependency
I changed the labthings package such that it will
only install the client dependencies by default.
This is now fixed by requiring the [server] extras.
In the future we might split labthings into client
and server packages.
2024-07-18 13:17:26 +01:00
Richard Bowman
bcc13475b6 Propagate logs from camera-stage-mapping 2024-01-04 13:19:00 +00:00
Richard Bowman
deeb2c7b9b Explicitly mention anyio as a dependency
This is already in via fastapi, but I just got caught out by a
v3 -> v4 change. I've added a dependency to make this explicit.
2024-01-03 17:12:15 +00:00
Richard Bowman
968136e22e Add opencv as a dependency 2023-12-14 17:21:22 +00:00
Richard Bowman
796622b802 Relax scipy version 2023-10-31 22:28:47 +00:00
Richard Bowman
63d7a6eb4d WIP: camera stage mapping
This still has some bugs, mostly related to numpy and serialisation.
2023-08-31 19:37:09 +01:00
Richard Bowman
081654533f First images on labthings-fastapi
We now have very basic camera and stage support.
2023-08-29 17:02:16 +01:00
Richard
e33e92b43a Generate and use pytest XML reports
This generates XML reports when we run pytest through poe, and
uploads them in the relevant CI stage.

I've also ignored mypy cache files - I'm not sure why this hasn't
been an issue before...
2021-08-10 11:29:09 +01:00
Richard
fe3fb5c66b Incorporate LabThings 1.3
The necessary changes to produce valid OpenAPI docs are now in
the latest release of LabThings.  This change updates it.

Also, isort was trying to sort my virtual environment, hence
the change to pyproject.toml.
I don't know why that happened - maybe an update to isort?
2021-07-25 22:23:54 +01:00
Richard Bowman
42f00b69a4 Merge remote-tracking branch 'origin/master' into auto-exposure-gain-awb
This was primarily done to disable the warning about f strings in
logging statements, globally rather than per-file.
2021-04-27 17:16:19 +01:00