- a mixin should not inherit from module then it has Parameters
- Parameters in mixins must be complete, not just overrides
- check precedence of read_<param> or handler
Change-Id: I72d9355a1982770d1a99d9552a20330103c97edb
- removed unused property json_path
- do not take the first directory in config path, but the first
directory with a sea subdirectory
Change-Id: I4f0d72936ca616134c38568d88c57a33a3397ec6
Config errors are collected first, and raised after processing
all modules. This is more user friendly.
+ remove redundant check for predefined accessibles in modules.py
+ fixed error handling for exporting parameters in params.py
+ fixed handling of bare attributes overwriting properties
Change-Id: I894bda291ab85ccec3d771c4903393c808af0a2a
Config errors are collected first, and raised after processing
all modules. This is more user friendly.
+ remove redundant check for predefined accessibles in modules.py
+ fixed error handling for exporting parameters in params.py
+ fixed handling of bare attributes overwriting properties
Change-Id: I894bda291ab85ccec3d771c4903393c808af0a2a
- a new wrapper for a read function is not only to be created when
the a new read method is in the class dict, but also when
it is inherited, but not yet wrapped
- a handler must not be ignored, when a write method is inherited
- a proxy class must not call checkProperties
+ remove trailing spaces in tutorial_helevel.rst
Change-Id: I16024c14232ea200db91a1bc07ec23326219ab68
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/25093
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
- a new wrapper for a read function is not only to be created when
the a new read function is in the class dict, but also when
it inherited, but not yet wrapped
- a proxy class must not call checkProperties
this should be the only file not matching mlz branch
now in sync with 316cf9738db29920a99e29813513ed1da048994a
'added README.md'
Change-Id: I826fd8c782f95fde3f8f4ef15b15b8b8f99d9973
as historywriter currently could be used at psi only
secop_psi is a better place for it
+ add comment about a general config file
Change-Id: I9b0e74d3da83ac485bd4bcc13475695c3140822c
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/25077
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
environment variable SECOP_CONFDIR may be a ':' separated
list of directories to lookup for cfg files
Change-Id: I058be6a270d3a3f6cd8ca45fdd4ab68c80fa5c23
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/25063
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
- basic_validators is not needed any more since the implementation
of datatypes.Stub
- client/baseclient.y is replaced by client/__init__.py both for
the gui client and NICOS SECoP client
- lib/parsing.py used by baseclient only
Change-Id: I15b6ac880017000e155b8f6b7e2456e1bbf56dab
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/25058
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
- fixed most important code after checking with flake8
- ignored code which has to be reworked or removed
+ mark unused code with 'TODO: remove ...'
Change-Id: Ic45e541049e391e2853d29cd64bb0963bd9a2125
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/25053
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
- removed secop/metaclass.py
- moved code from ModuleMeta to modules.HasAccessibles.__init_subclass__
- reworked properties:
assignment obj.property = value now always allowed
- reworked Parameters and Command to be true descriptors
- Command must now be solely used as decorator
- renamed 'usercommand' to 'Command'
- command methods no longer start with 'do_'
- reworked mechanism to determine accessible order:
the attribute paramOrder, if given, determines order of accessibles
+ fixed some issues makeing the IDE more happy
+ simplified code for StatusType and added a test for it
Change-Id: I8045cf38ee6f4d4862428272df0b12a7c8abaca7
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/25049
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
- flatten hierarchy (some links do not work when using folders)
- add a tutorial for programming a simple driver
- clean description using inspect.cleandoc
+ fix a bug with 'unit' pseudo property in a Parameter used as override
Change-Id: I31ddba5d516d1ee5e785e28fbd79fca44ed23f5e
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/25000
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
New Syntax:
- define properties and parameters as class attributes directly
instead of items in class attribute dicts
- define commands with decorator @usercommand(...)
- old syntax is still supported for now
still to do (with decreasing priority):
- turn parameters into descriptors (vs. creating getters/setters)
- migrate all existing code to new syntax
- get rid of or reduce code in metaclasses using __set_name__ and
__init_subclass__ instead, including a fix for allowing py < 3.6
Change-Id: Id47e0f89c506f50c40fa518b01822c6e5bbf4e98
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/24991
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
- allow (description and) datatype being positional args in Override
- disallow ctr and unit being a positional arg in Parameter
- disallow reorder being a positional arg in Override
Change-Id: Ic5711d091af11d5843943b0b2b31567127f8ed8c
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/24934
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
- bugfix: stop searching for file on the first match
- allow to ignore the sign on input by abs (bool) parameter
Change-Id: I0e5544d7645f124d4c4ac720174b0f5bde7e71a6
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/24928
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
The main value of main module is the selected channel, it is 0
when pausing during scanning, and the status is busy.
+ cosmetics to make IDE more happy
Change-Id: I11d8f08ea67d25fb00f7492080b4a55efc124bfb
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/24927
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
- when applying overrides with reorder=True, take ctr from Override,
else copy from the cloned Accesible. This did not work properly
- reworked:
- replaced CountedObj class by object_counter
- accessibles created by a copy or by applying Overrides
do not need fresh counted values
- adjusted tests
Change-Id: Id2fcf1ab1295aa1ea80ea81ae8cd02d36f86e969
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/24926
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
environment variable SECOP_CONFDIR may be a ':' separated
list of directories to lookup for cfg files
Change-Id: I058be6a270d3a3f6cd8ca45fdd4ab68c80fa5c23
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/25063
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
- basic_validators is not needed any more since the implementation
of datatypes.Stub
- client/baseclient.y is replaced by client/__init__.py both for
the gui client and NICOS SECoP client
- lib/parsing.py used by baseclient only
Change-Id: I15b6ac880017000e155b8f6b7e2456e1bbf56dab
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/25058
Tested-by: Jenkins Automated Tests <pedersen+jenkins@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>