You can subscribe to this list here.
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
(5) |
May
(34) |
Jun
(30) |
Jul
(65) |
Aug
(34) |
Sep
(9) |
Oct
(39) |
Nov
(147) |
Dec
(73) |
2016 |
Jan
(89) |
Feb
(42) |
Mar
(41) |
Apr
(28) |
May
(39) |
Jun
(59) |
Jul
(119) |
Aug
(48) |
Sep
(10) |
Oct
(19) |
Nov
(13) |
Dec
|
2017 |
Jan
(2) |
Feb
|
Mar
(3) |
Apr
|
May
(1) |
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
(1) |
Mar
(1) |
Apr
|
May
(2) |
Jun
(1) |
Jul
(2) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2019 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(1) |
Jul
(3) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(1) |
2021 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
(1) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
(1) |
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2023 |
Jan
(1) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(2) |
Aug
(3) |
Sep
(2) |
Oct
(3) |
Nov
(4) |
Dec
(3) |
2024 |
Jan
|
Feb
(3) |
Mar
(3) |
Apr
(4) |
May
(4) |
Jun
(3) |
Jul
(2) |
Aug
|
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(2) |
2025 |
Jan
(1) |
Feb
(2) |
Mar
(2) |
Apr
(2) |
May
(1) |
Jun
(1) |
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: cfalcon <cf...@ce...> - 2015-12-18 14:48:59
|
The taurustrend2D setModel menu option fails. It raises a TaurusException with 'Invalid scheme' The widget was developed to manage just one model and several inputs in the setModel menu option is configured. Fix it, setting this menu option to a 'simple model'. --- lib/taurus/qt/qtgui/extra_guiqwt/image.py | 5 ++++- lib/taurus/qt/qtgui/extra_guiqwt/taurustrend2d.py | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/taurus/qt/qtgui/extra_guiqwt/image.py b/lib/taurus/qt/qtgui/extra_guiqwt/image.py index e20a766..570fbee 100644 --- a/lib/taurus/qt/qtgui/extra_guiqwt/image.py +++ b/lib/taurus/qt/qtgui/extra_guiqwt/image.py @@ -258,7 +258,10 @@ class TaurusTrend2DItem(XYImageItem, TaurusBaseComponent): return plot = self.plot() - + + if plot is None: + return + #initialization ySize = len(evt_value.value) if self._yValues is None: diff --git a/lib/taurus/qt/qtgui/extra_guiqwt/taurustrend2d.py b/lib/taurus/qt/qtgui/extra_guiqwt/taurustrend2d.py index 4b1ea40..9e53300 100644 --- a/lib/taurus/qt/qtgui/extra_guiqwt/taurustrend2d.py +++ b/lib/taurus/qt/qtgui/extra_guiqwt/taurustrend2d.py @@ -62,8 +62,8 @@ class TaurusTrend2DDialog(ImageDialog, TaurusBaseWidget): self.setStackMode(stackMode) self.setWindowFlags(Qt.Qt.Widget) #add some tools - for toolklass in (TaurusModelChooserTool,AutoScrollTool): - self.add_tool(toolklass) + self.add_tool(TaurusModelChooserTool, singleModel=True) + self.add_tool(AutoScrollTool) self.setModifiableByUser(self._modifiableByUser) self.setContextMenuPolicy(Qt.Qt.CustomContextMenu) -- 2.4.0 |
From: cfalcon <cf...@ce...> - 2015-12-14 17:03:38
|
EvaluationAttributeNameValidator validates correctly the Evaluation Device URIs as evaluation attributes. e.g. eval:@Foo Fix the validator to not accept the '@' as part of the expression. Add some tests. --- lib/taurus/core/evaluation/evalvalidator.py | 2 +- lib/taurus/core/evaluation/test/test_evalvalidator.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/taurus/core/evaluation/evalvalidator.py b/lib/taurus/core/evaluation/evalvalidator.py index 328ebf6..c9bde9a 100644 --- a/lib/taurus/core/evaluation/evalvalidator.py +++ b/lib/taurus/core/evaluation/evalvalidator.py @@ -196,7 +196,7 @@ class EvaluationAttributeNameValidator(TaurusAttributeNameValidator): scheme = 'eval' authority = EvaluationAuthorityNameValidator.authority path = ((r'(?!//)/?(%s/)?' + - r'(?P<attrname>(?P<_subst>(%s;)+)?(?P<_expr>[^?#]+))') % + r'(?P<attrname>(?P<_subst>(%s;)+)?(?P<_expr>[^@?#]+))') % (EvaluationDeviceNameValidator.devname, K_EQUALS_V) ) query = '(?!)' diff --git a/lib/taurus/core/evaluation/test/test_evalvalidator.py b/lib/taurus/core/evaluation/test/test_evalvalidator.py index 1f460d0..7ea51fa 100644 --- a/lib/taurus/core/evaluation/test/test_evalvalidator.py +++ b/lib/taurus/core/evaluation/test/test_evalvalidator.py @@ -213,6 +213,8 @@ class EvaluationDevValidatorTestCase(AbstractNameValidatorTestCase, # @invalid(name='eval:1?configuration') # @invalid(name='eval:1?configuration=foo') +@invalid(name='eval:@foo') # invalid because is a device URI +@invalid(name='eval:{tango:a/b/c}') # invalid because is a device URI #=============================================================================== # -- 2.4.0 |
From: <cpa...@ce...> - 2015-12-11 14:19:15
|
From: cpascual <cpa...@ce...> Taurustrend2d raises an exception when using the model chooser tool, not allowing to change models from the GUI. Fix it by setting the singleModel property of the tool to True. --- lib/taurus/qt/qtgui/extra_guiqwt/taurustrend2d.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/taurus/qt/qtgui/extra_guiqwt/taurustrend2d.py b/lib/taurus/qt/qtgui/extra_guiqwt/taurustrend2d.py index 6f36f35..ec184b0 100644 --- a/lib/taurus/qt/qtgui/extra_guiqwt/taurustrend2d.py +++ b/lib/taurus/qt/qtgui/extra_guiqwt/taurustrend2d.py @@ -64,6 +64,7 @@ class TaurusTrend2DDialog(ImageDialog, TaurusBaseWidget): #add some tools for toolklass in (TaurusModelChooserTool,AutoScrollTool): self.add_tool(toolklass) + self.get_tool(TaurusModelChooserTool).singleModel = True self.setModifiableByUser(self._modifiableByUser) def keyPressEvent(self,event): -- 2.6.2 |
From: Teresa N. <mar...@de...> - 2015-12-11 13:16:14
|
The patch is applied to develop On 12/11/15 08:50, cpa...@ce... wrote: > From: cpascual <cpa...@ce...> > > Taurustrend2d does not show its context menu and locks the zoom. > This was already observed and fixed for other extra_guiqwt dialogs > (see #167). Apply the same solution here. > --- > lib/taurus/qt/qtgui/extra_guiqwt/taurustrend2d.py | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/lib/taurus/qt/qtgui/extra_guiqwt/taurustrend2d.py b/lib/taurus/qt/qtgui/extra_guiqwt/taurustrend2d.py > index 6f36f35..4b1ea40 100644 > --- a/lib/taurus/qt/qtgui/extra_guiqwt/taurustrend2d.py > +++ b/lib/taurus/qt/qtgui/extra_guiqwt/taurustrend2d.py > @@ -65,6 +65,7 @@ class TaurusTrend2DDialog(ImageDialog, TaurusBaseWidget): > for toolklass in (TaurusModelChooserTool,AutoScrollTool): > self.add_tool(toolklass) > self.setModifiableByUser(self._modifiableByUser) > + self.setContextMenuPolicy(Qt.Qt.CustomContextMenu) > > def keyPressEvent(self,event): > if(event.key() == Qt.Qt.Key_Escape): |
From: <cpa...@ce...> - 2015-12-11 07:50:55
|
From: cpascual <cpa...@ce...> Taurustrend2d does not show its context menu and locks the zoom. This was already observed and fixed for other extra_guiqwt dialogs (see #167). Apply the same solution here. --- lib/taurus/qt/qtgui/extra_guiqwt/taurustrend2d.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/taurus/qt/qtgui/extra_guiqwt/taurustrend2d.py b/lib/taurus/qt/qtgui/extra_guiqwt/taurustrend2d.py index 6f36f35..4b1ea40 100644 --- a/lib/taurus/qt/qtgui/extra_guiqwt/taurustrend2d.py +++ b/lib/taurus/qt/qtgui/extra_guiqwt/taurustrend2d.py @@ -65,6 +65,7 @@ class TaurusTrend2DDialog(ImageDialog, TaurusBaseWidget): for toolklass in (TaurusModelChooserTool,AutoScrollTool): self.add_tool(toolklass) self.setModifiableByUser(self._modifiableByUser) + self.setContextMenuPolicy(Qt.Qt.CustomContextMenu) def keyPressEvent(self,event): if(event.key() == Qt.Qt.Key_Escape): -- 2.6.2 |
From: Carlos P. <cpa...@ce...> - 2015-12-03 14:29:22
|
Applied to taurus4-preview On Wed 2 December 2015 14:49:14 cfalcon wrote: > TaurusLineEdit fails with models of non numeric attributes. > It is because the validator is not present and the method getValue > returns None. > > Fix it, moving the checking of the validator status only for > numeric attributes. > --- > lib/taurus/qt/qtgui/input/tauruslineedit.py | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/lib/taurus/qt/qtgui/input/tauruslineedit.py > b/lib/taurus/qt/qtgui/input/tauruslineedit.py index 66d15d9..6595d11 > 100755 > --- a/lib/taurus/qt/qtgui/input/tauruslineedit.py > +++ b/lib/taurus/qt/qtgui/input/tauruslineedit.py > @@ -188,12 +188,13 @@ class TaurusValueLineEdit(Qt.QLineEdit, > TaurusBaseWritableWidget): if model_obj is None: > return None > val = self.validator() > - if val is None or val.validate(str(text), 0)[0] != > val.Acceptable: - return None > try: > model_type = model_obj.type > model_format = model_obj.data_format > if model_type in [DataType.Integer, DataType.Float]: > + if val is None or \ > + val.validate(str(text), 0)[0] != > val.Acceptable: + return None > q = Quantity(text) > # allow implicit units (assume wvalue.units > implicitly) if q.dimensionless: -- +----------------------------------------------------+ Carlos Pascual Izarra Scientific Software Coordinator Computing Division ALBA Synchrotron [http://www.albasynchrotron.es] Carrer de la Llum 2-26 E-08290 Cerdanyola del Valles (Barcelona), Spain E-mail: cpa...@ce... Phone: +34 93 592 4428 +----------------------------------------------------+ |
From: Carlos P. <cpa...@ce...> - 2015-12-03 14:28:58
|
Patch applied to taurus4-preview after several modifications (to support non-scalars and fix some logical errors) On Wed 2 December 2015 16:27:26 cfalcon wrote: > TangoAttribute raises a TypeError: "an integer is required" when you > try to write in a DevUChar attribute. > > PyTango expects an int value while Taurus is trying to write a str > value. > > Fix it. Changing the Taurus type uses for DevUChar TangoAttributes. > The Tango decode method returns for a chr of the reading value, and > the encode method returns the ord. > --- > lib/taurus/core/tango/enums.py | 4 ++-- > lib/taurus/core/tango/tangoattribute.py | 10 +++++++++- > lib/taurus/core/tango/util/tango_taurus.py | 2 +- > 3 files changed, 12 insertions(+), 4 deletions(-) > > diff --git a/lib/taurus/core/tango/enums.py > b/lib/taurus/core/tango/enums.py index 9b46948..7e41158 100644 > --- a/lib/taurus/core/tango/enums.py > +++ b/lib/taurus/core/tango/enums.py > @@ -70,7 +70,7 @@ EVENT_TO_POLLING_EXCEPTIONS = > ('API_AttributePollingNotStarted', > > FROM_TANGO_TO_NUMPY_TYPE = { > PyTango.DevBoolean : numpy.bool8, > - PyTango.DevUChar : numpy.ubyte, > + PyTango.DevUChar : numpy.uint8, > PyTango.DevShort : numpy.short, > PyTango.DevUShort : numpy.ushort, > PyTango.DevLong : numpy.int32, > @@ -84,7 +84,7 @@ FROM_TANGO_TO_NUMPY_TYPE = { > > FROM_TANGO_TO_STR_TYPE = { > PyTango.DevBoolean : 'bool8', > - PyTango.DevUChar : 'ubyte', > + PyTango.DevUChar : 'uint8', > PyTango.DevShort : 'short', > PyTango.DevUShort : 'ushort', > PyTango.DevLong : 'int32', > diff --git a/lib/taurus/core/tango/tangoattribute.py > b/lib/taurus/core/tango/tangoattribute.py index 2067a96..27560f0 > 100755 > --- a/lib/taurus/core/tango/tangoattribute.py > +++ b/lib/taurus/core/tango/tangoattribute.py > @@ -112,6 +112,9 @@ class TangoAttrValue(TaurusAttrValue): > rvalue = Quantity(rvalue, units=units) > if wvalue is not None: > wvalue = Quantity(wvalue, units=units) > + if p.type == PyTango.CmdArgType.DevUChar: > + rvalue = chr(rvalue) > + wvalue = chr(wvalue) > if isinstance(rvalue, PyTango._PyTango.DevState): > rvalue = DevState[str(rvalue)] > > @@ -357,7 +360,12 @@ class TangoAttribute(TaurusAttribute): > except: > attrvalue = str(magnitude).lower() == 'true' > elif tgtype == PyTango.CmdArgType.DevUChar: > - attrvalue = chr(magnitude) > + try: > + magnitude = chr(int(magnitude)) > + except ValueError: > + pass > + finally: > + attrvalue = ord(magnitude) > elif tgtype in (PyTango.CmdArgType.DevState, > PyTango.CmdArgType.DevEncoded): > attrvalue = magnitude > diff --git a/lib/taurus/core/tango/util/tango_taurus.py > b/lib/taurus/core/tango/util/tango_taurus.py index 81c8dc4..04e4ede > 100644 > --- a/lib/taurus/core/tango/util/tango_taurus.py > +++ b/lib/taurus/core/tango/util/tango_taurus.py > @@ -60,7 +60,7 @@ FROM_TANGO_TO_TAURUS_TYPE = > {PyTango.CmdArgType.DevVoid:None, > PyTango.CmdArgType.DevState:DataType.DevState, > PyTango.CmdArgType.ConstDevString:DataType.String, > PyTango.CmdArgType.DevVarBooleanArray:DataType.Boolean, > - PyTango.CmdArgType.DevUChar:DataType.Integer, # maybe should > be Bytes? + PyTango.CmdArgType.DevUChar:DataType.Bytes, > PyTango.CmdArgType.DevLong64:DataType.Integer, > PyTango.CmdArgType.DevULong64:DataType.Integer, > PyTango.CmdArgType.DevVarLong64Array:DataType.Integer, -- +----------------------------------------------------+ Carlos Pascual Izarra Scientific Software Coordinator Computing Division ALBA Synchrotron [http://www.albasynchrotron.es] Carrer de la Llum 2-26 E-08290 Cerdanyola del Valles (Barcelona), Spain E-mail: cpa...@ce... Phone: +34 93 592 4428 +----------------------------------------------------+ |
From: cfalcon <cf...@ce...> - 2015-12-02 15:27:35
|
TangoAttribute raises a TypeError: "an integer is required" when you try to write in a DevUChar attribute. PyTango expects an int value while Taurus is trying to write a str value. Fix it. Changing the Taurus type uses for DevUChar TangoAttributes. The Tango decode method returns for a chr of the reading value, and the encode method returns the ord. --- lib/taurus/core/tango/enums.py | 4 ++-- lib/taurus/core/tango/tangoattribute.py | 10 +++++++++- lib/taurus/core/tango/util/tango_taurus.py | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/taurus/core/tango/enums.py b/lib/taurus/core/tango/enums.py index 9b46948..7e41158 100644 --- a/lib/taurus/core/tango/enums.py +++ b/lib/taurus/core/tango/enums.py @@ -70,7 +70,7 @@ EVENT_TO_POLLING_EXCEPTIONS = ('API_AttributePollingNotStarted', FROM_TANGO_TO_NUMPY_TYPE = { PyTango.DevBoolean : numpy.bool8, - PyTango.DevUChar : numpy.ubyte, + PyTango.DevUChar : numpy.uint8, PyTango.DevShort : numpy.short, PyTango.DevUShort : numpy.ushort, PyTango.DevLong : numpy.int32, @@ -84,7 +84,7 @@ FROM_TANGO_TO_NUMPY_TYPE = { FROM_TANGO_TO_STR_TYPE = { PyTango.DevBoolean : 'bool8', - PyTango.DevUChar : 'ubyte', + PyTango.DevUChar : 'uint8', PyTango.DevShort : 'short', PyTango.DevUShort : 'ushort', PyTango.DevLong : 'int32', diff --git a/lib/taurus/core/tango/tangoattribute.py b/lib/taurus/core/tango/tangoattribute.py index 2067a96..27560f0 100755 --- a/lib/taurus/core/tango/tangoattribute.py +++ b/lib/taurus/core/tango/tangoattribute.py @@ -112,6 +112,9 @@ class TangoAttrValue(TaurusAttrValue): rvalue = Quantity(rvalue, units=units) if wvalue is not None: wvalue = Quantity(wvalue, units=units) + if p.type == PyTango.CmdArgType.DevUChar: + rvalue = chr(rvalue) + wvalue = chr(wvalue) if isinstance(rvalue, PyTango._PyTango.DevState): rvalue = DevState[str(rvalue)] @@ -357,7 +360,12 @@ class TangoAttribute(TaurusAttribute): except: attrvalue = str(magnitude).lower() == 'true' elif tgtype == PyTango.CmdArgType.DevUChar: - attrvalue = chr(magnitude) + try: + magnitude = chr(int(magnitude)) + except ValueError: + pass + finally: + attrvalue = ord(magnitude) elif tgtype in (PyTango.CmdArgType.DevState, PyTango.CmdArgType.DevEncoded): attrvalue = magnitude diff --git a/lib/taurus/core/tango/util/tango_taurus.py b/lib/taurus/core/tango/util/tango_taurus.py index 81c8dc4..04e4ede 100644 --- a/lib/taurus/core/tango/util/tango_taurus.py +++ b/lib/taurus/core/tango/util/tango_taurus.py @@ -60,7 +60,7 @@ FROM_TANGO_TO_TAURUS_TYPE = {PyTango.CmdArgType.DevVoid:None, PyTango.CmdArgType.DevState:DataType.DevState, PyTango.CmdArgType.ConstDevString:DataType.String, PyTango.CmdArgType.DevVarBooleanArray:DataType.Boolean, - PyTango.CmdArgType.DevUChar:DataType.Integer, # maybe should be Bytes? + PyTango.CmdArgType.DevUChar:DataType.Bytes, PyTango.CmdArgType.DevLong64:DataType.Integer, PyTango.CmdArgType.DevULong64:DataType.Integer, PyTango.CmdArgType.DevVarLong64Array:DataType.Integer, -- 2.4.0 |
From: cfalcon <cf...@ce...> - 2015-12-02 13:49:23
|
TaurusLineEdit fails with models of non numeric attributes. It is because the validator is not present and the method getValue returns None. Fix it, moving the checking of the validator status only for numeric attributes. --- lib/taurus/qt/qtgui/input/tauruslineedit.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/taurus/qt/qtgui/input/tauruslineedit.py b/lib/taurus/qt/qtgui/input/tauruslineedit.py index 66d15d9..6595d11 100755 --- a/lib/taurus/qt/qtgui/input/tauruslineedit.py +++ b/lib/taurus/qt/qtgui/input/tauruslineedit.py @@ -188,12 +188,13 @@ class TaurusValueLineEdit(Qt.QLineEdit, TaurusBaseWritableWidget): if model_obj is None: return None val = self.validator() - if val is None or val.validate(str(text), 0)[0] != val.Acceptable: - return None try: model_type = model_obj.type model_format = model_obj.data_format if model_type in [DataType.Integer, DataType.Float]: + if val is None or \ + val.validate(str(text), 0)[0] != val.Acceptable: + return None q = Quantity(text) # allow implicit units (assume wvalue.units implicitly) if q.dimensionless: -- 2.4.0 |
From: Carlos P. <cpa...@ce...> - 2015-12-02 11:31:52
|
Hi, I replied in https://sourceforge.net/p/tauruslib/tickets/234/#bd10 I am afraid email responses to the ticket do not create replies in sf.net tracker (they are just dropped)... -- +----------------------------------------------------+ Carlos Pascual Izarra Scientific Software Coordinator Computing Division ALBA Synchrotron [http://www.albasynchrotron.es] Carrer de la Llum 2-26 E-08290 Cerdanyola del Valles (Barcelona), Spain E-mail: cpa...@ce... Phone: +34 93 592 4428 +----------------------------------------------------+ |
From: PICCA Frederic-E. <fre...@sy...> - 2015-12-02 10:51:40
|
> * .qtgui.image (requires Qub which I do not think it is a publicly distributed module. Can be substituted by TaurusImage. AFAIK everybody switched to TaurusImage) If I remember correctly Qub is used by MxCube to display live video from cameras. This widget use the shared memory system provided with Lima for this purpose. Is it possible to do the same thing with TaurusImage ? Cheers Fred |
From: Carlos P. <cpa...@ce...> - 2015-12-02 08:57:43
|
Hi, the changes seem ok to me, but the implementation has one problem: It assumesthat the "normal_name" returned by the validator is equivalent to the device name (and it psses it to setTable). But this is not always the case. The normal name may contain the DB name in it if it is not the default one. For example, in my system I have constrols02:10000 as my default DB, and the device cpascual/pysignalsimulator/1 is exported only in controls01 (not in controls02) then: This fails: ~~~~ python taurusdevicepropertytable.py \ tango://controls01:10000/cpascual/pysignalsimulator/1 ~~~~ This also fails: ~~~~ devenv python taurusdevicepropertytable.py \ --tango-host=controls01:10000 cpascual/pysignalsimulator/1 ~~~~ And this works: ~~~~ TANGO_HOST=controls01:10000 python taurusdevicepropertytable.py \ cpascual/pysignalsimulator/1 ~~~~ Apart from this, simply running `python taurusdevicepropertytable.py` I get this exception (the widget seems to work anyway): ~~~~ Traceback (most recent call last): File "/home/cpascual/src/taurus/lib/taurus/qt/qtgui/base/taurusbase.py", line 341, in filterEvent self.handleEvent(*evt) File "/home/cpascual/src/taurus/lib/taurus/qt/qtgui/base/taurusbase.py", line 1257, in handleEvent self._setText(text) TypeError: setText() takes exactly 4 arguments (2 given) ~~~~ Finally, it would be nice if you test the implementation on taurus4-preview as well (I haven't yet) Can you please resubmit addressing this problems? Note: if it is too much work, I think the current implementation is more or less ok and can be applied with just a TODO notifying of the currently known limitations Cheers, Carlos On Wed 11 November 2015 11:56:56 cfalcon wrote: > setModel of taurus.qt.qtgui.table.TaurusPropTable does not work. > > TaurusPropTable uses the inherit setModel method of TaurusBaseWidget > class that does not cover the funcionality of this widget. > > Implement a setModel method acording the specifications provided > by S.Rubio. > --- > .../qt/qtgui/table/taurusdevicepropertytable.py | 57 > ++++++++++++++-------- 1 file changed, 38 insertions(+), 19 > deletions(-) > > diff --git a/lib/taurus/qt/qtgui/table/taurusdevicepropertytable.py > b/lib/taurus/qt/qtgui/table/taurusdevicepropertytable.py index > 9901ec3..cc9722e 100644 > --- a/lib/taurus/qt/qtgui/table/taurusdevicepropertytable.py > +++ b/lib/taurus/qt/qtgui/table/taurusdevicepropertytable.py > @@ -31,14 +31,15 @@ __all__ = ["TaurusPropTable"] > > from taurus.external.qt import Qt, QtCore, QtGui > from taurus.qt.qtgui.base import TaurusBaseWidget > -import taurus.core > -import PyTango > +import taurus > +from taurus.core.taurusdevice import TaurusDevice > > class TaurusPropTable(QtGui.QTableWidget, TaurusBaseWidget): > ''' > This widget will show a list of properties of device and the list > of values. @todo add a frame for Add, Delete and Refresh buttons! > ''' > + # TODO This widget is Tango-centric > __pyqtSignals__ = ("modelChanged(const QString &)",) > > def __init__(self, parent=None, designMode = False): > @@ -59,6 +60,14 @@ class TaurusPropTable(QtGui.QTableWidget, > TaurusBaseWidget): > #-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ > -~-~-~- # TaurusBaseWidget over writing methods > > #-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ > -~-~-~- + def setModel(self, model): > + name_validator = TaurusDevice.getNameValidator() > + TaurusBaseWidget.setModel(self, model) > + try: > + _, normal_name, _ = name_validator.getNames(model) > + self.setTable(normal_name) > + except ValueError: > + self.debug('Wrong model!! %s' %(model)) > > def sizeHint(self): > return QtGui.QTableWidget.sizeHint(self) > @@ -67,7 +76,7 @@ class TaurusPropTable(QtGui.QTableWidget, > TaurusBaseWidget): return QtGui.QTableWidget.minimumSizeHint(self) > > def getModelClass(self): > - return taurus.core.taurusdatabase.TaurusDatabase > + return TaurusDevice > > @classmethod > def getQtDesignerPluginInfo(cls): > @@ -82,7 +91,7 @@ class TaurusPropTable(QtGui.QTableWidget, > TaurusBaseWidget): > #-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ > -~-~-~- > > model = QtCore.pyqtProperty("QString", TaurusBaseWidget.getModel, > - TaurusBaseWidget.setModel, > + setModel, > TaurusBaseWidget.resetModel) > > useParentModel = QtCore.pyqtProperty("bool", > @@ -95,30 +104,37 @@ class TaurusPropTable(QtGui.QTableWidget, > TaurusBaseWidget): > #-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ > -~-~-~- > > @QtCore.pyqtSignature("setTable(QString)") > - def setTable(self,dev_name): > + def setTable(self, dev_name): > ''' > This method is used to connect TaurusPropTable widget with > TaurusClassTable widget This method fill the table with the names of > properties and values for the device selected in the TaurusClassTable > ''' > - > QtCore.QObject.disconnect(self,QtCore.SIGNAL("cellChanged(int,int)"), > self.valueChanged) - self.db = PyTango.Database() > + QtCore.QObject.disconnect(self, > QtCore.SIGNAL("cellChanged(int, int)"), + > self.valueChanged) > + self.db = taurus.Database() > dev_name = str(dev_name) > - self.list_prop = > list(self.db.get_device_property_list(dev_name,'*')) + > self.list_prop = list(self.db.get_device_property_list(dev_name, > '*')) self.setRowCount(len(self.list_prop)) > for i in range(0,len(self.list_prop)): > elem = self.list_prop[i] > self.setText(elem,i,0) > - > self.dictionary=self.db.get_device_property(dev_name,self.list_prop) > - self.debug('Getting %s properties: %s -> > %s'%(dev_name,self.list_prop,self.dictionary)) + > self.dictionary= self.db.get_device_property(dev_name, + > self.list_prop) + > self.debug('Getting %s properties: %s -> %s' %(dev_name, + > self.list_prop, + > > self.dictionary)) value=self.dictionary[elem] > - self.debug('TaurusPropsTable: property %s is type > %s'%(elem,type(value))) - USE_TABLES=False > + self.debug('TaurusPropsTable: property %s is type %s' > %(elem, + > type(value)) + ) > + USE_TABLES= False > if USE_TABLES: self.setPropertyValue(value,i,1) > else: > if not isinstance(value,str): #not something like an > string #if isinstance(value,list):#type(value) is list: heigh1 = > len(value) > - value = '\n'.join(str(v) for v in value) # adding > new lines in between elements in the list + # > adding new lines in between elements in the list + > value = '\n'.join(str(v) for v in value) self.setText(str(value),i,1) > > self.updateStyle() > @@ -372,12 +388,15 @@ class Delegate(QtGui.QItemDelegate): > return size > > if __name__ == '__main__': > - import sys,os > - app = QtGui.QApplication([]) > + import sys > + from taurus.qt.qtgui.application import TaurusApplication > + app = TaurusApplication(app_name="TaurusDevice property table") > widget = TaurusPropTable() > - args = sys.argv[1:] > - if not args: args = > ['tango/admin/%s'%(os.environ['TANGO_HOST'].split(':')[0])] - > widget.setTable(sys.args) > + args = sys.argv > + if len(args) == 1: > + model = 'sys/tg_test/1' > + else: > + model = str(args[1]) > + widget.setModel(model) > widget.show() > app.exec_() > - -- +----------------------------------------------------+ Carlos Pascual Izarra Scientific Software Coordinator Computing Division ALBA Synchrotron [http://www.albasynchrotron.es] Carrer de la Llum 2-26 E-08290 Cerdanyola del Valles (Barcelona), Spain E-mail: cpa...@ce... Phone: +34 93 592 4428 +----------------------------------------------------+ |
From: Carlos P. <cpa...@ce...> - 2015-12-02 08:01:48
|
Oops, sorry for not replying. I had a look at it but since I cannot reproduce it straight away I delayed the reply till I had time for a further look. It is nice that you fixed it. Carlos On Tue 1 December 2015 14:59:56 Teresa Nunez wrote: > Hello, > it was a problem in our installation, now it is solved, > so this mail can be ignored. > > Regards, > Teresa > > On 11/30/15 11:08, Teresa Nunez wrote: > > Hello, > > > > I have a problem with the taurusimage widget, when I want > > to > > > > give > > a file name for saving or exporting the image (using 'Save as ...' > > or > > 'Export data ...' > > > > from the menu opened when clicking on the image). The name that I > > > > give to > > > > the QFileDialog window that is opened is seen as an unicode list, > > > > instead of > > > > as an string, I mean, it becomes, ex. > > > > [u'/', u'h', u'o', u'm', u'e', u'/', u't', u'n', u'u', u'n', u'e', > > > > u'z', u'/', u't', u'a', u'u', u'r', u'u', u's', u'_', u'g', u'u', > > u'i', u's', u'/', u'I', u'm', u'a', u'g', u'e', u'V', u'i', u'e', > > u'w', u'e', u'r', u'/', u't', u'e', u's', u't', u'.', u'p', u'n', > > u'g']> > > instead of: > > /home/tnunez/taurus_guis/ImageViewer/test.png > > > > And with this I get the error: > > File "/usr/lib/python2.7/dist-packages/guiqwt/qthelpers.py", line > > 66, > > in exec_image_save_dialog > > > > io.imwrite(filename, data) > > > > File "/usr/lib/python2.7/dist-packages/guiqwt/io.py", line 395, in > > > > imwrite > > > > iohandler.get_writefunc(ext)(fname, arr, **kwargs) > > > > File "/usr/lib/python2.7/dist-packages/guiqwt/io.py", line 155, in > > > > get_writefunc > > > > ftype = self._get_filetype(ext) > > > > File "/usr/lib/python2.7/dist-packages/guiqwt/io.py", line 143, in > > > > _get_filetype > > > > raise RuntimeError("Unsupported file type: '%s'" % ext) > > > > RuntimeError: Unsupported file type: '' > > > > > > I have this problem since the operating system of my computer was > > changed from > > > > debian7 to debian8, with the following changes in pyqt and guiqwt > > > > versions: > > > > debian7: > > python-guiqwt_2.1.6-4_amd64.deb > > pyqt4-dev-tools_4.9.3-4_amd64.deb > > > > debian8: > > python-guiqwt_2.3.1-1_amd64.deb > > pyqt4-dev-tools_4.11.2+dfsg-1_amd64.deb > > > > In both cases the python version was 2.7 and taurus 3.6. > > Do you have any idea why the problem happens, and how could be > > solved?. Thanks a lot. > > > > Regards, > > > > Teresa > > ---------------------------------------------------------------------- > -------- Go from Idea to Many App Stores Faster with Intel(R) XDK > Give your users amazing mobile app experiences with Intel(R) XDK. > Use one codebase in this all-in-one HTML5 development environment. > Design, debug & build mobile apps & 2D/3D high-impact games for > multiple OSs. > http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140 > _______________________________________________ > Tauruslib-devel mailing list > Tau...@li... > https://lists.sourceforge.net/lists/listinfo/tauruslib-devel -- +----------------------------------------------------+ Carlos Pascual Izarra Scientific Software Coordinator Computing Division ALBA Synchrotron [http://www.albasynchrotron.es] Carrer de la Llum 2-26 E-08290 Cerdanyola del Valles (Barcelona), Spain E-mail: cpa...@ce... Phone: +34 93 592 4428 +----------------------------------------------------+ |
From: Teresa N. <mar...@de...> - 2015-12-01 14:00:11
|
Hello, it was a problem in our installation, now it is solved, so this mail can be ignored. Regards, Teresa On 11/30/15 11:08, Teresa Nunez wrote: > Hello, > I have a problem with the taurusimage widget, when I want to > give > a file name for saving or exporting the image (using 'Save as ...' or > 'Export data ...' > from the menu opened when clicking on the image). The name that I > give to > the QFileDialog window that is opened is seen as an unicode list, > instead of > as an string, I mean, it becomes, ex. > > [u'/', u'h', u'o', u'm', u'e', u'/', u't', u'n', u'u', u'n', u'e', > u'z', u'/', u't', u'a', u'u', u'r', u'u', u's', u'_', u'g', u'u', > u'i', u's', u'/', u'I', u'm', u'a', u'g', u'e', u'V', u'i', u'e', > u'w', u'e', u'r', u'/', u't', u'e', u's', u't', u'.', u'p', u'n', u'g'] > > instead of: > > > /home/tnunez/taurus_guis/ImageViewer/test.png > > And with this I get the error: > > > File "/usr/lib/python2.7/dist-packages/guiqwt/qthelpers.py", line 66, > in exec_image_save_dialog > io.imwrite(filename, data) > File "/usr/lib/python2.7/dist-packages/guiqwt/io.py", line 395, in > imwrite > iohandler.get_writefunc(ext)(fname, arr, **kwargs) > File "/usr/lib/python2.7/dist-packages/guiqwt/io.py", line 155, in > get_writefunc > ftype = self._get_filetype(ext) > File "/usr/lib/python2.7/dist-packages/guiqwt/io.py", line 143, in > _get_filetype > raise RuntimeError("Unsupported file type: '%s'" % ext) > RuntimeError: Unsupported file type: '' > > > I have this problem since the operating system of my computer was > changed from > debian7 to debian8, with the following changes in pyqt and guiqwt > versions: > > debian7: > python-guiqwt_2.1.6-4_amd64.deb > pyqt4-dev-tools_4.9.3-4_amd64.deb > > debian8: > python-guiqwt_2.3.1-1_amd64.deb > pyqt4-dev-tools_4.11.2+dfsg-1_amd64.deb > > In both cases the python version was 2.7 and taurus 3.6. > Do you have any idea why the problem happens, and how could be solved?. > Thanks a lot. > > Regards, > Teresa > > > |
From: Teresa N. <mar...@de...> - 2015-11-30 10:08:53
|
Hello, I have a problem with the taurusimage widget, when I want to give a file name for saving or exporting the image (using 'Save as ...' or 'Export data ...' from the menu opened when clicking on the image). The name that I give to the QFileDialog window that is opened is seen as an unicode list, instead of as an string, I mean, it becomes, ex. [u'/', u'h', u'o', u'm', u'e', u'/', u't', u'n', u'u', u'n', u'e', u'z', u'/', u't', u'a', u'u', u'r', u'u', u's', u'_', u'g', u'u', u'i', u's', u'/', u'I', u'm', u'a', u'g', u'e', u'V', u'i', u'e', u'w', u'e', u'r', u'/', u't', u'e', u's', u't', u'.', u'p', u'n', u'g'] instead of: /home/tnunez/taurus_guis/ImageViewer/test.png And with this I get the error: File "/usr/lib/python2.7/dist-packages/guiqwt/qthelpers.py", line 66, in exec_image_save_dialog io.imwrite(filename, data) File "/usr/lib/python2.7/dist-packages/guiqwt/io.py", line 395, in imwrite iohandler.get_writefunc(ext)(fname, arr, **kwargs) File "/usr/lib/python2.7/dist-packages/guiqwt/io.py", line 155, in get_writefunc ftype = self._get_filetype(ext) File "/usr/lib/python2.7/dist-packages/guiqwt/io.py", line 143, in _get_filetype raise RuntimeError("Unsupported file type: '%s'" % ext) RuntimeError: Unsupported file type: '' I have this problem since the operating system of my computer was changed from debian7 to debian8, with the following changes in pyqt and guiqwt versions: debian7: python-guiqwt_2.1.6-4_amd64.deb pyqt4-dev-tools_4.9.3-4_amd64.deb debian8: python-guiqwt_2.3.1-1_amd64.deb pyqt4-dev-tools_4.11.2+dfsg-1_amd64.deb In both cases the python version was 2.7 and taurus 3.6. Do you have any idea why the problem happens, and how could be solved?. Thanks a lot. Regards, Teresa |
From: Carlos P. <cpa...@ce...> - 2015-11-26 12:05:57
|
All 3 patches of this series have been applied to taurus4-preview, thanks! On Wed 25 November 2015 09:40:33 cfalcon wrote: > Add tests to reproduce bug#226, and bug#227. > The new tests are focused to validate the getUriGroups method > of EvaluationAttributeNameValidator. > --- > .../core/evaluation/test/test_evalvalidator.py | 55 > +++++++++++++++++++++- 1 file changed, 53 insertions(+), 2 > deletions(-) > > diff --git a/lib/taurus/core/evaluation/test/test_evalvalidator.py > b/lib/taurus/core/evaluation/test/test_evalvalidator.py index > 25a0b28..037a1bf 100644 > --- a/lib/taurus/core/evaluation/test/test_evalvalidator.py > +++ b/lib/taurus/core/evaluation/test/test_evalvalidator.py > @@ -115,6 +115,57 @@ class > EvaluationDevValidatorTestCase(AbstractNameValidatorTestCase, > @valid(name='eval:@foo/1') > @valid(name='eval:@mymod.Myclass/1.2', > groups={'attrname':'1.2', 'devname':'@mymod.Myclass'}) > +@valid(name='eval://linspace(-1, 1, 256)', > + groups={'attrname': 'linspace(-1, 1, 256)', > + '_expr': 'linspace(-1, 1, 256)', > + '_subst': None, > + 'fragment': None, > + '__STRICT__': False, > + 'cfgkey': None}, strict=False) > +@valid(name="eval://rand(256, 128)", > + groups={'attrname': 'rand(256, 128)', > + '_expr': 'rand(256, 128)', > + '_subst': None, > + 'fragment': None, > + '__STRICT__': False, > + 'cfgkey': None}, strict=False) > +@valid(name="eval:rand(256, 128)", > + groups={'attrname': 'rand(256, 128)', > + '_expr': 'rand(256, 128)', > + '_subst': None, > + 'fragment': None, > + '__STRICT__': True, > + 'cfgkey': None}, strict=True) > +@valid(name="eval:rand(256, 128)#label", > + groups={'attrname': 'rand(256, 128)', > + '_expr': 'rand(256, 128)', > + '_subst': None, > + 'fragment': 'label', > + '__STRICT__': True, > + 'cfgkey': 'label'}, strict=True) > +@valid(name="eval:foo=10;rand(256, 128)+foo#label", > + groups={'attrname': 'foo=10;rand(256, 128)+foo', > + '_expr': 'rand(256, 128)+foo', > + '_subst': 'foo=10;', > + 'fragment': 'label', > + '__STRICT__': True, > + 'cfgkey': 'label'}, strict=True) > +@valid(name="eval://rand(256, 128)?configuration=label", > + groups={'attrname': 'rand(256, 128)', > + '_expr': 'rand(256, 128)', > + '_subst': None, > + 'query': 'configuration=label', > + 'fragment': 'label', > + '__STRICT__': False, > + 'cfgkey': 'label'}, strict=False) > +@valid(name="eval:foo=1;bar=2;tar=3;foo+bar+tar#label", > + groups={'attrname': 'foo=1;bar=2;tar=3;foo+bar+tar', > + '_expr': 'foo+bar+tar', > + '_subst': 'foo=1;bar=2;tar=3;', > + 'query': None, > + 'fragment': 'label', > + '__STRICT__': True, > + 'cfgkey': 'label'}, strict=True) > @valid(name='eval:@foo/1/3') > @valid(name='eval:x=2;y=3;x*y') > @valid(name='eval:@foo/x=2;y=3;x*y') > @@ -122,8 +173,8 @@ class > EvaluationDevValidatorTestCase(AbstractNameValidatorTestCase, > @valid(name='eval:a={tango:a/b/c/d};x=2;a*x', > groups={'attrname':'a={tango:a/b/c/d};x=2;a*x', > '_expr':'a*x', > - '_subst':'a={tango:a/b/c/d};x=2;'}) > - > + '_subst':'a={tango:a/b/c/d};x=2;', > + 'fragment': None}) > @valid(name='eval://dev=foo;1', strict=False) > @valid(name='eval://dev=foo;1/3', strict=False) > @valid(name='eval://1/3', strict=False) -- +----------------------------------------------------+ Carlos Pascual Izarra Scientific Software Coordinator Computing Division ALBA Synchrotron [http://www.albasynchrotron.es] Carrer de la Llum 2-26 E-08290 Cerdanyola del Valles (Barcelona), Spain E-mail: cpa...@ce... Phone: +34 93 592 4428 +----------------------------------------------------+ |
From: Zbigniew R. <zre...@ce...> - 2015-11-26 08:21:22
|
Hi Carlos, Your patch was applied to develop branch. Cheers, Zibi On 11/23/2015 03:37 PM, cpa...@ce... wrote: > From: cpascual <cpa...@ce...> > > The "change read/write widget" feature of taurusform relies on the > TaurusWidgetFactory to obtain class objects from the class name, > but names of locally defined classes are not supported. Fix it > by using the globals before the factory. Do the same for all other > setXXXwidgetClass() methods. > --- > lib/taurus/qt/qtgui/panel/taurusvalue.py | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/lib/taurus/qt/qtgui/panel/taurusvalue.py b/lib/taurus/qt/qtgui/panel/taurusvalue.py > index 85b00d0..543ba0e 100644 > --- a/lib/taurus/qt/qtgui/panel/taurusvalue.py > +++ b/lib/taurus/qt/qtgui/panel/taurusvalue.py > @@ -607,6 +607,7 @@ class TaurusValue(Qt.QWidget, TaurusBaseWidget): > def labelWidgetClassFactory(self, classID): > if self._customWidget is not None: return None > if classID is None or classID == 'None': return None > + classID = globals().get(classID, classID) > if isinstance(classID, type): return classID > elif str(classID) == 'Auto': return self.getDefaultLabelWidgetClass() > else: return TaurusWidgetFactory().getWidgetClass(classID) > @@ -614,7 +615,7 @@ class TaurusValue(Qt.QWidget, TaurusBaseWidget): > def readWidgetClassFactory(self, classID): > if self._customWidget is not None: return None > if classID is None or classID == 'None': return None > - > + classID = globals().get(classID, classID) > if isinstance(classID, type): ret = classID > elif str(classID) == 'Auto': ret = self.getDefaultReadWidgetClass() > else: ret = TaurusWidgetFactory().getWidgetClass(classID) > @@ -634,6 +635,7 @@ class TaurusValue(Qt.QWidget, TaurusBaseWidget): > if self._customWidget is not None: return None > if classID is None or classID == 'None': return None > if self._compact and not ignoreCompact: return None > + classID = globals().get(classID, classID) > if isinstance(classID, type): return classID > elif str(classID) == 'Auto': return self.getDefaultWriteWidgetClass() > else: return TaurusWidgetFactory().getWidgetClass(classID) > @@ -641,12 +643,14 @@ class TaurusValue(Qt.QWidget, TaurusBaseWidget): > def unitsWidgetClassFactory(self, classID): > if self._customWidget is not None: return None > if classID is None or classID == 'None': return None > + classID = globals().get(classID, classID) > if isinstance(classID, type): return classID > elif str(classID) == 'Auto': return self.getDefaultUnitsWidgetClass() > else: return TaurusWidgetFactory().getWidgetClass(classID) > > def customWidgetClassFactory(self, classID): > if classID is None or classID == 'None': return None > + classID = globals().get(classID, classID) > if isinstance(classID, type): return classID > elif str(classID) == 'Auto': return self.getDefaultCustomWidgetClass() > else: return TaurusWidgetFactory().getWidgetClass(classID) > @@ -654,6 +658,7 @@ class TaurusValue(Qt.QWidget, TaurusBaseWidget): > def extraWidgetClassFactory(self, classID): > if self._customWidget is not None: return None > if classID is None or classID == 'None': return None > + classID = globals().get(classID, classID) > if isinstance(classID, type): return classID > elif str(classID) == 'Auto': return self.getDefaultExtraWidgetClass() > else: return TaurusWidgetFactory().getWidgetClass(classID) -- ALBA Synchrotron <http://www.albasynchrotron.es> Zbigniew Reszela Controls Section - Computing Division ALBA SYNCHROTRON LIGHT SOURCE Carrer de la Llum 2-26 | 08290 | Cerdanyola del Vallès| Barcelona | Spain <http://www.albasynchrotron.es/AboutUs/Access> (+34) 93 592 4407 www.albasynchrotron.es <http://www.albasynchrotron.es>| zre...@ce... <mailto:zre...@ce...> **Please, do not print this e-mail unless it is absolutely necessary. **Si heu rebut aquest correu per error, us informo que pot contenir informació confidencial i privada i que està prohibit el seu ús. Us agrairíem que ho comuniqueu al remitent i l'elimineu. Gràcies. Si ha recibido este correo por error, le informo de que puede contener información confidencial y privada y que está prohibido su uso. Le agradeceré que lo comunique a su remitente y lo elimine. Gracias. If you have received this e-mail in error, please note that it may contain confidential and private information, therefore, the use of this information is strictly forbidden. Please inform the sender of the error and delete the information received. Thank you. |
From: Zbigniew R. <zre...@ce...> - 2015-11-25 16:46:47
|
Hi Carlos, your patch was applied to develop. Thanks, Zibi On 11/19/2015 01:20 PM, cpascual wrote: > taurus.helper.__get_pyqt_version reports Qt version instead of PyQt one. > Fix it > --- > lib/taurus/core/taurushelper.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/taurus/core/taurushelper.py b/lib/taurus/core/taurushelper.py > index dae7c93..c5bdc32 100644 > --- a/lib/taurus/core/taurushelper.py > +++ b/lib/taurus/core/taurushelper.py > @@ -103,7 +103,7 @@ def __get_pytango_version_number(): > def __get_pyqt_version(): > try: > import PyQt4.Qt > - return PyQt4.Qt.QT_VERSION_STR > + return PyQt4.Qt.PYQT_VERSION_STR > except: > return None > -- ALBA Synchrotron <http://www.albasynchrotron.es> Zbigniew Reszela Controls Section - Computing Division ALBA SYNCHROTRON LIGHT SOURCE Carrer de la Llum 2-26 | 08290 | Cerdanyola del Vallès| Barcelona | Spain <http://www.albasynchrotron.es/AboutUs/Access> (+34) 93 592 4407 www.albasynchrotron.es <http://www.albasynchrotron.es>| zre...@ce... <mailto:zre...@ce...> **Please, do not print this e-mail unless it is absolutely necessary. **Si heu rebut aquest correu per error, us informo que pot contenir informació confidencial i privada i que està prohibit el seu ús. Us agrairíem que ho comuniqueu al remitent i l'elimineu. Gràcies. Si ha recibido este correo por error, le informo de que puede contener información confidencial y privada y que está prohibido su uso. Le agradeceré que lo comunique a su remitente y lo elimine. Gracias. If you have received this e-mail in error, please note that it may contain confidential and private information, therefore, the use of this information is strictly forbidden. Please inform the sender of the error and delete the information received. Thank you. |
From: cfalcon <cf...@ce...> - 2015-11-25 08:40:49
|
EvaluationAttributeNameValidator.getUriGroups for modern Uris without substitutions returns the group '_subst' as an empty string instead of None. Modify EvaluationAttributeNameValidator.path attribute to fix the bug. --- lib/taurus/core/evaluation/evalvalidator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/taurus/core/evaluation/evalvalidator.py b/lib/taurus/core/evaluation/evalvalidator.py index 9ba3596..cb76b1c 100644 --- a/lib/taurus/core/evaluation/evalvalidator.py +++ b/lib/taurus/core/evaluation/evalvalidator.py @@ -195,8 +195,8 @@ class EvaluationAttributeNameValidator(TaurusAttributeNameValidator): ''' scheme = 'eval' authority = EvaluationAuthorityNameValidator.authority - path = ((r'(?!//)/?(%s/)?' + - r'(?P<attrname>(?P<_subst>(%s;)*)(?P<_expr>[^?#]+))') % + path = ((r'(?!//)/?(%s/)?' + + r'(?P<attrname>(?P<_subst>(%s;)+)?(?P<_expr>[^?#]+))') % (EvaluationDeviceNameValidator.devname, K_EQUALS_V) ) query = '(?!)' -- 2.4.0 |
From: cfalcon <cf...@ce...> - 2015-11-25 08:40:47
|
The EvaluationAttributeNameValidator.getUriGroups is not well adapted for backwards compatibility Uris. The old Uris does not include the fragment group. Fix the problem adding this group in the backwards compatibility. --- lib/taurus/core/evaluation/evalvalidator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/taurus/core/evaluation/evalvalidator.py b/lib/taurus/core/evaluation/evalvalidator.py index 6317be4..9ba3596 100644 --- a/lib/taurus/core/evaluation/evalvalidator.py +++ b/lib/taurus/core/evaluation/evalvalidator.py @@ -379,7 +379,9 @@ class EvaluationAttributeNameValidator(TaurusAttributeNameValidator): r'(?P<_expr>[^?#;]+)' + \ r'(\?(?P<_substquery>(?!configuration=)(?P<_subst>%s(;%s)*)))?' % \ (K_EQUALS_V, K_EQUALS_V) + \ - r'(\?(?P<query>configuration(=(?P<cfgkey>[^#?]*))?))?$' + r'(\?(?P<query>configuration(=' +\ + '(?P<fragment>(?P<cfgkey>[^#?]*)))?))?$' + return p def getExpandedExpr(self, name): -- 2.4.0 |
From: cfalcon <cf...@ce...> - 2015-11-25 08:40:46
|
Add tests to reproduce bug#226, and bug#227. The new tests are focused to validate the getUriGroups method of EvaluationAttributeNameValidator. --- .../core/evaluation/test/test_evalvalidator.py | 55 +++++++++++++++++++++- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/lib/taurus/core/evaluation/test/test_evalvalidator.py b/lib/taurus/core/evaluation/test/test_evalvalidator.py index 25a0b28..037a1bf 100644 --- a/lib/taurus/core/evaluation/test/test_evalvalidator.py +++ b/lib/taurus/core/evaluation/test/test_evalvalidator.py @@ -115,6 +115,57 @@ class EvaluationDevValidatorTestCase(AbstractNameValidatorTestCase, @valid(name='eval:@foo/1') @valid(name='eval:@mymod.Myclass/1.2', groups={'attrname':'1.2', 'devname':'@mymod.Myclass'}) +@valid(name='eval://linspace(-1, 1, 256)', + groups={'attrname': 'linspace(-1, 1, 256)', + '_expr': 'linspace(-1, 1, 256)', + '_subst': None, + 'fragment': None, + '__STRICT__': False, + 'cfgkey': None}, strict=False) +@valid(name="eval://rand(256, 128)", + groups={'attrname': 'rand(256, 128)', + '_expr': 'rand(256, 128)', + '_subst': None, + 'fragment': None, + '__STRICT__': False, + 'cfgkey': None}, strict=False) +@valid(name="eval:rand(256, 128)", + groups={'attrname': 'rand(256, 128)', + '_expr': 'rand(256, 128)', + '_subst': None, + 'fragment': None, + '__STRICT__': True, + 'cfgkey': None}, strict=True) +@valid(name="eval:rand(256, 128)#label", + groups={'attrname': 'rand(256, 128)', + '_expr': 'rand(256, 128)', + '_subst': None, + 'fragment': 'label', + '__STRICT__': True, + 'cfgkey': 'label'}, strict=True) +@valid(name="eval:foo=10;rand(256, 128)+foo#label", + groups={'attrname': 'foo=10;rand(256, 128)+foo', + '_expr': 'rand(256, 128)+foo', + '_subst': 'foo=10;', + 'fragment': 'label', + '__STRICT__': True, + 'cfgkey': 'label'}, strict=True) +@valid(name="eval://rand(256, 128)?configuration=label", + groups={'attrname': 'rand(256, 128)', + '_expr': 'rand(256, 128)', + '_subst': None, + 'query': 'configuration=label', + 'fragment': 'label', + '__STRICT__': False, + 'cfgkey': 'label'}, strict=False) +@valid(name="eval:foo=1;bar=2;tar=3;foo+bar+tar#label", + groups={'attrname': 'foo=1;bar=2;tar=3;foo+bar+tar', + '_expr': 'foo+bar+tar', + '_subst': 'foo=1;bar=2;tar=3;', + 'query': None, + 'fragment': 'label', + '__STRICT__': True, + 'cfgkey': 'label'}, strict=True) @valid(name='eval:@foo/1/3') @valid(name='eval:x=2;y=3;x*y') @valid(name='eval:@foo/x=2;y=3;x*y') @@ -122,8 +173,8 @@ class EvaluationDevValidatorTestCase(AbstractNameValidatorTestCase, @valid(name='eval:a={tango:a/b/c/d};x=2;a*x', groups={'attrname':'a={tango:a/b/c/d};x=2;a*x', '_expr':'a*x', - '_subst':'a={tango:a/b/c/d};x=2;'}) - + '_subst':'a={tango:a/b/c/d};x=2;', + 'fragment': None}) @valid(name='eval://dev=foo;1', strict=False) @valid(name='eval://dev=foo;1/3', strict=False) @valid(name='eval://1/3', strict=False) -- 2.4.0 |
From: Carlos P. <cpa...@ce...> - 2015-11-24 12:38:19
|
Sorry, I am rejecting this patch. see my reasons in https://sourceforge.net/p/tauruslib/tickets/204/#f8bf/936c Cheers, Carlos On Tue 24 November 2015 09:13:11 cfalcon wrote: > The taurus testsuite applies the autodiscover in the taurus/lib > getting all the existing test. The external directory, that is include > in the root path, could include local installation of libraries used > by Taurus. Taurus should not execute the unittests of the external > libraries. > > The patch limits the taurus testsuite autodiscover in two directories: > - taurus/lib/core > - taurus/lib/qt > --- > lib/taurus/test/testsuite.py | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/lib/taurus/test/testsuite.py > b/lib/taurus/test/testsuite.py index 0cdcdef..c02890d 100644 > --- a/lib/taurus/test/testsuite.py > +++ b/lib/taurus/test/testsuite.py > @@ -44,9 +44,13 @@ def run(disableLogger=True): > # disable logging messages > if disableLogger: > taurus.disableLogOutput() > - # discover all tests within the taurus/lib directory > + # discover all tests within taurus/lib/core and taurus/lib/qt > directories loader = unittest.defaultTestLoader > - suite = loader.discover(os.path.dirname(taurus.__file__)) > + main_path = os.path.dirname(taurus.__file__) > + core_path = os.path.join(main_path, 'core') > + qt_path = os.path.join(main_path, 'qt') > + suite = loader.discover(core_path, top_level_dir=main_path) > + suite.addTests(loader.discover(qt_path, top_level_dir=main_path)) > # use the basic text test runner that outputs to sys.stderr runner = > unittest.TextTestRunner(descriptions=True, verbosity=2) # run the > test suite -- +----------------------------------------------------+ Carlos Pascual Izarra Scientific Software Coordinator Computing Division ALBA Synchrotron [http://www.albasynchrotron.es] Carrer de la Llum 2-26 E-08290 Cerdanyola del Valles (Barcelona), Spain E-mail: cpa...@ce... Phone: +34 93 592 4428 +----------------------------------------------------+ |
From: cfalcon <cf...@ce...> - 2015-11-24 08:13:23
|
The taurus testsuite applies the autodiscover in the taurus/lib getting all the existing test. The external directory, that is include in the root path, could include local installation of libraries used by Taurus. Taurus should not execute the unittests of the external libraries. The patch limits the taurus testsuite autodiscover in two directories: - taurus/lib/core - taurus/lib/qt --- lib/taurus/test/testsuite.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/taurus/test/testsuite.py b/lib/taurus/test/testsuite.py index 0cdcdef..c02890d 100644 --- a/lib/taurus/test/testsuite.py +++ b/lib/taurus/test/testsuite.py @@ -44,9 +44,13 @@ def run(disableLogger=True): # disable logging messages if disableLogger: taurus.disableLogOutput() - # discover all tests within the taurus/lib directory + # discover all tests within taurus/lib/core and taurus/lib/qt directories loader = unittest.defaultTestLoader - suite = loader.discover(os.path.dirname(taurus.__file__)) + main_path = os.path.dirname(taurus.__file__) + core_path = os.path.join(main_path, 'core') + qt_path = os.path.join(main_path, 'qt') + suite = loader.discover(core_path, top_level_dir=main_path) + suite.addTests(loader.discover(qt_path, top_level_dir=main_path)) # use the basic text test runner that outputs to sys.stderr runner = unittest.TextTestRunner(descriptions=True, verbosity=2) # run the test suite -- 2.4.0 |
From: <cpa...@ce...> - 2015-11-23 14:37:33
|
From: cpascual <cpa...@ce...> The "change read/write widget" feature of taurusform relies on the TaurusWidgetFactory to obtain class objects from the class name, but names of locally defined classes are not supported. Fix it by using the globals before the factory. Do the same for all other setXXXwidgetClass() methods. --- lib/taurus/qt/qtgui/panel/taurusvalue.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/taurus/qt/qtgui/panel/taurusvalue.py b/lib/taurus/qt/qtgui/panel/taurusvalue.py index 85b00d0..543ba0e 100644 --- a/lib/taurus/qt/qtgui/panel/taurusvalue.py +++ b/lib/taurus/qt/qtgui/panel/taurusvalue.py @@ -607,6 +607,7 @@ class TaurusValue(Qt.QWidget, TaurusBaseWidget): def labelWidgetClassFactory(self, classID): if self._customWidget is not None: return None if classID is None or classID == 'None': return None + classID = globals().get(classID, classID) if isinstance(classID, type): return classID elif str(classID) == 'Auto': return self.getDefaultLabelWidgetClass() else: return TaurusWidgetFactory().getWidgetClass(classID) @@ -614,7 +615,7 @@ class TaurusValue(Qt.QWidget, TaurusBaseWidget): def readWidgetClassFactory(self, classID): if self._customWidget is not None: return None if classID is None or classID == 'None': return None - + classID = globals().get(classID, classID) if isinstance(classID, type): ret = classID elif str(classID) == 'Auto': ret = self.getDefaultReadWidgetClass() else: ret = TaurusWidgetFactory().getWidgetClass(classID) @@ -634,6 +635,7 @@ class TaurusValue(Qt.QWidget, TaurusBaseWidget): if self._customWidget is not None: return None if classID is None or classID == 'None': return None if self._compact and not ignoreCompact: return None + classID = globals().get(classID, classID) if isinstance(classID, type): return classID elif str(classID) == 'Auto': return self.getDefaultWriteWidgetClass() else: return TaurusWidgetFactory().getWidgetClass(classID) @@ -641,12 +643,14 @@ class TaurusValue(Qt.QWidget, TaurusBaseWidget): def unitsWidgetClassFactory(self, classID): if self._customWidget is not None: return None if classID is None or classID == 'None': return None + classID = globals().get(classID, classID) if isinstance(classID, type): return classID elif str(classID) == 'Auto': return self.getDefaultUnitsWidgetClass() else: return TaurusWidgetFactory().getWidgetClass(classID) def customWidgetClassFactory(self, classID): if classID is None or classID == 'None': return None + classID = globals().get(classID, classID) if isinstance(classID, type): return classID elif str(classID) == 'Auto': return self.getDefaultCustomWidgetClass() else: return TaurusWidgetFactory().getWidgetClass(classID) @@ -654,6 +658,7 @@ class TaurusValue(Qt.QWidget, TaurusBaseWidget): def extraWidgetClassFactory(self, classID): if self._customWidget is not None: return None if classID is None or classID == 'None': return None + classID = globals().get(classID, classID) if isinstance(classID, type): return classID elif str(classID) == 'Auto': return self.getDefaultExtraWidgetClass() else: return TaurusWidgetFactory().getWidgetClass(classID) -- 2.6.2 |
From: cpascual <cpa...@ce...> - 2015-11-19 12:21:07
|
taurus.helper.__get_pyqt_version reports Qt version instead of PyQt one. Fix it --- lib/taurus/core/taurushelper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/taurus/core/taurushelper.py b/lib/taurus/core/taurushelper.py index dae7c93..c5bdc32 100644 --- a/lib/taurus/core/taurushelper.py +++ b/lib/taurus/core/taurushelper.py @@ -103,7 +103,7 @@ def __get_pytango_version_number(): def __get_pyqt_version(): try: import PyQt4.Qt - return PyQt4.Qt.QT_VERSION_STR + return PyQt4.Qt.PYQT_VERSION_STR except: return None -- 2.6.2 |