Commit graph

54 commits

Author SHA1 Message Date
Julian Stirling
7e4ec53d78 Update how the application configuration is read for LabThings 0.0.17 2026-03-04 17:22:03 +00:00
Julian Stirling
45903f92a6 Create and mount application level data direcory rather than just a scan directory 2026-03-04 17:22:03 +00:00
Julian Stirling
742cd6bdf2 Add a fallback page template. 2026-02-20 10:36:19 +00:00
Julian Stirling
015d6c5f03 Developer Mode set from environment variable 2026-02-15 17:11:56 +00:00
Julian Stirling
d4f26e8536 Fix static file check and associated tests 2026-02-15 16:03:06 +00:00
Antonio Anaya
e438b642bd ui_migration lint(fix): ruff format 2026-02-15 02:57:41 -06:00
Antonio Anaya
1b16917542 ui_migration lint(fix): ruff fix 2026-02-15 02:47:04 -06:00
Antonio Anaya
5a62b92f45 ui_migration fix(deps): --preliminary-- --python-- added developer options that add cors options to enable connecting ui from another IP 2026-02-13 19:24:06 -06:00
Julian Stirling
ad53f72a60 Bugfox, stop saving scans into log folder 2026-01-13 18:03:13 +00:00
Julian Stirling
3db83534e8 Update for how Labthings-Fastapi 0.0.14 impements the fallback server 2026-01-09 17:43:11 +00:00
Julian Stirling
141ccc06c1 Some minor type fixes 2026-01-09 15:18:05 +00:00
Julian Stirling
18e89aa148 More typing fixes 2026-01-09 15:18:05 +00:00
Julian Stirling
dec90f5b6b Update legacy_api.py test_sangaboard and test_server_cli so tests pass for labthings-fastapi 0.0.12 2025-12-14 20:53:33 +00:00
Julian Stirling
9ef417971f Remove a load more /names/ 2025-12-14 18:23:33 +00:00
Julian Stirling
bbbfaf8602 Get fallback server working again 2025-12-14 11:33:03 +00:00
Julian Stirling
7bc4c514a6 Autofix import order 2025-12-02 16:26:15 +00:00
Julian Stirling
c7e4160a08 Implement patching base labthings configuration files 2025-10-27 15:07:45 +00:00
Julian Stirling
65f172d650 Stop using print statments or root level loggers 2025-09-18 16:21:45 +01:00
Julian Stirling
338d49f9e6 Remove remaining TODOs in favour of issues 2025-09-18 16:10:36 +01:00
Julian Stirling
4c46330959 Add ANN20X rules to ruff 2025-08-27 18:56:08 +01:00
Julian Stirling
d673196671 Add ANN002, and ANN003 rules 2025-08-27 18:54:16 +01:00
Julian Stirling
2325dced5e Merge branch 'test-server-startup' into 'v3'
Test server startup

See merge request openflexure/openflexure-microscope-server!379
2025-08-27 16:11:34 +00:00
Julian Stirling
2d89cdd3a3 Add tests for the legacy api 2025-08-24 20:45:55 +01:00
Julian Stirling
dade26cde1 Tweak a few error types. 2025-08-21 16:11:30 +01:00
Julian Stirling
3289221c6b Add unit tests for all of serving static files. Update docs in src to clarify behaviour 2025-08-15 11:01:43 +01:00
Julian Stirling
44e24f42a6 Check webapp is available or give useful error 2025-08-15 09:21:38 +01:00
Julian Stirling
98c023032c Allow fonts to cache 2025-08-14 14:45:20 +01:00
jaknapper
025e6b1fba Request no caching for static files like webapp 2025-08-12 18:47:02 +01:00
Julian Stirling
864ca91e5c Add docstrings to all public package 2025-07-10 15:29:10 +01:00
Julian Stirling
14359e73bb Add public method docstrings. 2025-07-10 15:12:28 +01:00
Julian Stirling
2cb4003835 Add module level docstrings. 2025-07-10 09:24:50 +01:00
Julian Stirling
80beeea07b Add punctuation to docstrings 2025-07-10 09:24:50 +01:00
Julian Stirling
4dc41bb008 Single line summaries of docstrings 2025-07-10 09:24:49 +01:00
Julian Stirling
35d47fe3ed Starting docstring on the same lines as the quotations 2025-07-10 09:24:49 +01:00
Julian Stirling
f51dae7b3a Doc strings to imperative mood 2025-07-10 09:24:49 +01:00
Julian Stirling
a84a916719 Restructured text fixes so that pydoctor would return without an error 2025-07-09 23:59:08 +01:00
Julian Stirling
cd6eaf7be7 Apply suggestions from code review of branch pass-portal-to-stop 2025-07-09 21:19:55 +00:00
Julian Stirling
d9fd54696a Monkey patch Uvicorn's handle_exit function to stop streams
Before the uvicorn handle_exit function is called kill the camera
streams.
2025-07-09 16:53:08 +01:00
Julian Stirling
52a80ef66b And adjust for new as lt import 2025-07-07 15:25:14 +01:00
Julian Stirling
cdf23bc403 Add a timeout when shutting down the server.
The browser needs to be closed for graceful shutdown. If the browser
is left open the microscope may never shut down as it is waiting on
the uvicorn process to finish. This causes potential SD card issues.

This forces the server to force shutdown if it doesn't exit gracefully in
2 seconds.
2025-06-19 16:25:43 -04:00
Julian Stirling
3a1c3bb026 Ensure server and config vars always defined before fallback server is started 2025-06-06 12:42:21 +01:00
Julian Stirling
b45f5651ab Add scan directory to json config 2025-06-06 12:21:51 +01:00
Julian Stirling
16317bf94c Merge branch 'fix-simulation' into 'v3'
Simulation fixes

See merge request openflexure/openflexure-microscope-server!279
2025-06-05 10:35:53 +00:00
Joe Knapper
c919f8a19f Logging config based on default uvicorn settings 2025-06-03 14:48:13 +01:00
Julian Stirling
4ef74c42c3 Configure log folder in json file 2025-06-03 14:05:58 +01:00
jaknapper
efe2127afb Mount scans to app on startup 2025-05-23 16:28:21 +01:00
Joe Knapper
a563c634a3 Update serve static files to serve correct directory and to add docstrings 2025-05-15 16:30:37 +00:00
jaknapper
d4b3508b77 Clean up of serve_static_files 2025-05-15 14:10:15 +01:00
Julian Stirling
3a47151694 Serve logfile and logs for UI seperately 2025-04-07 23:45:19 +01:00
Julian Stirling
dd0b30df51 Stop uvicorn.run disabling existing loggers 2025-04-06 15:26:39 +01:00