Code formatting
This commit is contained in:
parent
0234b20ce3
commit
2bfb988460
60 changed files with 392 additions and 396 deletions
|
|
@ -2,11 +2,11 @@
|
|||
Top-level representation of enabled actions
|
||||
"""
|
||||
from flask import url_for
|
||||
from . import camera, stage, system
|
||||
|
||||
from labthings import current_labthing
|
||||
from labthings.views import View
|
||||
from labthings.utilities import description_from_view
|
||||
from labthings.views import View
|
||||
|
||||
from . import camera, stage, system
|
||||
|
||||
_actions = {
|
||||
"capture": {
|
||||
|
|
|
|||
|
|
@ -1,14 +1,13 @@
|
|||
from openflexure_microscope.api.utilities import get_bool, JsonResponse
|
||||
from labthings.views import View, ActionView
|
||||
from labthings import find_component, fields
|
||||
|
||||
from openflexure_microscope.utilities import filter_dict
|
||||
|
||||
from openflexure_microscope.api.v2.views.captures import CaptureSchema
|
||||
|
||||
import logging
|
||||
import io
|
||||
from flask import request, abort, url_for, redirect, send_file
|
||||
import logging
|
||||
|
||||
from flask import abort, redirect, request, send_file, url_for
|
||||
from labthings import fields, find_component
|
||||
from labthings.views import ActionView, View
|
||||
|
||||
from openflexure_microscope.api.utilities import JsonResponse, get_bool
|
||||
from openflexure_microscope.api.v2.views.captures import CaptureSchema
|
||||
from openflexure_microscope.utilities import filter_dict
|
||||
|
||||
|
||||
class CaptureAPI(ActionView):
|
||||
|
|
@ -58,11 +57,10 @@ class CaptureAPI(ActionView):
|
|||
resize=resize,
|
||||
bayer=args.get("bayer"),
|
||||
annotations=args.get("annotations"),
|
||||
tags=args.get("tags")
|
||||
tags=args.get("tags"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
class RAMCaptureAPI(ActionView):
|
||||
"""
|
||||
Take a non-persistant image capture.
|
||||
|
|
@ -77,12 +75,8 @@ class RAMCaptureAPI(ActionView):
|
|||
missing=None, example={"width": 640, "height": 480}
|
||||
), # TODO: Validate keys
|
||||
}
|
||||
|
||||
responses = {
|
||||
200: {
|
||||
"content_type": "image/jpeg"
|
||||
}
|
||||
}
|
||||
|
||||
responses = {200: {"content_type": "image/jpeg"}}
|
||||
|
||||
def post(self, args):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -1,12 +1,11 @@
|
|||
from openflexure_microscope.api.utilities import JsonResponse
|
||||
from labthings.views import View, ActionView
|
||||
from labthings import find_component, fields
|
||||
|
||||
from openflexure_microscope.utilities import axes_to_array, filter_dict
|
||||
import logging
|
||||
|
||||
from flask import Blueprint, request
|
||||
from labthings import fields, find_component
|
||||
from labthings.views import ActionView, View
|
||||
|
||||
import logging
|
||||
from openflexure_microscope.api.utilities import JsonResponse
|
||||
from openflexure_microscope.utilities import axes_to_array, filter_dict
|
||||
|
||||
|
||||
class MoveStageAPI(ActionView):
|
||||
|
|
@ -65,5 +64,3 @@ class ZeroStageAPI(ActionView):
|
|||
|
||||
# TODO: Make schema for microscope state
|
||||
return microscope.state["stage"]
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
from labthings.views import View, ActionView
|
||||
import subprocess
|
||||
import os
|
||||
import subprocess
|
||||
from sys import platform
|
||||
|
||||
from labthings.views import ActionView, View
|
||||
|
||||
|
||||
def is_raspberrypi(raise_on_errors=False):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue