Merge branch 'Update-WoT-links' into 'sangaboard-v4'

Update swagger with links to WoT documentation

See merge request openflexure/openflexure-microscope-server!155
This commit is contained in:
Richard Bowman 2023-03-22 10:37:47 +00:00
commit d948d3f04d
6 changed files with 13 additions and 11 deletions

View file

@ -2,6 +2,7 @@
## New features
* Background detection can now be used in scans, if you have the background-detect extension. ([!153](https://gitlab.com/openflexure/openflexure-microscope-server/-/merge_requests/153))
* Support for Sangaboard firmware v1, via updated `sangaboard` dependency ([!154](https://gitlab.com/openflexure/openflexure-microscope-server/-/merge_requests/154))
* Fixed links in the OpenAPI documentation describing actions etc. ([!155](https://gitlab.com/openflexure/openflexure-microscope-server/-/merge_requests/154))
# [v2.10.1](https://gitlab.com/openflexure/openflexure-microscope-server/compare/v2.10.0...v2.10.1) (2022-01-17)
## Bug fixes

View file

@ -8,8 +8,8 @@ API_TAGS = [
"embedded in the JSON action description."
),
"externalDocs": {
"url": "https://iot.mozilla.org/wot/#action-resource",
"description": "Mozilla's description of Web of Things 'Action' resources.",
"url": "https://www.w3.org/TR/wot-thing-description/#actionaffordance",
"description": "w3's description of Web of Things 'Action' resources.",
},
},
{
@ -19,8 +19,8 @@ API_TAGS = [
"state of the microscope."
),
"externalDocs": {
"url": "https://iot.mozilla.org/wot/#property-resource",
"description": "Mozilla's description of Web of Things 'Property' resources.",
"url": "https://www.w3.org/TR/wot-thing-description/#propertyaffordance",
"description": "w3's description of Web of Things 'Property' resources.",
},
},
{"name": "captures", "description": ""},

View file

@ -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):

View file

@ -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",

View file

@ -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
@ -307,7 +307,9 @@ class PiCameraStreamer(BaseCamera):
self.picamera.zoom = new_fov
def start_preview(
self, fullscreen: bool = True, window: Optional[Tuple[int, int, int, int]] = None
self,
fullscreen: bool = True,
window: Optional[Tuple[int, int, int, int]] = None,
):
"""Start the on board GPU camera preview."""
with self.lock(timeout=1):

View file

@ -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