shepherd-core 2024.11.3__py3-none-any.whl → 2025.2.1__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.
@@ -59,8 +59,7 @@ def prepare_task(config: Union[ShpModel, Path, str], observer: Optional[str] = N
59
59
  if shp_wrap.datatype == TestbedTasks.__name__:
60
60
  if observer is None:
61
61
  logger.debug(
62
- "Task-Set contained TestbedTasks & no observer was provided "
63
- "-> will return TB-Tasks"
62
+ "Task-Set contained TestbedTasks & no observer was provided -> will return TB-Tasks"
64
63
  )
65
64
  return shp_wrap
66
65
  tbt = TestbedTasks(**shp_wrap.parameters)
@@ -93,7 +93,7 @@ class SystemInventory(ShpModel):
93
93
  reply = subprocess.run( # noqa: S603
94
94
  ptp_cmd, timeout=30, capture_output=True, check=False
95
95
  )
96
- ptp_out = f"{ reply.stdout }, { reply.stderr }"
96
+ ptp_out = f"{reply.stdout}, {reply.stderr}"
97
97
  # alternative: check_output - seems to be lighter
98
98
 
99
99
  model_dict = {
shepherd_core/reader.py CHANGED
@@ -172,7 +172,10 @@ class Reader:
172
172
  """Update internal states, helpful after resampling or other changes in data-group."""
173
173
  self.h5file.flush()
174
174
  sample_count = self.ds_time.shape[0]
175
- duration_raw = self.ds_time[sample_count - 1] - self.ds_time[0] if sample_count > 0 else 0
175
+ duration_raw = (
176
+ (int(self.ds_time[sample_count - 1]) - int(self.ds_time[0])) if sample_count > 0 else 0
177
+ )
178
+ # above's typecasting prevents overflow in u64-format
176
179
  if (sample_count > 0) and (duration_raw > 0):
177
180
  # this assumes iso-chronous sampling
178
181
  duration_s = self._cal.time.raw_to_si(duration_raw)
@@ -285,6 +288,9 @@ class Reader:
285
288
  dsv = self.ds_voltage[0:2000]
286
289
  diffs_np = np.unique(dsv[1:] - dsv[0:-1], return_counts=False)
287
290
  diffs_ls = [_e for _e in list(np.array(diffs_np)) if _e > 0]
291
+ # static voltages have 0 steps, so
292
+ if len(diffs_ls) == 0:
293
+ return None # or is 0 better? that may provoke div0
288
294
  voltage_step = min(diffs_ls)
289
295
  if voltage_step is not None:
290
296
  voltage_step = 1e-3 * voltage_step
@@ -36,7 +36,7 @@ class WebClient(AbcClient):
36
36
  super().__init__()
37
37
  if not hasattr(self, "_token"):
38
38
  # add default values
39
- self._token: str = "basic_public_access"
39
+ self._token: str = "basic_public_access" # noqa: S105
40
40
  self._server: str = testbed_server_default
41
41
  self._user: Optional[User] = None
42
42
  self._key: Optional[str] = None
shepherd_core/version.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """Separated string avoids circular imports."""
2
2
 
3
- version: str = "2024.11.3"
3
+ version: str = "2025.02.1"
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: shepherd_core
3
- Version: 2024.11.3
3
+ Version: 2025.2.1
4
4
  Summary: Programming- and CLI-Interface for the h5-dataformat of the Shepherd-Testbed
5
5
  Author-email: Ingmar Splitt <ingmar.splitt@tu-dresden.de>
6
6
  Maintainer-email: Ingmar Splitt <ingmar.splitt@tu-dresden.de>
@@ -2,8 +2,8 @@ shepherd_core/__init__.py,sha256=fCld2mcl0y0h6kRyPal3DP-sWXnKl_0aYWYBdg4QuUk,127
2
2
  shepherd_core/calibration_hw_def.py,sha256=_nMzgNzSnYyqcLnVCGd4tfA2e0avUXbccjmNpFhiDgo,2830
3
3
  shepherd_core/commons.py,sha256=vymKXWcy_1bz7ChzzEATUkJ4p3czCzjIdsSehVjJOY8,218
4
4
  shepherd_core/logger.py,sha256=4Q4hTI-nccOZ1_A68fo4UEctfu3pJx3IeHfa9VuDDEo,1804
5
- shepherd_core/reader.py,sha256=OBjvvo-R_68RPAlgTWfYkNeIW-wEeHVcSzScxLhYhvg,28021
6
- shepherd_core/version.py,sha256=efgburSXJlcrRhiL0_hKDFmBgNSmAdHw7BRzTIN918M,76
5
+ shepherd_core/reader.py,sha256=BxVWE-4BfDUjVh03l0SZHT5PwVN0xPEy4aP8Kr858kI,28270
6
+ shepherd_core/version.py,sha256=o-7_x2K2hYD5ZqmJzGFJI_9bnBF0jpY08HmDCMNTfMA,76
7
7
  shepherd_core/writer.py,sha256=GMR-7vkOgpTNPoknBWsRsC7-b7iGMtT60-KtSKunNe8,14636
8
8
  shepherd_core/data_models/__init__.py,sha256=bnHSP_HBOYm4WuoiHs_vyiRsWlvkyDjsarMNfKedN-Q,1836
9
9
  shepherd_core/data_models/readme.md,sha256=1bdfEypY_0NMhXLxOPRnLAsFca0HuHdq7_01yEWxvUs,2470
@@ -29,7 +29,7 @@ shepherd_core/data_models/experiment/__init__.py,sha256=lorsx0M-JWPIrt_UZfexsLwa
29
29
  shepherd_core/data_models/experiment/experiment.py,sha256=wnn6T3czuh4rz6OSYtMltCTbRpPX55TLVAtQcKO7Uhg,4044
30
30
  shepherd_core/data_models/experiment/observer_features.py,sha256=qxnb7anuQz9ZW5IUlPdUXYPIl5U7O9uXkJqZtMnAb0Y,5156
31
31
  shepherd_core/data_models/experiment/target_config.py,sha256=XIsjbbo7yn_A4q3GMxWbiNzEGA0Kk5gH7-XfQQ7Kg0E,3674
32
- shepherd_core/data_models/task/__init__.py,sha256=qZPoLdqnU2ffqP08wUdXzf0MC5hEdv5X2_XOIui0MM8,3314
32
+ shepherd_core/data_models/task/__init__.py,sha256=vOsSeB5IBYYwzOLKom8-XuZyjF86m_svtCsw-agiV7o,3295
33
33
  shepherd_core/data_models/task/emulation.py,sha256=tLb5auHOgdoG-e4hFljAYT49z7lMEaiimOy4UVZONi4,6440
34
34
  shepherd_core/data_models/task/firmware_mod.py,sha256=Rw_TA1ykQ7abUd_U0snqZlpZyrS8Nx6f4BEax1Xnji0,2818
35
35
  shepherd_core/data_models/task/harvest.py,sha256=HHnqWwRsJupaZJxuohs7NrK6VaDyoRzGOaG2h9y3s1Y,3360
@@ -59,12 +59,12 @@ shepherd_core/fw_tools/patcher.py,sha256=D6MHaCvKRRVQYSZozODAp_l7UnqxVsvnulPzpkf
59
59
  shepherd_core/fw_tools/validation.py,sha256=hBLCKIUumPTA6iuXMVbMYph2jamaxeSTxRqsvl3C4-I,4699
60
60
  shepherd_core/inventory/__init__.py,sha256=nRO11HG4eJ_FaXebSkE0dd1H6qvjrX5n3OQHOzKXVvk,3841
61
61
  shepherd_core/inventory/python.py,sha256=OWNnyEt0IDPW9XGW-WloU0FExwgZzYNA05VpRj4cZGc,1250
62
- shepherd_core/inventory/system.py,sha256=jRzko9QNPLaBiG7urVaeqqvb3GtCEYRwc0DAghRkLVo,3159
62
+ shepherd_core/inventory/system.py,sha256=Q_mtM2zhUsTvzELgpEVxSxL9aFS1RSGcCX6RFpyZ-r8,3155
63
63
  shepherd_core/inventory/target.py,sha256=Lq11j25tWieXheOxIDaQb-lc-2omxYVex5P6uGiLUyk,507
64
64
  shepherd_core/testbed_client/__init__.py,sha256=QtbsBUzHwOoM6rk0qa21ywuz63YV7af1fwUtWW8Vg_4,234
65
65
  shepherd_core/testbed_client/cache_path.py,sha256=tS0er9on5fw8wddMCt1jkc2uyYOdSTvX_UmfmYJf6tY,445
66
66
  shepherd_core/testbed_client/client_abc_fix.py,sha256=BsSkpvJHURRejlS-YPF1f6QRPC_X0fYEsJpinzsx6Jc,4079
67
- shepherd_core/testbed_client/client_web.py,sha256=iMh5T91152uugbFsqr2vvxLser0KIo5g426dp_6QWUE,5774
67
+ shepherd_core/testbed_client/client_web.py,sha256=rOg0Gf-s3S8U0z2ssh9_bNnq4aRQINfuuVHionPf38M,5788
68
68
  shepherd_core/testbed_client/fixtures.py,sha256=4Uk583R4r6I5IB78HxOn-9UNH3sbFha7OPEdcSXvMCU,9939
69
69
  shepherd_core/testbed_client/user_model.py,sha256=5M3vWkAGBwdGDUYAanAjrZwpzMBlh3XLOVvNYWiLmms,2107
70
70
  shepherd_core/vsource/__init__.py,sha256=vTvFWuJn4eurPNzEiMd15c1Rd6o3DTWzCfbhOomflZU,771
@@ -74,8 +74,8 @@ shepherd_core/vsource/virtual_harvester_model.py,sha256=GyA0uGl3r42t5c4roYtEaj22
74
74
  shepherd_core/vsource/virtual_harvester_simulation.py,sha256=MFT583s73BJZYyhcqgnDUGTPr9s_lN_lKafzJG6kueE,2457
75
75
  shepherd_core/vsource/virtual_source_model.py,sha256=9tiOzgrEgdEH5Uuhd8hjmmIkquNDuaNjLlblvInIlzg,3036
76
76
  shepherd_core/vsource/virtual_source_simulation.py,sha256=ZOnFd2uPawY2G1salCiLGx9o1OBG99_-EHBtDjx4ZUo,5140
77
- shepherd_core-2024.11.3.dist-info/METADATA,sha256=OBSLkOgbXMb_mhTym-Dk2p_GoPkGQyzMbYlaRhRhicU,7807
78
- shepherd_core-2024.11.3.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
79
- shepherd_core-2024.11.3.dist-info/top_level.txt,sha256=wy-t7HRBrKARZxa-Y8_j8d49oVHnulh-95K9ikxVhew,14
80
- shepherd_core-2024.11.3.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
81
- shepherd_core-2024.11.3.dist-info/RECORD,,
77
+ shepherd_core-2025.2.1.dist-info/METADATA,sha256=rYFb9DPtDYpbwy5xpIMWv7OtfQ87J12-pMQbvToPRpk,7806
78
+ shepherd_core-2025.2.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
79
+ shepherd_core-2025.2.1.dist-info/top_level.txt,sha256=wy-t7HRBrKARZxa-Y8_j8d49oVHnulh-95K9ikxVhew,14
80
+ shepherd_core-2025.2.1.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
81
+ shepherd_core-2025.2.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.6.0)
2
+ Generator: setuptools (75.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5