shepherd-data 2025.6.3__tar.gz → 2025.6.4__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 (28) hide show
  1. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/PKG-INFO +3 -4
  2. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/pyproject.toml +3 -4
  3. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/shepherd_data/__init__.py +1 -1
  4. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/shepherd_data/cli.py +9 -10
  5. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/shepherd_data/ivonne.py +9 -10
  6. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/shepherd_data/reader.py +17 -19
  7. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/shepherd_data.egg-info/PKG-INFO +3 -4
  8. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/shepherd_data.egg-info/requires.txt +1 -1
  9. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/README.md +0 -0
  10. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/setup.cfg +0 -0
  11. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/shepherd_data/mppt.py +0 -0
  12. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/shepherd_data.egg-info/SOURCES.txt +0 -0
  13. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/shepherd_data.egg-info/dependency_links.txt +0 -0
  14. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/shepherd_data.egg-info/entry_points.txt +0 -0
  15. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/shepherd_data.egg-info/top_level.txt +0 -0
  16. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/shepherd_data.egg-info/zip-safe +0 -0
  17. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/tests/test_cli.py +0 -0
  18. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/tests/test_cli_downsample.py +0 -0
  19. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/tests/test_cli_extract.py +0 -0
  20. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/tests/test_cli_extract_gpio.py +0 -0
  21. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/tests/test_cli_extract_meta.py +0 -0
  22. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/tests/test_cli_extract_uart.py +0 -0
  23. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/tests/test_cli_plot.py +0 -0
  24. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/tests/test_cli_validate.py +0 -0
  25. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/tests/test_cli_version.py +0 -0
  26. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/tests/test_examples.py +0 -0
  27. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/tests/test_ivonne.py +0 -0
  28. {shepherd_data-2025.6.3 → shepherd_data-2025.6.4}/tests/test_reader.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shepherd_data
3
- Version: 2025.6.3
3
+ Version: 2025.6.4
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>
@@ -18,7 +18,6 @@ Classifier: Development Status :: 5 - Production/Stable
18
18
  Classifier: Intended Audience :: Developers
19
19
  Classifier: Intended Audience :: Information Technology
20
20
  Classifier: Intended Audience :: Science/Research
21
- Classifier: Programming Language :: Python :: 3.9
22
21
  Classifier: Programming Language :: Python :: 3.10
23
22
  Classifier: Programming Language :: Python :: 3.11
24
23
  Classifier: Programming Language :: Python :: 3.12
@@ -26,7 +25,7 @@ Classifier: Programming Language :: Python :: 3.13
26
25
  Classifier: License :: OSI Approved :: MIT License
27
26
  Classifier: Operating System :: OS Independent
28
27
  Classifier: Natural Language :: English
29
- Requires-Python: >=3.9
28
+ Requires-Python: >=3.10
30
29
  Description-Content-Type: text/markdown
31
30
  Requires-Dist: click
32
31
  Requires-Dist: h5py
@@ -35,7 +34,7 @@ Requires-Dist: numpy
35
34
  Requires-Dist: pandas>=2.0.0
36
35
  Requires-Dist: pyYAML
37
36
  Requires-Dist: scipy
38
- Requires-Dist: shepherd-core[inventory]>=2025.06.3
37
+ Requires-Dist: shepherd-core[inventory]>=2025.06.4
39
38
  Requires-Dist: tqdm
40
39
  Provides-Extra: elf
41
40
  Requires-Dist: shepherd-core[elf]; extra == "elf"
