sardana-nxsrecorder 3.29.0__py3-none-any.whl → 3.30.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sardana-nxsrecorder
3
- Version: 3.29.0
3
+ Version: 3.30.0
4
4
  Summary: NeXus Sardana Scan Recorder
5
5
  Home-page: https://github.com/nexdatas/sardana-nxs-filerecorder/
6
6
  Author: Jan Kotanski
@@ -76,7 +76,7 @@ Extract sources and run
76
76
 
77
77
  .. code-block:: console
78
78
 
79
- $ python setup.py install
79
+ $ python3 setup.py install
80
80
 
81
81
  and add an *RecorderPath* property of *MacroServer* with its value
82
82
  defining the package location, e.g.
@@ -87,7 +87,7 @@ defining the package location, e.g.
87
87
  Debian packages
88
88
  """""""""""""""
89
89
 
90
- Debian Bookworm, Bullseye, Buster and Ubuntu Lunar, Jammy and Focal packages can be found in the HDRI repository.
90
+ Debian Bookworm, Bullseye, Buster and Ubuntu Oracular, Noble Jammy packages can be found in the HDRI repository.
91
91
 
92
92
  To install the debian packages, add the PGP repository key
93
93
 
@@ -109,7 +109,7 @@ Finally, for python2.7
109
109
  .. code-block:: console
110
110
 
111
111
  $ apt-get update
112
- $ apt-get install python-sardana-nxsrecorder
112
+ $ apt-get install python3-sardana-nxsrecorder
113
113
 
114
114
  and set the RecoderPath property of MacroServer with
115
115
 
@@ -117,34 +117,15 @@ and set the RecoderPath property of MacroServer with
117
117
 
118
118
  $ apt-get install sardana-nxsrecorder
119
119
 
120
- For python3
121
-
122
- .. code-block:: console
123
-
124
- $ apt-get update
125
- $ apt-get install python3-sardana-nxsrecorder
126
- $ apt-get install sardana-nxsrecorder3
127
120
 
128
121
  To instal other NexDaTaS packages
129
122
 
130
- .. code-block:: console
131
-
132
- $ apt-get install python-nxswriter nxsconfigserver-db python-nxsconfigserver nxsconfigtool python-nxstools nxswriter nxsconfigserver nxsrecselector
133
-
134
- or for python 3
135
-
136
123
  .. code-block:: console
137
124
 
138
125
  $ apt-get install python3-nxswriter nxsconfigserver-db python3-nxsconfigserver nxsconfigtool3 python3-nxstools nxswriter3 nxsconfigserver3
139
126
 
140
127
  and
141
128
 
142
- .. code-block:: console
143
-
144
- $ apt-get install python-nxsrecselector nxsrecselector nxselector
145
-
146
- or for python3
147
-
148
129
  .. code-block:: console
149
130
 
150
131
  $ apt-get install python3-nxsrecselector nxsrecselector3 nxselector3
@@ -0,0 +1,6 @@
1
+ sardananxsrecorder/__init__.py,sha256=Gi6Nc8XqKBPmq8YhG7H2-9QGIR9lmirdvd-UUbWFOZU,896
2
+ sardananxsrecorder/nxsrecorder.py,sha256=D2upQ6dLwZZQKPgIzUJPROAfDFYJfWBk-T-8cmNpdOU,60716
3
+ sardana_nxsrecorder-3.30.0.dist-info/METADATA,sha256=OyCMdsfpzFGG8CyS2iPvvE6m5vo-HMqvLFfrmnvMQBg,8116
4
+ sardana_nxsrecorder-3.30.0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
5
+ sardana_nxsrecorder-3.30.0.dist-info/top_level.txt,sha256=YdD3m417i-jlYyQWgiizgZ8lQQcOjM8y-bmUHrGkfY4,19
6
+ sardana_nxsrecorder-3.30.0.dist-info/RECORD,,
@@ -20,4 +20,4 @@
20
20
  """ Sardana Scan Recorders """
21
21
 
22
22
  #: package version
23
- __version__ = "3.29.0"
23
+ __version__ = "3.30.0"
@@ -600,6 +600,26 @@ class NXS_FileRecorder(BaseFileRecorder):
600
600
  alias = None
601
601
  return alias
602
602
 
603
+ def __short_name(self, name):
604
+ """ provides a device alias
605
+
606
+ :param name: device name
607
+ :type name: :obj:`str`
608
+ :returns: device alias
609
+ :rtype: :obj:`str`
610
+ """
611
+ # if name does not contain a "/" it's probably an alias
612
+ if name.startswith("tango://"):
613
+ name = name[8:]
614
+ if name.find("/") == -1:
615
+ return name
616
+
617
+ # haso107klx:10000/expchan/hasysis3820ctrl/1
618
+ if name.find(':') >= 0:
619
+ lst = name.split("/")
620
+ name = "/".join(lst[1:])
621
+ return name
622
+
603
623
  def __collectAliases(self, envRec):
604
624
  """ sets deviceAlaises and dynamicDataSources from env record
