sardana-nxsrecorder 3.20.0__tar.gz → 3.21.1__tar.gz

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.
Files changed (40) hide show
  1. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/ChangeLog +9 -0
  2. {sardana-nxsrecorder-3.20.0/sardana_nxsrecorder.egg-info → sardana-nxsrecorder-3.21.1}/PKG-INFO +2 -2
  3. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1/sardana_nxsrecorder.egg-info}/PKG-INFO +2 -2
  4. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/sardananxsrecorder/__init__.py +1 -1
  5. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/sardananxsrecorder/nxsrecorder.py +13 -5
  6. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/setup.py +2 -2
  7. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/.ci/debian10_py2/Dockerfile +0 -0
  8. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/.ci/debian10_py3/Dockerfile +0 -0
  9. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/.ci/debian8_py2/Dockerfile +0 -0
  10. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/.ci/debian8_py3/Dockerfile +0 -0
  11. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/.ci/debian9_py2/Dockerfile +0 -0
  12. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/.ci/debian9_py3/Dockerfile +0 -0
  13. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/.ci/install.sh +0 -0
  14. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/.ci/run.sh +0 -0
  15. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/.ci/ubuntu16.04_py2/Dockerfile +0 -0
  16. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/.ci/ubuntu16.04_py3/Dockerfile +0 -0
  17. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/.ci/ubuntu18.04_py2/Dockerfile +0 -0
  18. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/.ci/ubuntu18.04_py3/Dockerfile +0 -0
  19. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/.ci/ubuntu20.04_py3/Dockerfile +0 -0
  20. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/.flake8 +0 -0
  21. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/.github/workflows/tests.yml +0 -0
  22. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/.gitignore +0 -0
  23. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/COPYRIGHT +0 -0
  24. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/MANIFEST.in +0 -0
  25. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/README.rst +0 -0
  26. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/doc/Makefile +0 -0
  27. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/doc/conf.py +0 -0
  28. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/doc/index.rst +0 -0
  29. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/doc/make.bat +0 -0
  30. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/doc/sardananxsrecorder.rst +0 -0
  31. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/man/sardananxsrecorder.1 +0 -0
  32. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/sardana_nxsrecorder.egg-info/SOURCES.txt +0 -0
  33. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/sardana_nxsrecorder.egg-info/dependency_links.txt +0 -0
  34. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/sardana_nxsrecorder.egg-info/not-zip-safe +0 -0
  35. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/sardana_nxsrecorder.egg-info/requires.txt +0 -0
  36. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/sardana_nxsrecorder.egg-info/top_level.txt +0 -0
  37. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/setup.cfg +0 -0
  38. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/test/__init__.py +0 -0
  39. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/test/__main__.py +0 -0
  40. {sardana-nxsrecorder-3.20.0 → sardana-nxsrecorder-3.21.1}/test/main.py +0 -0
