fix isort
Change-Id: I5486e1f9b3143c6bb0804c49c7ca21adb9b84de1 Reviewed-on: https://forge.frm2.tum.de/review/19524 Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de> Tested-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
This commit is contained in:
@ -21,10 +21,12 @@
|
||||
#
|
||||
# *****************************************************************************
|
||||
|
||||
from __future__ import division, print_function
|
||||
|
||||
import os
|
||||
from os import path
|
||||
|
||||
import markdown
|
||||
import codecs
|
||||
|
||||
BASE_PATH = path.abspath(path.join(path.dirname(__file__), '..'))
|
||||
DOC_SRC = path.join(BASE_PATH, 'doc')
|
||||
@ -55,7 +57,7 @@ for dirpath, dirnames, filenames in os.walk(DOC_SRC):
|
||||
# treat .md files special
|
||||
final_sub_name = path.splitext(sub_name)[0] + '.html'
|
||||
final_name = path.join(DOC_DST, final_sub_name)
|
||||
print "Converting", sub_name, "to", final_sub_name
|
||||
print("Converting %s to %s" %(sub_name, final_sub_name))
|
||||
# transform one file
|
||||
conv.reset()
|
||||
conv.convertFile(input=full_name,
|
||||
|
@ -21,17 +21,26 @@
|
||||
# *****************************************************************************
|
||||
"""Define Client side proxies"""
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import division, print_function
|
||||
|
||||
import json
|
||||
import socket
|
||||
from select import select
|
||||
import threading
|
||||
from collections import OrderedDict
|
||||
|
||||
import time
|
||||
from collections import OrderedDict
|
||||
from select import select
|
||||
|
||||
import mlzlog
|
||||
import serial
|
||||
|
||||
from secop.datatypes import CommandType, EnumType, get_datatype
|
||||
#from secop.protocol.encoding import ENCODERS
|
||||
#from secop.protocol.framing import FRAMERS
|
||||
#from secop.protocol.messages import *
|
||||
from secop.errors import EXCEPTIONS
|
||||
from secop.lib import formatException, formatExtendedStack, mkthread
|
||||
from secop.lib.parsing import format_time, parse_time
|
||||
|
||||
try:
|
||||
# py3
|
||||
import queue
|
||||
@ -39,15 +48,7 @@ except ImportError:
|
||||
# py2
|
||||
import Queue as queue
|
||||
|
||||
import mlzlog
|
||||
|
||||
from secop.datatypes import get_datatype, EnumType, CommandType
|
||||
from secop.lib import mkthread, formatException, formatExtendedStack
|
||||
from secop.lib.parsing import parse_time, format_time
|
||||
#from secop.protocol.encoding import ENCODERS
|
||||
#from secop.protocol.framing import FRAMERS
|
||||
#from secop.protocol.messages import *
|
||||
from secop.errors import EXCEPTIONS
|
||||
|
||||
|
||||
class TCPConnection(object):
|
||||
|
@ -21,7 +21,13 @@
|
||||
# *****************************************************************************
|
||||
"""Define validated data types."""
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import division, print_function
|
||||
|
||||
from base64 import b64decode, b64encode
|
||||
|
||||
from secop.errors import ProgrammingError, ProtocolError
|
||||
from secop.lib.enum import Enum
|
||||
from secop.parse import Parser
|
||||
|
||||
try:
|
||||
# py2
|
||||
@ -30,11 +36,7 @@ except NameError:
|
||||
# py3
|
||||
unicode = str # pylint: disable=redefined-builtin
|
||||
|
||||
from base64 import b64encode, b64decode
|
||||
|
||||
from secop.lib.enum import Enum
|
||||
from secop.errors import ProgrammingError, ProtocolError
|
||||
from secop.parse import Parser
|
||||
|
||||
|
||||
Parser = Parser()
|
||||
|
@ -21,6 +21,8 @@
|
||||
# *****************************************************************************
|
||||
"""Define (internal) SECoP Errors"""
|
||||
|
||||
from __future__ import division, print_function
|
||||
|
||||
|
||||
class SECoPError(RuntimeError):
|
||||
|
||||
|
@ -21,11 +21,13 @@
|
||||
# *****************************************************************************
|
||||
"""Define Mixin Features for real Modules implemented in the server"""
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import division, print_function
|
||||
|
||||
from secop.datatypes import EnumType, TupleOf, StringType, FloatRange, StructOf, ArrayOf, BoolType
|
||||
from secop.modules import Parameter, Command
|
||||
from secop.datatypes import (ArrayOf, BoolType, EnumType, FloatRange,
|
||||
StringType, StructOf, TupleOf)
|
||||
from secop.metaclass import ModuleMeta, add_metaclass
|
||||
from secop.modules import Command, Parameter
|
||||
|
||||
|
||||
@add_metaclass(ModuleMeta)
|
||||
class Feature(object):
|
||||
|
@ -21,19 +21,17 @@
|
||||
#
|
||||
# *****************************************************************************
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import division, print_function
|
||||
|
||||
import sys
|
||||
|
||||
from secop.gui.qt import QMainWindow, QInputDialog, QTreeWidgetItem, QMessageBox, \
|
||||
pyqtSlot, QObject, pyqtSignal
|
||||
|
||||
from secop.gui.util import loadUi
|
||||
from secop.gui.nodectrl import NodeCtrl
|
||||
from secop.gui.modulectrl import ModuleCtrl
|
||||
from secop.gui.paramview import ParameterView
|
||||
from secop.client.baseclient import Client as SECNode
|
||||
|
||||
from secop.gui.modulectrl import ModuleCtrl
|
||||
from secop.gui.nodectrl import NodeCtrl
|
||||
from secop.gui.paramview import ParameterView
|
||||
from secop.gui.qt import (QInputDialog, QMainWindow, QMessageBox, QObject,
|
||||
QTreeWidgetItem, pyqtSignal, pyqtSlot)
|
||||
from secop.gui.util import loadUi
|
||||
|
||||
ITEM_TYPE_NODE = QTreeWidgetItem.UserType + 1
|
||||
ITEM_TYPE_GROUP = QTreeWidgetItem.UserType + 2
|
||||
|
@ -22,12 +22,12 @@
|
||||
# *****************************************************************************
|
||||
|
||||
|
||||
from __future__ import division, print_function
|
||||
|
||||
from os import path
|
||||
|
||||
from secop.gui.qt import Qt, QColor, QWidget, QSize, \
|
||||
QBrush, QPainter, QPolygonF, QPointF, QPen, QRectF
|
||||
|
||||
|
||||
from secop.gui.qt import (QBrush, QColor, QPainter, QPen, QPointF, QPolygonF,
|
||||
QRectF, QSize, Qt, QWidget)
|
||||
|
||||
_magenta = QBrush(QColor('#A12F86'))
|
||||
_yellow = QBrush(QColor('yellow'))
|
||||
|
@ -22,7 +22,13 @@
|
||||
#
|
||||
# *****************************************************************************
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import division, print_function
|
||||
|
||||
from secop.gui.params import ParameterView
|
||||
from secop.gui.qt import QCheckBox, QDialog, QLabel, QMessageBox, QPushButton, \
|
||||
QSizePolicy, QWidget
|
||||
from secop.gui.util import loadUi
|
||||
from secop.gui.valuewidgets import get_widget
|
||||
|
||||
try:
|
||||
# py2
|
||||
@ -31,15 +37,12 @@ except NameError:
|
||||
# py3
|
||||
unicode = str # pylint: disable=redefined-builtin
|
||||
|
||||
from secop.gui.util import loadUi
|
||||
from secop.gui.params import ParameterView
|
||||
|
||||
|
||||
#from secop.datatypes import ...
|
||||
|
||||
from secop.gui.qt import QDialog, QLabel, QCheckBox, QWidget, QMessageBox, \
|
||||
QPushButton, QSizePolicy
|
||||
|
||||
from secop.gui.valuewidgets import get_widget
|
||||
|
||||
|
||||
|
||||
class CommandDialog(QDialog):
|
||||
|
@ -21,7 +21,17 @@
|
||||
#
|
||||
# *****************************************************************************
|
||||
|
||||
from __future__ import print_function, division
|
||||
from __future__ import division, print_function
|
||||
|
||||
import json
|
||||
import pprint
|
||||
from time import sleep
|
||||
|
||||
from secop.datatypes import EnumType, StringType
|
||||
from secop.errors import SECoPError
|
||||
from secop.gui.qt import (QFont, QFontMetrics, QLabel, QMessageBox,
|
||||
QTextCursor, QWidget, pyqtSlot, toHtmlEscaped)
|
||||
from secop.gui.util import loadUi
|
||||
|
||||
try:
|
||||
# py2
|
||||
@ -29,16 +39,8 @@ try:
|
||||
except NameError:
|
||||
unicode = str # pylint: disable=redefined-builtin
|
||||
|
||||
import pprint
|
||||
import json
|
||||
from time import sleep
|
||||
|
||||
from secop.gui.qt import QWidget, QTextCursor, QFont, QFontMetrics, QLabel, \
|
||||
QMessageBox, pyqtSlot, toHtmlEscaped
|
||||
|
||||
from secop.gui.util import loadUi
|
||||
from secop.errors import SECoPError
|
||||
from secop.datatypes import StringType, EnumType
|
||||
|
||||
|
||||
class NodeCtrl(QWidget):
|
||||
|
@ -33,12 +33,13 @@ from secop.gui.qt import QWidget, QLabel, QPushButton as QButton, QLineEdit, \
|
||||
QMessageBox, QCheckBox, QSizePolicy, Qt, pyqtSignal, pyqtSlot
|
||||
|
||||
from secop.gui.util import loadUi
|
||||
from secop.datatypes import EnumType
|
||||
from secop.datatypes import EnumType, FloatRange, IntRange
|
||||
from secop.lib import formatExtendedStack
|
||||
|
||||
|
||||
class ParameterWidget(QWidget):
|
||||
setRequested = pyqtSignal(str, str, object) # module, parameter, target
|
||||
plotRequested = pyqtSignal(str, str) # module, parameter
|
||||
cmdRequested = pyqtSignal(str, str, list) # module, command, args
|
||||
|
||||
def __init__(self,
|
||||
|
@ -21,6 +21,8 @@
|
||||
#
|
||||
# *****************************************************************************
|
||||
|
||||
from __future__ import division, print_function
|
||||
|
||||
try:
|
||||
# py2
|
||||
unicode(u'')
|
||||
@ -28,8 +30,7 @@ except NameError:
|
||||
# py3
|
||||
unicode = str # pylint: disable=redefined-builtin
|
||||
|
||||
from secop.gui.qt import QWidget, QLabel, QSizePolicy
|
||||
|
||||
from secop.gui.qt import QLabel, QSizePolicy, QWidget
|
||||
from secop.gui.util import loadUi
|
||||
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
"""Import needed stuff from PyQt4/PyQt5"""
|
||||
|
||||
# pylint: disable=unused-import
|
||||
from __future__ import print_function
|
||||
from __future__ import division, print_function
|
||||
|
||||
import sys
|
||||
|
||||
|
@ -21,6 +21,8 @@
|
||||
#
|
||||
# *****************************************************************************
|
||||
|
||||
from __future__ import division, print_function
|
||||
|
||||
from os import path
|
||||
|
||||
from secop.gui.qt import uic
|
||||
|
@ -21,18 +21,15 @@
|
||||
#
|
||||
# *****************************************************************************
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
from secop.datatypes import FloatRange, IntRange, StringType, BLOBType, \
|
||||
EnumType, BoolType, TupleOf, StructOf, ArrayOf
|
||||
|
||||
from secop.gui.qt import QDialog, QLabel, QLineEdit,\
|
||||
QGroupBox, QSpinBox, QDoubleSpinBox, QComboBox, QCheckBox, \
|
||||
QVBoxLayout, QGridLayout, QFrame
|
||||
from __future__ import division, print_function
|
||||
|
||||
from secop.datatypes import (ArrayOf, BLOBType, BoolType, EnumType, FloatRange,
|
||||
IntRange, StringType, StructOf, TupleOf)
|
||||
from secop.gui.qt import (QCheckBox, QComboBox, QDialog, QDoubleSpinBox,
|
||||
QFrame, QGridLayout, QGroupBox, QLabel, QLineEdit,
|
||||
QSpinBox, QVBoxLayout)
|
||||
from secop.gui.util import loadUi
|
||||
|
||||
|
||||
# XXX: implement live validators !!!!
|
||||
|
||||
class StringWidget(QLineEdit):
|
||||
|
@ -22,6 +22,8 @@
|
||||
# *****************************************************************************
|
||||
"""Enum class"""
|
||||
|
||||
from __future__ import division, print_function
|
||||
|
||||
__ALL__ = ['Enum']
|
||||
|
||||
try:
|
||||
|
@ -21,9 +21,11 @@
|
||||
# *****************************************************************************
|
||||
"""Define parsing helpers"""
|
||||
|
||||
from __future__ import division, print_function
|
||||
|
||||
import re
|
||||
import time
|
||||
from datetime import tzinfo, timedelta, datetime
|
||||
from datetime import datetime, timedelta, tzinfo
|
||||
|
||||
# format_time and parse_time could be simplified with external dateutil lib
|
||||
# http://stackoverflow.com/a/15228038
|
||||
|
@ -20,8 +20,11 @@
|
||||
#
|
||||
# *****************************************************************************
|
||||
"""Define pidfile helpers"""
|
||||
import os
|
||||
from __future__ import division, print_function
|
||||
|
||||
import atexit
|
||||
import os
|
||||
|
||||
import psutil
|
||||
|
||||
|
||||
|
@ -23,10 +23,12 @@
|
||||
|
||||
"""Utilities for modules that require sequenced actions on value change."""
|
||||
|
||||
from __future__ import division, print_function
|
||||
|
||||
from time import sleep
|
||||
|
||||
from secop.lib import mkthread
|
||||
from secop.errors import IsBusyError
|
||||
from secop.lib import mkthread
|
||||
|
||||
|
||||
class Namespace(object):
|
||||
|
@ -21,9 +21,15 @@
|
||||
# *****************************************************************************
|
||||
"""Define Metaclass for Modules/Features"""
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import division, print_function
|
||||
|
||||
import time
|
||||
from collections import OrderedDict
|
||||
|
||||
from secop.datatypes import EnumType
|
||||
from secop.errors import ProgrammingError
|
||||
from secop.params import Command, Override, Parameter
|
||||
|
||||
try:
|
||||
# pylint: disable=unused-import
|
||||
from six import add_metaclass # for py2/3 compat
|
||||
@ -44,11 +50,7 @@ except ImportError:
|
||||
return metaclass(cls.__name__, cls.__bases__, orig_vars)
|
||||
return wrapper
|
||||
|
||||
import time
|
||||
|
||||
from secop.errors import ProgrammingError
|
||||
from secop.datatypes import EnumType
|
||||
from secop.params import Parameter, Override, Command
|
||||
|
||||
EVENT_ONLY_ON_CHANGED_VALUES = True
|
||||
|
||||
|
@ -21,22 +21,26 @@
|
||||
# *****************************************************************************
|
||||
"""Define Baseclasses for real Modules implemented in the server"""
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import division, print_function
|
||||
|
||||
import sys
|
||||
import time
|
||||
|
||||
from secop.datatypes import (EnumType, FloatRange, StringType, TupleOf,
|
||||
get_datatype)
|
||||
from secop.errors import ConfigError
|
||||
from secop.lib import (formatException, formatExtendedStack, mkthread,
|
||||
unset_value)
|
||||
from secop.lib.enum import Enum
|
||||
from secop.metaclass import ModuleMeta, add_metaclass
|
||||
from secop.params import Command, Override, Parameter
|
||||
|
||||
# XXX: connect with 'protocol'-Modules.
|
||||
# Idea: every Module defined herein is also a 'protocol'-Module,
|
||||
# all others MUST derive from those, the 'interface'-class is still derived
|
||||
# from these base classes (how to do this?)
|
||||
|
||||
import sys
|
||||
import time
|
||||
|
||||
from secop.lib import formatExtendedStack, mkthread, unset_value, formatException
|
||||
from secop.lib.enum import Enum
|
||||
from secop.errors import ConfigError
|
||||
from secop.datatypes import EnumType, TupleOf, StringType, FloatRange, get_datatype
|
||||
from secop.metaclass import add_metaclass, ModuleMeta
|
||||
from secop.params import Command, Parameter, Override
|
||||
|
||||
|
||||
@add_metaclass(ModuleMeta)
|
||||
|
@ -21,9 +21,11 @@
|
||||
# *****************************************************************************
|
||||
"""Define classes for Parameters/Commands and Overriding them"""
|
||||
|
||||
from secop.lib import unset_value
|
||||
from __future__ import division, print_function
|
||||
|
||||
from secop.datatypes import CommandType, DataType
|
||||
from secop.errors import ProgrammingError
|
||||
from secop.datatypes import DataType, CommandType
|
||||
from secop.lib import unset_value
|
||||
|
||||
EVENT_ONLY_ON_CHANGED_VALUES = False
|
||||
|
||||
|
@ -36,7 +36,7 @@ text -> string
|
||||
|
||||
further convertions are done by the validator of the datatype....
|
||||
"""
|
||||
from __future__ import print_function
|
||||
from __future__ import division, print_function
|
||||
|
||||
from collections import OrderedDict
|
||||
|
||||
|
@ -21,6 +21,8 @@
|
||||
# *****************************************************************************
|
||||
"""Pathes. how to find what and where..."""
|
||||
|
||||
from __future__ import division, print_function
|
||||
|
||||
import sys
|
||||
from os import path
|
||||
|
||||
|
@ -36,20 +36,19 @@ Interface to the modules:
|
||||
- remove_module(modulename_or_obj): removes the module (during shutdown)
|
||||
|
||||
"""
|
||||
from __future__ import print_function
|
||||
from __future__ import division, print_function
|
||||
|
||||
from time import time as currenttime
|
||||
import threading
|
||||
from time import time as currenttime
|
||||
|
||||
from secop.protocol.messages import EVENTREPLY, IDENTREQUEST, IDENTREPLY, \
|
||||
ENABLEEVENTSREPLY, DESCRIPTIONREPLY, WRITEREPLY, COMMANDREPLY, \
|
||||
DISABLEEVENTSREPLY, HEARTBEATREPLY
|
||||
|
||||
from secop.errors import NoSuchModuleError, NoSuchCommandError, \
|
||||
NoSuchParameterError, BadValueError, ReadOnlyError, \
|
||||
ProtocolError, SECoPServerError as InternalError
|
||||
|
||||
from secop.errors import SECoPServerError as InternalError
|
||||
from secop.errors import (BadValueError, NoSuchCommandError, NoSuchModuleError,
|
||||
NoSuchParameterError, ProtocolError, ReadOnlyError)
|
||||
from secop.params import Parameter
|
||||
from secop.protocol.messages import (COMMANDREPLY, DESCRIPTIONREPLY,
|
||||
DISABLEEVENTSREPLY, ENABLEEVENTSREPLY,
|
||||
EVENTREPLY, HEARTBEATREPLY, IDENTREPLY,
|
||||
IDENTREQUEST, WRITEREPLY)
|
||||
|
||||
try:
|
||||
unicode('a')
|
||||
|
@ -19,21 +19,23 @@
|
||||
#
|
||||
# *****************************************************************************
|
||||
"""provides tcp interface to the SECoP Server"""
|
||||
from __future__ import print_function
|
||||
from __future__ import division, print_function
|
||||
|
||||
import sys
|
||||
import socket
|
||||
import collections
|
||||
import socket
|
||||
import sys
|
||||
|
||||
from secop.errors import SECoPError
|
||||
from secop.lib import (formatException, formatExtendedStack,
|
||||
formatExtendedTraceback)
|
||||
from secop.protocol.interface import decode_msg, encode_msg_frame, get_msg
|
||||
from secop.protocol.messages import HELPREPLY, HELPREQUEST, HelpMessage
|
||||
|
||||
try:
|
||||
import socketserver # py3
|
||||
except ImportError:
|
||||
import SocketServer as socketserver # py2
|
||||
|
||||
from secop.lib import formatExtendedStack, formatException, formatExtendedTraceback
|
||||
from secop.protocol.messages import HELPREQUEST, HELPREPLY, HelpMessage
|
||||
from secop.errors import SECoPError
|
||||
from secop.protocol.interface import encode_msg_frame, get_msg, decode_msg
|
||||
|
||||
|
||||
DEF_PORT = 10767
|
||||
|
@ -21,6 +21,8 @@
|
||||
# *****************************************************************************
|
||||
"""provide a zmq server"""
|
||||
|
||||
from __future__ import division, print_function
|
||||
|
||||
# tbd.
|
||||
|
||||
# use zmq frames??
|
||||
|
@ -20,7 +20,7 @@
|
||||
#
|
||||
# *****************************************************************************
|
||||
"""Define SECoP Messages"""
|
||||
from __future__ import print_function
|
||||
from __future__ import division, print_function
|
||||
|
||||
# allowed actions:
|
||||
|
||||
|
@ -21,14 +21,19 @@
|
||||
#
|
||||
# *****************************************************************************
|
||||
"""Define helpers"""
|
||||
from __future__ import print_function
|
||||
from __future__ import division, print_function
|
||||
|
||||
import os
|
||||
import ast
|
||||
import time
|
||||
import os
|
||||
import threading
|
||||
import time
|
||||
from collections import OrderedDict
|
||||
|
||||
from daemon import DaemonContext
|
||||
|
||||
from secop.errors import ConfigError
|
||||
from secop.lib import formatException, get_class, getGeneralConfig
|
||||
|
||||
try:
|
||||
import configparser # py3
|
||||
except ImportError:
|
||||
@ -39,15 +44,12 @@ try:
|
||||
except ImportError:
|
||||
from Queue import Queue # py 2
|
||||
|
||||
from daemon import DaemonContext
|
||||
|
||||
try:
|
||||
import daemon.pidlockfile as pidlockfile
|
||||
except ImportError:
|
||||
import daemon.pidfile as pidlockfile
|
||||
|
||||
from secop.lib import get_class, formatException, getGeneralConfig
|
||||
from secop.errors import ConfigError
|
||||
|
||||
|
||||
|
||||
|
@ -21,12 +21,14 @@
|
||||
# *****************************************************************************
|
||||
"""Define Simulation classes"""
|
||||
|
||||
from __future__ import division, print_function
|
||||
|
||||
import random
|
||||
from time import sleep
|
||||
|
||||
from secop.modules import Module, Readable, Writable, Drivable, Parameter
|
||||
from secop.lib import mkthread
|
||||
from secop.datatypes import FloatRange
|
||||
from secop.lib import mkthread
|
||||
from secop.modules import Drivable, Module, Parameter, Readable, Writable
|
||||
|
||||
|
||||
class SimBase(object):
|
||||
|
@ -23,10 +23,10 @@
|
||||
#
|
||||
# *****************************************************************************
|
||||
|
||||
from __future__ import print_function
|
||||
from __future__ import division, print_function
|
||||
|
||||
import os.path
|
||||
from subprocess import Popen, PIPE
|
||||
from subprocess import PIPE, Popen
|
||||
|
||||
__all__ = ['get_version']
|
||||
|
||||
|
@ -20,13 +20,15 @@
|
||||
# *****************************************************************************
|
||||
"""playing implementation of a (simple) simulated cryostat"""
|
||||
|
||||
from math import atan
|
||||
import time
|
||||
import random
|
||||
from __future__ import division, print_function
|
||||
|
||||
from secop.modules import Drivable, Command, Parameter
|
||||
from secop.datatypes import FloatRange, EnumType, TupleOf
|
||||
import random
|
||||
import time
|
||||
from math import atan
|
||||
|
||||
from secop.datatypes import EnumType, FloatRange, TupleOf
|
||||
from secop.lib import clamp, mkthread
|
||||
from secop.modules import Command, Drivable, Parameter
|
||||
|
||||
|
||||
class CryoBase(Drivable):
|
||||
|
@ -20,13 +20,16 @@
|
||||
# *****************************************************************************
|
||||
"""testing devices"""
|
||||
|
||||
import time
|
||||
from __future__ import division, print_function
|
||||
|
||||
import random
|
||||
import threading
|
||||
import time
|
||||
|
||||
from secop.datatypes import (ArrayOf, BoolType, EnumType, FloatRange, IntRange,
|
||||
StringType, StructOf, TupleOf)
|
||||
from secop.lib.enum import Enum
|
||||
from secop.modules import Readable, Drivable, Parameter, Override
|
||||
from secop.datatypes import EnumType, FloatRange, IntRange, ArrayOf, StringType, TupleOf, StructOf, BoolType
|
||||
from secop.modules import Drivable, Override, Parameter, Readable
|
||||
|
||||
|
||||
class Switch(Drivable):
|
||||
|
@ -20,6 +20,8 @@
|
||||
# *****************************************************************************
|
||||
"""testing devices"""
|
||||
|
||||
from __future__ import division, print_function
|
||||
|
||||
try:
|
||||
# py2
|
||||
unicode
|
||||
@ -29,8 +31,8 @@ except NameError:
|
||||
|
||||
import random
|
||||
|
||||
from secop.modules import Readable, Drivable, Communicator, Parameter
|
||||
from secop.datatypes import FloatRange, StringType
|
||||
from secop.modules import Communicator, Drivable, Parameter, Readable
|
||||
|
||||
|
||||
class LN2(Readable):
|
||||
|
@ -20,10 +20,10 @@
|
||||
#
|
||||
# *****************************************************************************
|
||||
|
||||
from __future__ import absolute_import
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
from secop.datatypes import EnumType, FloatRange, StringType
|
||||
from secop.modules import Readable, Drivable, Parameter
|
||||
from secop.modules import Drivable, Parameter, Readable
|
||||
|
||||
try:
|
||||
from pvaccess import Channel # import EPIVSv4 functionallity, PV access
|
||||
|
@ -25,12 +25,14 @@
|
||||
|
||||
# partially borrowed from nicos
|
||||
|
||||
from __future__ import division, print_function
|
||||
|
||||
import math
|
||||
|
||||
from secop.datatypes import ArrayOf, FloatRange, StringType, StructOf, TupleOf
|
||||
from secop.errors import ConfigError, DisabledError
|
||||
from secop.lib.sequence import SequencerMixin, Step
|
||||
from secop.datatypes import StringType, TupleOf, FloatRange, ArrayOf, StructOf
|
||||
from secop.errors import DisabledError, ConfigError
|
||||
from secop.modules import Parameter, Drivable
|
||||
from secop.modules import Drivable, Parameter
|
||||
|
||||
|
||||
class GarfieldMagnet(SequencerMixin, Drivable):
|
||||
|
@ -27,21 +27,23 @@
|
||||
Here we support devices which fulfill the official
|
||||
MLZ TANGO interface for the respective device classes.
|
||||
"""
|
||||
from __future__ import division
|
||||
from __future__ import division, print_function
|
||||
|
||||
import re
|
||||
from time import sleep, time as currenttime
|
||||
import threading
|
||||
from time import time as currenttime
|
||||
from time import sleep
|
||||
|
||||
import PyTango
|
||||
|
||||
from secop.lib import lazy_property
|
||||
#from secop.parse import Parser
|
||||
from secop.datatypes import IntRange, FloatRange, StringType, TupleOf, \
|
||||
ArrayOf, EnumType
|
||||
from secop.errors import ConfigError, ProgrammingError, CommunicationFailedError, \
|
||||
HardwareError
|
||||
from secop.modules import Parameter, Command, Override, Module, Readable, Drivable
|
||||
from secop.datatypes import (ArrayOf, EnumType, FloatRange, IntRange,
|
||||
StringType, TupleOf)
|
||||
from secop.errors import (CommunicationFailedError, ConfigError, HardwareError,
|
||||
ProgrammingError)
|
||||
from secop.lib import lazy_property
|
||||
from secop.modules import (Command, Drivable, Module, Override, Parameter,
|
||||
Readable)
|
||||
|
||||
#####
|
||||
|
||||
|
8
setup.py
8
setup.py
@ -22,13 +22,15 @@
|
||||
#
|
||||
# *****************************************************************************
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
from os import path, listdir
|
||||
from __future__ import division, print_function
|
||||
|
||||
from glob import glob
|
||||
from os import listdir, path
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
import secop.version
|
||||
|
||||
|
||||
scripts = glob(path.join('bin', 'secop-*'))
|
||||
|
||||
uidir = path.join(path.dirname(__file__), 'secop', 'gui', 'ui')
|
||||
|
@ -1,4 +1,6 @@
|
||||
# content of conftest.py
|
||||
from __future__ import division, print_function
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
@ -15,5 +17,6 @@ def constants():
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
# pylint: disable=redefined-builtin
|
||||
def globals():
|
||||
return dict()
|
||||
|
@ -20,18 +20,21 @@
|
||||
#
|
||||
# *****************************************************************************
|
||||
"""test base client."""
|
||||
from __future__ import print_function
|
||||
from __future__ import division, print_function
|
||||
|
||||
import sys
|
||||
from os import path
|
||||
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))
|
||||
|
||||
from collections import OrderedDict
|
||||
from os import path
|
||||
|
||||
import pytest
|
||||
|
||||
from secop.client.baseclient import Client
|
||||
|
||||
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))
|
||||
|
||||
|
||||
|
||||
|
||||
# define Test-only connection object
|
||||
|
||||
|
||||
|
@ -21,17 +21,22 @@
|
||||
# *****************************************************************************
|
||||
"""test data types."""
|
||||
|
||||
from __future__ import division, print_function
|
||||
|
||||
import sys
|
||||
from os import path
|
||||
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))
|
||||
|
||||
# no fixtures needed
|
||||
import pytest
|
||||
|
||||
from secop.datatypes import (ArrayOf, BLOBType, BoolType, DataType, EnumType,
|
||||
FloatRange, IntRange, ProgrammingError,
|
||||
StringType, StructOf, TupleOf, get_datatype)
|
||||
|
||||
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))
|
||||
|
||||
|
||||
|
||||
from secop.datatypes import DataType, FloatRange, IntRange, \
|
||||
EnumType, BLOBType, StringType, BoolType, ArrayOf, TupleOf, StructOf, \
|
||||
get_datatype, ProgrammingError
|
||||
|
||||
|
||||
def test_DataType():
|
||||
|
@ -21,15 +21,20 @@
|
||||
# *****************************************************************************
|
||||
"""test Enum type."""
|
||||
|
||||
from __future__ import division, print_function
|
||||
|
||||
import sys
|
||||
from os import path
|
||||
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))
|
||||
|
||||
# no fixtures needed
|
||||
import pytest
|
||||
|
||||
from secop.lib.enum import Enum, EnumMember
|
||||
|
||||
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))
|
||||
|
||||
|
||||
|
||||
from secop.lib.enum import EnumMember, Enum
|
||||
|
||||
|
||||
def test_EnumMember():
|
||||
|
@ -20,25 +20,28 @@
|
||||
#
|
||||
# *****************************************************************************
|
||||
"""test data types."""
|
||||
from __future__ import print_function
|
||||
from __future__ import division, print_function
|
||||
|
||||
import sys
|
||||
from os import path
|
||||
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))
|
||||
|
||||
# no fixtures needed
|
||||
import pytest
|
||||
|
||||
from secop.datatypes import BoolType, EnumType
|
||||
from secop.metaclass import ModuleMeta
|
||||
from secop.modules import Communicator, Drivable, Module, Readable, Writable
|
||||
from secop.params import Command, Override, Parameter
|
||||
|
||||
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))
|
||||
|
||||
|
||||
try:
|
||||
import Queue as queue
|
||||
except ImportError:
|
||||
import queue as queue
|
||||
|
||||
from secop.datatypes import BoolType, EnumType
|
||||
|
||||
from secop.metaclass import ModuleMeta
|
||||
from secop.params import Command, Parameter, Override
|
||||
from secop.modules import Module, Readable, Writable, Drivable, Communicator
|
||||
|
||||
|
||||
def test_Communicator():
|
||||
|
@ -21,17 +21,22 @@
|
||||
# *****************************************************************************
|
||||
"""test data types."""
|
||||
|
||||
from __future__ import division, print_function
|
||||
|
||||
import sys
|
||||
from os import path
|
||||
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))
|
||||
|
||||
# no fixtures needed
|
||||
import pytest
|
||||
|
||||
|
||||
from secop.datatypes import BoolType
|
||||
from secop.params import Command, Override, Parameter
|
||||
|
||||
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))
|
||||
|
||||
|
||||
|
||||
|
||||
from secop.params import Command, Parameter, Override
|
||||
|
||||
|
||||
def test_Command():
|
||||
|
@ -21,16 +21,21 @@
|
||||
# *****************************************************************************
|
||||
"""test data types."""
|
||||
|
||||
import sys
|
||||
from os import path
|
||||
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))
|
||||
from __future__ import division, print_function
|
||||
|
||||
import sys
|
||||
from collections import OrderedDict
|
||||
from os import path
|
||||
|
||||
import pytest
|
||||
|
||||
from secop.parse import Parser
|
||||
|
||||
sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..')))
|
||||
|
||||
|
||||
|
||||
|
||||
# pylint: disable=redefined-outer-name
|
||||
@pytest.fixture(scope="module")
|
||||
def parser():
|
||||
|
@ -1,3 +1,5 @@
|
||||
from __future__ import division, print_function
|
||||
|
||||
|
||||
def test_assert():
|
||||
assert 1
|
||||
|
Reference in New Issue
Block a user