shepherd-data 2023.8.7__py3-none-any.whl → 2023.9.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.
shepherd_data/__init__.py CHANGED
@@ -9,7 +9,7 @@ from shepherd_core import BaseWriter as Writer
9
9
 
10
10
  from .reader import Reader
11
11
 
12
- __version__ = "2023.8.7"
12
+ __version__ = "2023.9.0"
13
13
 
14
14
  __all__ = [
15
15
  "Reader",
shepherd_data/cli.py CHANGED
@@ -29,13 +29,13 @@ def path_to_flist(data_path: Path) -> List[Path]:
29
29
  """
30
30
  data_path = Path(data_path).resolve()
31
31
  h5files = []
32
- if data_path.is_file() and data_path.suffix == ".h5":
32
+ if data_path.is_file() and data_path.suffix.lower() == ".h5":
33
33
  h5files.append(data_path)
34
34
  elif data_path.is_dir():
35
35
  flist = os.listdir(data_path)
36
36
  for file in flist:
37
37
  fpath = data_path / str(file)
38
- if not fpath.is_file() or ".h5" != fpath.suffix:
38
+ if not fpath.is_file() or ".h5" != fpath.suffix.lower():
39
39
  continue
40
40
  h5files.append(fpath)
41
41
  return h5files
shepherd_data/reader.py CHANGED
@@ -14,6 +14,7 @@ from matplotlib import pyplot as plt
14
14
  from tqdm import trange
15
15
 
16
16
  from shepherd_core import BaseReader
17
+ from shepherd_core.logger import logger
17
18
 
18
19
  # import samplerate # TODO: just a test-fn for now
19
20
 
@@ -402,6 +403,7 @@ class Reader(BaseReader):
402
403
  f".plot_{start_str}_to_{end_str}.png"
403
404
  )
404
405
  if plot_path.exists():
406
+ self._logger.warning("Plot exists, will skip & not overwrite!")
405
407
  return
406
408
  self._logger.info("Plot generated, will be saved to '%s'", plot_path.name)
407
409
  fig = self.assemble_plot(data, width, height)
@@ -429,6 +431,7 @@ class Reader(BaseReader):
429
431
  .with_suffix(f".multiplot_{start_str}_to_{end_str}.png")
430
432
  )
431
433
  if plot_path.exists():
434
+ logger.warning("Plot exists, will skip & not overwrite!")
432
435
  return None
433
436
  fig = Reader.assemble_plot(data, width, height)
434
437
  plt.savefig(plot_path)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: shepherd-data
3
- Version: 2023.8.7
3
+ Version: 2023.9.0
4
4
  Summary: Programming- and CLI-Interface for the h5-dataformat of the Shepherd-Testbed
5
5
  Home-page: https://pypi.org/project/shepherd-data/
6
6
  Author: Ingmar Splitt, Kai Geissdoerfer
@@ -30,13 +30,13 @@ Classifier: Operating System :: OS Independent
30
30
  Classifier: Natural Language :: English
31
31
  Requires-Python: >=3.7
32
32
  Description-Content-Type: text/markdown
33
- Requires-Dist: shepherd-core[elf,inventory]
34
- Requires-Dist: click
35
33
  Requires-Dist: h5py
36
- Requires-Dist: matplotlib
37
34
  Requires-Dist: numpy
38
- Requires-Dist: pandas <2.0.0
39
35
  Requires-Dist: pyYAML
36
+ Requires-Dist: shepherd-core[elf,inventory]
37
+ Requires-Dist: click
38
+ Requires-Dist: matplotlib
39
+ Requires-Dist: pandas
40
40
  Requires-Dist: scipy
41
41
  Requires-Dist: tqdm
42
42
  Provides-Extra: dev
@@ -46,86 +46,34 @@ Provides-Extra: test
46
46
  Requires-Dist: shepherd-core[test] ; extra == 'test'
47
47
  Requires-Dist: pytest-click ; extra == 'test'
48
48
 
49
- # Shepherd - Data
49
+ # Data Module
50
50
 
51
51
  [![PyPiVersion](https://img.shields.io/pypi/v/shepherd_data.svg)](https://pypi.org/project/shepherd_data)
52
52
  [![Pytest](https://github.com/orgua/shepherd-datalib/actions/workflows/python-app.yml/badge.svg)](https://github.com/orgua/shepherd-datalib/actions/workflows/python-app.yml)
53
53
  [![CodeStyle](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
54
54
 
55
- This Python Module eases the handling of hdf5-recordings used by the [shepherd](https://github.com/orgua/shepherd)-testbed. Users can read, validate and create files and also extract, down-sample and plot information.
56
-
57
- ---
55
+ **Documentation**: <https://orgua.github.io/shepherd/external/shepherd_data.html>
58
56
 
59
- **Main Project**: [https://github.com/orgua/shepherd](https://github.com/orgua/shepherd)
57
+ **Source Code**: <https://github.com/orgua/shepherd-datalib>
60
58
 
61
- **Source Code**: [https://github.com/orgua/shepherd-datalib](https://github.com/orgua/shepherd-datalib)
59
+ **Main Project**: <https://github.com/orgua/shepherd>
62
60
 
63
61
  ---
64
62
 
63
+ This Python Module eases the handling of hdf5-recordings used by the [shepherd](https://github.com/orgua/shepherd)-testbed. Users can read, validate and create files and also extract, down-sample and plot information.
64
+
65
65
  ## Installation
66
66
 
67
67
  ### PIP - Online
68
68
 
69
69
  ```shell
70
- pip3 install shepherd-data
71
- ```
72
-
73
- ### PIP - Offline
74
-
75
- - clone repository
76
- - navigate shell into directory
77
- - install local module
78
-
79
- ```shell
80
- git clone https://github.com/orgua/shepherd-datalib
81
- cd .\shepherd-datalib
82
-
83
- pip3 install ./
70
+ pip3 install shepherd-data -U
84
71
  ```
85
72
 
86
- ## Development
87
-
88
- ### PipEnv
89
-
90
- - clone repository
91
- - navigate shell into directory
92
- - install environment
93
- - activate shell
94
- - optional
95
- - update pipenv (optional)
96
- - add special packages with `-dev` switch
97
-
73
+ For bleeding-edge-features or dev-work it is possible to install directly from GitHub-Sources (here `dev`-branch):
98
74
 
99
75
  ```Shell
100
- git clone https://github.com/orgua/shepherd-datalib
101
- cd .\shepherd-datalib
102
-
103
- pipenv install --dev
104
- pipenv shell
105
-
106
- pipenv update
107
- pipenv install --dev pytest
108
- ```
109
-
110
- ### running Testbench
111
-
112
- - run pytest
113
-
114
- ```shell
115
- pytest
116
- ```
117
-
118
- ### code coverage (with pytest)
119
-
120
- - run coverage
121
- - check results (in browser `./htmlcov/index.html`)
122
-
123
- ```shell
124
- coverage run -m pytest
125
-
126
- coverage html
127
- # or simpler
128
- coverage report
76
+ pip install git+https://github.com/orgua/shepherd-datalib.git@dev#subdirectory=shepherd_data -U
129
77
  ```
130
78
 
131
79
  ## Programming Interface
@@ -1,9 +1,9 @@
1
- shepherd_data/__init__.py,sha256=2Lye8hg_rONj1Sen7AX0mEe09O2qTB9AmJJj7uudTVI,256
2
- shepherd_data/cli.py,sha256=FmxBH2CO4xlSzZ6aOp9ljg5b_Y3Ekmz4_seOMVOjgrI,10914
1
+ shepherd_data/__init__.py,sha256=lj8aGFbKv9eiDbpFejyFz7KGQrJtJ_XrgdumbrwZ0q4,256
2
+ shepherd_data/cli.py,sha256=Cj9j_kUoDqkvs6CcV6x_iev48bdmzGsn9HkpVShrsyg,10930
3
3
  shepherd_data/debug_resampler.py,sha256=Y4uxSXqWKoyyJ1H6TY1vZKe0pWMK_mjQY0xBr7dC_f4,983
4
4
  shepherd_data/ivonne.py,sha256=Y0vwVVwDZCEEy4fHUPMluAN1Wh63TdbkaHH_pGVOtqg,11683
5
5
  shepherd_data/mppt.py,sha256=diAHzbb4QlW3ceoRQ20OWMpEcf3-hcnk_rH0BwLB0vU,3599
6
- shepherd_data/reader.py,sha256=Ipi3SkJxQk1YeRTaiBrhivyxqHuAGfauUkMqPZ56wFU,16657
6
+ shepherd_data/reader.py,sha256=eLk4XrA-tww_2fYHSdQzhn9DPrnFs7LCYMyVGxeC6_Q,16843
7
7
  tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  tests/conftest.py,sha256=BCtm2TbfVf85_AsGOUZLXd6TquicWRMgBq2-q5UA2UM,985
9
9
  tests/test_cli.py,sha256=Lha58ILt4inAIX562HeMYonACuWnK7rtAtia-ALIGP8,173
@@ -14,9 +14,9 @@ tests/test_cli_validate.py,sha256=f501lSUiZZ-60Xnb7Nz2Z8cUZGTUfJ6opEcRIDEXTOU,40
14
14
  tests/test_examples.py,sha256=e_uc5h_I4wwJnIWuh-PjpSSTICkYemI831iqhxIy_R0,576
15
15
  tests/test_ivonne.py,sha256=cIMtpx7tjRFxL9hpr5OPPgroGLzRZxGC4x9Y7vWgze8,1367
16
16
  tests/test_reader.py,sha256=Xt__Khgldv8klZJ3OQcMZevC6_3gPH2_TpOorq2ytNI,90
17
- shepherd_data-2023.8.7.dist-info/METADATA,sha256=lMIw7rl78mzNhgslh-ib6kGqFog_0tu5-wfQV1NlWD0,10391
18
- shepherd_data-2023.8.7.dist-info/WHEEL,sha256=5sUXSg9e4bi7lTLOHcm6QEYwO5TIF1TNbTSVFVjcJcc,92
19
- shepherd_data-2023.8.7.dist-info/entry_points.txt,sha256=6PBfY36A1xNOdzLiz-Qoukya_UzFZAwOapwmRNnPeZ8,56
20
- shepherd_data-2023.8.7.dist-info/top_level.txt,sha256=Bk61YO7iYS43TSWtwdSKb2moGBvJqJIYfGaZsQsv09M,20
21
- shepherd_data-2023.8.7.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
22
- shepherd_data-2023.8.7.dist-info/RECORD,,
17
+ shepherd_data-2023.9.0.dist-info/METADATA,sha256=NylPV-B2W3MUtDsGvxuoQ_Tqw9y-WC3ndW7vTEgIN98,9800
18
+ shepherd_data-2023.9.0.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
19
+ shepherd_data-2023.9.0.dist-info/entry_points.txt,sha256=6PBfY36A1xNOdzLiz-Qoukya_UzFZAwOapwmRNnPeZ8,56
20
+ shepherd_data-2023.9.0.dist-info/top_level.txt,sha256=Bk61YO7iYS43TSWtwdSKb2moGBvJqJIYfGaZsQsv09M,20
21
+ shepherd_data-2023.9.0.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
22
+ shepherd_data-2023.9.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.41.1)
2
+ Generator: bdist_wheel (0.41.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5