From 7f166a5b8c902d1b16c6682a76b12c37e1416d68 Mon Sep 17 00:00:00 2001 From: Alexander Zaft Date: Tue, 8 Nov 2022 08:09:41 +0100 Subject: [PATCH] Rename from secop to frappy debian/ is still missing, will follow in next commit. Fixes: #4626 Change-Id: Ia87c28c1c75b8402eedbfca47f888585a7881f44 --- Makefile | 22 ++++--- bin/{secop-cfg-editor => frappy-cfg-editor} | 4 +- bin/{secop-gui => frappy-gui} | 6 +- bin/{secop-server => frappy-server} | 6 +- bin/stringio-server | 4 +- cfg/ah2700test.cfg | 4 +- cfg/amagnet.cfg | 18 +++--- cfg/ccr.cfg | 32 +++++----- cfg/cryo.cfg | 2 +- cfg/demo.cfg | 12 ++-- cfg/epics.cfg | 12 ++-- cfg/ls370sim.cfg | 8 +-- cfg/ls370test.cfg | 4 +- cfg/ppms.cfg | 36 +++++------ cfg/ppms_proxy_test.cfg | 6 +- cfg/sim.cfg | 2 +- cfg/sim_mlz_amagnet.cfg | 18 +++--- cfg/sim_mlz_cci3he1.cfg | 20 +++--- cfg/sim_mlz_ccidu1.cfg | 24 ++++---- cfg/sim_mlz_ccr12.cfg | 32 +++++----- cfg/sim_mlz_ccr12_v2.cfg | 22 +++---- cfg/sim_mlz_htf02.cfg | 4 +- cfg/sim_mlz_stressihtf2.cfg | 12 ++-- cfg/sim_mlz_stressihtf2_v2.cfg | 12 ++-- cfg/softcal.cfg | 6 +- cfg/stressihtf2.cfg | 14 ++--- cfg/test.cfg | 12 ++-- ci/Jenkinsfile | 10 +-- ci/README | 4 +- doc/source/conf.py | 6 +- .../{secop_demo.rst => frappy_demo.rst} | 4 +- doc/source/{secop_ess.rst => frappy_ess.rst} | 2 +- doc/source/{secop_mlz.rst => frappy_mlz.rst} | 4 +- doc/source/{secop_psi.rst => frappy_psi.rst} | 6 +- doc/source/index.rst | 8 +-- doc/source/introduction.rst | 8 +-- doc/source/reference.rst | 58 +++++++++--------- doc/source/server.rst | 8 +-- doc/source/tutorial_helevel.rst | 16 ++--- etc/{secop-generator => frappy-generator} | 12 ++-- etc/{secop.target => frappy.target} | 0 etc/{secop@.service => frappy@.service} | 4 +- secop-server.spec => frappy-server.spec | 10 +-- {secop => frappy}/__init__.py | 0 {secop => frappy}/client/__init__.py | 26 ++++---- {secop => frappy}/client/interactive.py | 8 +-- {secop => frappy}/core.py | 20 +++--- {secop => frappy}/datatypes.py | 10 +-- {secop => frappy}/errors.py | 0 {secop => frappy}/features.py | 8 +-- {secop => frappy}/gui/__init__.py | 0 {secop => frappy}/gui/cfg_editor/__init__.py | 0 .../gui/cfg_editor/config_file.py | 4 +- .../gui/cfg_editor/mainwindow.py | 10 +-- .../gui/cfg_editor/node_display.py | 4 +- .../gui/cfg_editor/tree_widget_item.py | 10 +-- .../gui/cfg_editor/ui/add_dialog.ui | 0 .../gui/cfg_editor/ui/change_name_dialog.ui | 0 .../gui/cfg_editor/ui/icons/add_comment.png | Bin .../gui/cfg_editor/ui/icons/add_interface.png | Bin .../gui/cfg_editor/ui/icons/add_module.png | Bin .../gui/cfg_editor/ui/icons/add_parameter.png | Bin .../gui/cfg_editor/ui/icons/add_property.png | Bin .../gui/cfg_editor/ui/icons/cfg-editor.qrc | 0 .../gui/cfg_editor/ui/icons/comment.png | Bin .../gui/cfg_editor/ui/icons/delete.png | Bin .../gui/cfg_editor/ui/icons/duplicate.png | Bin .../gui/cfg_editor/ui/icons/edit.png | Bin .../gui/cfg_editor/ui/icons/empty.png | Bin .../gui/cfg_editor/ui/icons/interface.png | Bin .../gui/cfg_editor/ui/icons/module.png | Bin .../gui/cfg_editor/ui/icons/new.png | Bin .../gui/cfg_editor/ui/icons/open.png | Bin .../gui/cfg_editor/ui/icons/parameter.png | Bin .../gui/cfg_editor/ui/icons/property.png | Bin .../gui/cfg_editor/ui/icons/save.png | Bin .../gui/cfg_editor/ui/mainwindow.ui | 0 .../gui/cfg_editor/ui/node_display.ui | 2 +- {secop => frappy}/gui/cfg_editor/utils.py | 20 +++--- {secop => frappy}/gui/cfg_editor/widgets.py | 8 +-- {secop => frappy}/gui/icon_rc_qt4.py | 0 {secop => frappy}/gui/icon_rc_qt5.py | 0 {secop => frappy}/gui/mainwindow.py | 20 +++--- {secop => frappy}/gui/miniplot.py | 2 +- {secop => frappy}/gui/modulectrl.py | 12 ++-- {secop => frappy}/gui/nodectrl.py | 12 ++-- {secop => frappy}/gui/params/__init__.py | 6 +- {secop => frappy}/gui/paramview.py | 4 +- {secop => frappy}/gui/qt.py | 4 +- {secop => frappy}/gui/ui/cmdbuttons.ui | 0 {secop => frappy}/gui/ui/cmddialog.ui | 0 {secop => frappy}/gui/ui/mainwindow.ui | 2 +- {secop => frappy}/gui/ui/modulebuttons.ui | 0 {secop => frappy}/gui/ui/modulectrl.ui | 0 {secop => frappy}/gui/ui/nodectrl.ui | 0 {secop => frappy}/gui/ui/parambuttons.ui | 0 .../gui/ui/parambuttons_select.ui | 0 {secop => frappy}/gui/ui/paramview.ui | 0 {secop => frappy}/gui/util.py | 2 +- {secop => frappy}/gui/valuewidgets.py | 6 +- {secop => frappy}/io.py | 10 +-- {secop => frappy}/lib/__init__.py | 6 +- {secop => frappy}/lib/asynconn.py | 6 +- {secop => frappy}/lib/classdoc.py | 2 +- {secop => frappy}/lib/enum.py | 0 {secop => frappy}/lib/multievent.py | 0 {secop => frappy}/lib/pidfile.py | 0 {secop => frappy}/lib/py35compat.py | 0 {secop => frappy}/lib/sequence.py | 4 +- {secop => frappy}/lib/statemachine.py | 2 +- {secop => frappy}/logging.py | 6 +- {secop => frappy}/modules.py | 16 ++--- {secop => frappy}/params.py | 8 +-- {secop => frappy}/parse.py | 0 {secop => frappy}/persistent.py | 8 +-- {secop => frappy}/properties.py | 6 +- {secop => frappy}/protocol/__init__.py | 0 {secop => frappy}/protocol/dispatcher.py | 6 +- .../protocol/interface/__init__.py | 0 {secop => frappy}/protocol/interface/tcp.py | 12 ++-- {secop => frappy}/protocol/interface/zmq.py | 0 {secop => frappy}/protocol/messages.py | 0 {secop => frappy}/protocol/router.py | 24 ++++---- {secop => frappy}/proxy.py | 16 ++--- {secop => frappy}/rwhandler.py | 4 +- {secop => frappy}/server.py | 16 ++--- {secop => frappy}/simulation.py | 6 +- {secop => frappy}/version.py | 0 {secop_demo => frappy_demo}/__init__.py | 0 {secop_demo => frappy_demo}/cryo.py | 8 +-- {secop_demo => frappy_demo}/modules.py | 12 ++-- {secop_demo => frappy_demo}/test.py | 6 +- {secop_ess => frappy_ess}/__init__.py | 0 {secop_ess => frappy_ess}/epics.py | 6 +- {secop_mlz => frappy_mlz}/__init__.py | 0 {secop_mlz => frappy_mlz}/amagnet.py | 8 +-- {secop_mlz => frappy_mlz}/entangle.py | 10 +-- {secop_psi => frappy_psi}/__init__.py | 0 {secop_psi => frappy_psi}/ah2700.py | 2 +- {secop_psi => frappy_psi}/ccu4.py | 4 +- {secop_psi => frappy_psi}/channelswitcher.py | 8 +-- {secop_psi => frappy_psi}/convergence.py | 4 +- {secop_psi => frappy_psi}/historywriter.py | 2 +- {secop_psi => frappy_psi}/k2601b.py | 2 +- {secop_psi => frappy_psi}/ls370res.py | 14 ++--- {secop_psi => frappy_psi}/ls370sim.py | 2 +- {secop_psi => frappy_psi}/mercury.py | 10 +-- {secop_psi => frappy_psi}/motorvalve.py | 12 ++-- {secop_psi => frappy_psi}/ppms.py | 18 +++--- {secop_psi => frappy_psi}/ppmssim.py | 0 {secop_psi => frappy_psi}/ppmswindows.py | 0 {secop_psi => frappy_psi}/softcal.py | 2 +- {secop_psi => frappy_psi}/trinamic.py | 10 +-- setup.py | 20 +++--- test/test_attach.py | 4 +- test/test_datatypes.py | 4 +- test/test_errors.py | 8 +-- test/test_handler.py | 4 +- test/test_lib_enum.py | 2 +- test/test_logging.py | 14 ++--- test/test_modules.py | 14 ++--- test/test_msg.py | 4 +- test/test_multievent.py | 2 +- test/test_params.py | 8 +-- test/test_parse.py | 2 +- test/test_poller.py | 4 +- test/test_properties.py | 8 +-- test/test_statemachine.py | 2 +- 168 files changed, 558 insertions(+), 554 deletions(-) rename bin/{secop-cfg-editor => frappy-cfg-editor} (94%) rename bin/{secop-gui => frappy-gui} (93%) rename bin/{secop-server => frappy-server} (97%) rename doc/source/{secop_demo.rst => frappy_demo.rst} (56%) rename doc/source/{secop_ess.rst => frappy_ess.rst} (64%) rename doc/source/{secop_mlz.rst => frappy_mlz.rst} (69%) rename doc/source/{secop_psi.rst => frappy_psi.rst} (73%) rename etc/{secop-generator => frappy-generator} (85%) rename etc/{secop.target => frappy.target} (100%) rename etc/{secop@.service => frappy@.service} (63%) rename secop-server.spec => frappy-server.spec (71%) rename {secop => frappy}/__init__.py (100%) rename {secop => frappy}/client/__init__.py (97%) rename {secop => frappy}/client/interactive.py (98%) rename {secop => frappy}/core.py (70%) rename {secop => frappy}/datatypes.py (99%) rename {secop => frappy}/errors.py (100%) rename {secop => frappy}/features.py (97%) rename {secop => frappy}/gui/__init__.py (100%) rename {secop => frappy}/gui/cfg_editor/__init__.py (100%) rename {secop => frappy}/gui/cfg_editor/config_file.py (98%) rename {secop => frappy}/gui/cfg_editor/mainwindow.py (96%) rename {secop => frappy}/gui/cfg_editor/node_display.py (95%) rename {secop => frappy}/gui/cfg_editor/tree_widget_item.py (96%) rename {secop => frappy}/gui/cfg_editor/ui/add_dialog.ui (100%) rename {secop => frappy}/gui/cfg_editor/ui/change_name_dialog.ui (100%) rename {secop => frappy}/gui/cfg_editor/ui/icons/add_comment.png (100%) rename {secop => frappy}/gui/cfg_editor/ui/icons/add_interface.png (100%) rename {secop => frappy}/gui/cfg_editor/ui/icons/add_module.png (100%) rename {secop => frappy}/gui/cfg_editor/ui/icons/add_parameter.png (100%) rename {secop => frappy}/gui/cfg_editor/ui/icons/add_property.png (100%) rename {secop => frappy}/gui/cfg_editor/ui/icons/cfg-editor.qrc (100%) rename {secop => frappy}/gui/cfg_editor/ui/icons/comment.png (100%) rename {secop => frappy}/gui/cfg_editor/ui/icons/delete.png (100%) rename {secop => frappy}/gui/cfg_editor/ui/icons/duplicate.png (100%) rename {secop => frappy}/gui/cfg_editor/ui/icons/edit.png (100%) rename {secop => frappy}/gui/cfg_editor/ui/icons/empty.png (100%) rename {secop => frappy}/gui/cfg_editor/ui/icons/interface.png (100%) rename {secop => frappy}/gui/cfg_editor/ui/icons/module.png (100%) rename {secop => frappy}/gui/cfg_editor/ui/icons/new.png (100%) rename {secop => frappy}/gui/cfg_editor/ui/icons/open.png (100%) rename {secop => frappy}/gui/cfg_editor/ui/icons/parameter.png (100%) rename {secop => frappy}/gui/cfg_editor/ui/icons/property.png (100%) rename {secop => frappy}/gui/cfg_editor/ui/icons/save.png (100%) rename {secop => frappy}/gui/cfg_editor/ui/mainwindow.ui (100%) rename {secop => frappy}/gui/cfg_editor/ui/node_display.ui (97%) rename {secop => frappy}/gui/cfg_editor/utils.py (93%) rename {secop => frappy}/gui/cfg_editor/widgets.py (98%) rename {secop => frappy}/gui/icon_rc_qt4.py (100%) rename {secop => frappy}/gui/icon_rc_qt5.py (100%) rename {secop => frappy}/gui/mainwindow.py (94%) rename {secop => frappy}/gui/miniplot.py (99%) rename {secop => frappy}/gui/modulectrl.py (97%) rename {secop => frappy}/gui/nodectrl.py (97%) rename {secop => frappy}/gui/params/__init__.py (97%) rename {secop => frappy}/gui/paramview.py (96%) rename {secop => frappy}/gui/qt.py (97%) rename {secop => frappy}/gui/ui/cmdbuttons.ui (100%) rename {secop => frappy}/gui/ui/cmddialog.ui (100%) rename {secop => frappy}/gui/ui/mainwindow.ui (99%) rename {secop => frappy}/gui/ui/modulebuttons.ui (100%) rename {secop => frappy}/gui/ui/modulectrl.ui (100%) rename {secop => frappy}/gui/ui/nodectrl.ui (100%) rename {secop => frappy}/gui/ui/parambuttons.ui (100%) rename {secop => frappy}/gui/ui/parambuttons_select.ui (100%) rename {secop => frappy}/gui/ui/paramview.ui (100%) rename {secop => frappy}/gui/util.py (98%) rename {secop => frappy}/gui/valuewidgets.py (97%) rename {secop => frappy}/io.py (98%) rename {secop => frappy}/lib/__init__.py (98%) rename {secop => frappy}/lib/asynconn.py (98%) rename {secop => frappy}/lib/classdoc.py (98%) rename {secop => frappy}/lib/enum.py (100%) rename {secop => frappy}/lib/multievent.py (100%) rename {secop => frappy}/lib/pidfile.py (100%) rename {secop => frappy}/lib/py35compat.py (100%) rename {secop => frappy}/lib/sequence.py (99%) rename {secop => frappy}/lib/statemachine.py (99%) rename {secop => frappy}/logging.py (98%) rename {secop => frappy}/modules.py (98%) rename {secop => frappy}/params.py (98%) rename {secop => frappy}/parse.py (100%) rename {secop => frappy}/persistent.py (97%) rename {secop => frappy}/properties.py (98%) rename {secop => frappy}/protocol/__init__.py (100%) rename {secop => frappy}/protocol/dispatcher.py (99%) rename {secop => frappy}/protocol/interface/__init__.py (100%) rename {secop => frappy}/protocol/interface/tcp.py (96%) rename {secop => frappy}/protocol/interface/zmq.py (100%) rename {secop => frappy}/protocol/messages.py (100%) rename {secop => frappy}/protocol/router.py (91%) rename {secop => frappy}/proxy.py (95%) rename {secop => frappy}/rwhandler.py (99%) rename {secop => frappy}/server.py (96%) rename {secop => frappy}/simulation.py (96%) rename {secop => frappy}/version.py (100%) rename {secop_demo => frappy_demo}/__init__.py (100%) rename {secop_demo => frappy_demo}/cryo.py (98%) rename {secop_demo => frappy_demo}/modules.py (98%) rename {secop_demo => frappy_demo}/test.py (94%) rename {secop_ess => frappy_ess}/__init__.py (100%) rename {secop_ess => frappy_ess}/epics.py (97%) rename {secop_mlz => frappy_mlz}/__init__.py (100%) rename {secop_mlz => frappy_mlz}/amagnet.py (98%) rename {secop_mlz => frappy_mlz}/entangle.py (99%) rename {secop_psi => frappy_psi}/__init__.py (100%) rename {secop_psi => frappy_psi}/ah2700.py (97%) rename {secop_psi => frappy_psi}/ccu4.py (96%) rename {secop_psi => frappy_psi}/channelswitcher.py (96%) rename {secop_psi => frappy_psi}/convergence.py (98%) rename {secop_psi => frappy_psi}/historywriter.py (98%) rename {secop_psi => frappy_psi}/k2601b.py (98%) rename {secop_psi => frappy_psi}/ls370res.py (97%) rename {secop_psi => frappy_psi}/ls370sim.py (98%) rename {secop_psi => frappy_psi}/mercury.py (98%) rename {secop_psi => frappy_psi}/motorvalve.py (97%) rename {secop_psi => frappy_psi}/ppms.py (98%) rename {secop_psi => frappy_psi}/ppmssim.py (100%) rename {secop_psi => frappy_psi}/ppmswindows.py (100%) rename {secop_psi => frappy_psi}/softcal.py (99%) rename {secop_psi => frappy_psi}/trinamic.py (98%) diff --git a/Makefile b/Makefile index 6a5ce54..2f27895 100644 --- a/Makefile +++ b/Makefile @@ -4,11 +4,15 @@ all: clean doc demo: - @bin/secop-server -q demo & - @bin/secop-server -q test & - @bin/secop-server -q cryo & - @bin/secop-gui localhost:10767 localhost:10768 localhost:10769 - @ps aux|grep [s]ecop-server|awk '{print $$2}'|xargs kill + # Make spawns a new shell for each command. + # Save each PID in temporary file + @rm -f frappydemo.PID || true + @{ bin/frappy-server -q demo & echo $$! >> frappydemo.PID; } + @{ bin/frappy-server -q test & echo $$! >> frappydemo.PID; } + @{ bin/frappy-server -q cryo & echo $$! >> frappydemo.PID; } + @bin/frappy-gui localhost:10767 localhost:10768 localhost:10769 + @cat frappydemo.PID | xargs kill || true + @rm frappydemo.PID build: python3 setup.py build @@ -32,18 +36,18 @@ test-verbose: python3 $(shell which pytest) -v test -s test-coverage: - python3 $(shell which pytest) -v test --cov=secop + python3 $(shell which pytest) -v test --cov=frappy doc: $(MAKE) -C doc html lint: - pylint -f colorized -r n --rcfile=.pylintrc secop secop_* test + pylint -f colorized -r n --rcfile=.pylintrc frappy frappy_* test isort: @find test -name '*.py' -print0 | xargs -0 isort -e -m 2 -w 80 -ns __init__.py - @find secop -name '*.py' -print0 | xargs -0 isort -e -m 2 -w 80 -ns __init__.py - @find . -wholename './secop_*.py' -print0 | xargs -0 isort -e -m 2 -w 80 -ns __init__.py + @find frappy -name '*.py' -print0 | xargs -0 isort -e -m 2 -w 80 -ns __init__.py + @find . -wholename './frappy_*.py' -print0 | xargs -0 isort -e -m 2 -w 80 -ns __init__.py release-patch: MODE="patch" $(MAKE) release diff --git a/bin/secop-cfg-editor b/bin/frappy-cfg-editor similarity index 94% rename from bin/secop-cfg-editor rename to bin/frappy-cfg-editor index 9e4fdd4..f9c3a23 100755 --- a/bin/secop-cfg-editor +++ b/bin/frappy-cfg-editor @@ -29,8 +29,8 @@ from os import path # Add import path for inplace usage sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..'))) -from secop.gui.qt import QApplication -from secop.gui.cfg_editor.mainwindow import MainWindow +from frappy.gui.qt import QApplication +from frappy.gui.cfg_editor.mainwindow import MainWindow def main(argv=None): diff --git a/bin/secop-gui b/bin/frappy-gui similarity index 93% rename from bin/secop-gui rename to bin/frappy-gui index 302df2e..95c2ad5 100755 --- a/bin/secop-gui +++ b/bin/frappy-gui @@ -33,8 +33,8 @@ sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..'))) import mlzlog -from secop.gui.qt import QApplication -from secop.gui.mainwindow import MainWindow +from frappy.gui.qt import QApplication +from frappy.gui.mainwindow import MainWindow def main(argv=None): @@ -42,7 +42,7 @@ def main(argv=None): argv = sys.argv if '-h' in argv or '--help' in argv: - print("Usage: secop-gui [-d] [-h] [host:[port]]") + print("Usage: frappy-gui [-d] [-h] [host:[port]]") print() print("Option GNU long option Meaning") print("-h --help Show this message") diff --git a/bin/secop-server b/bin/frappy-server similarity index 97% rename from bin/secop-server rename to bin/frappy-server index d28a307..309c7c0 100755 --- a/bin/secop-server +++ b/bin/frappy-server @@ -30,9 +30,9 @@ from os import path # Add import path for inplace usage sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..'))) -from secop.lib import generalConfig -from secop.logging import logger -from secop.server import Server +from frappy.lib import generalConfig +from frappy.logging import logger +from frappy.server import Server def parseArgv(argv): diff --git a/bin/stringio-server b/bin/stringio-server index 5d2152d..6284862 100755 --- a/bin/stringio-server +++ b/bin/stringio-server @@ -42,7 +42,7 @@ import ast # Add import path for inplace usage sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..'))) -from secop.lib import get_class, formatException +from frappy.lib import get_class, formatException class LineHandler(asyncore.dispatcher_with_send): @@ -136,7 +136,7 @@ for arg in sys.argv[1:]: pass opts[k] = v verbose = opts.pop('verbose', False) -opts['cls'] = 'secop_psi.ls370sim.Ls370Sim' +opts['cls'] = 'frappy_psi.ls370sim.Ls370Sim' opts['port'] = 4567 if len(args) > 2: raise ValueError('do not know about: %s' % ' '.join(args[2:])) diff --git a/cfg/ah2700test.cfg b/cfg/ah2700test.cfg index 34fa6a0..83c9cdc 100644 --- a/cfg/ah2700test.cfg +++ b/cfg/ah2700test.cfg @@ -7,11 +7,11 @@ bindto = 0.0.0.0 bindport = 5000 [module cap] -class = secop_psi.ah2700.Capacitance +class = frappy_psi.ah2700.Capacitance description = capacitance uri=ldmse3-ts:3015 #[module ahcom] -#class = secop_psi.ah2700.StringIO +#class = frappy_psi.ah2700.StringIO #uri=ldmse3-ts:3015 #description = serial communicator to an AH2700 diff --git a/cfg/amagnet.cfg b/cfg/amagnet.cfg index 80aca7c..cf3f8cf 100644 --- a/cfg/amagnet.cfg +++ b/cfg/amagnet.cfg @@ -19,7 +19,7 @@ bindto=0.0.0.0 bindport=10767 [module enable] -class=secop_mlz.entangle.NamedDigitalOutput +class=frappy_mlz.entangle.NamedDigitalOutput tangodevice='tango://localhost:10000/box/plc/_enable' value.datatype=["enum", {'On':1,'Off':0}] target.datatype=["enum", {'On':1,'Off':0}] @@ -27,7 +27,7 @@ target.datatype=["enum", {'On':1,'Off':0}] .visibility='advanced' [module polarity] -class=secop_mlz.entangle.NamedDigitalOutput +class=frappy_mlz.entangle.NamedDigitalOutput tangodevice=tango://localhost:10000/box/plc/_polarity value.datatype=["enum", {'+1':1,'0':0,'-1':-1}] target.datatype=["enum", {'+1':1,'0':0,'-1':-1}] @@ -41,7 +41,7 @@ comtries=50 [module symmetry] -class=secop_mlz.entangle.NamedDigitalOutput +class=frappy_mlz.entangle.NamedDigitalOutput tangodevice=tango://localhost:10000/box/plc/_symmetric value.datatype=["enum",{'symmetric':1,'short':0, 'asymmetric':-1}] target.datatype=["enum",{'symmetric':1,'short':0, 'asymmetric':-1}] @@ -51,35 +51,35 @@ target.datatype=["enum",{'symmetric':1,'short':0, 'asymmetric':-1}] .visibility=advanced [module T1] -class=secop_mlz.entangle.AnalogInput +class=frappy_mlz.entangle.AnalogInput tangodevice=tango://localhost:10000/box/plc/_t1 .description=Temperature1 of the coils system #warnlimits=(0, 50) value.unit='degC' [module T2] -class=secop_mlz.entangle.AnalogInput +class=frappy_mlz.entangle.AnalogInput tangodevice=tango://localhost:10000/box/plc/_t2 .description=Temperature2 of the coils system #warnlimits=(0, 50) value.unit='degC' [module T3] -class=secop_mlz.entangle.AnalogInput +class=frappy_mlz.entangle.AnalogInput tangodevice=tango://localhost:10000/box/plc/_t3 .description=Temperature3 of the coils system #warnlimits=(0, 50) value.unit='degC' [module T4] -class=secop_mlz.entangle.AnalogInput +class=frappy_mlz.entangle.AnalogInput tangodevice=tango://localhost:10000/box/plc/_t4 .description=Temperature4 of the coils system #warnlimits=(0, 50) value.unit='degC' [module currentsource] -class=secop_mlz.entangle.PowerSupply +class=frappy_mlz.entangle.PowerSupply tangodevice=tango://localhost:10000/box/lambda/curr .description=Device for the magnet power supply (current mode) abslimits=(0,200) @@ -92,7 +92,7 @@ voltage=10 .visibility=advanced [module mf] -class=secop_mlz.amagnet.GarfieldMagnet +class=frappy_mlz.amagnet.GarfieldMagnet .description=magnetic field module, handling polarity switching and stuff subdev_currentsource=currentsource subdev_enable=enable diff --git a/cfg/ccr.cfg b/cfg/ccr.cfg index 8c56f02..a64a40f 100644 --- a/cfg/ccr.cfg +++ b/cfg/ccr.cfg @@ -11,7 +11,7 @@ bindto=0.0.0.0 bindport=10767 [module automatik] -class=secop_mlz.entangle.NamedDigitalOutput +class=frappy_mlz.entangle.NamedDigitalOutput tangodevice=tango://localhost:10000/box/plc/_automatik mapping=dict(Off=0,p1=1,p2=2) description="controls the (simple) pressure regulation @@ -19,13 +19,13 @@ description="controls the (simple) pressure regulation selects between off, regulate on p1 or regulate on p2 sensor" [module compressor] -class=secop_mlz.entangle.NamedDigitalOutput +class=frappy_mlz.entangle.NamedDigitalOutput tangodevice=tango://localhost:10000/box/plc/_cooler_onoff mapping=dict(Off=0,On=1) description=control the compressor (on/off) [module gas] -class=secop_mlz.entangle.NamedDigitalOutput +class=frappy_mlz.entangle.NamedDigitalOutput tangodevice=tango://localhost:10000/box/plc/_gas_onoff mapping=dict(Off=0,On=1) description=control the gas inlet into the ccr (on/off) @@ -35,7 +35,7 @@ description=control the gas inlet into the ccr (on/off) note: if the pressure regulation is active, it enslave this device [module vacuum] -class=secop_mlz.entangle.NamedDigitalOutput +class=frappy_mlz.entangle.NamedDigitalOutput tangodevice=tango://localhost:10000/box/plc/_vacuum_Onoff mapping=dict(Off=0,On=1) description=control the vacuum inlet into the ccr (on/off) @@ -44,19 +44,19 @@ description=control the vacuum inlet into the ccr (on/off) note: if the pressure regulation is active, it enslave this device [module p1] -class=secop_mlz.entangle.AnalogInput +class=frappy_mlz.entangle.AnalogInput tangodevice=tango://localhost:10000/box/plc/_p1 value.unit='mbar' description=pressure sensor 1 (linear scale) [module p2] -class=secop_mlz.entangle.AnalogInput +class=frappy_mlz.entangle.AnalogInput tangodevice=tango://localhost:10000/box/plc/_p2 value.unit='mbar' description=pressure sensor 2 (selectable curve) [module curve_p2] -class=secop_mlz.entangle.NamedDigitalInput +class=frappy_mlz.entangle.NamedDigitalInput tangodevice=tango://localhost:10000/box/plc/_curve value.default=0 description=calibration curve for pressure sensor 2 @@ -71,25 +71,25 @@ mapping="{'0-10V':0, '0-1000mbar':1, '1-9V to 0-1 mbar':2, # sensors [module T_sample] -class=secop_mlz.entangle.Sensor +class=frappy_mlz.entangle.Sensor tangodevice=tango://localhost:10000/box/sample/sensora value.unit='K' description=sample temperature [module T_stick] -class=secop_mlz.entangle.Sensor +class=frappy_mlz.entangle.Sensor tangodevice=tango://localhost:10000/box/stick/sensorb value.unit='K' description=temperature at bottom of sample stick [module T_coldhead] -class=secop_mlz.entangle.Sensor +class=frappy_mlz.entangle.Sensor tangodevice=tango://localhost:10000/box/coldhead/sensorc value.unit='K' description=temperature at coldhead [module T_tube] -class=secop_mlz.entangle.Sensor +class=frappy_mlz.entangle.Sensor tangodevice=tango://localhost:10000/box/tube/sensord value.unit='K' description=temperature at thermal coupling tube <-> stick @@ -98,7 +98,7 @@ description=temperature at thermal coupling tube <-> stick # regulations [module T_stick_regulation] -class=secop_mlz.entangle.TemperatureController +class=frappy_mlz.entangle.TemperatureController tangodevice=tango://localhost:10000/box/stick/control2 heateroutput.default=0 description=regulation of stick temperature @@ -114,7 +114,7 @@ value.unit='K' # OMG! a NamedDigitalOutput, but with float'ints' 0..3 [module T_stick_regulation_heaterrange] -class=secop_mlz.entangle.AnalogOutput +class=frappy_mlz.entangle.AnalogOutput tangodevice=tango://localhost:10000/box/stick/range2 precision.default=1 abslimits=(0,3) @@ -122,7 +122,7 @@ description=heaterrange for stick regulation [module T_tube_regulation] -class=secop_mlz.entangle.TemperatureController +class=frappy_mlz.entangle.TemperatureController tangodevice=tango://localhost:10000/box/tube/control1 description=regulation of tube temperature heateroutput.default=0 @@ -138,13 +138,13 @@ value.unit='K' # OMG! a NamedDigitalOutput, but with float'ints' 0..3 #[module T_tube_regulation_heaterrange] -#class=secop_mlz.entangle.AnalogOutput +#class=frappy_mlz.entangle.AnalogOutput #tangodevice=tango://localhost:10000/box/tube/range1 #precision.default=1 #abslimits=(0,3) [module T_tube_regulation_heaterrange] -class=secop_mlz.entangle.NamedDigitalOutput +class=frappy_mlz.entangle.NamedDigitalOutput tangodevice=tango://localhost:10000/box/tube/range1 mapping=dict(Off=0, Low=1, Medium=2, High=3) description=heaterrange for tube regulation diff --git a/cfg/cryo.cfg b/cfg/cryo.cfg index fc8daab..3e9ed36 100644 --- a/cfg/cryo.cfg +++ b/cfg/cryo.cfg @@ -17,7 +17,7 @@ bindport=10769 and a temperature dependend heat-link between sample and regulation. # class of module: -class=secop_demo.cryo.Cryostat +class=frappy_demo.cryo.Cryostat # some parameters jitter=0.1 diff --git a/cfg/demo.cfg b/cfg/demo.cfg index 8fa1271..6533791 100644 --- a/cfg/demo.cfg +++ b/cfg/demo.cfg @@ -6,18 +6,18 @@ bindto=0.0.0.0 bindport=10767 [module heatswitch] -class=secop_demo.modules.Switch +class=frappy_demo.modules.Switch switch_on_time=5 switch_off_time=10 .description="Heatswitch for `mf` device" [module mf] -class=secop_demo.modules.MagneticField +class=frappy_demo.modules.MagneticField heatswitch = heatswitch .description="simulates some cryomagnet with persistent/non-persistent switching" [module ts] -class=secop_demo.modules.SampleTemp +class=frappy_demo.modules.SampleTemp sensor = 'Q1329V7R3' ramp = 4 target = 10 @@ -25,17 +25,17 @@ value = 10 .description = "some temperature" [module tc1] -class=secop_demo.modules.CoilTemp +class=frappy_demo.modules.CoilTemp sensor="X34598T7" .description = "some temperature" [module tc2] -class=secop_demo.modules.CoilTemp +class=frappy_demo.modules.CoilTemp sensor="X39284Q8' .description = "some temperature" [module label] -class=secop_demo.modules.Label +class=frappy_demo.modules.Label system=Cryomagnet MX15 subdev_mf=mf subdev_ts=ts diff --git a/cfg/epics.cfg b/cfg/epics.cfg index 1342ce1..07a6f5f 100644 --- a/cfg/epics.cfg +++ b/cfg/epics.cfg @@ -7,23 +7,23 @@ bindto=0.0.0.0 bindport=10767 [module tc1] -class=secop_demo.modules.CoilTemp +class=frappy_demo.modules.CoilTemp sensor="X34598T7" [module tc2] -class=secop_demo.modules.CoilTemp +class=frappy_demo.modules.CoilTemp sensor="X39284Q8' [module sensor1] -class=secop_ess.epics.EpicsReadable +class=frappy_ess.epics.EpicsReadable epics_version="v4" .group="Lakeshore336" value_pv="DEV:KRDG1" [module loop1] -class=secop_ess.epics.EpicsTempCtrl +class=frappy_ess.epics.EpicsTempCtrl epics_version="v4" .group="Lakeshore336" @@ -33,14 +33,14 @@ heaterrange_pv="DEV:RANGE_S1" [module sensor2] -class=secop_ess.epics.EpicsReadable +class=frappy_ess.epics.EpicsReadable epics_version="v4" .group="Lakeshore336" value_pv="DEV:KRDG2" [module loop2] -class=secop_ess.epics.EpicsTempCtrl +class=frappy_ess.epics.EpicsTempCtrl epics_version="v4" .group="Lakeshore336" diff --git a/cfg/ls370sim.cfg b/cfg/ls370sim.cfg index bb11d01..271a646 100644 --- a/cfg/ls370sim.cfg +++ b/cfg/ls370sim.cfg @@ -6,23 +6,23 @@ description = Lsc Simulation at PSI uri = tcp://5000 [lscom] -class = secop_psi.ls370sim.Ls370Sim +class = frappy_psi.ls370sim.Ls370Sim description = simulated serial communicator to a LS 370 visibility = 3 [sw] -class = secop_psi.ls370res.Switcher +class = frappy_psi.ls370res.Switcher description = channel switcher for Lsc controller io = lscom [a] -class = secop_psi.ls370res.ResChannel +class = frappy_psi.ls370res.ResChannel channel = 1 description = resistivity switcher = sw [b] -class = secop_psi.ls370res.ResChannel +class = frappy_psi.ls370res.ResChannel channel = 3 description = resistivity switcher = sw diff --git a/cfg/ls370test.cfg b/cfg/ls370test.cfg index 6ade7f7..096a61c 100644 --- a/cfg/ls370test.cfg +++ b/cfg/ls370test.cfg @@ -7,12 +7,12 @@ bindto = 0.0.0.0 bindport = 5000 [module lsmain] -class = secop_psi.ls370res.Main +class = frappy_psi.ls370res.Main description = main control of Lsc controller uri = localhost:4567 [module res] -class = secop_psi.ls370res.ResChannel +class = frappy_psi.ls370res.ResChannel vexc = '2mV' channel = 3 description = resistivity diff --git a/cfg/ppms.cfg b/cfg/ppms.cfg index 82cc65e..fa21cbd 100644 --- a/cfg/ppms.cfg +++ b/cfg/ppms.cfg @@ -6,118 +6,118 @@ description = PPMS at PSI uri = tcp://5000 [tt] -class = secop_psi.ppms.Temp +class = frappy_psi.ppms.Temp description = main temperature io = ppms [mf] -class = secop_psi.ppms.Field +class = frappy_psi.ppms.Field target.min = -9 target.max = 9 description = magnetic field io = ppms [pos] -class = secop_psi.ppms.Position +class = frappy_psi.ppms.Position description = sample rotator io = ppms [lev] -class = secop_psi.ppms.Level +class = frappy_psi.ppms.Level description = helium level io = ppms [chamber] -class = secop_psi.ppms.Chamber +class = frappy_psi.ppms.Chamber description = chamber state io = ppms [r1] -class = secop_psi.ppms.BridgeChannel +class = frappy_psi.ppms.BridgeChannel description = resistivity channel 1 no = 1 value.unit = Ohm io = ppms [r2] -class = secop_psi.ppms.BridgeChannel +class = frappy_psi.ppms.BridgeChannel description = resistivity channel 2 no = 2 value.unit = Ohm io = ppms [r3] -class = secop_psi.ppms.BridgeChannel +class = frappy_psi.ppms.BridgeChannel description = resistivity channel 3 no = 3 value.unit = Ohm io = ppms [r4] -class = secop_psi.ppms.BridgeChannel +class = frappy_psi.ppms.BridgeChannel description = resistivity channel 4 no = 4 value.unit = Ohm io = ppms [i1] -class = secop_psi.ppms.Channel +class = frappy_psi.ppms.Channel description = current channel 1 no = 1 value.unit = uA io = ppms [i2] -class = secop_psi.ppms.Channel +class = frappy_psi.ppms.Channel description = current channel 2 no = 2 value.unit = uA io = ppms [i3] -class = secop_psi.ppms.Channel +class = frappy_psi.ppms.Channel description = current channel 3 no = 3 value.unit = uA io = ppms [i4] -class = secop_psi.ppms.Channel +class = frappy_psi.ppms.Channel description = current channel 4 no = 4 value.unit = uA io = ppms [v1] -class = secop_psi.ppms.DriverChannel +class = frappy_psi.ppms.DriverChannel description = voltage channel 1 no = 1 value.unit = V io = ppms [v2] -class = secop_psi.ppms.DriverChannel +class = frappy_psi.ppms.DriverChannel description = voltage channel 2 no = 2 value.unit = V io = ppms [tv] -class = secop_psi.ppms.UserChannel +class = frappy_psi.ppms.UserChannel description = VTI temperature enabled = 1 value.unit = K io = ppms [ts] -class = secop_psi.ppms.UserChannel +class = frappy_psi.ppms.UserChannel description = sample temperature enabled = 1 value.unit = K io = ppms [ppms] -class = secop_psi.ppms.Main +class = frappy_psi.ppms.Main description = the main and poller module class_id = QD.MULTIVU.PPMS.1 visibility = 3 diff --git a/cfg/ppms_proxy_test.cfg b/cfg/ppms_proxy_test.cfg index bbaeea0..848bf4d 100644 --- a/cfg/ppms_proxy_test.cfg +++ b/cfg/ppms_proxy_test.cfg @@ -7,13 +7,13 @@ bindto = 0.0.0.0 bindport = 5002 [module secnode] -class = secop.SecNode +class = frappy.SecNode description = a SEC node uri = tcp://localhost:5000 [module mf] -class = secop.Proxy -remote_class = secop_psi.ppms.Field +class = frappy.Proxy +remote_class = frappy_psi.ppms.Field description = magnetic field iodev = secnode value.min = -0.1 diff --git a/cfg/sim.cfg b/cfg/sim.cfg index 4247b11..857d519 100644 --- a/cfg/sim.cfg +++ b/cfg/sim.cfg @@ -10,7 +10,7 @@ bindport=10767 [module sim] -class=secop.simulation.SimDrivable +class=frappy.simulation.SimDrivable .description=simulation stuff .extra_params=param3,param4,jitter,ramp param3.datatype={"type":"bool"} diff --git a/cfg/sim_mlz_amagnet.cfg b/cfg/sim_mlz_amagnet.cfg index b65775e..d149476 100644 --- a/cfg/sim_mlz_amagnet.cfg +++ b/cfg/sim_mlz_amagnet.cfg @@ -19,14 +19,14 @@ bindto=0.0.0.0 bindport=10767 [module enable] -class=secop.simulation.SimWritable +class=frappy.simulation.SimWritable value.datatype={"type":"enum", "members":{'On':1,'Off':0}} target.datatype={"type":"enum", "members":{'On':1,'Off':0}} .description='Enables to Output of the Powersupply' .visibility='advanced' [module polarity] -class=secop.simulation.SimWritable +class=frappy.simulation.SimWritable value.datatype={"type":"enum", "members":{'+1':1,'0':0,'-1':-1}} target.datatype={"type":"enum", "members":{'+1':1,'0':0,'-1':-1}} .description=polarity (+/-) switch @@ -38,7 +38,7 @@ target.datatype={"type":"enum", "members":{'+1':1,'0':0,'-1':-1}} [module symmetry] -class=secop.simulation.SimWritable +class=frappy.simulation.SimWritable value.datatype={"type":"enum", "members":{'symmetric':1,'short':0, 'asymmetric':-1}} target.datatype={"type":"enum", "members":{'symmetric':1,'short':0, 'asymmetric':-1}} .description=par/ser switch selecting (a)symmetric mode @@ -48,31 +48,31 @@ target.datatype={"type":"enum", "members":{'symmetric':1,'short':0, 'asymmetric' value.default = 'symmetric' [module T1] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Temperature1 of the coils system value.unit='degC' value.default = 23.45 [module T2] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Temperature2 of the coils system value.unit='degC' value.default = 23.45 [module T3] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Temperature3 of the coils system value.unit='degC' value.default = 23.45 [module T4] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Temperature4 of the coils system value.unit='degC' value.default = 23.45 [module currentsource] -class=secop.simulation.SimDrivable +class=frappy.simulation.SimDrivable .description=Device for the magnet power supply (current mode) abslimits=(0,200) speed=1 @@ -98,7 +98,7 @@ window.datatype = {"type":"double", "min":0, "max":120, "unit":"s"} window.default = 10 [module mf] -class=secop_mlz.amagnet.GarfieldMagnet +class=frappy_mlz.amagnet.GarfieldMagnet .description=magnetic field module, handling polarity switching and stuff subdev_currentsource=currentsource subdev_enable=enable diff --git a/cfg/sim_mlz_cci3he1.cfg b/cfg/sim_mlz_cci3he1.cfg index d04d9d9..23a2255 100644 --- a/cfg/sim_mlz_cci3he1.cfg +++ b/cfg/sim_mlz_cci3he1.cfg @@ -11,7 +11,7 @@ bindto=0.0.0.0 bindport=10767 [module T_cci3he1] -class=secop.simulation.SimDrivable +class=frappy.simulation.SimDrivable .description=Main temperature control node of cci3he1. . Controls the regulation loop of the ls370. @@ -26,7 +26,7 @@ ramp.default=60 .meaning=["temperature_regulation",40] [module T_cci3he1_A] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=3He pot temperature sensor. Also used for the regulation. .visibility=expert value.default=300 @@ -34,7 +34,7 @@ value.datatype={"type":"double","unit":"K"} .meaning=["temperature",38] [module T_cci3he1_B] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=(optional) sample temperature sensor close to sample. .visibility=user value.default=300 @@ -42,49 +42,49 @@ value.datatype={"type":"double","unit":"K"} .meaning=["temperature",39] [module cci3he1_p1] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Pressure at turbo pump inlet. .visibility=expert value.default=2e-3 value.datatype={"type":"double","unit":"mbar"} [module cci3he1_p2] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Pressure at turbo pump outlet. .visibility=expert value.default=9.87 value.datatype={"type":"double","unit":"mbar"} [module cci3he1_p3] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Pressure at compressor inlet. .visibility=expert value.default=19.99 value.datatype={"type":"double","unit":"mbar"} [module cci3he1_p4] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Pressure at compressor outlet. .visibility=expert value.default=999 value.datatype={"type":"double","unit":"mbar"} [module cci3he1_p5] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Pressure in dump tank. .visibility=expert value.default=567 value.datatype={"type":"double","unit":"mbar"} [module cci3he1_p6] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Pressure in the vacuum dewar (ivc). .visibility=expert value.default=1e-3 value.datatype={"type":"double","unit":"mbar"} [module cci3he1_flow] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Gas Flow (condensing line). .visibility=expert value.default=12.34 diff --git a/cfg/sim_mlz_ccidu1.cfg b/cfg/sim_mlz_ccidu1.cfg index a6cea34..9854d03 100644 --- a/cfg/sim_mlz_ccidu1.cfg +++ b/cfg/sim_mlz_ccidu1.cfg @@ -11,7 +11,7 @@ bindto=0.0.0.0 bindport=10767 [module T_ccidu1] -class=secop.simulation.SimDrivable +class=frappy.simulation.SimDrivable .description=Main temperature control node of ccidu1. . Controls the regulation loop of the ls372. @@ -26,7 +26,7 @@ ramp.default=60 .meaning=["temperature_regulation",40] [module T_ccidu1_A] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=mixing chamber temperature sensor. Also used for the regulation. .visibility=expert value.default=300 @@ -34,7 +34,7 @@ value.datatype={"type":"double", "unit":"K"} .meaning=["temperature",38] [module T_ccidu1_B] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=(optional) sample temperature sensor close to sample. .visibility=user value.default=300 @@ -42,49 +42,49 @@ value.datatype={"type":"double", "unit":"K"} .meaning=["temperature",39] [module ccidu1_pstill] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Pressure at the still/turbo pump inlet. .visibility=expert value.default=999 value.datatype={"type":"double", "unit":"mbar"} [module ccidu1_pinlet] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Pressure at forepump inlet/turbo pump outlet. .visibility=expert value.default=999 value.datatype={"type":"double", "unit":"mbar"} [module ccidu1_poutlet] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Pressure at forepump outlet/compressor inlet. .visibility=expert value.default=999 value.datatype={"type":"double", "unit":"mbar"} [module ccidu1_pkond] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Pressure at condensing line/compressor outlet. .visibility=expert value.default=999 value.datatype={"type":"double", "unit":"mbar"} [module ccidu1_ptank] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Pressure in dump tank. .visibility=expert value.default=999 value.datatype={"type":"double", "unit":"mbar"} [module ccidu1_pvac] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Pressure in the vacuum dewar (ivc). .visibility=expert value.default=999 value.datatype={"type":"double", "unit":"mbar"} [module ccidu1_flow] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Gas Flow (condensing line). .visibility=expert value.default=999 @@ -92,14 +92,14 @@ value.datatype={"type":"double", "unit":"mbar"} # note: all valves and switches are missing: use VNC to control them [module ccidu1_V6] -class=secop.simulation.SimDrivable +class=frappy.simulation.SimDrivable .description=Needle valve .visibility=expert value.default=99 value.datatype={"type":"double", "min":0, "max":100, "unit":"%%"} [module ccidu1_V3] -class=secop.simulation.SimWritable +class=frappy.simulation.SimWritable .description=Dump Valve .visibility=expert value.default="OFF" diff --git a/cfg/sim_mlz_ccr12.cfg b/cfg/sim_mlz_ccr12.cfg index b924dce..054adb1 100644 --- a/cfg/sim_mlz_ccr12.cfg +++ b/cfg/sim_mlz_ccr12.cfg @@ -12,7 +12,7 @@ bindto=0.0.0.0 bindport=10767 [module T_ccr12] -class=secop.simulation.SimDrivable +class=frappy.simulation.SimDrivable .description=Main temperature control node of CCR12. . Switches between regulation on stick and regulation on tube depending on temperature requested. @@ -30,7 +30,7 @@ target.default=300 .meaning=["temperature_regulation", 20] [module T_ccr12_stick] -class=secop.simulation.SimDrivable +class=frappy.simulation.SimDrivable .description=Temperature regulation for the sample stick in ccr12. .extra_params=ramp ramp.datatype={"type":"double", "min":0,"max":60, "unit":"K/min"} @@ -42,7 +42,7 @@ target.default=300 .meaning=["temperature_regulation", 15] [module T_ccr12_tube] -class=secop.simulation.SimDrivable +class=frappy.simulation.SimDrivable .description=Temperature regulation for the tube of ccr12. .extra_params=ramp ramp.datatype={"type":"double", "min":0,"max":60, "unit":"K/min"} @@ -54,28 +54,28 @@ target.default=300 .meaning=["temperature_regulation", 10] [module T_ccr12_A] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=(optional) Sample temperature sensor. value.datatype={"type":"double", "unit":"K"} value.default=300 .meaning=["temperature", 9] [module T_ccr12_B] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=(regulation) temperature sensor on stick. value.datatype={"type":"double", "unit":"K"} value.default=300 .meaning=["temperature", 10] [module T_ccr12_C] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Temperature at the coldhead. value.datatype={"type":"double", "unit":"K"} value.default=70 .meaning=["temperature", 1] [module T_ccr12_D] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=(regulation) temperature at coupling to stick. value.datatype={"type":"double", "unit":"K"} value.default=80 @@ -84,7 +84,7 @@ value.default=80 [module ccr12_pressure_regulate] -class=secop.simulation.SimWritable +class=frappy.simulation.SimWritable .description=Selects on which Sensor the pressure regulation works, or switches it off. .visibility=expert value.datatype={"type":"enum", "members":{'off':0,'p1':1,'p2':2}} @@ -93,7 +93,7 @@ target.datatype={"type":"enum", "members":{'off':0,'p1':1,'p2':2}} target.default='off' [module ccr12_compressor] -class=secop.simulation.SimDrivable +class=frappy.simulation.SimDrivable .description=Switches the compressor for the cooling stage on or off. . Note: This should always be on, except for fast heatup for sample change. @@ -103,7 +103,7 @@ target.datatype={"type":"enum", "members":{'off':0,'on':1}} target.default='on' [module ccr12_gas_switch] -class=secop.simulation.SimWritable +class=frappy.simulation.SimWritable .description=Switches the gas inlet on or off. . note: in reality this switches itself off after 15min. @@ -115,7 +115,7 @@ target.datatype={"type":"enum", "members":{'off':0,'on':1}} target.default='off' [module ccr12_vacuum_switch] -class=secop.simulation.SimWritable +class=frappy.simulation.SimWritable .description=Switches the vacuum pumping valve on or off. . note: in reality this is interlocked with ccr12_gas_switch, only one can be on! @@ -126,19 +126,19 @@ target.datatype={"type":"enum", "members":{'off':0,'on':1}} target.default='off' [module ccr12_p1] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Default pressure Sensor, linear scale 0..1000mbar value.datatype={"type":"double", "unit":"mbar"} value.default=999 [module ccr12_p2] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Auxillary pressure Sensor. value.datatype={"type":"double", "unit":"mbar"} value.default=1e-6 [module ccr12_curve_p2] -class=secop.simulation.SimWritable +class=frappy.simulation.SimWritable .description=Curve for Aux pressure Sensor p2 .visibility=expert value.default='TTR100' @@ -146,7 +146,7 @@ value.datatype={"type":"enum", "members":{'0..10V':0,'default':1,'0..9V':2,'DI20 target.datatype={"type":"enum", "members":{'0..10V':0,'default':1,'0..9V':2,'DI200':3,'DI2000':4,'TTR100':7,'PTR90':8,'PTR225/PTR237':9,'ITR90':10,'ITR100 curve D':11, 'ITR100 curve 2':12, 'ITR100 curve 3':13,'ITR100 curve 4':14,'ITR100 curve 5':15, 'ITR100 curve 6':16, 'ITR100 curve 7':17, 'ITR100 curve 8':18, 'ITR100 curve 9':19, 'ITR100 curve A':20,'CMR361':21, 'CMR362':22, 'CMR363':23, 'CMR364':24, 'CMR365':25}} [module ccr12_p1_limits] -class=secop.simulation.SimWritable +class=frappy.simulation.SimWritable .description=Limits for pressure regulation in P1. .visibility=expert value.datatype={"type":"limit","members":{"type":"double", "min":0,"max":1000, "unit":"mbar"}} @@ -155,7 +155,7 @@ target.datatype={"type":"limit","members":{"type":"double", "min":0,"max":1000, target.default=[0,10] [module ccr12_p2_limits] -class=secop.simulation.SimWritable +class=frappy.simulation.SimWritable .description=Limits for pressure regulation in P2. .visibility=expert value.datatype={"type":"limit","members":{"type":"double", "min":0,"max":1000, "unit":"mbar"}} diff --git a/cfg/sim_mlz_ccr12_v2.cfg b/cfg/sim_mlz_ccr12_v2.cfg index 3d54447..51fee79 100644 --- a/cfg/sim_mlz_ccr12_v2.cfg +++ b/cfg/sim_mlz_ccr12_v2.cfg @@ -12,7 +12,7 @@ bindto=0.0.0.0 bindport=10767 [module T_ccr12] -class=secop.simulation.SimDrivable +class=frappy.simulation.SimDrivable .description=Main temperature control node of CCR12. . Switches between regulation on stick and regulation on tube depending on temperature requested. @@ -41,7 +41,7 @@ userlimits.readonly=False .meaning=["temperature_regulation", 20] [module T_ccr12_A] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=(optional) Sample temperature sensor. .visibility=expert value.datatype={"type":"double", "min":0, "unit":"K"} @@ -49,7 +49,7 @@ value.default=300 .meaning=["temperature", 9] [module T_ccr12_B] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=(regulation) temperature sensor on stick. .visibility=expert value.datatype={"type":"double", "min":0, "unit":"K"} @@ -57,7 +57,7 @@ value.default=300 .meaning=["temperature", 10] [module T_ccr12_C] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Temperature at the coldhead. .visibility=expert value.datatype={"type":"double", "min":0, "unit":"K"} @@ -65,7 +65,7 @@ value.default=70 .meaning=["temperature", 1] [module T_ccr12_D] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=(regulation) temperature at coupling to stick. .visibility=expert value.datatype={"type":"double", "min":0, "unit":"K"} @@ -75,7 +75,7 @@ value.default=80 [module ccr12_pressure_regulation] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Simple two-point presssure regulation. the mode parameter selects the readout on which to regulate, or 'none' for no regulation. .visibility=user .extra_params=switchpoints, mode @@ -91,7 +91,7 @@ value.datatype={"type":"double", "min":0, "max":1000, "unit":"mbar"} value.default = 1e-5 [module ccr12_compressor] -class=secop.simulation.SimDrivable +class=frappy.simulation.SimDrivable .description=Switches the compressor for the cooling stage on or off. . Note: This should always be on, except for fast heatup for sample change. @@ -101,7 +101,7 @@ value.default='off' target.datatype={"type":"enum", "members":{'off':0,'on':1}} [module ccr12_gas_switch] -class=secop.simulation.SimWritable +class=frappy.simulation.SimWritable .description=Switches the gas inlet on or off. . note: in reality this switches itself off after 15min. @@ -113,7 +113,7 @@ target.datatype={"type":"enum", "members":{'off':0,'on':1}} target.default='off' [module ccr12_vacuum_switch] -class=secop.simulation.SimWritable +class=frappy.simulation.SimWritable .description=Switches the vacuum pumping valve on or off. . note: in reality this is interlocked with ccr12_gas_switch, only one can be on! @@ -124,7 +124,7 @@ target.datatype={"type":"enum", "members":{'off':0,'on':1}} target.default='off' [module ccr12_p1] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Default pressure Sensor, linear scale 0..1000 mbar . Good candidate for a 'Sensor' Interface class! @@ -140,7 +140,7 @@ userlimits.description=current user set limits for the pressure regulation. userlimits.readonly=False [module ccr12_p2] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Auxillary pressure Sensor. value.default=1e-6 value.unit=mbar diff --git a/cfg/sim_mlz_htf02.cfg b/cfg/sim_mlz_htf02.cfg index 9b88eb1..a60b3bd 100644 --- a/cfg/sim_mlz_htf02.cfg +++ b/cfg/sim_mlz_htf02.cfg @@ -10,7 +10,7 @@ bindto=0.0.0.0 bindport=10767 [module T_htf02] -class=secop.simulation.SimDrivable +class=frappy.simulation.SimDrivable .description=Main temperature control node of htf02. . Controls the regulation loop of the Eurotherm. @@ -26,7 +26,7 @@ ramp.readonly=False .meaning=["temperature", 10] [module htf02_p] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Pressure Sensor at sample space (ivc). value.datatype={"type":"double", "min":0, "unit":"mbar"} value.default=989 diff --git a/cfg/sim_mlz_stressihtf2.cfg b/cfg/sim_mlz_stressihtf2.cfg index 8379214..00809c9 100644 --- a/cfg/sim_mlz_stressihtf2.cfg +++ b/cfg/sim_mlz_stressihtf2.cfg @@ -10,7 +10,7 @@ bindto=0.0.0.0 bindport=10767 [module T_stressihtf2] -class=secop.simulation.SimDrivable +class=frappy.simulation.SimDrivable .description=Main temperature control node of Stressihtf2. value.datatype={"type":"double", "min":0, "unit":"degC"} value.default=20 @@ -30,7 +30,7 @@ userlimits.readonly=False .meaning=['temperature_regulation', 10] [module T_stressihtf2_sample] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=(optional) Sample temperature sensor. .visibility=expert value.default=300 @@ -38,7 +38,7 @@ value.datatype={"type":"double", "min":0, "unit":"degC"} .meaning=["temperature", 9] [module stressihtf2_n2] -class=secop.simulation.SimWritable +class=frappy.simulation.SimWritable .description=Switches the N2 gas inlet on or off. .visibility=expert value.default='off' @@ -47,7 +47,7 @@ target.datatype={"type":"enum", "members":{'off':0,'on':1}} target.default='off' [module stressihtf2_he] -class=secop.simulation.SimWritable +class=frappy.simulation.SimWritable .description=Switches the He gas inlet on or off. .visibility=expert value.default='off' @@ -56,7 +56,7 @@ target.datatype={"type":"enum", "members":{'off':0,'on':1}} target.default='off' [module stressihtf2_lamps] -class=secop.simulation.SimWritable +class=frappy.simulation.SimWritable .description=Switches the heating lamps on or off. .visibility=expert value.default='on' @@ -65,7 +65,7 @@ target.datatype={"type":"enum", "members":{'off':0,'on':1}} target.default='on' [module stressihtf2_water_ok] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Readout of the cooling water state. .visibility=expert value.default='ok' diff --git a/cfg/sim_mlz_stressihtf2_v2.cfg b/cfg/sim_mlz_stressihtf2_v2.cfg index 81a8d85..fbfaef4 100644 --- a/cfg/sim_mlz_stressihtf2_v2.cfg +++ b/cfg/sim_mlz_stressihtf2_v2.cfg @@ -10,7 +10,7 @@ bindto=0.0.0.0 bindport=10767 [module T] -class=secop.simulation.SimDrivable +class=frappy.simulation.SimDrivable .description=Main temperature control node of Stressihtf2. value.datatype={"type":"double", "min":0, "unit":"degC"} value.default=20 @@ -30,7 +30,7 @@ userlimits.readonly=False .meaning=['temperature_regulation', 10] [module T_sample] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=(optional) Sample temperature sensor. .visibility=expert value.default=300 @@ -38,7 +38,7 @@ value.datatype={"type":"double", "min":0, "unit":"degC"} .meaning=["temperature", 9] [module N2] -class=secop.simulation.SimWritable +class=frappy.simulation.SimWritable .description=Switches the N2 gas inlet on or off. .visibility=expert value.default='off' @@ -47,7 +47,7 @@ target.datatype={"type":"enum", "members":{'off':0,'on':1}} target.default='off' [module He] -class=secop.simulation.SimWritable +class=frappy.simulation.SimWritable .description=Switches the He gas inlet on or off. .visibility=expert value.default='off' @@ -56,7 +56,7 @@ target.datatype={"type":"enum", "members":{'off':0,'on':1}} target.default='off' [module lamps] -class=secop.simulation.SimWritable +class=frappy.simulation.SimWritable .description=Switches the heating lamps on or off. .visibility=expert value.default='on' @@ -65,7 +65,7 @@ target.datatype={"type":"enum", "members":{'off':0,'on':1}} target.default='on' [module water_ok] -class=secop.simulation.SimReadable +class=frappy.simulation.SimReadable .description=Readout of the cooling water state. .visibility=expert value.default='ok' diff --git a/cfg/softcal.cfg b/cfg/softcal.cfg index c6f2439..2ac2511 100644 --- a/cfg/softcal.cfg +++ b/cfg/softcal.cfg @@ -1,12 +1,12 @@ [r3] -class = secop.core.Proxy -remote_class = secop.core.Readable +class = frappy.core.Proxy +remote_class = frappy.core.Readable description = temp sensor on 3He system uri = tcp://pc12694:5000 export = False [t3] -class = secop_psi.softcal.Sensor +class = frappy_psi.softcal.Sensor rawsensor = r3 calib = X131346 value.unit = K diff --git a/cfg/stressihtf2.cfg b/cfg/stressihtf2.cfg index 7cc14a2..610759a 100644 --- a/cfg/stressihtf2.cfg +++ b/cfg/stressihtf2.cfg @@ -11,7 +11,7 @@ bindto=0.0.0.0 bindport=10767 [module T] -class=secop_mlz.entangle.TemperatureController +class=frappy_mlz.entangle.TemperatureController tangodevice=tango://localhost:10000/box/eurotherm/ctrl .description=Main temperature control node of Stressihtf2. value.unit='degC' @@ -41,42 +41,42 @@ pid.default=[1,0,0] speed.default=0 [module T_sample_a] -class=secop_mlz.entangle.Sensor +class=frappy_mlz.entangle.Sensor tangodevice=tango://localhost:10000/box/eurotherm/sensora .description=Regulation temperature sensor. .visibility=user value.unit='degC' [module T_sample_b] -class=secop_mlz.entangle.Sensor +class=frappy_mlz.entangle.Sensor tangodevice=tango://localhost:10000/box/eurotherm/sensorb .description=(optional) Sample temperature sensor. .visibility=expert value.unit='degC' [module N2] -class=secop_mlz.entangle.NamedDigitalOutput +class=frappy_mlz.entangle.NamedDigitalOutput tangodevice=tango://localhost:10000/box/plc/_gas1 .description=Switches the N2 gas inlet on or off. .visibility=expert mapping=dict(off=0,on=1) [module He] -class=secop_mlz.entangle.NamedDigitalOutput +class=frappy_mlz.entangle.NamedDigitalOutput tangodevice=tango://localhost:10000/box/plc/_gas2 .description=Switches the He gas inlet on or off. .visibility=expert mapping=dict(off=0,on=1) [module lamps] -class=secop_mlz.entangle.NamedDigitalOutput +class=frappy_mlz.entangle.NamedDigitalOutput tangodevice=tango://localhost:10000/box/plc/_onoff .description=Switches the heating lamps on or off. .visibility=expert mapping=dict(off=0,on=1) [module water_ok] -class=secop_mlz.entangle.NamedDigitalInput +class=frappy_mlz.entangle.NamedDigitalInput tangodevice=tango://localhost:10000/box/plc/_waterok .description=Readout of the cooling water state. .visibility=expert diff --git a/cfg/test.cfg b/cfg/test.cfg index 4267c69..23a0b29 100644 --- a/cfg/test.cfg +++ b/cfg/test.cfg @@ -15,32 +15,32 @@ bindport=10768 [module LN2] -class=secop_demo.test.LN2 +class=frappy_demo.test.LN2 .description="random value between 0..100%%" value.unit = "%%" [module heater] -class=secop_demo.test.Heater +class=frappy_demo.test.Heater maxheaterpower=10 .description="some heater" [module T1] -class=secop_demo.test.Temp +class=frappy_demo.test.Temp sensor="X34598T7" .description="some temperature" [module T2] -class=secop_demo.modules.CoilTemp +class=frappy_demo.modules.CoilTemp sensor="X34598T8" .description="some temperature" [module T3] -class=secop_demo.modules.CoilTemp +class=frappy_demo.modules.CoilTemp sensor="X34598T9" .description="some temperature" [module Lower] -class=secop_demo.test.Lower +class=frappy_demo.test.Lower .description="something else" diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile index 1702033..1d8c32c 100644 --- a/ci/Jenkinsfile +++ b/ci/Jenkinsfile @@ -200,16 +200,16 @@ node("dockerhost") { sh '''#!/bin/bash git worktree add tmpmaster origin/master cd tmpmaster - docker build --target base --tag secop_base:latest ci - docker build --target docs --tag secop_docs:latest ci + docker build --target base --tag frappy_base:latest ci + docker build --target docs --tag frappy_docs:latest ci cd .. rm -rf tmpmaster ''' } stage('execute tests') { - def img = docker.image('secop_base:latest') - def docimg = docker.image('secop_docs:latest') + def img = docker.image('frappy_base:latest') + def docimg = docker.image('frappy_docs:latest') parallel 'Test': { img.inside { @@ -227,7 +227,7 @@ node("dockerhost") { if (GERRIT_EVENT_TYPE == 'change-merged') { sh ''' - rsync -rlv doc/_build/* /ictrlsrv/share/public/doc/secop + rsync -rlv doc/_build/* /ictrlsrv/share/public/doc/frappy ''' } }} diff --git a/ci/README b/ci/README index 0417805..5d7b9a9 100644 --- a/ci/README +++ b/ci/README @@ -10,10 +10,10 @@ The Dockerfile defines two images: To create the images: - docker build --target --tag secop_:latest . + docker build --target --tag frappy_:latest . To test images interactivly: - docker run -u jenkins -i -t secop /bin/bash + docker run -u jenkins -i -t frappy /bin/bash The Jenkinsfile uses this Dockerfile (only approved checked-in versions from master) to build the images (a rebuild will only happen if the Dockerfile is changed as docker diff --git a/doc/source/conf.py b/doc/source/conf.py index d319d15..6788b2e 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -27,7 +27,7 @@ from os import path # Add import path for inplace usage sys.path.insert(0, path.abspath(path.join(path.dirname(__file__), '..', '..'))) -from secop.version import get_version +from frappy.version import get_version # -- General configuration ------------------------------------------------ @@ -213,7 +213,7 @@ epub_exclude_files = ['search.html'] # Example configuration for intersphinx: refer to the Python standard library. intersphinx_mapping = {'https://docs.python.org/': None} -from secop.lib.classdoc import class_doc_handler +from frappy.lib.classdoc import class_doc_handler def setup(app): - app.connect('autodoc-process-docstring', class_doc_handler) \ No newline at end of file + app.connect('autodoc-process-docstring', class_doc_handler) diff --git a/doc/source/secop_demo.rst b/doc/source/frappy_demo.rst similarity index 56% rename from doc/source/secop_demo.rst rename to doc/source/frappy_demo.rst index 7273d58..02202ec 100644 --- a/doc/source/secop_demo.rst +++ b/doc/source/frappy_demo.rst @@ -1,10 +1,10 @@ Demo ==== -.. automodule:: secop_demo.cryo +.. automodule:: frappy_demo.cryo :show-inheritance: :members: -.. automodule:: secop_demo.test +.. automodule:: frappy_demo.test :show-inheritance: :members: diff --git a/doc/source/secop_ess.rst b/doc/source/frappy_ess.rst similarity index 64% rename from doc/source/secop_ess.rst rename to doc/source/frappy_ess.rst index 7f115c7..b5b81f2 100644 --- a/doc/source/secop_ess.rst +++ b/doc/source/frappy_ess.rst @@ -4,6 +4,6 @@ ESS EPICS ..... -.. automodule:: secop_ess.epics +.. automodule:: frappy_ess.epics :show-inheritance: :members: diff --git a/doc/source/secop_mlz.rst b/doc/source/frappy_mlz.rst similarity index 69% rename from doc/source/secop_mlz.rst rename to doc/source/frappy_mlz.rst index ec275ef..e7cb326 100644 --- a/doc/source/secop_mlz.rst +++ b/doc/source/frappy_mlz.rst @@ -4,7 +4,7 @@ MLZ Amagnet (Garfield) .................. -.. automodule:: secop_mlz.amagnet +.. automodule:: frappy_mlz.amagnet :show-inheritance: :members: @@ -12,7 +12,7 @@ Amagnet (Garfield) Entangle Framework .................. -.. automodule:: secop_mlz.entangle +.. automodule:: frappy_mlz.entangle :show-inheritance: :members: diff --git a/doc/source/secop_psi.rst b/doc/source/frappy_psi.rst similarity index 73% rename from doc/source/secop_psi.rst rename to doc/source/frappy_psi.rst index fd3663c..db5cb3c 100644 --- a/doc/source/secop_psi.rst +++ b/doc/source/frappy_psi.rst @@ -4,7 +4,7 @@ PSI (SINQ) CCU4 tutorial example ..................... -.. automodule:: secop_psi.ccu4 +.. automodule:: frappy_psi.ccu4 :show-inheritance: :members: @@ -12,7 +12,7 @@ CCU4 tutorial example PPMS .... -.. automodule:: secop_psi.ppms +.. automodule:: frappy_psi.ppms :show-inheritance: :members: @@ -21,7 +21,7 @@ LakeShore 370 Calibrated sensors and control loop not yet supported. -.. automodule:: secop_psi.ls370res +.. automodule:: frappy_psi.ls370res :show-inheritance: :members: diff --git a/doc/source/index.rst b/doc/source/index.rst index 8cb2774..93742c3 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -7,10 +7,10 @@ Frappy Programming Guide introduction tutorial reference - secop_psi - secop_demo - secop_mlz - secop_ess + frappy_psi + frappy_demo + frappy_mlz + frappy_ess * :ref:`genindex` diff --git a/doc/source/introduction.rst b/doc/source/introduction.rst index 2c70b39..34a841f 100644 --- a/doc/source/introduction.rst +++ b/doc/source/introduction.rst @@ -57,10 +57,10 @@ to provide to the user. Programming a Driver -------------------- -Programming a driver means extending one of the base classes like :class:`secop.modules.Readable` -or :class:`secop.modules.Drivable`. The parameters are defined in the dict :py:attr:`parameters`, as a -class attribute of the extended class, using the :class:`secop.params.Parameter` constructor, or in case -of altering the properties of an inherited parameter, :class:`secop.params.Override`. +Programming a driver means extending one of the base classes like :class:`frappy.modules.Readable` +or :class:`frappy.modules.Drivable`. The parameters are defined in the dict :py:attr:`parameters`, as a +class attribute of the extended class, using the :class:`frappy.params.Parameter` constructor, or in case +of altering the properties of an inherited parameter, :class:`frappy.params.Override`. Parameters usually need a method :meth:`read_()` implementing the code to retrieve their value from the hardware. Writeable parameters diff --git a/doc/source/reference.rst b/doc/source/reference.rst index 66efe31..f6d3527 100644 --- a/doc/source/reference.rst +++ b/doc/source/reference.rst @@ -4,85 +4,85 @@ Reference Module Base Classes ................... -.. autodata:: secop.modules.Done +.. autodata:: frappy.modules.Done -.. autoclass:: secop.modules.Module +.. autoclass:: frappy.modules.Module :members: earlyInit, initModule, startModule -.. autoclass:: secop.modules.Readable +.. autoclass:: frappy.modules.Readable :members: Status -.. autoclass:: secop.modules.Writable +.. autoclass:: frappy.modules.Writable -.. autoclass:: secop.modules.Drivable +.. autoclass:: frappy.modules.Drivable :members: Status, isBusy, isDriving, stop Parameters, Commands and Properties ................................... -.. autoclass:: secop.params.Parameter -.. autoclass:: secop.params.Command -.. autoclass:: secop.properties.Property -.. autoclass:: secop.modules.Attached +.. autoclass:: frappy.params.Parameter +.. autoclass:: frappy.params.Command +.. autoclass:: frappy.properties.Property +.. autoclass:: frappy.modules.Attached :show-inheritance: Datatypes ......... -.. autoclass:: secop.datatypes.FloatRange -.. autoclass:: secop.datatypes.IntRange -.. autoclass:: secop.datatypes.BoolType -.. autoclass:: secop.datatypes.ScaledInteger -.. autoclass:: secop.datatypes.EnumType -.. autoclass:: secop.datatypes.StringType -.. autoclass:: secop.datatypes.TupleOf -.. autoclass:: secop.datatypes.ArrayOf -.. autoclass:: secop.datatypes.StructOf -.. autoclass:: secop.datatypes.BLOBType +.. autoclass:: frappy.datatypes.FloatRange +.. autoclass:: frappy.datatypes.IntRange +.. autoclass:: frappy.datatypes.BoolType +.. autoclass:: frappy.datatypes.ScaledInteger +.. autoclass:: frappy.datatypes.EnumType +.. autoclass:: frappy.datatypes.StringType +.. autoclass:: frappy.datatypes.TupleOf +.. autoclass:: frappy.datatypes.ArrayOf +.. autoclass:: frappy.datatypes.StructOf +.. autoclass:: frappy.datatypes.BLOBType Communication ............. -.. autoclass:: secop.modules.Communicator +.. autoclass:: frappy.modules.Communicator :show-inheritance: :members: communicate -.. autoclass:: secop.io.StringIO +.. autoclass:: frappy.io.StringIO :show-inheritance: :members: communicate, multicomm -.. autoclass:: secop.io.BytesIO +.. autoclass:: frappy.io.BytesIO :show-inheritance: :members: communicate, multicomm -.. autoclass:: secop.io.HasIO +.. autoclass:: frappy.io.HasIO :show-inheritance: -.. autoclass:: secop.rwhandler.ReadHandler +.. autoclass:: frappy.rwhandler.ReadHandler :show-inheritance: :members: -.. autoclass:: secop.rwhandler.CommonReadHandler +.. autoclass:: frappy.rwhandler.CommonReadHandler :show-inheritance: :members: -.. autoclass:: secop.rwhandler.WriteHandler +.. autoclass:: frappy.rwhandler.WriteHandler :show-inheritance: :members: -.. autoclass:: secop.rwhandler.CommonWriteHandler +.. autoclass:: frappy.rwhandler.CommonWriteHandler :show-inheritance: :members: Exception classes -.....................-- +................. -.. automodule:: secop.errors +.. automodule:: frappy.errors :members: .. include:: server.rst diff --git a/doc/source/server.rst b/doc/source/server.rst index e5ed364..d5890e2 100644 --- a/doc/source/server.rst +++ b/doc/source/server.rst @@ -27,12 +27,12 @@ All other sections define the SECoP modules. The section name itself is the modu mandatory fields are **class** and **description**. **class** is a path to the Python class from there the module is instantiated, separated with dots. In the following example the class **HeLevel** used by the **helevel** module can be found in the PSI facility subdirectory -secop_psi in the python module file ccu4.py: +frappy_psi in the python module file ccu4.py: .. code:: [helevel] - class = secop_psi.ccu4.HeLevel + class = frappy_psi.ccu4.HeLevel description = this is the He level sensor of the main reservoir empty = 380 empty.export = False @@ -50,11 +50,11 @@ the SECoP interface. Starting ........ -The Frappy server can be started via the **bin/secop-server** script. +The Frappy server can be started via the **bin/frappy-server** script. .. parsed-literal:: - usage: secop-server [-h] [-v | -q] [-d] name + usage: frappy-server [-h] [-v | -q] [-d] name Manage a Frappy server diff --git a/doc/source/tutorial_helevel.rst b/doc/source/tutorial_helevel.rst index 3ac85e0..2a95eb1 100644 --- a/doc/source/tutorial_helevel.rst +++ b/doc/source/tutorial_helevel.rst @@ -8,7 +8,7 @@ meter, as this is the simplest module. As mentioned in the introduction, we have to code the access to the hardware (driver), and the Frappy framework will deal with the SECoP interface. The code for the driver is located in a subdirectory named after the facility or institute programming the driver -in our case *secop_psi*. We create a file named from the electronic device CCU4 we use +in our case *frappy_psi*. We create a file named from the electronic device CCU4 we use here for the He level reading. CCU4 luckily has a very simple and logical protocol: @@ -17,12 +17,12 @@ CCU4 luckily has a very simple and logical protocol: * ``\n`` reads the parameter named ```` * in both cases, the reply is ``=\n`` -``secop_psi/ccu4.py``: +``frappy_psi/ccu4.py``: .. code:: python - # the most common Frappy classes can be imported from secop.core - from secop.core import Readable, Parameter, FloatRange, BoolType, StringIO, HasIO + # the most common Frappy classes can be imported from frappy.core + from frappy.core import Readable, Parameter, FloatRange, BoolType, StringIO, HasIO class CCU4IO(StringIO): @@ -54,7 +54,7 @@ CCU4 luckily has a very simple and logical protocol: return txtvalue # the framework will automatically convert the string to a float -The class :class:`secop_psi.ccu4.CCU4IO`, an extension of (:class:`secop.stringio.StringIO`) +The class :class:`frappy_psi.ccu4.CCU4IO`, an extension of (:class:`frappy.stringio.StringIO`) serves as communication class. :Note: @@ -183,7 +183,7 @@ which means it might be worth to create a *query* method, and then the :Note: It make sense to unify *empty_length* and *full_length* to one parameter *calibration*, - as a :class:`secop.datatypes.StructOf` with members *empty_length* and *full_length*: + as a :class:`frappy.datatypes.StructOf` with members *empty_length* and *full_length*: .. code:: python @@ -196,7 +196,7 @@ which means it might be worth to create a *query* method, and then the For simplicity we stay with two float parameters for this tutorial. -The full documentation of the example can be found here: :class:`secop_psi.ccu4.HeLevel` +The full documentation of the example can be found here: :class:`frappy_psi.ccu4.HeLevel` Configuration @@ -220,7 +220,7 @@ We choose the name *example_cryo* and create therefore a configuration file [helev] description = He level of the cryostat He reservoir - class = secop_psi.ccu4.HeLevel + class = frappy_psi.ccu4.HeLevel uri = linse-moxa-4.psi.ch:3001 empty_length = 380 full_length = 0 diff --git a/etc/secop-generator b/etc/frappy-generator similarity index 85% rename from etc/secop-generator rename to etc/frappy-generator index c24b08d..0b11906 100755 --- a/etc/secop-generator +++ b/etc/frappy-generator @@ -27,7 +27,7 @@ import os import sys from os import path -from secop.lib import generalConfig +from frappy.lib import generalConfig def main(): @@ -36,22 +36,22 @@ def main(): generalConfig.init() config_dir = generalConfig['confdir'] - secop_unit = '/lib/systemd/system/secop@.service' - wants_dir = normal_dir + '/secop.target.wants' + frappy_unit = '/lib/systemd/system/frappy@.service' + wants_dir = normal_dir + '/frappy.target.wants' all_servers = [base for (base, ext) in map(path.splitext, os.listdir(config_dir)) if ext == '.cfg'] all_servers.sort() for srv in all_servers: - symlink = '%s/secop@%s.service' % (normal_dir, srv) - os.symlink(secop_unit, symlink) + symlink = '%s/frappy@%s.service' % (normal_dir, srv) + os.symlink(frappy_unit, symlink) if not path.isdir(wants_dir): os.mkdir(wants_dir) os.symlink(symlink, '%s/%s' % (wants_dir, path.basename(symlink))) # the stamp file signals successful run of the generator - open(normal_dir + '/secop.stamp', 'w').close() + open(normal_dir + '/frappy.stamp', 'w').close() if __name__ == '__main__': diff --git a/etc/secop.target b/etc/frappy.target similarity index 100% rename from etc/secop.target rename to etc/frappy.target diff --git a/etc/secop@.service b/etc/frappy@.service similarity index 63% rename from etc/secop@.service rename to etc/frappy@.service index 64e7518..74d78ef 100644 --- a/etc/secop@.service +++ b/etc/frappy@.service @@ -1,10 +1,10 @@ [Unit] -Description=SECoP SEC-node: %i +Description=FRAPPY SECoP SEC-node: %i After=network-online.service [Service] Type=notify -ExecStart=/usr/bin/secop-server %I +ExecStart=/usr/bin/frappy-server %I Restart=on-abnormal RestartSec=30 diff --git a/secop-server.spec b/frappy-server.spec similarity index 71% rename from secop-server.spec rename to frappy-server.spec index 706b678..6755ff6 100644 --- a/secop-server.spec +++ b/frappy-server.spec @@ -3,12 +3,12 @@ block_cipher = None -a = Analysis(['bin\\secop-server'], +a = Analysis(['bin\\frappy-server'], pathex=['.'], binaries=[], datas=[], - hiddenimports=['secop.protocol', 'secop.protocol.dispatcher', 'secop.protocol.interface', 'secop.protocol.interface.tcp', - 'secop_psi.ppmssim', 'secop_psi.ppmswindows', 'secop_psi.ppms'], + hiddenimports=['frappy.protocol', 'frappy.protocol.dispatcher', 'frappy.protocol.interface', 'frappy.protocol.interface.tcp', + 'frappy_psi.ppmssim', 'frappy_psi.ppmswindows', 'frappy_psi.ppms'], hookspath=[], runtime_hooks=[], excludes=[], @@ -22,7 +22,7 @@ exe = EXE(pyz, a.scripts, [], exclude_binaries=True, - name='secop-server', + name='frappy-server', debug=False, bootloader_ignore_signals=False, strip=False, @@ -35,4 +35,4 @@ coll = COLLECT(exe, strip=False, upx=True, upx_exclude=[], - name='secop-server') + name='frappy-server') diff --git a/secop/__init__.py b/frappy/__init__.py similarity index 100% rename from secop/__init__.py rename to frappy/__init__.py diff --git a/secop/client/__init__.py b/frappy/client/__init__.py similarity index 97% rename from secop/client/__init__.py rename to frappy/client/__init__.py index e01522a..7e2ccdc 100644 --- a/secop/client/__init__.py +++ b/frappy/client/__init__.py @@ -28,13 +28,13 @@ import time from collections import defaultdict from threading import Event, RLock, current_thread -import secop.errors -import secop.params -from secop.datatypes import get_datatype -from secop.lib import mkthread -from secop.lib.asynconn import AsynConn, ConnectionClosed -from secop.protocol.interface import decode_msg, encode_msg_frame -from secop.protocol.messages import COMMANDREQUEST, \ +import frappy.errors +import frappy.params +from frappy.datatypes import get_datatype +from frappy.lib import mkthread +from frappy.lib.asynconn import AsynConn, ConnectionClosed +from frappy.protocol.interface import decode_msg, encode_msg_frame +from frappy.protocol.messages import COMMANDREQUEST, \ DESCRIPTIONREQUEST, ENABLEEVENTSREQUEST, ERRORPREFIX, \ EVENTREPLY, HEARTBEATREQUEST, IDENTPREFIX, IDENTREQUEST, \ READREPLY, READREQUEST, REQUEST2REPLY, WRITEREPLY, WRITEREQUEST @@ -317,7 +317,7 @@ class SecopClient(ProxyClient): if module_param is not None: if action.startswith(ERRORPREFIX): timestamp = data[2].get('t', None) - readerror = secop.errors.make_secop_error(*data[0:2]) + readerror = frappy.errors.make_secop_error(*data[0:2]) value = None else: timestamp = data[1].get('t', None) @@ -533,7 +533,7 @@ class SecopClient(ProxyClient): """forced read over connection""" try: self.request(READREQUEST, self.identifier[module, parameter]) - except secop.errors.SECoPError: + except frappy.errors.SECoPError: # error reply message is already stored as readerror in cache pass return self.cache.get((module, parameter), None) @@ -561,7 +561,7 @@ class SecopClient(ProxyClient): argument = datatype.export_value(argument) else: if argument is not None: - raise secop.errors.BadValueError('command has no argument') + raise frappy.errors.BadValueError('command has no argument') # pylint: disable=unsubscriptable-object data, qualifiers = self.request(COMMANDREQUEST, self.identifier[module, command], argument)[2] datatype = self.modules[module]['commands'][command]['datatype'].result @@ -571,9 +571,9 @@ class SecopClient(ProxyClient): # the following attributes may be/are intended to be overwritten by a subclass - ERROR_MAP = secop.errors.EXCEPTIONS - DEFAULT_EXCEPTION = secop.errors.SECoPError - PREDEFINED_NAMES = set(secop.params.PREDEFINED_ACCESSIBLES) + ERROR_MAP = frappy.errors.EXCEPTIONS + DEFAULT_EXCEPTION = frappy.errors.SECoPError + PREDEFINED_NAMES = set(frappy.params.PREDEFINED_ACCESSIBLES) activate = True def error_map(self, exc): diff --git a/secop/client/interactive.py b/frappy/client/interactive.py similarity index 98% rename from secop/client/interactive.py rename to frappy/client/interactive.py index 28d8b61..cbaeced 100644 --- a/secop/client/interactive.py +++ b/frappy/client/interactive.py @@ -25,14 +25,14 @@ import sys import time import re from queue import Queue -from secop.client import SecopClient -from secop.errors import SECoPError -from secop.datatypes import get_datatype +from frappy.client import SecopClient +from frappy.errors import SECoPError +from frappy.datatypes import get_datatype USAGE = """ Usage: -from secop.client.interactive import Client +from frappy.client.interactive import Client client = Client('localhost:5000') # start client. # this connects and creates objects for all SECoP modules in the main namespace diff --git a/secop/core.py b/frappy/core.py similarity index 70% rename from secop/core.py rename to frappy/core.py index cda4273..6c3ffdc 100644 --- a/secop/core.py +++ b/frappy/core.py @@ -23,20 +23,20 @@ # # ***************************************************************************** -# allow to import the most important classes from 'secop' +# allow to import the most important classes from 'frappy' # pylint: disable=unused-import -from secop.datatypes import ArrayOf, BLOBType, BoolType, EnumType, \ +from frappy.datatypes import ArrayOf, BLOBType, BoolType, EnumType, \ FloatRange, IntRange, ScaledInteger, StringType, StructOf, TupleOf -from secop.lib.enum import Enum -from secop.modules import Attached, Communicator, \ +from frappy.lib.enum import Enum +from frappy.modules import Attached, Communicator, \ Done, Drivable, Feature, Module, Readable, Writable, HasAccessibles -from secop.params import Command, Parameter -from secop.properties import Property -from secop.proxy import Proxy, SecNode, proxy_class -from secop.io import HasIO, StringIO, BytesIO, HasIodev # TODO: remove HasIodev (legacy stuff) -from secop.persistent import PersistentMixin, PersistentParam -from secop.rwhandler import ReadHandler, WriteHandler, CommonReadHandler, \ +from frappy.params import Command, Parameter +from frappy.properties import Property +from frappy.proxy import Proxy, SecNode, proxy_class +from frappy.io import HasIO, StringIO, BytesIO, HasIodev # TODO: remove HasIodev (legacy stuff) +from frappy.persistent import PersistentMixin, PersistentParam +from frappy.rwhandler import ReadHandler, WriteHandler, CommonReadHandler, \ CommonWriteHandler, nopoll ERROR = Drivable.Status.ERROR diff --git a/secop/datatypes.py b/frappy/datatypes.py similarity index 99% rename from secop/datatypes.py rename to frappy/datatypes.py index 8296c2f..cd2ca03 100644 --- a/secop/datatypes.py +++ b/frappy/datatypes.py @@ -28,12 +28,12 @@ import sys from base64 import b64decode, b64encode -from secop.errors import BadValueError, \ +from frappy.errors import BadValueError, \ ConfigError, ProgrammingError, ProtocolError -from secop.lib import clamp, generalConfig -from secop.lib.enum import Enum -from secop.parse import Parser -from secop.properties import HasProperties, Property +from frappy.lib import clamp, generalConfig +from frappy.lib.enum import Enum +from frappy.parse import Parser +from frappy.properties import HasProperties, Property generalConfig.set_default('lazy_number_validation', False) diff --git a/secop/errors.py b/frappy/errors.py similarity index 100% rename from secop/errors.py rename to frappy/errors.py diff --git a/secop/features.py b/frappy/features.py similarity index 97% rename from secop/features.py rename to frappy/features.py index b25e72d..3588bb8 100644 --- a/secop/features.py +++ b/frappy/features.py @@ -23,12 +23,12 @@ """Define Mixin Features for real Modules implemented in the server""" -from secop.datatypes import ArrayOf, BoolType, EnumType, \ +from frappy.datatypes import ArrayOf, BoolType, EnumType, \ FloatRange, StringType, StructOf, TupleOf -from secop.core import Command, Done, Drivable, Feature, \ +from frappy.core import Command, Done, Drivable, Feature, \ Parameter, Property, PersistentParam, Readable -from secop.errors import BadValueError, ConfigError -from secop.lib import clamp +from frappy.errors import BadValueError, ConfigError +from frappy.lib import clamp # --- proposals, to be used at SINQ (not agreed as standard yet) --- diff --git a/secop/gui/__init__.py b/frappy/gui/__init__.py similarity index 100% rename from secop/gui/__init__.py rename to frappy/gui/__init__.py diff --git a/secop/gui/cfg_editor/__init__.py b/frappy/gui/cfg_editor/__init__.py similarity index 100% rename from secop/gui/cfg_editor/__init__.py rename to frappy/gui/cfg_editor/__init__.py diff --git a/secop/gui/cfg_editor/config_file.py b/frappy/gui/cfg_editor/config_file.py similarity index 98% rename from secop/gui/cfg_editor/config_file.py rename to frappy/gui/cfg_editor/config_file.py index 1a2d43f..3b0b632 100644 --- a/secop/gui/cfg_editor/config_file.py +++ b/frappy/gui/cfg_editor/config_file.py @@ -24,8 +24,8 @@ import configparser from collections import OrderedDict from configparser import NoOptionError -from secop.gui.cfg_editor.tree_widget_item import TreeWidgetItem -from secop.gui.cfg_editor.utils import get_all_children_with_names, \ +from frappy.gui.cfg_editor.tree_widget_item import TreeWidgetItem +from frappy.gui.cfg_editor.utils import get_all_children_with_names, \ get_all_items, get_interface_class_from_name, \ get_module_class_from_name, get_params, get_props diff --git a/secop/gui/cfg_editor/mainwindow.py b/frappy/gui/cfg_editor/mainwindow.py similarity index 96% rename from secop/gui/cfg_editor/mainwindow.py rename to frappy/gui/cfg_editor/mainwindow.py index 937b4f5..8d30663 100644 --- a/secop/gui/cfg_editor/mainwindow.py +++ b/frappy/gui/cfg_editor/mainwindow.py @@ -22,12 +22,12 @@ import os -from secop.gui.cfg_editor.node_display import NodeDisplay -from secop.gui.cfg_editor.utils import get_file_paths, loadUi -from secop.gui.cfg_editor.widgets import TabBar -from secop.gui.qt import QMainWindow, QMessageBox +from frappy.gui.cfg_editor.node_display import NodeDisplay +from frappy.gui.cfg_editor.utils import get_file_paths, loadUi +from frappy.gui.cfg_editor.widgets import TabBar +from frappy.gui.qt import QMainWindow, QMessageBox -# TODO move secop mainwinodw to gui/client and all specific stuff +# TODO move frappy mainwindow to gui/client and all specific stuff NODE = 'node' MODULE = 'module' INTERFACE = 'interface' diff --git a/secop/gui/cfg_editor/node_display.py b/frappy/gui/cfg_editor/node_display.py similarity index 95% rename from secop/gui/cfg_editor/node_display.py rename to frappy/gui/cfg_editor/node_display.py index 6ecc95d..a09d00a 100644 --- a/secop/gui/cfg_editor/node_display.py +++ b/frappy/gui/cfg_editor/node_display.py @@ -20,8 +20,8 @@ # # ***************************************************************************** -from secop.gui.cfg_editor.utils import loadUi -from secop.gui.qt import QHBoxLayout, QSizePolicy, QSpacerItem, Qt, QWidget +from frappy.gui.cfg_editor.utils import loadUi +from frappy.gui.qt import QHBoxLayout, QSizePolicy, QSpacerItem, Qt, QWidget class NodeDisplay(QWidget): diff --git a/secop/gui/cfg_editor/tree_widget_item.py b/frappy/gui/cfg_editor/tree_widget_item.py similarity index 96% rename from secop/gui/cfg_editor/tree_widget_item.py rename to frappy/gui/cfg_editor/tree_widget_item.py index 20b41b2..b64112c 100644 --- a/secop/gui/cfg_editor/tree_widget_item.py +++ b/frappy/gui/cfg_editor/tree_widget_item.py @@ -20,13 +20,13 @@ # # ***************************************************************************** -from secop.gui.cfg_editor.utils import loadUi, \ +from frappy.gui.cfg_editor.utils import loadUi, \ set_name_edit_style, setIcon, setTreeIcon -from secop.gui.qt import QDialog, QFont, QHBoxLayout, \ +from frappy.gui.qt import QDialog, QFont, QHBoxLayout, \ QLabel, QPushButton, QSize, QSizePolicy, QTextEdit, \ QTreeWidgetItem, QVBoxLayout, QWidget, pyqtSignal -from secop.gui.valuewidgets import get_widget -from secop.properties import Property +from frappy.gui.valuewidgets import get_widget +from frappy.properties import Property NODE = 'node' INTERFACE = 'interface' @@ -41,7 +41,7 @@ class TreeWidgetItem(QTreeWidgetItem): parameters=None, properties=None, parent=None): """object_class: for interfaces and modules = class for parameter and properties = their objects - the datatype passed onto ValueWidget should be on of secop.datatypes""" + the datatype passed onto ValueWidget should be on of frappy.datatypes""" # TODO: like stated in docstring the datatype for parameters and # properties must be found out through their object super().__init__(parent) diff --git a/secop/gui/cfg_editor/ui/add_dialog.ui b/frappy/gui/cfg_editor/ui/add_dialog.ui similarity index 100% rename from secop/gui/cfg_editor/ui/add_dialog.ui rename to frappy/gui/cfg_editor/ui/add_dialog.ui diff --git a/secop/gui/cfg_editor/ui/change_name_dialog.ui b/frappy/gui/cfg_editor/ui/change_name_dialog.ui similarity index 100% rename from secop/gui/cfg_editor/ui/change_name_dialog.ui rename to frappy/gui/cfg_editor/ui/change_name_dialog.ui diff --git a/secop/gui/cfg_editor/ui/icons/add_comment.png b/frappy/gui/cfg_editor/ui/icons/add_comment.png similarity index 100% rename from secop/gui/cfg_editor/ui/icons/add_comment.png rename to frappy/gui/cfg_editor/ui/icons/add_comment.png diff --git a/secop/gui/cfg_editor/ui/icons/add_interface.png b/frappy/gui/cfg_editor/ui/icons/add_interface.png similarity index 100% rename from secop/gui/cfg_editor/ui/icons/add_interface.png rename to frappy/gui/cfg_editor/ui/icons/add_interface.png diff --git a/secop/gui/cfg_editor/ui/icons/add_module.png b/frappy/gui/cfg_editor/ui/icons/add_module.png similarity index 100% rename from secop/gui/cfg_editor/ui/icons/add_module.png rename to frappy/gui/cfg_editor/ui/icons/add_module.png diff --git a/secop/gui/cfg_editor/ui/icons/add_parameter.png b/frappy/gui/cfg_editor/ui/icons/add_parameter.png similarity index 100% rename from secop/gui/cfg_editor/ui/icons/add_parameter.png rename to frappy/gui/cfg_editor/ui/icons/add_parameter.png diff --git a/secop/gui/cfg_editor/ui/icons/add_property.png b/frappy/gui/cfg_editor/ui/icons/add_property.png similarity index 100% rename from secop/gui/cfg_editor/ui/icons/add_property.png rename to frappy/gui/cfg_editor/ui/icons/add_property.png diff --git a/secop/gui/cfg_editor/ui/icons/cfg-editor.qrc b/frappy/gui/cfg_editor/ui/icons/cfg-editor.qrc similarity index 100% rename from secop/gui/cfg_editor/ui/icons/cfg-editor.qrc rename to frappy/gui/cfg_editor/ui/icons/cfg-editor.qrc diff --git a/secop/gui/cfg_editor/ui/icons/comment.png b/frappy/gui/cfg_editor/ui/icons/comment.png similarity index 100% rename from secop/gui/cfg_editor/ui/icons/comment.png rename to frappy/gui/cfg_editor/ui/icons/comment.png diff --git a/secop/gui/cfg_editor/ui/icons/delete.png b/frappy/gui/cfg_editor/ui/icons/delete.png similarity index 100% rename from secop/gui/cfg_editor/ui/icons/delete.png rename to frappy/gui/cfg_editor/ui/icons/delete.png diff --git a/secop/gui/cfg_editor/ui/icons/duplicate.png b/frappy/gui/cfg_editor/ui/icons/duplicate.png similarity index 100% rename from secop/gui/cfg_editor/ui/icons/duplicate.png rename to frappy/gui/cfg_editor/ui/icons/duplicate.png diff --git a/secop/gui/cfg_editor/ui/icons/edit.png b/frappy/gui/cfg_editor/ui/icons/edit.png similarity index 100% rename from secop/gui/cfg_editor/ui/icons/edit.png rename to frappy/gui/cfg_editor/ui/icons/edit.png diff --git a/secop/gui/cfg_editor/ui/icons/empty.png b/frappy/gui/cfg_editor/ui/icons/empty.png similarity index 100% rename from secop/gui/cfg_editor/ui/icons/empty.png rename to frappy/gui/cfg_editor/ui/icons/empty.png diff --git a/secop/gui/cfg_editor/ui/icons/interface.png b/frappy/gui/cfg_editor/ui/icons/interface.png similarity index 100% rename from secop/gui/cfg_editor/ui/icons/interface.png rename to frappy/gui/cfg_editor/ui/icons/interface.png diff --git a/secop/gui/cfg_editor/ui/icons/module.png b/frappy/gui/cfg_editor/ui/icons/module.png similarity index 100% rename from secop/gui/cfg_editor/ui/icons/module.png rename to frappy/gui/cfg_editor/ui/icons/module.png diff --git a/secop/gui/cfg_editor/ui/icons/new.png b/frappy/gui/cfg_editor/ui/icons/new.png similarity index 100% rename from secop/gui/cfg_editor/ui/icons/new.png rename to frappy/gui/cfg_editor/ui/icons/new.png diff --git a/secop/gui/cfg_editor/ui/icons/open.png b/frappy/gui/cfg_editor/ui/icons/open.png similarity index 100% rename from secop/gui/cfg_editor/ui/icons/open.png rename to frappy/gui/cfg_editor/ui/icons/open.png diff --git a/secop/gui/cfg_editor/ui/icons/parameter.png b/frappy/gui/cfg_editor/ui/icons/parameter.png similarity index 100% rename from secop/gui/cfg_editor/ui/icons/parameter.png rename to frappy/gui/cfg_editor/ui/icons/parameter.png diff --git a/secop/gui/cfg_editor/ui/icons/property.png b/frappy/gui/cfg_editor/ui/icons/property.png similarity index 100% rename from secop/gui/cfg_editor/ui/icons/property.png rename to frappy/gui/cfg_editor/ui/icons/property.png diff --git a/secop/gui/cfg_editor/ui/icons/save.png b/frappy/gui/cfg_editor/ui/icons/save.png similarity index 100% rename from secop/gui/cfg_editor/ui/icons/save.png rename to frappy/gui/cfg_editor/ui/icons/save.png diff --git a/secop/gui/cfg_editor/ui/mainwindow.ui b/frappy/gui/cfg_editor/ui/mainwindow.ui similarity index 100% rename from secop/gui/cfg_editor/ui/mainwindow.ui rename to frappy/gui/cfg_editor/ui/mainwindow.ui diff --git a/secop/gui/cfg_editor/ui/node_display.ui b/frappy/gui/cfg_editor/ui/node_display.ui similarity index 97% rename from secop/gui/cfg_editor/ui/node_display.ui rename to frappy/gui/cfg_editor/ui/node_display.ui index 10451a3..b48e13e 100644 --- a/secop/gui/cfg_editor/ui/node_display.ui +++ b/frappy/gui/cfg_editor/ui/node_display.ui @@ -81,7 +81,7 @@ TreeWidget QTreeWidget -
secop.gui.cfg_editor.widgets
+
frappy.gui.cfg_editor.widgets
diff --git a/secop/gui/cfg_editor/utils.py b/frappy/gui/cfg_editor/utils.py similarity index 93% rename from secop/gui/cfg_editor/utils.py rename to frappy/gui/cfg_editor/utils.py index 5e3b80a..a2014bb 100644 --- a/secop/gui/cfg_editor/utils.py +++ b/frappy/gui/cfg_editor/utils.py @@ -24,12 +24,12 @@ import inspect import sys from os import listdir, path -from secop.gui.qt import QDialogButtonBox, QFileDialog, QIcon, QSize, uic -from secop.modules import Module -from secop.params import Parameter -from secop.properties import Property -from secop.protocol.interface.tcp import TCPServer -from secop.server import generalConfig +from frappy.gui.qt import QDialogButtonBox, QFileDialog, QIcon, QSize, uic +from frappy.modules import Module +from frappy.params import Parameter +from frappy.properties import Property +from frappy.protocol.interface.tcp import TCPServer +from frappy.server import generalConfig uipath = path.dirname(__file__) @@ -109,7 +109,7 @@ def get_modules(): base_path = generalConfig.basedir # pylint: disable=too-many-nested-blocks for dirname in listdir(base_path): - if dirname.startswith('secop_'): + if dirname.startswith('frappy_'): modules[dirname] = {} for filename in listdir(path.join(base_path, dirname)): if not path.isfile(path.join(base_path, dirname, filename)) or \ @@ -121,7 +121,7 @@ def get_modules(): __import__(module) for name, obj in inspect.getmembers(sys.modules[module]): if inspect.isclass(obj) and \ - obj.__module__.startswith('secop_') and \ + obj.__module__.startswith('frappy_') and \ issubclass(obj, Module): # full_name = '%s.%s' % (obj.__module__, name) if not module_in_file: @@ -140,7 +140,7 @@ def get_module_class_from_name(name): module = name[:last_dot] __import__(module) for cls_name, obj in inspect.getmembers(sys.modules[module]): - if inspect.isclass(obj) and obj.__module__.startswith('secop_') \ + if inspect.isclass(obj) and obj.__module__.startswith('frappy_') \ and issubclass(obj, Module) and cls_name == class_name: return obj except ImportError: @@ -156,7 +156,7 @@ def get_interface_class_from_name(name): def get_interfaces(): # TODO class must be found out like for modules interfaces = [] - interface_path = path.join(generalConfig.basedir, 'secop', + interface_path = path.join(generalConfig.basedir, 'frappy', 'protocol', 'interface') for filename in listdir(interface_path): if path.isfile(path.join(interface_path, filename)) and \ diff --git a/secop/gui/cfg_editor/widgets.py b/frappy/gui/cfg_editor/widgets.py similarity index 98% rename from secop/gui/cfg_editor/widgets.py rename to frappy/gui/cfg_editor/widgets.py index 6c866d4..5b61d80 100644 --- a/secop/gui/cfg_editor/widgets.py +++ b/frappy/gui/cfg_editor/widgets.py @@ -23,13 +23,13 @@ import os -from secop.gui.cfg_editor.config_file import read_config, write_config -from secop.gui.cfg_editor.tree_widget_item import TreeWidgetItem -from secop.gui.cfg_editor.utils import get_all_items, \ +from frappy.gui.cfg_editor.config_file import read_config, write_config +from frappy.gui.cfg_editor.tree_widget_item import TreeWidgetItem +from frappy.gui.cfg_editor.utils import get_all_items, \ get_file_paths, get_interface_class_from_name, get_interfaces, \ get_module_class_from_name, get_modules, get_params, \ get_props, loadUi, set_name_edit_style, setActionIcon -from secop.gui.qt import QComboBox, QDialog, QDialogButtonBox, QLabel, \ +from frappy.gui.qt import QComboBox, QDialog, QDialogButtonBox, QLabel, \ QLineEdit, QMenu, QPoint, QSize, QStandardItem, QStandardItemModel, \ Qt, QTabBar, QTextEdit, QTreeView, QTreeWidget, pyqtSignal diff --git a/secop/gui/icon_rc_qt4.py b/frappy/gui/icon_rc_qt4.py similarity index 100% rename from secop/gui/icon_rc_qt4.py rename to frappy/gui/icon_rc_qt4.py diff --git a/secop/gui/icon_rc_qt5.py b/frappy/gui/icon_rc_qt5.py similarity index 100% rename from secop/gui/icon_rc_qt5.py rename to frappy/gui/icon_rc_qt5.py diff --git a/secop/gui/mainwindow.py b/frappy/gui/mainwindow.py similarity index 94% rename from secop/gui/mainwindow.py rename to frappy/gui/mainwindow.py index f2e3e3b..b75f835 100644 --- a/secop/gui/mainwindow.py +++ b/frappy/gui/mainwindow.py @@ -22,14 +22,14 @@ # ***************************************************************************** -import secop.client -from secop.gui.modulectrl import ModuleCtrl -from secop.gui.nodectrl import NodeCtrl -from secop.gui.paramview import ParameterView -from secop.gui.qt import QBrush, QColor, QInputDialog, QMainWindow, \ +import frappy.client +from frappy.gui.modulectrl import ModuleCtrl +from frappy.gui.nodectrl import NodeCtrl +from frappy.gui.paramview import ParameterView +from frappy.gui.qt import QBrush, QColor, QInputDialog, QMainWindow, \ QMessageBox, QObject, QTreeWidgetItem, pyqtSignal, pyqtSlot -from secop.gui.util import Value, loadUi -from secop.lib import formatExtendedTraceback +from frappy.gui.util import Value, loadUi +from frappy.lib import formatExtendedTraceback ITEM_TYPE_NODE = QTreeWidgetItem.UserType + 1 ITEM_TYPE_GROUP = QTreeWidgetItem.UserType + 2 @@ -45,7 +45,7 @@ class QSECNode(QObject): def __init__(self, uri, parent=None): super().__init__(parent) - self.conn = conn = secop.client.SecopClient(uri) + self.conn = conn = frappy.client.SecopClient(uri) conn.validate_data = True self.log = conn.log self.contactPoint = conn.uri @@ -92,11 +92,11 @@ class QSECNode(QObject): def syncCommunicate(self, action, ident='', data=None): reply = self.conn.request(action, ident, data) # pylint: disable=not-an-iterable - return secop.client.encode_msg_frame(*reply).decode('utf-8') + return frappy.client.encode_msg_frame(*reply).decode('utf-8') def decode_message(self, msg): # decode_msg needs bytes as input - return secop.client.decode_msg(msg.encode('utf-8')) + return frappy.client.decode_msg(msg.encode('utf-8')) def _getDescribingParameterData(self, module, parameter): return self.modules[module]['parameters'][parameter] diff --git a/secop/gui/miniplot.py b/frappy/gui/miniplot.py similarity index 99% rename from secop/gui/miniplot.py rename to frappy/gui/miniplot.py index 15e56ac..ff7dec5 100644 --- a/secop/gui/miniplot.py +++ b/frappy/gui/miniplot.py @@ -25,7 +25,7 @@ from os import path -from secop.gui.qt import QBrush, QColor, QPainter, QPen, \ +from frappy.gui.qt import QBrush, QColor, QPainter, QPen, \ QPointF, QPolygonF, QRectF, QSize, Qt, QWidget _magenta = QBrush(QColor('#A12F86')) diff --git a/secop/gui/modulectrl.py b/frappy/gui/modulectrl.py similarity index 97% rename from secop/gui/modulectrl.py rename to frappy/gui/modulectrl.py index 16553fe..ab550c9 100644 --- a/secop/gui/modulectrl.py +++ b/frappy/gui/modulectrl.py @@ -23,11 +23,11 @@ # ***************************************************************************** -from secop.gui.params import ParameterView -from secop.gui.qt import QCheckBox, QDialog, QLabel, \ +from frappy.gui.params import ParameterView +from frappy.gui.qt import QCheckBox, QDialog, QLabel, \ QMessageBox, QPushButton, QSizePolicy, QWidget -from secop.gui.util import loadUi -from secop.gui.valuewidgets import get_widget +from frappy.gui.util import loadUi +from frappy.gui.valuewidgets import get_widget class CommandDialog(QDialog): @@ -357,7 +357,7 @@ class ModuleCtrl(QWidget): def _updateValue(self, module, parameter, value): if module != self._module: return - # value is is type secop.gui.mainwindow.Value + # value is is type frappy.gui.mainwindow.Value # note: update subwidgets with the data portion only - # note: paramwidgets[..][1] is a ParameterView from secop.gui.params + # note: paramwidgets[..][1] is a ParameterView from frappy.gui.params self._paramWidgets[parameter][1].updateValue(value) diff --git a/secop/gui/nodectrl.py b/frappy/gui/nodectrl.py similarity index 97% rename from secop/gui/nodectrl.py rename to frappy/gui/nodectrl.py index 0b24ae0..8f6df94 100644 --- a/secop/gui/nodectrl.py +++ b/frappy/gui/nodectrl.py @@ -28,12 +28,12 @@ from time import sleep import mlzlog -import secop.lib -from secop.datatypes import EnumType, StringType -from secop.errors import SECoPError -from secop.gui.qt import QFont, QFontMetrics, QLabel, \ +import frappy.lib +from frappy.datatypes import EnumType, StringType +from frappy.errors import SECoPError +from frappy.gui.qt import QFont, QFontMetrics, QLabel, \ QMessageBox, QTextCursor, QWidget, pyqtSlot, toHtmlEscaped -from secop.gui.util import Value, loadUi +from frappy.gui.util import Value, loadUi class NodeCtrl(QWidget): @@ -165,7 +165,7 @@ class NodeCtrl(QWidget): else: widget = QLabel('Unsupported Interfaceclass %r' % interfaces) except Exception as e: - print(secop.lib.formatExtendedTraceback()) + print(frappy.lib.formatExtendedTraceback()) widget = QLabel('Bad configured Module %s! (%s)' % (modname, e)) if unit: diff --git a/secop/gui/params/__init__.py b/frappy/gui/params/__init__.py similarity index 97% rename from secop/gui/params/__init__.py rename to frappy/gui/params/__init__.py index f2162fe..68d11d7 100644 --- a/secop/gui/params/__init__.py +++ b/frappy/gui/params/__init__.py @@ -22,9 +22,9 @@ # ***************************************************************************** -from secop.datatypes import EnumType -from secop.gui.qt import QWidget, pyqtSignal, pyqtSlot -from secop.gui.util import loadUi +from frappy.datatypes import EnumType +from frappy.gui.qt import QWidget, pyqtSignal, pyqtSlot +from frappy.gui.util import loadUi class ParameterWidget(QWidget): diff --git a/secop/gui/paramview.py b/frappy/gui/paramview.py similarity index 96% rename from secop/gui/paramview.py rename to frappy/gui/paramview.py index a931cbe..9733aa7 100644 --- a/secop/gui/paramview.py +++ b/frappy/gui/paramview.py @@ -22,8 +22,8 @@ # ***************************************************************************** -from secop.gui.qt import QLabel, QSizePolicy, QWidget -from secop.gui.util import loadUi +from frappy.gui.qt import QLabel, QSizePolicy, QWidget +from frappy.gui.util import loadUi class ParameterView(QWidget): diff --git a/secop/gui/qt.py b/frappy/gui/qt.py similarity index 97% rename from secop/gui/qt.py rename to frappy/gui/qt.py index 2f743bd..9950f8d 100644 --- a/secop/gui/qt.py +++ b/frappy/gui/qt.py @@ -44,7 +44,7 @@ try: from xml.sax.saxutils import escape as toHtmlEscaped - import secop.gui.icon_rc_qt5 + import frappy.gui.icon_rc_qt5 except ImportError: from PyQt4 import uic @@ -57,7 +57,7 @@ except ImportError: QTreeWidget, QFileDialog, QTabBar, QAction, QMenu, QDialogButtonBox, QAbstractItemView, \ QSpacerItem, QTreeView, QStandardItemModel, QStandardItem - import secop.gui.icon_rc_qt4 + import frappy.gui.icon_rc_qt4 def toHtmlEscaped(s): return Qt.escape(s) diff --git a/secop/gui/ui/cmdbuttons.ui b/frappy/gui/ui/cmdbuttons.ui similarity index 100% rename from secop/gui/ui/cmdbuttons.ui rename to frappy/gui/ui/cmdbuttons.ui diff --git a/secop/gui/ui/cmddialog.ui b/frappy/gui/ui/cmddialog.ui similarity index 100% rename from secop/gui/ui/cmddialog.ui rename to frappy/gui/ui/cmddialog.ui diff --git a/secop/gui/ui/mainwindow.ui b/frappy/gui/ui/mainwindow.ui similarity index 99% rename from secop/gui/ui/mainwindow.ui rename to frappy/gui/ui/mainwindow.ui index ac9ff5f..b647870 100644 --- a/secop/gui/ui/mainwindow.ui +++ b/frappy/gui/ui/mainwindow.ui @@ -11,7 +11,7 @@ - secop-gui + frappy-gui diff --git a/secop/gui/ui/modulebuttons.ui b/frappy/gui/ui/modulebuttons.ui similarity index 100% rename from secop/gui/ui/modulebuttons.ui rename to frappy/gui/ui/modulebuttons.ui diff --git a/secop/gui/ui/modulectrl.ui b/frappy/gui/ui/modulectrl.ui similarity index 100% rename from secop/gui/ui/modulectrl.ui rename to frappy/gui/ui/modulectrl.ui diff --git a/secop/gui/ui/nodectrl.ui b/frappy/gui/ui/nodectrl.ui similarity index 100% rename from secop/gui/ui/nodectrl.ui rename to frappy/gui/ui/nodectrl.ui diff --git a/secop/gui/ui/parambuttons.ui b/frappy/gui/ui/parambuttons.ui similarity index 100% rename from secop/gui/ui/parambuttons.ui rename to frappy/gui/ui/parambuttons.ui diff --git a/secop/gui/ui/parambuttons_select.ui b/frappy/gui/ui/parambuttons_select.ui similarity index 100% rename from secop/gui/ui/parambuttons_select.ui rename to frappy/gui/ui/parambuttons_select.ui diff --git a/secop/gui/ui/paramview.ui b/frappy/gui/ui/paramview.ui similarity index 100% rename from secop/gui/ui/paramview.ui rename to frappy/gui/ui/paramview.ui diff --git a/secop/gui/util.py b/frappy/gui/util.py similarity index 98% rename from secop/gui/util.py rename to frappy/gui/util.py index e908733..911e33a 100644 --- a/secop/gui/util.py +++ b/frappy/gui/util.py @@ -24,7 +24,7 @@ from os import path -from secop.gui.qt import uic +from frappy.gui.qt import uic uipath = path.dirname(__file__) diff --git a/secop/gui/valuewidgets.py b/frappy/gui/valuewidgets.py similarity index 97% rename from secop/gui/valuewidgets.py rename to frappy/gui/valuewidgets.py index cd16f7d..2a4163d 100644 --- a/secop/gui/valuewidgets.py +++ b/frappy/gui/valuewidgets.py @@ -22,12 +22,12 @@ # ***************************************************************************** -from secop.datatypes import ArrayOf, BLOBType, BoolType, EnumType, \ +from frappy.datatypes import ArrayOf, BLOBType, BoolType, EnumType, \ FloatRange, IntRange, StringType, StructOf, TextType, TupleOf -from secop.gui.qt import QCheckBox, QComboBox, QDialog, \ +from frappy.gui.qt import QCheckBox, QComboBox, QDialog, \ QDoubleSpinBox, QFrame, QGridLayout, QGroupBox, \ QLabel, QLineEdit, QSpinBox, QTextEdit, QVBoxLayout -from secop.gui.util import loadUi +from frappy.gui.util import loadUi # XXX: implement live validators !!!! diff --git a/secop/io.py b/frappy/io.py similarity index 98% rename from secop/io.py rename to frappy/io.py index 9fee063..b1f6b91 100644 --- a/secop/io.py +++ b/frappy/io.py @@ -28,13 +28,13 @@ import re import time import threading -from secop.lib.asynconn import AsynConn, ConnectionClosed -from secop.datatypes import ArrayOf, BLOBType, BoolType, FloatRange, IntRange, \ +from frappy.lib.asynconn import AsynConn, ConnectionClosed +from frappy.datatypes import ArrayOf, BLOBType, BoolType, FloatRange, IntRange, \ StringType, TupleOf, ValueType -from secop.errors import CommunicationFailedError, ConfigError, ProgrammingError -from secop.modules import Attached, Command, \ +from frappy.errors import CommunicationFailedError, ConfigError, ProgrammingError +from frappy.modules import Attached, Command, \ Communicator, Done, Module, Parameter, Property -from secop.lib import generalConfig +from frappy.lib import generalConfig generalConfig.set_default('legacy_hasiodev', False) diff --git a/secop/lib/__init__.py b/frappy/lib/__init__.py similarity index 98% rename from secop/lib/__init__.py rename to frappy/lib/__init__.py index aae453c..069239d 100644 --- a/secop/lib/__init__.py +++ b/frappy/lib/__init__.py @@ -124,7 +124,7 @@ class GeneralConfig: except TypeError: if key in self.defaults: # accept retrieving defaults before init - # e.g. 'lazy_number_validation' in secop.datatypes + # e.g. 'lazy_number_validation' in frappy.datatypes return self.defaults[key] raise TypeError('generalConfig.init() has to be called first') from None @@ -201,11 +201,11 @@ def clamp(_min, value, _max): def get_class(spec): """loads a class given by string in dotted notation (as python would do)""" modname, classname = spec.rsplit('.', 1) - if modname.startswith('secop'): + if modname.startswith('frappy'): module = importlib.import_module(modname) else: # rarely needed by now.... - module = importlib.import_module('secop.' + modname) + module = importlib.import_module('frappy.' + modname) try: return getattr(module, classname) except AttributeError: diff --git a/secop/lib/asynconn.py b/frappy/lib/asynconn.py similarity index 98% rename from secop/lib/asynconn.py rename to frappy/lib/asynconn.py index 52d3878..3c3b139 100644 --- a/secop/lib/asynconn.py +++ b/frappy/lib/asynconn.py @@ -25,7 +25,7 @@ generic class for byte oriented communication includes implementation for TCP and Serial connections support for asynchronous communication, but may be used also for -synchronous IO (see secop.io) +synchronous IO (see frappy.io) """ import ast @@ -33,8 +33,8 @@ import select import socket import time -from secop.errors import CommunicationFailedError, ConfigError -from secop.lib import closeSocket, parseHostPort, tcpSocket +from frappy.errors import CommunicationFailedError, ConfigError +from frappy.lib import closeSocket, parseHostPort, tcpSocket try: from serial import Serial diff --git a/secop/lib/classdoc.py b/frappy/lib/classdoc.py similarity index 98% rename from secop/lib/classdoc.py rename to frappy/lib/classdoc.py index 18392d7..5322923 100644 --- a/secop/lib/classdoc.py +++ b/frappy/lib/classdoc.py @@ -22,7 +22,7 @@ from textwrap import indent -from secop.modules import Command, HasProperties, Module, Parameter, Property +from frappy.modules import Command, HasProperties, Module, Parameter, Property def indent_description(p): diff --git a/secop/lib/enum.py b/frappy/lib/enum.py similarity index 100% rename from secop/lib/enum.py rename to frappy/lib/enum.py diff --git a/secop/lib/multievent.py b/frappy/lib/multievent.py similarity index 100% rename from secop/lib/multievent.py rename to frappy/lib/multievent.py diff --git a/secop/lib/pidfile.py b/frappy/lib/pidfile.py similarity index 100% rename from secop/lib/pidfile.py rename to frappy/lib/pidfile.py diff --git a/secop/lib/py35compat.py b/frappy/lib/py35compat.py similarity index 100% rename from secop/lib/py35compat.py rename to frappy/lib/py35compat.py diff --git a/secop/lib/sequence.py b/frappy/lib/sequence.py similarity index 99% rename from secop/lib/sequence.py rename to frappy/lib/sequence.py index 68e79ad..31ee7df 100644 --- a/secop/lib/sequence.py +++ b/frappy/lib/sequence.py @@ -26,8 +26,8 @@ from time import sleep -from secop.errors import IsBusyError -from secop.lib import mkthread +from frappy.errors import IsBusyError +from frappy.lib import mkthread class Namespace: diff --git a/secop/lib/statemachine.py b/frappy/lib/statemachine.py similarity index 99% rename from secop/lib/statemachine.py rename to frappy/lib/statemachine.py index 9fe6271..a40dac4 100644 --- a/secop/lib/statemachine.py +++ b/frappy/lib/statemachine.py @@ -77,7 +77,7 @@ import time import threading import queue from logging import getLogger -from secop.lib import mkthread, UniqueObject +from frappy.lib import mkthread, UniqueObject Stop = UniqueObject('Stop') diff --git a/secop/logging.py b/frappy/logging.py similarity index 98% rename from secop/logging.py rename to frappy/logging.py index 04ab122..5cf829c 100644 --- a/secop/logging.py +++ b/frappy/logging.py @@ -27,9 +27,9 @@ from os.path import dirname, join from logging import DEBUG, INFO, addLevelName import mlzlog -from secop.lib import generalConfig -from secop.datatypes import BoolType -from secop.properties import Property +from frappy.lib import generalConfig +from frappy.datatypes import BoolType +from frappy.properties import Property OFF = 99 COMLOG = 15 diff --git a/secop/modules.py b/frappy/modules.py similarity index 98% rename from secop/modules.py rename to frappy/modules.py index 363daa8..15538f6 100644 --- a/secop/modules.py +++ b/frappy/modules.py @@ -28,15 +28,15 @@ import threading from collections import OrderedDict from functools import wraps -from secop.datatypes import ArrayOf, BoolType, EnumType, FloatRange, \ +from frappy.datatypes import ArrayOf, BoolType, EnumType, FloatRange, \ IntRange, StatusType, StringType, TextType, TupleOf, DiscouragedConversion -from secop.errors import BadValueError, CommunicationFailedError, ConfigError, \ +from frappy.errors import BadValueError, CommunicationFailedError, ConfigError, \ ProgrammingError, SECoPError, secop_error -from secop.lib import formatException, mkthread, UniqueObject, generalConfig -from secop.lib.enum import Enum -from secop.params import Accessible, Command, Parameter -from secop.properties import HasProperties, Property -from secop.logging import RemoteLogHandler, HasComlog +from frappy.lib import formatException, mkthread, UniqueObject, generalConfig +from frappy.lib.enum import Enum +from frappy.params import Accessible, Command, Parameter +from frappy.properties import HasProperties, Property +from frappy.logging import RemoteLogHandler, HasComlog generalConfig.set_default('disable_value_range_check', False) # check for problematic value range by default @@ -338,7 +338,7 @@ class Module(HasAccessibles): self.implementation = myclassname # list of all 'secop' modules # self.interface_classes = [ - # b.__name__ for b in mycls.__mro__ if b.__module__.startswith('secop.modules')] + # b.__name__ for b in mycls.__mro__ if b.__module__.startswith('frappy.modules')] # list of only the 'highest' secop module class self.interface_classes = [ b.__name__ for b in mycls.__mro__ if issubclass(Drivable, b)][0:1] diff --git a/secop/params.py b/frappy/params.py similarity index 98% rename from secop/params.py rename to frappy/params.py index 6a0bf5d..08a7e15 100644 --- a/secop/params.py +++ b/frappy/params.py @@ -25,12 +25,12 @@ import inspect -from secop.datatypes import BoolType, CommandType, DataType, \ +from frappy.datatypes import BoolType, CommandType, DataType, \ DataTypeType, EnumType, NoneOr, OrType, \ StringType, StructOf, TextType, TupleOf, ValueType -from secop.errors import BadValueError, ProgrammingError -from secop.properties import HasProperties, Property -from secop.lib import generalConfig +from frappy.errors import BadValueError, ProgrammingError +from frappy.properties import HasProperties, Property +from frappy.lib import generalConfig generalConfig.set_default('tolerate_poll_property', False) diff --git a/secop/parse.py b/frappy/parse.py similarity index 100% rename from secop/parse.py rename to frappy/parse.py diff --git a/secop/persistent.py b/frappy/persistent.py similarity index 97% rename from secop/persistent.py rename to frappy/persistent.py index 5ef3ab5..d12c868 100644 --- a/secop/persistent.py +++ b/frappy/persistent.py @@ -55,10 +55,10 @@ class MyClass(PersistentMixin, ...): import os import json -from secop.lib import generalConfig -from secop.datatypes import EnumType -from secop.params import Parameter, Property, Command -from secop.modules import HasAccessibles +from frappy.lib import generalConfig +from frappy.datatypes import EnumType +from frappy.params import Parameter, Property, Command +from frappy.modules import HasAccessibles class PersistentParam(Parameter): diff --git a/secop/properties.py b/frappy/properties.py similarity index 98% rename from secop/properties.py rename to frappy/properties.py index d491f65..4bb9224 100644 --- a/secop/properties.py +++ b/frappy/properties.py @@ -25,9 +25,9 @@ import inspect -from secop.errors import BadValueError, ConfigError, ProgrammingError -from secop.lib import UniqueObject -from secop.lib.py35compat import Object +from frappy.errors import BadValueError, ConfigError, ProgrammingError +from frappy.lib import UniqueObject +from frappy.lib.py35compat import Object UNSET = UniqueObject('undefined value') #: an unset value, not even None diff --git a/secop/protocol/__init__.py b/frappy/protocol/__init__.py similarity index 100% rename from secop/protocol/__init__.py rename to frappy/protocol/__init__.py diff --git a/secop/protocol/dispatcher.py b/frappy/protocol/dispatcher.py similarity index 99% rename from secop/protocol/dispatcher.py rename to frappy/protocol/dispatcher.py index 58a0e4b..bf550f6 100644 --- a/secop/protocol/dispatcher.py +++ b/frappy/protocol/dispatcher.py @@ -42,10 +42,10 @@ import threading from collections import OrderedDict from time import time as currenttime -from secop.errors import NoSuchCommandError, NoSuchModuleError, \ +from frappy.errors import NoSuchCommandError, NoSuchModuleError, \ NoSuchParameterError, ProtocolError, ReadOnlyError, SECoPServerError -from secop.params import Parameter -from secop.protocol.messages import COMMANDREPLY, DESCRIPTIONREPLY, \ +from frappy.params import Parameter +from frappy.protocol.messages import COMMANDREPLY, DESCRIPTIONREPLY, \ DISABLEEVENTSREPLY, ENABLEEVENTSREPLY, ERRORPREFIX, EVENTREPLY, \ HEARTBEATREPLY, IDENTREPLY, IDENTREQUEST, READREPLY, WRITEREPLY, \ LOGGING_REPLY, LOG_EVENT diff --git a/secop/protocol/interface/__init__.py b/frappy/protocol/interface/__init__.py similarity index 100% rename from secop/protocol/interface/__init__.py rename to frappy/protocol/interface/__init__.py diff --git a/secop/protocol/interface/tcp.py b/frappy/protocol/interface/tcp.py similarity index 96% rename from secop/protocol/interface/tcp.py rename to frappy/protocol/interface/tcp.py index a41f4b4..e57e621 100644 --- a/secop/protocol/interface/tcp.py +++ b/frappy/protocol/interface/tcp.py @@ -28,13 +28,13 @@ import threading import time import errno -from secop.datatypes import BoolType, StringType -from secop.errors import SECoPError -from secop.lib import formatException, \ +from frappy.datatypes import BoolType, StringType +from frappy.errors import SECoPError +from frappy.lib import formatException, \ formatExtendedStack, formatExtendedTraceback -from secop.properties import Property -from secop.protocol.interface import decode_msg, encode_msg_frame, get_msg -from secop.protocol.messages import ERRORPREFIX, \ +from frappy.properties import Property +from frappy.protocol.interface import decode_msg, encode_msg_frame, get_msg +from frappy.protocol.messages import ERRORPREFIX, \ HELPREPLY, HELPREQUEST, HelpMessage DEF_PORT = 10767 diff --git a/secop/protocol/interface/zmq.py b/frappy/protocol/interface/zmq.py similarity index 100% rename from secop/protocol/interface/zmq.py rename to frappy/protocol/interface/zmq.py diff --git a/secop/protocol/messages.py b/frappy/protocol/messages.py similarity index 100% rename from secop/protocol/messages.py rename to frappy/protocol/messages.py diff --git a/secop/protocol/router.py b/frappy/protocol/router.py similarity index 91% rename from secop/protocol/router.py rename to frappy/protocol/router.py index d49a74d..7c76e9b 100644 --- a/secop/protocol/router.py +++ b/frappy/protocol/router.py @@ -34,16 +34,16 @@ simplifications: import time -import secop.client -import secop.errors -import secop.protocol.dispatcher -from secop.lib.multievent import MultiEvent -from secop.protocol.messages import COMMANDREQUEST, DESCRIPTIONREPLY, \ +import frappy.client +import frappy.errors +import frappy.protocol.dispatcher +from frappy.lib.multievent import MultiEvent +from frappy.protocol.messages import COMMANDREQUEST, DESCRIPTIONREPLY, \ ENABLEEVENTSREPLY, ERRORPREFIX, EVENTREPLY, READREQUEST, WRITEREQUEST -class SecopClient(secop.client.SecopClient): - disconnectedExc = secop.errors.CommunicationFailedError('remote SEC node disconnected') +class SecopClient(frappy.client.SecopClient): + disconnectedExc = frappy.errors.CommunicationFailedError('remote SEC node disconnected') disconnectedError = (disconnectedExc.name, str(disconnectedExc)) def __init__(self, uri, log, dispatcher): @@ -74,10 +74,10 @@ class SecopClient(secop.client.SecopClient): if module is None: self.dispatcher.restart() self._shutdown = True - raise secop.errors.SECoPError('descriptive data for node %r has changed' % self.nodename) + raise frappy.errors.SECoPError('descriptive data for node %r has changed' % self.nodename) -class Router(secop.protocol.dispatcher.Dispatcher): +class Router(frappy.protocol.dispatcher.Dispatcher): singlenode = None def __init__(self, name, logger, options, srv): @@ -91,7 +91,7 @@ class Router(secop.protocol.dispatcher.Dispatcher): uri = options.pop('node', None) uris = options.pop('nodes', None) if uri and uris: - raise secop.errors.ConfigError('can not specify node _and_ nodes') + raise frappy.errors.ConfigError('can not specify node _and_ nodes') super().__init__(name, logger, options, srv) if uri: self.nodes = [SecopClient(uri, logger.getChild('routed'), self)] @@ -122,7 +122,7 @@ class Router(secop.protocol.dispatcher.Dispatcher): self.node_by_module[module] = node self.nodes.append(node) self.restart() - return secop.client.UNREGISTER + return frappy.client.UNREGISTER return None node.register_callback(None, nodeStateChange) @@ -165,7 +165,7 @@ class Router(secop.protocol.dispatcher.Dispatcher): def handle_deactivate(self, conn, specifier, data): if specifier: - raise secop.errors.NotImplementedError('module wise activation not implemented') + raise frappy.errors.NotImplementedError('module wise activation not implemented') super().handle_deactivate(conn, specifier, data) def handle_read(self, conn, specifier, data): diff --git a/secop/proxy.py b/frappy/proxy.py similarity index 95% rename from secop/proxy.py rename to frappy/proxy.py index 10fe83f..b117948 100644 --- a/secop/proxy.py +++ b/frappy/proxy.py @@ -21,14 +21,14 @@ # ***************************************************************************** """SECoP proxy modules""" -from secop.client import SecopClient, decode_msg, encode_msg_frame -from secop.datatypes import StringType -from secop.errors import BadValueError, CommunicationFailedError, ConfigError -from secop.lib import get_class -from secop.modules import Drivable, Module, Readable, Writable -from secop.params import Command, Parameter -from secop.properties import Property -from secop.io import HasIO +from frappy.client import SecopClient, decode_msg, encode_msg_frame +from frappy.datatypes import StringType +from frappy.errors import BadValueError, CommunicationFailedError, ConfigError +from frappy.lib import get_class +from frappy.modules import Drivable, Module, Readable, Writable +from frappy.params import Command, Parameter +from frappy.properties import Property +from frappy.io import HasIO class ProxyModule(HasIO, Module): diff --git a/secop/rwhandler.py b/frappy/rwhandler.py similarity index 99% rename from secop/rwhandler.py rename to frappy/rwhandler.py index 76aa803..6a29578 100644 --- a/secop/rwhandler.py +++ b/frappy/rwhandler.py @@ -54,8 +54,8 @@ Example 2: addressable HW parameters """ import functools -from secop.modules import Done -from secop.errors import ProgrammingError +from frappy.modules import Done +from frappy.errors import ProgrammingError def wraps(func): diff --git a/secop/server.py b/frappy/server.py similarity index 96% rename from secop/server.py rename to frappy/server.py index e2be9c6..d8a4908 100644 --- a/secop/server.py +++ b/frappy/server.py @@ -30,11 +30,11 @@ import sys import traceback from collections import OrderedDict -from secop.errors import ConfigError, SECoPError -from secop.lib import formatException, get_class, generalConfig -from secop.lib.multievent import MultiEvent -from secop.params import PREDEFINED_ACCESSIBLES -from secop.modules import Attached +from frappy.errors import ConfigError, SECoPError +from frappy.lib import formatException, get_class, generalConfig +from frappy.lib.multievent import MultiEvent +from frappy.params import PREDEFINED_ACCESSIBLES +from frappy.modules import Attached try: from daemon import DaemonContext @@ -341,16 +341,16 @@ class Server: self.log.info('all modules started') history_path = os.environ.get('FRAPPY_HISTORY') if history_path: - from secop_psi.historywriter import FrappyHistoryWriter # pylint: disable=import-outside-toplevel + from frappy_psi.historywriter import FrappyHistoryWriter # pylint: disable=import-outside-toplevel writer = FrappyHistoryWriter(history_path, PREDEFINED_ACCESSIBLES.keys(), self.dispatcher) # treat writer as a connection self.dispatcher.add_connection(writer) writer.init(self.dispatcher.handle_describe(writer, None, None)) # TODO: if ever somebody wants to implement an other history writer: - # - a general config file /etc/secp/secop.conf or /etc/secop.conf + # - a general config file /etc/secp/frappy.conf or /etc/frappy.conf # might be introduced, which contains the log, pid and cfg directory path and # the class path implementing the history # - or we just add here an other if statement: # history_path = os.environ.get('ALTERNATIVE_HISTORY') # if history_path: - # from secop_.historywriter import ... etc. + # from frappy_.historywriter import ... etc. diff --git a/secop/simulation.py b/frappy/simulation.py similarity index 96% rename from secop/simulation.py rename to frappy/simulation.py index c974ff9..bc23d93 100644 --- a/secop/simulation.py +++ b/frappy/simulation.py @@ -25,9 +25,9 @@ import random from time import sleep -from secop.datatypes import FloatRange -from secop.lib import mkthread -from secop.modules import Drivable, Module, Parameter, Readable, Writable, Command +from frappy.datatypes import FloatRange +from frappy.lib import mkthread +from frappy.modules import Drivable, Module, Parameter, Readable, Writable, Command class SimBase: diff --git a/secop/version.py b/frappy/version.py similarity index 100% rename from secop/version.py rename to frappy/version.py diff --git a/secop_demo/__init__.py b/frappy_demo/__init__.py similarity index 100% rename from secop_demo/__init__.py rename to frappy_demo/__init__.py diff --git a/secop_demo/cryo.py b/frappy_demo/cryo.py similarity index 98% rename from secop_demo/cryo.py rename to frappy_demo/cryo.py index b53ba32..28ee14a 100644 --- a/secop_demo/cryo.py +++ b/frappy_demo/cryo.py @@ -25,11 +25,11 @@ import random import time from math import atan -from secop.datatypes import BoolType, EnumType, FloatRange, StringType, TupleOf -from secop.lib import clamp, mkthread -from secop.modules import Command, Drivable, Parameter +from frappy.datatypes import BoolType, EnumType, FloatRange, StringType, TupleOf +from frappy.lib import clamp, mkthread +from frappy.modules import Command, Drivable, Parameter # test custom property (value.test can be changed in config file) -from secop.properties import Property +from frappy.properties import Property Parameter.propertyDict['test'] = Property('A Property for testing purposes', StringType(), default='', export=True) diff --git a/secop_demo/modules.py b/frappy_demo/modules.py similarity index 98% rename from secop_demo/modules.py rename to frappy_demo/modules.py index 22d3675..9d459c6 100644 --- a/secop_demo/modules.py +++ b/frappy_demo/modules.py @@ -25,13 +25,13 @@ import random import threading import time -from secop.datatypes import ArrayOf, BoolType, EnumType, \ +from frappy.datatypes import ArrayOf, BoolType, EnumType, \ FloatRange, IntRange, StringType, StructOf, TupleOf -from secop.lib.enum import Enum -from secop.modules import Drivable -from secop.modules import Parameter as SECoP_Parameter -from secop.modules import Readable -from secop.properties import Property +from frappy.lib.enum import Enum +from frappy.modules import Drivable +from frappy.modules import Parameter as SECoP_Parameter +from frappy.modules import Readable +from frappy.properties import Property class Parameter(SECoP_Parameter): diff --git a/secop_demo/test.py b/frappy_demo/test.py similarity index 94% rename from secop_demo/test.py rename to frappy_demo/test.py index 7966c11..c454f28 100644 --- a/secop_demo/test.py +++ b/frappy_demo/test.py @@ -23,9 +23,9 @@ import random -from secop.datatypes import FloatRange, StringType -from secop.modules import Communicator, Drivable, Parameter, Readable -from secop.params import Command +from frappy.datatypes import FloatRange, StringType +from frappy.modules import Communicator, Drivable, Parameter, Readable +from frappy.params import Command class LN2(Readable): diff --git a/secop_ess/__init__.py b/frappy_ess/__init__.py similarity index 100% rename from secop_ess/__init__.py rename to frappy_ess/__init__.py diff --git a/secop_ess/epics.py b/frappy_ess/epics.py similarity index 97% rename from secop_ess/epics.py rename to frappy_ess/epics.py index 515fbdf..f72d71f 100644 --- a/secop_ess/epics.py +++ b/frappy_ess/epics.py @@ -21,8 +21,8 @@ # ***************************************************************************** -from secop.datatypes import EnumType, FloatRange, StringType -from secop.modules import Drivable, Parameter, Readable +from frappy.datatypes import EnumType, FloatRange, StringType +from frappy.modules import Drivable, Parameter, Readable try: from pvaccess import Channel # import EPIVSv4 functionallity, PV access @@ -185,7 +185,7 @@ class EpicsDrivable(Drivable): # """Temperature control loop""" -# should also derive from secop.core.temperaturecontroller, once its +# should also derive from frappy.core.temperaturecontroller, once its # features are agreed upon diff --git a/secop_mlz/__init__.py b/frappy_mlz/__init__.py similarity index 100% rename from secop_mlz/__init__.py rename to frappy_mlz/__init__.py diff --git a/secop_mlz/amagnet.py b/frappy_mlz/amagnet.py similarity index 98% rename from secop_mlz/amagnet.py rename to frappy_mlz/amagnet.py index ff14734..f88330a 100644 --- a/secop_mlz/amagnet.py +++ b/frappy_mlz/amagnet.py @@ -28,10 +28,10 @@ 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.modules import Drivable, Parameter +from frappy.datatypes import ArrayOf, FloatRange, StringType, StructOf, TupleOf +from frappy.errors import ConfigError, DisabledError +from frappy.lib.sequence import SequencerMixin, Step +from frappy.modules import Drivable, Parameter class GarfieldMagnet(SequencerMixin, Drivable): diff --git a/secop_mlz/entangle.py b/frappy_mlz/entangle.py similarity index 99% rename from secop_mlz/entangle.py rename to frappy_mlz/entangle.py index ff09d93..18a5d70 100644 --- a/secop_mlz/entangle.py +++ b/frappy_mlz/entangle.py @@ -36,18 +36,18 @@ from time import sleep from time import time as currenttime import PyTango -from secop.datatypes import ArrayOf, EnumType, FloatRange, \ +from frappy.datatypes import ArrayOf, EnumType, FloatRange, \ IntRange, LimitsType, StringType, TupleOf -from secop.errors import CommunicationFailedError, \ +from frappy.errors import CommunicationFailedError, \ ConfigError, HardwareError, ProgrammingError -from secop.lib import lazy_property -from secop.modules import Command, \ +from frappy.lib import lazy_property +from frappy.modules import Command, \ Drivable, Module, Parameter, Readable ##### -# Only export these classes for 'from secop_mlz import *' +# Only export these classes for 'from frappy_mlz import *' __all__ = [ 'AnalogInput', 'Sensor', 'AnalogOutput', 'Actuator', 'Motor', diff --git a/secop_psi/__init__.py b/frappy_psi/__init__.py similarity index 100% rename from secop_psi/__init__.py rename to frappy_psi/__init__.py diff --git a/secop_psi/ah2700.py b/frappy_psi/ah2700.py similarity index 97% rename from secop_psi/ah2700.py rename to frappy_psi/ah2700.py index df403ee..dbcae27 100644 --- a/secop_psi/ah2700.py +++ b/frappy_psi/ah2700.py @@ -20,7 +20,7 @@ # ***************************************************************************** """Andeen Hagerling capacitance bridge""" -from secop.core import Done, FloatRange, HasIO, Parameter, Readable, StringIO, nopoll +from frappy.core import Done, FloatRange, HasIO, Parameter, Readable, StringIO, nopoll class Ah2700IO(StringIO): diff --git a/secop_psi/ccu4.py b/frappy_psi/ccu4.py similarity index 96% rename from secop_psi/ccu4.py rename to frappy_psi/ccu4.py index e1b4801..15991f8 100644 --- a/secop_psi/ccu4.py +++ b/frappy_psi/ccu4.py @@ -21,8 +21,8 @@ # ***************************************************************************** """drivers for CCU4, the cryostat control unit at SINQ""" -# the most common Frappy classes can be imported from secop.core -from secop.core import EnumType, FloatRange, \ +# the most common Frappy classes can be imported from frappy.core +from frappy.core import EnumType, FloatRange, \ HasIO, Parameter, Readable, StringIO diff --git a/secop_psi/channelswitcher.py b/frappy_psi/channelswitcher.py similarity index 96% rename from secop_psi/channelswitcher.py rename to frappy_psi/channelswitcher.py index 4c3fe57..1f81394 100644 --- a/secop_psi/channelswitcher.py +++ b/frappy_psi/channelswitcher.py @@ -24,12 +24,12 @@ Example Config File: [sw] description=the switcher for blabla channels -class=secop_facility.module.YourChannelSwitcher +class=frappy_facility.module.YourChannelSwitcher uri=... [chan1] description=channel 1 -class=secop_facility.module.YourChannel +class=frappy_facility.module.YourChannel switcher=sw [chan2] @@ -38,8 +38,8 @@ switcher=sw import time -from secop.datatypes import IntRange, BoolType, FloatRange -from secop.core import Attached, Property, Drivable, Parameter, Readable, Done +from frappy.datatypes import IntRange, BoolType, FloatRange +from frappy.core import Attached, Property, Drivable, Parameter, Readable, Done class ChannelSwitcher(Drivable): diff --git a/secop_psi/convergence.py b/frappy_psi/convergence.py similarity index 98% rename from secop_psi/convergence.py rename to frappy_psi/convergence.py index b2aaa47..a0a4693 100644 --- a/secop_psi/convergence.py +++ b/frappy_psi/convergence.py @@ -20,8 +20,8 @@ # # ***************************************************************************** -from secop.core import Parameter, FloatRange, BUSY, IDLE, WARN -from secop.lib.statemachine import StateMachine, Retry, Stop +from frappy.core import Parameter, FloatRange, BUSY, IDLE, WARN +from frappy.lib.statemachine import StateMachine, Retry, Stop class HasConvergence: diff --git a/secop_psi/historywriter.py b/frappy_psi/historywriter.py similarity index 98% rename from secop_psi/historywriter.py rename to frappy_psi/historywriter.py index 76b1bea..07b9919 100644 --- a/secop_psi/historywriter.py +++ b/frappy_psi/historywriter.py @@ -20,7 +20,7 @@ import time import frappyhistory # pylint: disable=import-error -from secop.datatypes import get_datatype, IntRange, FloatRange, ScaledInteger,\ +from frappy.datatypes import get_datatype, IntRange, FloatRange, ScaledInteger,\ EnumType, BoolType, StringType, TupleOf, StructOf diff --git a/secop_psi/k2601b.py b/frappy_psi/k2601b.py similarity index 98% rename from secop_psi/k2601b.py rename to frappy_psi/k2601b.py index 9538281..444a136 100644 --- a/secop_psi/k2601b.py +++ b/frappy_psi/k2601b.py @@ -26,7 +26,7 @@ * setting the active parameter to True raises an error """ -from secop.core import Attached, BoolType, Done, EnumType, FloatRange, \ +from frappy.core import Attached, BoolType, Done, EnumType, FloatRange, \ HasIO, Module, Parameter, Readable, StringIO, Writable diff --git a/secop_psi/ls370res.py b/frappy_psi/ls370res.py similarity index 97% rename from secop_psi/ls370res.py rename to frappy_psi/ls370res.py index eeb4e57..4680faa 100644 --- a/secop_psi/ls370res.py +++ b/frappy_psi/ls370res.py @@ -30,12 +30,12 @@ the hardware state. import time from ast import literal_eval -import secop.io -from secop.datatypes import BoolType, EnumType, FloatRange, IntRange -from secop.lib import formatStatusBits -from secop.core import Done, Drivable, Parameter, Property, CommonReadHandler, CommonWriteHandler -from secop.io import HasIO -from secop_psi.channelswitcher import Channel, ChannelSwitcher +import frappy.io +from frappy.datatypes import BoolType, EnumType, FloatRange, IntRange +from frappy.lib import formatStatusBits +from frappy.core import Done, Drivable, Parameter, Property, CommonReadHandler, CommonWriteHandler +from frappy.io import HasIO +from frappy_psi.channelswitcher import Channel, ChannelSwitcher Status = Drivable.Status @@ -43,7 +43,7 @@ Status = Drivable.Status STATUS_BIT_LABELS = 'CS_OVL VCM_OVL VMIX_OVL VDIF_OVL R_OVER R_UNDER T_OVER T_UNDER'.split() -class StringIO(secop.io.StringIO): +class StringIO(frappy.io.StringIO): identification = [('*IDN?', 'LSCI,MODEL370,.*')] wait_before = 0.05 diff --git a/secop_psi/ls370sim.py b/frappy_psi/ls370sim.py similarity index 98% rename from secop_psi/ls370sim.py rename to frappy_psi/ls370sim.py index 015f202..b934685 100644 --- a/secop_psi/ls370sim.py +++ b/frappy_psi/ls370sim.py @@ -20,7 +20,7 @@ # ***************************************************************************** """a very simple simulator for a LakeShore Model 370""" -from secop.modules import Communicator +from frappy.modules import Communicator class Ls370Sim(Communicator): diff --git a/secop_psi/mercury.py b/frappy_psi/mercury.py similarity index 98% rename from secop_psi/mercury.py rename to frappy_psi/mercury.py index 991d0fb..975dddd 100644 --- a/secop_psi/mercury.py +++ b/frappy_psi/mercury.py @@ -25,12 +25,12 @@ import math import re import time -from secop.core import Drivable, HasIO, Writable, \ +from frappy.core import Drivable, HasIO, Writable, \ Parameter, Property, Readable, StringIO, Attached, Done, IDLE, nopoll -from secop.datatypes import EnumType, FloatRange, StringType, StructOf, BoolType -from secop.errors import HardwareError -from secop_psi.convergence import HasConvergence -from secop.lib.enum import Enum +from frappy.datatypes import EnumType, FloatRange, StringType, StructOf, BoolType +from frappy.errors import HardwareError +from frappy_psi.convergence import HasConvergence +from frappy.lib.enum import Enum VALUE_UNIT = re.compile(r'(.*\d|inf)([A-Za-z/%]*)$') diff --git a/secop_psi/motorvalve.py b/frappy_psi/motorvalve.py similarity index 97% rename from secop_psi/motorvalve.py rename to frappy_psi/motorvalve.py index 0c7344f..d721d95 100644 --- a/secop_psi/motorvalve.py +++ b/frappy_psi/motorvalve.py @@ -27,7 +27,7 @@ of the motor controller. Motor settings for the currently used valve: [valve_motor] description = valve motor -class = secop_psi.trinamic.Motor +class = frappy_psi.trinamic.Motor maxcurrent=0.3 # a value corresponding to the torque needed to firmly close the valve. move_limit=9999 # no move limit needed acceleration=150 @@ -36,18 +36,18 @@ auto_reset=True # motor stalls on closing [valve] description = trinamic angular motor valve -class = secop_psi.motorvalve.MotorValve +class = frappy_psi.motorvalve.MotorValve motor = valve_motor turns = 9 # number of turns needed to open fully speed = 400 # close to max. speed lowspeed = 50 # speed for final closing / reference run """ -from secop.core import Drivable, Parameter, EnumType, Attached, FloatRange, \ +from frappy.core import Drivable, Parameter, EnumType, Attached, FloatRange, \ Command, IDLE, BUSY, WARN, ERROR, Done, PersistentParam, PersistentMixin -from secop.errors import HardwareError -from secop_psi.trinamic import Motor -from secop.lib.statemachine import StateMachine, Retry, Stop +from frappy.errors import HardwareError +from frappy_psi.trinamic import Motor +from frappy.lib.statemachine import StateMachine, Retry, Stop class MotorValve(PersistentMixin, Drivable): diff --git a/secop_psi/ppms.py b/frappy_psi/ppms.py similarity index 98% rename from secop_psi/ppms.py rename to frappy_psi/ppms.py index d376e2b..ba3ea72 100644 --- a/secop_psi/ppms.py +++ b/frappy_psi/ppms.py @@ -35,21 +35,21 @@ import threading import time from ast import literal_eval # convert string as comma separated numbers into tuple -from secop.datatypes import BoolType, EnumType, \ +from frappy.datatypes import BoolType, EnumType, \ FloatRange, IntRange, StatusType, StringType -from secop.errors import HardwareError -from secop.lib import clamp -from secop.lib.enum import Enum -from secop.modules import Communicator, Done, \ +from frappy.errors import HardwareError +from frappy.lib import clamp +from frappy.lib.enum import Enum +from frappy.modules import Communicator, Done, \ Drivable, Parameter, Property, Readable -from secop.io import HasIO -from secop.rwhandler import CommonReadHandler, CommonWriteHandler +from frappy.io import HasIO +from frappy.rwhandler import CommonReadHandler, CommonWriteHandler try: - import secop_psi.ppmswindows as ppmshw + import frappy_psi.ppmswindows as ppmshw except ImportError: print('use simulation instead') - import secop_psi.ppmssim as ppmshw + import frappy_psi.ppmssim as ppmshw class Main(Communicator): diff --git a/secop_psi/ppmssim.py b/frappy_psi/ppmssim.py similarity index 100% rename from secop_psi/ppmssim.py rename to frappy_psi/ppmssim.py diff --git a/secop_psi/ppmswindows.py b/frappy_psi/ppmswindows.py similarity index 100% rename from secop_psi/ppmswindows.py rename to frappy_psi/ppmswindows.py diff --git a/secop_psi/softcal.py b/frappy_psi/softcal.py similarity index 99% rename from secop_psi/softcal.py rename to frappy_psi/softcal.py index 0534308..c09b3fe 100644 --- a/secop_psi/softcal.py +++ b/frappy_psi/softcal.py @@ -27,7 +27,7 @@ from os.path import basename, dirname, exists, join import numpy as np from scipy.interpolate import splev, splrep # pylint: disable=import-error -from secop.core import Attached, BoolType, Parameter, Readable, StringType, \ +from frappy.core import Attached, BoolType, Parameter, Readable, StringType, \ FloatRange, Done diff --git a/secop_psi/trinamic.py b/frappy_psi/trinamic.py similarity index 98% rename from secop_psi/trinamic.py rename to frappy_psi/trinamic.py index 793f502..28d9254 100644 --- a/secop_psi/trinamic.py +++ b/frappy_psi/trinamic.py @@ -25,13 +25,13 @@ import time import struct -from secop.core import BoolType, Command, EnumType, FloatRange, IntRange, \ +from frappy.core import BoolType, Command, EnumType, FloatRange, IntRange, \ HasIO, Parameter, Property, Drivable, PersistentMixin, PersistentParam, Done, \ IDLE, BUSY, ERROR -from secop.io import BytesIO -from secop.errors import CommunicationFailedError, HardwareError, BadValueError, IsBusyError -from secop.rwhandler import ReadHandler, WriteHandler -from secop.lib import formatStatusBits +from frappy.io import BytesIO +from frappy.errors import CommunicationFailedError, HardwareError, BadValueError, IsBusyError +from frappy.rwhandler import ReadHandler, WriteHandler +from frappy.lib import formatStatusBits MOTOR_STOP = 3 MOVE = 4 diff --git a/setup.py b/setup.py index cc89e69..99d9d93 100755 --- a/setup.py +++ b/setup.py @@ -29,28 +29,28 @@ from os import listdir, path from setuptools import find_packages, setup -import secop.version +import frappy.version -scripts = glob(path.join('bin', 'secop-*')) +scripts = glob(path.join('bin', 'frappy-*')) -uidir = path.join(path.dirname(__file__), 'secop', 'gui', 'ui') +uidir = path.join(path.dirname(__file__), 'frappy', 'gui', 'ui') uis = [path.join('gui', 'ui', entry) for entry in listdir(uidir)] setup( - name='secop-core', - version=secop.version.get_version(), + name='frappy-core', + version=frappy.version.get_version(), license='GPL', author='Enrico Faulhaber', author_email='enrico.faulhaber@frm2.tum.de', description='SECoP Playground core system', packages=find_packages(exclude=['test']), - package_data={'secop': ['RELEASE-VERSION'] + uis}, + package_data={'frappy': ['RELEASE-VERSION'] + uis}, data_files=[ - ('/lib/systemd/system-generators', ['etc/secop-generator']), - ('/lib/systemd/system', ['etc/secop@.service', - 'etc/secop.target', + ('/lib/systemd/system-generators', ['etc/frappy-generator']), + ('/lib/systemd/system', ['etc/frappy@.service', + 'etc/frappy.target', ]), - ('/var/log/secop', []), + ('/var/log/frappy', []), ], scripts=scripts, classifiers=[ diff --git a/test/test_attach.py b/test/test_attach.py index 76aa4b8..ebb6a47 100644 --- a/test/test_attach.py +++ b/test/test_attach.py @@ -20,8 +20,8 @@ # # ***************************************************************************** -from secop.modules import Module, Attached -from secop.protocol.dispatcher import Dispatcher +from frappy.modules import Module, Attached +from frappy.protocol.dispatcher import Dispatcher # class DispatcherStub: diff --git a/test/test_datatypes.py b/test/test_datatypes.py index 1c874aa..ed69561 100644 --- a/test/test_datatypes.py +++ b/test/test_datatypes.py @@ -25,12 +25,12 @@ # no fixtures needed import pytest -from secop.datatypes import ArrayOf, BLOBType, BoolType, \ +from frappy.datatypes import ArrayOf, BLOBType, BoolType, \ CommandType, ConfigError, DataType, Enum, EnumType, FloatRange, \ IntRange, ProgrammingError, ScaledInteger, StatusType, \ StringType, StructOf, TextType, TupleOf, get_datatype, \ DiscouragedConversion -from secop.lib import generalConfig +from frappy.lib import generalConfig def copytest(dt): diff --git a/test/test_errors.py b/test/test_errors.py index fd455eb..21a73e0 100644 --- a/test/test_errors.py +++ b/test/test_errors.py @@ -21,10 +21,10 @@ # ***************************************************************************** """test data types.""" -import secop.errors +import frappy.errors def test_errors(): - """check consistence of secop.errors.EXCEPTIONS""" - for e in secop.errors.EXCEPTIONS.values(): - assert secop.errors.EXCEPTIONS[e().name] == e + """check consistence of frappy.errors.EXCEPTIONS""" + for e in frappy.errors.EXCEPTIONS.values(): + assert frappy.errors.EXCEPTIONS[e().name] == e diff --git a/test/test_handler.py b/test/test_handler.py index 2a5359a..15a1125 100644 --- a/test/test_handler.py +++ b/test/test_handler.py @@ -21,9 +21,9 @@ # ***************************************************************************** -from secop.rwhandler import ReadHandler, WriteHandler, \ +from frappy.rwhandler import ReadHandler, WriteHandler, \ CommonReadHandler, CommonWriteHandler, nopoll -from secop.core import Module, Parameter, FloatRange, Done +from frappy.core import Module, Parameter, FloatRange, Done class DispatcherStub: diff --git a/test/test_lib_enum.py b/test/test_lib_enum.py index 580dd86..b349358 100644 --- a/test/test_lib_enum.py +++ b/test/test_lib_enum.py @@ -25,7 +25,7 @@ # no fixtures needed import pytest -from secop.lib.enum import Enum, EnumMember +from frappy.lib.enum import Enum, EnumMember def test_EnumMember(): diff --git a/test/test_logging.py b/test/test_logging.py index a0c9c1c..bd1af39 100644 --- a/test/test_logging.py +++ b/test/test_logging.py @@ -22,11 +22,11 @@ import pytest import mlzlog -from secop.modules import Module -from secop.protocol.dispatcher import Dispatcher -from secop.protocol.interface import encode_msg_frame, decode_msg -import secop.logging -from secop.logging import logger, generalConfig, HasComlog +from frappy.modules import Module +from frappy.protocol.dispatcher import Dispatcher +from frappy.protocol.interface import encode_msg_frame, decode_msg +import frappy.logging +from frappy.logging import logger, generalConfig, HasComlog class ServerStub: @@ -89,8 +89,8 @@ def init_(monkeypatch): close = flush = emit = noop monkeypatch.setattr(mlzlog, 'ColoredConsoleHandler', ConsoleHandler) - monkeypatch.setattr(secop.logging, 'ComLogfileHandler', ComLogHandler) - monkeypatch.setattr(secop.logging, 'LogfileHandler', LogfileHandler) + monkeypatch.setattr(frappy.logging, 'ComLogfileHandler', ComLogHandler) + monkeypatch.setattr(frappy.logging, 'LogfileHandler', LogfileHandler) class Mod(Module): result = [] diff --git a/test/test_modules.py b/test/test_modules.py index c3364e7..1cb23fe 100644 --- a/test/test_modules.py +++ b/test/test_modules.py @@ -26,12 +26,12 @@ import sys import threading import pytest -from secop.datatypes import BoolType, FloatRange, StringType, IntRange, ScaledInteger -from secop.errors import ProgrammingError, ConfigError -from secop.modules import Communicator, Drivable, Readable, Module -from secop.params import Command, Parameter -from secop.rwhandler import ReadHandler, WriteHandler, nopoll -from secop.lib import generalConfig +from frappy.datatypes import BoolType, FloatRange, StringType, IntRange, ScaledInteger +from frappy.errors import ProgrammingError, ConfigError +from frappy.modules import Communicator, Drivable, Readable, Module +from frappy.params import Command, Parameter +from frappy.rwhandler import ReadHandler, WriteHandler, nopoll +from frappy.lib import generalConfig class DispatcherStub: @@ -668,7 +668,7 @@ def test_problematic_value_range(): ({'value.unit': 'K', 'someparam.unit': 'A'}, 'C', 'C', 'A'), ]) def test_deferred_main_unit(config, dynamicunit, finalunit, someunit): - # this pattern is used in secop_mlz.entangle.AnalogInput + # this pattern is used in frappy_mlz.entangle.AnalogInput class Mod(Drivable): ramp = Parameter('', datatype=FloatRange(unit='$/min')) someparam = Parameter('', datatype=FloatRange(unit='$')) diff --git a/test/test_msg.py b/test/test_msg.py index aee0e87..f94ec85 100644 --- a/test/test_msg.py +++ b/test/test_msg.py @@ -23,8 +23,8 @@ import pytest -import secop.protocol.messages as m -from secop.protocol.interface import decode_msg, encode_msg_frame +import frappy.protocol.messages as m +from frappy.protocol.interface import decode_msg, encode_msg_frame # args are: msg tuple, msg bytes MSG = [ diff --git a/test/test_multievent.py b/test/test_multievent.py index 3cf1106..e124ddc 100644 --- a/test/test_multievent.py +++ b/test/test_multievent.py @@ -21,7 +21,7 @@ # ***************************************************************************** import time -from secop.lib.multievent import MultiEvent +from frappy.lib.multievent import MultiEvent def test_without_timeout(): diff --git a/test/test_params.py b/test/test_params.py index bf39577..7de5f87 100644 --- a/test/test_params.py +++ b/test/test_params.py @@ -25,10 +25,10 @@ # no fixtures needed import pytest -from secop.datatypes import BoolType, FloatRange, IntRange -from secop.errors import ProgrammingError -from secop.modules import HasAccessibles -from secop.params import Command, Parameter +from frappy.datatypes import BoolType, FloatRange, IntRange +from frappy.errors import ProgrammingError +from frappy.modules import HasAccessibles +from frappy.params import Command, Parameter def test_Command(): diff --git a/test/test_parse.py b/test/test_parse.py index abb59a1..6b2975f 100644 --- a/test/test_parse.py +++ b/test/test_parse.py @@ -27,7 +27,7 @@ from collections import OrderedDict import pytest -from secop.parse import Parser +from frappy.parse import Parser # pylint: disable=redefined-outer-name diff --git a/test/test_poller.py b/test/test_poller.py index bea914c..6a08131 100644 --- a/test/test_poller.py +++ b/test/test_poller.py @@ -29,8 +29,8 @@ import logging import pytest -from secop.core import Module, Parameter, FloatRange, Readable, ReadHandler, nopoll -from secop.lib.multievent import MultiEvent +from frappy.core import Module, Parameter, FloatRange, Readable, ReadHandler, nopoll +from frappy.lib.multievent import MultiEvent class Time: diff --git a/test/test_properties.py b/test/test_properties.py index 6c1d8e4..47cc717 100644 --- a/test/test_properties.py +++ b/test/test_properties.py @@ -23,10 +23,10 @@ import pytest -from secop.datatypes import FloatRange, IntRange, StringType, ValueType -from secop.errors import BadValueError, ConfigError, ProgrammingError -from secop.properties import HasProperties, Property -from secop.core import Parameter +from frappy.datatypes import FloatRange, IntRange, StringType, ValueType +from frappy.errors import BadValueError, ConfigError, ProgrammingError +from frappy.properties import HasProperties, Property +from frappy.core import Parameter def Prop(*args, name=None, **kwds): diff --git a/test/test_statemachine.py b/test/test_statemachine.py index 2ea81b5..cd6fb25 100644 --- a/test/test_statemachine.py +++ b/test/test_statemachine.py @@ -21,7 +21,7 @@ # ***************************************************************************** -from secop.lib.statemachine import StateMachine, Stop, Retry +from frappy.lib.statemachine import StateMachine, Stop, Retry def rise(state):