Draft: Configuration overhaul

Open Richard Bowman requested to merge configuration-overhaul into master

This branch implements a more robust configuration system, intended to make life easier with respect to medical device audits, but also make the server more flexible. Specifically, it will:

  • Use entry points to declare available stage, camera, and extension classes (to allow them to be more easily added by installed Python modules)
  • Load exactly the stage, camera, and extensions defined in the configuration file, and raise an obvious error if these are not present.
  • Implement a clear "fall-back" mechanism that allows extensions to be marked as optional, or allows stage/camera classes to fall back to safe defaults if the hardware won't load. We should discuss exactly how this is done, and how it's specified, in an OFEP.
  • Declare available stage, camera, and extension classes using entry points.
    • built-in stage classes
    • built-in camera classes
    • built-in extensions
  • Load the microscope stage from an entry point defined in the configuration file.
  • Load the camera from an entry point in the configuration file.
  • Load plugins from entry points defined in the configuration file.
  • Implement a fallback server that makes it clear what has gone wrong.

A web app that allows the microscope's configuration to be modified would be really useful - but this is not a prerequisite for merging the current work.

Edited by Richard Bowman

Merge request reports