605
625
 
@@ -656,6 +676,9 @@ class NXS_FileRecorder(BaseFileRecorder):
656
676
  lddict = []
657
677
  tdss = [ds for ds in dss if not ds.startswith("tango://")
658
678
  and ds not in nexuscomponents]
679
+ tgdss = [self.__short_name(ds)
680
+ for ds in dss if ds.startswith("tango://")
681
+ and ds not in nexuscomponents]
659
682
 
660
683
  fields = []
661
684
  for dd in envRec['datadesc']:
@@ -705,10 +728,13 @@ class NXS_FileRecorder(BaseFileRecorder):
705
728
  for mdd in fields.values():
706
729
  lddict.append(mdd)
707
730
 
731
+ tdss.extend(tgdss)
708
732
  jddict = json.dumps(lddict, cls=NXS_FileRecorder.numpyEncoder)
709
733
  jdss = json.dumps(tdss, cls=NXS_FileRecorder.numpyEncoder)
710
734
  jkeys = json.dumps(keys, cls=NXS_FileRecorder.numpyEncoder)
711
- # self.debug("JDD: %s" % jddict)
735
+ self.debug("JDD: %s" % jddict)
736
+ self.debug("JDs: %s" % tdss)
737
+ self.debug("Jk: %s" % jkeys)
712
738
  self.__dynamicCP = \
713
739
  self.__command(self.__nexussettings_device,
714
740
  "createDynamicComponent",
@@ -1402,6 +1428,8 @@ class NXS_FileRecorder(BaseFileRecorder):
1402
1428
  commands = []
1403
1429
  try:
1404
1430
  sm = dict(self.__getEnvVar('SciCatMeasurements', {}))
1431
+ if not isinstance(sm, dict):
1432
+ sm = {}
1405
1433
  except Exception:
1406
1434
  sm = {}
1407
1435
 
@@ -1456,6 +1484,8 @@ class NXS_FileRecorder(BaseFileRecorder):
1456
1484
 
1457
1485
  try:
1458
1486
  sm = dict(self.__getEnvVar('SciCatMeasurements', {}))
1487
+ if not isinstance(sm, dict):
1488
+ sm = {}
1459
1489
  except Exception:
1460
1490
  sm = {}
1461
1491
 
@@ -1,6 +0,0 @@
1
- sardananxsrecorder/__init__.py,sha256=I4fy63PG6PEO-ccX4KwyaT3_WUwNbwqi2Vg6PQTh0_c,896
2
- sardananxsrecorder/nxsrecorder.py,sha256=ovQh6Fhh7YTShCpuvsrntFGY2TJxd7V3Nbc-6nrFxBs,59760
3
- sardana_nxsrecorder-3.29.0.dist-info/METADATA,sha256=19GQGpmlAvFRwpBTBq4lwXOiZ64c_C217F2qHkoA6Tc,8569
4
- sardana_nxsrecorder-3.29.0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
5
- sardana_nxsrecorder-3.29.0.dist-info/top_level.txt,sha256=YdD3m417i-jlYyQWgiizgZ8lQQcOjM8y-bmUHrGkfY4,19
6
- sardana_nxsrecorder-3.29.0.dist-info/RECORD,,