- fix omit_unchanged
- names too short
+ other pylint complains
Change-Id: I3c277b461fad1a5fdf8e76ff1cc42b8742d1de16
Change-Id: I58fb64f91bcc2efef20df68f5c63a64315413286
- 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>
Actually, only property values set in the configuration can
be exported, as values equal to the default are not exported.
For this, the mechanism of overwriting properties by class attributes
has to be modified.
Change-Id: I4388d1fbb36393e863556fbbc8df800dd4800c87
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/22161
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
When a class attribute is assigned with the same name as a property
from an inherited class, the property default is overridden.
If the type does not match, a ProgrammingError is raised.
Change-Id: Ifdab5c8bbdaae008370a9b297c770f5c04db9311
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/21989
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
this change is triggered by the fact, that assigining a unit
in the config file did no longer work.
this change has several implications:
1) secop.properties must not import secop.datatypes:
- as ValueType can not be imported, the default behaviour with
'mandatory' and 'default' arguments was slightly changed
- instead of checking for DataType when exporting, a try/except
was used
2) the datatype of datatype properties is sometimes not yet defined.
a stub is used in this cases instead, which is later replaced by
the proper datatype. The number of stubs may be reduced, but this
should be done in a later change, as the diff will be much less
readable.
3) in config files, datatype properties can be changed like parameter
properties. HasProperties.setProperties/checkProperties/getProperties
are overridden for this.
the config editor seems still to work, an issue (probably py3) had
to be fixed there
Change-Id: I1efddf51f2c760510e913dbcaa099e8a89c9cab5
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/21399
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
- None <= 0 is invalid in py3
- restrict BLOBType to bytes (may be changed after migration to py3)
- remove long
- use list(<dict>.items()) when dict is changed within loop
- allow initialization of properties in HasProperties without
supercall to base class
- <dict>.values() can not be indexed
- adapted/removed various tests. additional tests might be added
after definitive migration to py3
after this change, all the tests run with py3, also secop-server and
secop-gui were tested with an example, but other code might still contain
py3 incompatibilities
Change-Id: I881c6972aeabb8494a21a6cbc7ffeddfd4f5d4f8
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/21306
Tested-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
Reviewed-by: Bjoern Pedersen <bjoern.pedersen@frm2.tum.de>
+ DataType validators are shifted to __call__
+ as_json is moved to export_datatape()
+ new HasProperties Base Mixin for Modules/DataTypes
+ accessibles can be accessed via iterator of a module
+ properties are properly 'derived' and checked, are set with .setPropertyValue
remember: parameters only have properties, so use getPropertyValue()
Change-Id: Iae0273f971aacb00fe6bf05e6a4d24a6d1be881a
Reviewed-on: https://forge.frm2.tum.de/review/20635
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>