From 7ba5f6f8ede6522fb1bd3c3efa2444b03d4db3eb Mon Sep 17 00:00:00 2001 From: Enrico Faulhaber Date: Tue, 7 Apr 2020 11:40:11 +0200 Subject: [PATCH] introduce secop.core for easy imports Change-Id: I559d537ba480e1c20f8e11fb259da6e17da53059 Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/22892 Tested-by: JenkinsCodeReview Reviewed-by: Markus Zolliker --- secop/core.py | 37 +++++++++++++++++++++++++++++++++++++ secop_psi/ah2700.py | 2 +- secop_psi/k2601b.py | 2 +- 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 secop/core.py diff --git a/secop/core.py b/secop/core.py new file mode 100644 index 0000000..534868a --- /dev/null +++ b/secop/core.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +# ***************************************************************************** +# Copyright (c) 2015-2016 by the authors, see LICENSE +# +# This program is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along with +# this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# Module authors: +# Alexander Lenz +# Enrico Faulhaber +# Markus Zolliker +# +# ***************************************************************************** + +# allow to import the most important classes from 'secop' + +# pylint: disable=unused-import +from secop.datatypes import FloatRange, IntRange, ScaledInteger, \ + BoolType, EnumType, BLOBType, StringType, TupleOf, ArrayOf, StructOf +from secop.lib.enum import Enum +from secop.modules import Module, Readable, Writable, Drivable, Communicator, Attached +from secop.params import Parameter, Command, Override +from secop.metaclass import Done +from secop.iohandler import IOHandler, IOHandlerBase +from secop.stringio import StringIO, HasIodev +from secop.proxy import SecNode, Proxy, proxy_class diff --git a/secop_psi/ah2700.py b/secop_psi/ah2700.py index 7062434..689b1e1 100644 --- a/secop_psi/ah2700.py +++ b/secop_psi/ah2700.py @@ -20,7 +20,7 @@ # ***************************************************************************** """Andeen Hagerling capacitance bridge""" -from secop import Readable, Parameter, Override, FloatRange, HasIodev, StringIO, Done +from secop.core import Readable, Parameter, Override, FloatRange, HasIodev, StringIO, Done class Ah2700IO(StringIO): diff --git a/secop_psi/k2601b.py b/secop_psi/k2601b.py index e9b6600..d7f818b 100644 --- a/secop_psi/k2601b.py +++ b/secop_psi/k2601b.py @@ -22,7 +22,7 @@ not tested yet""" -from secop import Writable, Module, Parameter, Override, Attached,\ +from secop.core import Writable, Module, Parameter, Override, Attached,\ BoolType, FloatRange, EnumType, HasIodev, StringIO