diff --git a/openflexure_microscope/api/v2/views/actions/stage.py b/openflexure_microscope/api/v2/views/actions/stage.py index d13774ab..20412a6f 100644 --- a/openflexure_microscope/api/v2/views/actions/stage.py +++ b/openflexure_microscope/api/v2/views/actions/stage.py @@ -10,9 +10,9 @@ class MoveStageAPI(ActionView): load_default=False, metadata={"description": "Move to an absolute position", "example": False}, ), - "x": fields.Int(load_default=None, metadata={"example": 100}, allow_none=False), - "y": fields.Int(load_default=None, metadata={"example": 100}, allow_none=False), - "z": fields.Int(load_default=None, metadata={"example": 20}, allow_none=False), + "x": fields.Int(load_default=None, metadata={"example": 100}, allow_none=True), + "y": fields.Int(load_default=None, metadata={"example": 100}, allow_none=True), + "z": fields.Int(load_default=None, metadata={"example": 20}, allow_none=True), } def post(self, args): diff --git a/openflexure_microscope/api/v2/views/stage.py b/openflexure_microscope/api/v2/views/stage.py index bcfec3a9..c6437a24 100644 --- a/openflexure_microscope/api/v2/views/stage.py +++ b/openflexure_microscope/api/v2/views/stage.py @@ -7,7 +7,7 @@ class StageTypeProperty(PropertyView): """The type of the stage""" schema = fields.String( - load_default=None, + load_default="SangaStage", validate=validate.OneOf(["SangaStage", "SangaDeltaStage"]), metadata={ "description": "The translation stage geometry", diff --git a/openflexure_microscope/camera/pi.py b/openflexure_microscope/camera/pi.py index f3a1db16..e46360fa 100644 --- a/openflexure_microscope/camera/pi.py +++ b/openflexure_microscope/camera/pi.py @@ -30,7 +30,7 @@ import logging import time # Type hinting -from typing import BinaryIO, Tuple, Union, Optional +from typing import BinaryIO, Optional, Tuple, Union import numpy as np diff --git a/openflexure_microscope/config.py b/openflexure_microscope/config.py index 8ceed138..b2db8546 100644 --- a/openflexure_microscope/config.py +++ b/openflexure_microscope/config.py @@ -5,7 +5,6 @@ import os import shutil from typing import Optional - from .json import JSONEncoder from .paths import CONFIGURATION_FILE_PATH, SETTINGS_FILE_PATH