@@ -1,3 +1,12 @@
1
+ 2024-05-23 Jan Kotanski <jankotan@gmail.com>
2
+ * replace deprecated tz.localize() with datetime.replace() (#111)
3
+ * tagged as 3.21.1
4
+
5
+ 2024-05-22 Jan Kotanski <jankotan@gmail.com>
6
+ * improve support for creating measurement files in appendentry mode (#108)
7
+ * change entryname in the appendentry mode to '%s_%05i' (#108)
8
+ * tagged as 3.21.0
9
+
1
10
  2024-05-22 Jan Kotanski <jankotan@gmail.com>
2
11
  * add support for creating measurement files (#105)
3
12
  * tagged as 3.20.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sardana-nxsrecorder
3
- Version: 3.20.0
3
+ Version: 3.21.1
4
4
  Summary: NeXus Sardana Scan Recorder
5
5
  Home-page: https://github.com/nexdatas/sardana-nxs-filerecorder/
6
6
  Author: Jan Kotanski
@@ -12,7 +12,6 @@ Classifier: Intended Audience :: Science/Research
12
12
  Classifier: Topic :: Scientific/Engineering :: Physics
13
13
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
14
14
  Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
15
- Classifier: Programming Language :: Python :: 2.7
16
15
  Classifier: Programming Language :: Python :: 3
17
16
  Classifier: Programming Language :: Python :: 3.4
18
17
  Classifier: Programming Language :: Python :: 3.5
@@ -22,6 +21,7 @@ Classifier: Programming Language :: Python :: 3.8
22
21
  Classifier: Programming Language :: Python :: 3.9
23
22
  Classifier: Programming Language :: Python :: 3.10
24
23
  Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
25
 
26
26
  Welcome to sardananxsrecorder's documentation!
27
27
  ==============================================
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sardana-nxsrecorder
3
- Version: 3.20.0
3
+ Version: 3.21.1
4
4
  Summary: NeXus Sardana Scan Recorder
5
5
  Home-page: https://github.com/nexdatas/sardana-nxs-filerecorder/
6
6
  Author: Jan Kotanski
@@ -12,7 +12,6 @@ Classifier: Intended Audience :: Science/Research
12
12
  Classifier: Topic :: Scientific/Engineering :: Physics
13
13
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
14
14
  Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
15
- Classifier: Programming Language :: Python :: 2.7
16
15
  Classifier: Programming Language :: Python :: 3
17
16
  Classifier: Programming Language :: Python :: 3.4
18
17
  Classifier: Programming Language :: Python :: 3.5
@@ -22,6 +21,7 @@ Classifier: Programming Language :: Python :: 3.8
22
21
  Classifier: Programming Language :: Python :: 3.9
23
22
  Classifier: Programming Language :: Python :: 3.10
24
23
  Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
25
 
26
26
  Welcome to sardananxsrecorder's documentation!
27
27
  ==============================================
@@ -20,4 +20,4 @@
20
20
  """ Sardana Scan Recorders """
21
21
 
22
22
  #: package version
23
- __version__ = "3.20.0"
23
+ __version__ = "3.21.1"
@@ -22,6 +22,7 @@
22
22
 
23
23
  import os
24
24
  import re
25
+ import sys
25
26
 
26
27
  import numpy
27
28
  import json
@@ -961,7 +962,7 @@ class NXS_FileRecorder(BaseFileRecorder):
961
962
  appendentry = not self.__setFileName(
962
963
  self.__base_filename, not appendentry)
963
964
  envRec = self.recordlist.getEnviron()
964
- self.__vars["vars"]["serialno"] = envRec["serialno"] \
965
+ self.__vars["vars"]["serialno"] = ("_%05i" % envRec["serialno"]) \
965
966
  if appendentry else ""
966
967
  self.__vars["vars"]["scan_id"] = envRec["serialno"]
967
968
  self.__vars["vars"]["scan_title"] = envRec["title"]
@@ -1129,7 +1130,10 @@ class NXS_FileRecorder(BaseFileRecorder):
1129
1130
  tz = pytz.timezone(self.__timezone)
1130
1131
 
1131
1132
  fmt = '%Y-%m-%dT%H:%M:%S.%f%z'
1132
- starttime = tz.localize(mtime)
1133
+ if sys.version_info > (3, 6):
1134
+ starttime = mtime.replace(tzinfo=tz)
1135
+ else:
1136
+ starttime = tz.localize(mtime)
1133
1137
  return str(starttime.strftime(fmt))
1134
1138
 
1135
1139
  def _endRecordList(self, recordlist):
@@ -1233,8 +1237,8 @@ class NXS_FileRecorder(BaseFileRecorder):
1233
1237
  scanname, _ = os.path.splitext(bfname)
1234
1238
 
1235
1239
  if appendentry is True:
1236
- sid = self.__getEnvVar("ScanID", 0)
1237
- sname = "%s::/%s%i;%s_%05i" % (
1240
+ sid = self.__vars["vars"]["scan_id"]
1241
+ sname = "%s::/%s_%05i;%s_%05i" % (
1238
1242
  scanname, entryname, sid, scanname, sid)
1239
1243
 
1240
1244
  # auto grouping
@@ -1290,6 +1294,10 @@ class NXS_FileRecorder(BaseFileRecorder):
1290
1294
  variables = self.__getConfVar("ConfigVariables", None, True)
1291
1295
  if isinstance(variables, dict) and "entryname" in variables:
1292
1296
  entryname = variables["entryname"]
1297
+ if appendentry is True:
1298
+ sid = self.__vars["vars"]["scan_id"]
1299
+ entryname = entryname + ("_%05i" % sid)
1300
+ sname = sname + ("_%05i" % sid)
1293
1301
 
1294
1302
  mntname = scanname
1295
1303
  if fdir in sm.keys() and sm[fdir]:
@@ -1304,7 +1312,7 @@ class NXS_FileRecorder(BaseFileRecorder):
1304
1312
  fl = h5writer.open_file(mntfile, readonly=False)
1305
1313
  rt = fl.root()
1306
1314
  if sname not in rt.names():
1307
- h5writer.link("%s:/%s" % (self.filename, entryname), rt, sname)
1315
+ h5writer.link("%s:/%s" % (fname, entryname), rt, sname)
1308
1316
  self.debug("Link '%s' in '%s' created " % (sname, mntname))
1309
1317
  rt.close()
1310
1318
  fl.close()
@@ -50,7 +50,7 @@ install_requires = [
50
50
  'numpy>1.6.0',
51
51
  # 'pytango',
52
52
  # 'nxswriter',
53
- # 'nxstools',
53
+ # 'nxstools', # >4.1.0
54
54
  # 'nxsconfigserver',
55
55
  # 'sardana',
56
56
  # 'taurus',
@@ -80,7 +80,6 @@ SETUPDATA = dict(
80
80
  'Topic :: Scientific/Engineering :: Physics',
81
81
  'Topic :: Software Development :: Libraries :: Python Modules',
82
82
  'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
83
- 'Programming Language :: Python :: 2.7',
84
83
  'Programming Language :: Python :: 3',
85
84
  'Programming Language :: Python :: 3.4',
86
85
  'Programming Language :: Python :: 3.5',
@@ -90,6 +89,7 @@ SETUPDATA = dict(
90
89
  'Programming Language :: Python :: 3.9',
91
90
  'Programming Language :: Python :: 3.10',
92
91
  'Programming Language :: Python :: 3.11',
92
+ 'Programming Language :: Python :: 3.12',
93
93
  ],
94
94
  install_requires=install_requires,
95
95
  zip_safe=False,