@@ -18,7 +18,6 @@ classifiers = [
18
18
  "Intended Audience :: Developers",
19
19
  "Intended Audience :: Information Technology",
20
20
  "Intended Audience :: Science/Research",
21
- "Programming Language :: Python :: 3.9",
22
21
  "Programming Language :: Python :: 3.10",
23
22
  "Programming Language :: Python :: 3.11",
24
23
  "Programming Language :: Python :: 3.12",
@@ -28,7 +27,7 @@ classifiers = [
28
27
  "Natural Language :: English",
29
28
  ]
30
29
 
31
- requires-python = ">=3.9"
30
+ requires-python = ">=3.10"
32
31
  dependencies = [
33
32
  "click",
34
33
  "h5py",
@@ -37,7 +36,7 @@ dependencies = [
37
36
  "pandas>=2.0.0", # full-version, v2 is OK
38
37
  "pyYAML",
39
38
  "scipy", # full-version
40
- "shepherd-core[inventory]>=2025.06.3", # libs are strongly coupled
39
+ "shepherd-core[inventory]>=2025.06.4", # libs are strongly coupled
41
40
  "tqdm", # full-version
42
41
  ]
43
42
 
@@ -100,7 +99,7 @@ addopts = "-vvv --stepwise" # opts: verbose result for each tests
100
99
  source = ["shepherd_data"]
101
100
 
102
101
  [tool.mypy]
103
- python_version = 3.9
102
+ python_version = 3.10
104
103
  ignore_missing_imports = true
105
104
  disable_error_code = ["call-arg", ]
106
105
  exclude = [
@@ -11,7 +11,7 @@ from shepherd_core import Writer
11
11
 
12
12
  from .reader import Reader
13
13
 
14
- __version__ = "2025.06.3"
14
+ __version__ = "2025.06.4"
15
15
 
16
16
  __all__ = [
17
17
  "Reader",
@@ -5,7 +5,6 @@ import sys
5
5
  from contextlib import suppress
6
6
  from datetime import datetime
7
7
  from pathlib import Path
8
- from typing import Optional
9
8
 
10
9
  import click
11
10
  import pydantic
@@ -135,8 +134,8 @@ def validate(in_data: Path, *, recurse: bool = False) -> None:
135
134
  )
136
135
  def extract(
137
136
  in_data: Path,
138
- start: Optional[float],
139
- end: Optional[float],
137
+ start: float | None,
138
+ end: float | None,
140
139
  ds_factor: float,
141
140
  separator: str,
142
141
  *,
@@ -211,7 +210,7 @@ def extract_meta(
211
210
  if not debug:
212
211
  continue
213
212
  csv_depr = ["sysutil", "timesync"]
214
- csv_meta = ["ptp", "phc2sys", "sys_util", "pru_util"]
213
+ csv_meta = ["ptp", "phc2sys", "sys_util", "pru_util", "power"]
215
214
  for element in csv_meta + csv_depr:
216
215
  if element in shpr.h5file:
217
216
  shpr.save_csv(shpr[element], separator)
@@ -353,10 +352,10 @@ def extract_gpio(in_data: Path, separator: str, *, recurse: bool = False) -> Non
353
352
  )
354
353
  def downsample(
355
354
  in_data: Path,
356
- ds_factor: Optional[float],
357
- sample_rate: Optional[int],
358
- start: Optional[float],
359
- end: Optional[float],
355
+ ds_factor: float | None,
356
+ sample_rate: int | None,
357
+ start: float | None,
358
+ end: float | None,
360
359
  *,
361
360
  recurse: bool = False,
362
361
  ) -> None:
@@ -431,8 +430,8 @@ def downsample(
431
430
  )
432
431
  def plot(
433
432
  in_data: Path,
434
- start: Optional[float],
435
- end: Optional[float],
433
+ start: float | None,
434
+ end: float | None,
436
435
  width: int,
437
436
  height: int,
438
437
  *,
@@ -16,7 +16,6 @@ import os
16
16
  import pickle
17
17
  from pathlib import Path
18
18
  from types import TracebackType
19
- from typing import Optional
20
19
 
21
20
  import numpy as np
22
21
  import pandas as pd
@@ -48,7 +47,7 @@ class Reader:
48
47
  def __init__(
49
48
  self,
50
49
  file_path: Path,
51
- samplerate_sps: Optional[int] = None,
50
+ samplerate_sps: int | None = None,
52
51
  *,
53
52
  verbose: bool = True,
54
53
  ) -> None:
@@ -66,7 +65,7 @@ class Reader:
66
65
  self.file_size: int = 0
67
66
  self.data_rate: float = 0
68
67
 
69
- self._df: Optional[pd.DataFrame] = None
68
+ self._df: pd.DataFrame | None = None
70
69
 
71
70
  def __enter__(self) -> Self:
72
71
  if not self.file_path.exists():
@@ -88,9 +87,9 @@ class Reader:
88
87
 
89
88
  def __exit__(
90
89
  self,
91
- typ: Optional[type[BaseException]] = None,
92
- exc: Optional[BaseException] = None,
93
- tb: Optional[TracebackType] = None,
90
+ typ: type[BaseException] | None = None,
91
+ exc: BaseException | None = None,
92
+ tb: TracebackType | None = None,
94
93
  extra_arg: int = 0,
95
94
  ) -> None:
96
95
  pass
@@ -107,7 +106,7 @@ class Reader:
107
106
  shp_output: Path,
108
107
  v_max: float = 5.0,
109
108
  pts_per_curve: int = 1000,
110
- duration_s: Optional[float] = None,
109
+ duration_s: float | None = None,
111
110
  ) -> None:
112
111
  """Transform recorded parameters to shepherd hdf database with IV curves.
113
112
 
@@ -170,8 +169,8 @@ class Reader:
170
169
  self,
171
170
  shp_output: Path,
172
171
  v_max: float = 5.0,
173
- duration_s: Optional[float] = None,
174
- tracker: Optional[MPPTracker] = None,
172
+ duration_s: float | None = None,
173
+ tracker: MPPTracker | None = None,
175
174
  ) -> None:
176
175
  """Transform shepherd IV surface / curves to shepherd IV trace / samples .
177
176
 
@@ -240,7 +239,7 @@ class Reader:
240
239
  self,
241
240
  shp_output: Path,
242
241
  v_max: float = 5.0,
243
- duration_s: Optional[float] = None,
242
+ duration_s: float | None = None,
244
243
  ) -> None:
245
244
  """Transform ivonne-parameters to up-sampled versions for shepherd.
246
245
 
@@ -5,8 +5,6 @@ from collections.abc import Mapping
5
5
  from collections.abc import Sequence
6
6
  from datetime import datetime
7
7
  from pathlib import Path
8
- from typing import Optional
9
- from typing import Union
10
8
 
11
9
  import h5py
12
10
  import numpy as np
@@ -166,14 +164,14 @@ class Reader(CoreReader):
166
164
 
167
165
  def downsample(
168
166
  self,
169
- data_src: Union[h5py.Dataset, np.ndarray],
170
- data_dst: Union[None, h5py.Dataset, np.ndarray],
167
+ data_src: h5py.Dataset | np.ndarray,
168
+ data_dst: None | h5py.Dataset | np.ndarray,
171
169
  start_n: int = 0,
172
- end_n: Optional[int] = None,
170
+ end_n: int | None = None,
173
171
  ds_factor: float = 5,
174
172
  *,
175
173
  is_time: bool = False,
176
- ) -> Union[None, h5py.Dataset, np.ndarray]:
174
+ ) -> None | h5py.Dataset | np.ndarray:
177
175
  """Sample down iv-data.
178
176
 
179
177
  Warning: only valid for IV-Stream, not IV-Curves,
@@ -258,8 +256,8 @@ class Reader(CoreReader):
258
256
 
259
257
  def cut_and_downsample_to_file(
260
258
  self,
261
- start_s: Optional[float],
262
- end_s: Optional[float],
259
+ start_s: float | None,
260
+ end_s: float | None,
263
261
  ds_factor: float,
264
262
  ) -> Path:
265
263
  """Cut source to given limits, downsample by factor and store result in separate file.
@@ -360,14 +358,14 @@ class Reader(CoreReader):
360
358
 
361
359
  def resample(
362
360
  self,
363
- data_src: Union[h5py.Dataset, np.ndarray],
364
- data_dst: Union[None, h5py.Dataset, np.ndarray],
361
+ data_src: h5py.Dataset | np.ndarray,
362
+ data_dst: None | h5py.Dataset | np.ndarray,
365
363
  start_n: int = 0,
366
- end_n: Optional[int] = None,
364
+ end_n: int | None = None,
367
365
  samplerate_dst: float = 1000,
368
366
  *,
369
367
  is_time: bool = False,
370
- ) -> Union[None, h5py.Dataset, np.ndarray]:
368
+ ) -> None | h5py.Dataset | np.ndarray:
371
369
  """Up- or down-sample the original trace-data.
372
370
 
373
371
  :param data_src: original iv-data
@@ -463,11 +461,11 @@ class Reader(CoreReader):
463
461
 
464
462
  def generate_plot_data(
465
463
  self,
466
- start_s: Optional[float] = None,
467
- end_s: Optional[float] = None,
464
+ start_s: float | None = None,
465
+ end_s: float | None = None,
468
466
  *,
469
467
  relative_timestamp: bool = True,
470
- ) -> Optional[dict]:
468
+ ) -> dict | None:
471
469
  """Provide down-sampled iv-data that can be fed into plot_to_file().
472
470
 
473
471
  :param start_s: time in seconds, relative to start of recording
@@ -517,7 +515,7 @@ class Reader(CoreReader):
517
515
 
518
516
  @staticmethod
519
517
  def assemble_plot(
520
- data: Union[Mapping, Sequence], width: int = 20, height: int = 10, *, only_pwr: bool = False
518
+ data: Mapping | Sequence, width: int = 20, height: int = 10, *, only_pwr: bool = False
521
519
  ) -> plt.Figure:
522
520
  """Create the actual figure.
523
521
 
@@ -575,8 +573,8 @@ class Reader(CoreReader):
575
573
 
576
574
  def plot_to_file(
577
575
  self,
578
- start_s: Optional[float] = None,
579
- end_s: Optional[float] = None,
576
+ start_s: float | None = None,
577
+ end_s: float | None = None,
580
578
  width: int = 20,
581
579
  height: int = 10,
582
580
  *,
@@ -619,7 +617,7 @@ class Reader(CoreReader):
619
617
  height: int = 10,
620
618
  *,
621
619
  only_pwr: bool = False,
622
- ) -> Optional[Path]:
620
+ ) -> Path | None:
623
621
  """Create (down-sampled) IV-Multi-Plots (of more than one trace).
624
622
 
625
623
  :param data: plottable / down-sampled iv-data with some meta-data
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shepherd_data
3
- Version: 2025.6.3
3
+ Version: 2025.6.4
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>
@@ -18,7 +18,6 @@ Classifier: Development Status :: 5 - Production/Stable
18
18
  Classifier: Intended Audience :: Developers
19
19
  Classifier: Intended Audience :: Information Technology
20
20
  Classifier: Intended Audience :: Science/Research
21
- Classifier: Programming Language :: Python :: 3.9
22
21
  Classifier: Programming Language :: Python :: 3.10
23
22
  Classifier: Programming Language :: Python :: 3.11
24
23
  Classifier: Programming Language :: Python :: 3.12
@@ -26,7 +25,7 @@ Classifier: Programming Language :: Python :: 3.13
26
25
  Classifier: License :: OSI Approved :: MIT License
27
26
  Classifier: Operating System :: OS Independent
28
27
  Classifier: Natural Language :: English
29
- Requires-Python: >=3.9
28
+ Requires-Python: >=3.10
30
29
  Description-Content-Type: text/markdown
31
30
  Requires-Dist: click
32
31
  Requires-Dist: h5py
@@ -35,7 +34,7 @@ Requires-Dist: numpy
35
34
  Requires-Dist: pandas>=2.0.0
36
35
  Requires-Dist: pyYAML
37
36
  Requires-Dist: scipy
38
- Requires-Dist: shepherd-core[inventory]>=2025.06.3
37
+ Requires-Dist: shepherd-core[inventory]>=2025.06.4
39
38
  Requires-Dist: tqdm
40
39
  Provides-Extra: elf
41
40
  Requires-Dist: shepherd-core[elf]; extra == "elf"
@@ -5,7 +5,7 @@ numpy
5
5
  pandas>=2.0.0
6
6
  pyYAML
7
7
  scipy
8
- shepherd-core[inventory]>=2025.06.3
8
+ shepherd-core[inventory]>=2025.06.4
9
9
  tqdm
10
10
 
11
11
  [dev]