shepherd-data 2022.9.3__tar.gz → 2023.3.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.
- {shepherd_data-2022.9.3 → shepherd_data-2023.3.1}/PKG-INFO +47 -31
- {shepherd_data-2022.9.3 → shepherd_data-2023.3.1}/README.md +44 -28
- shepherd_data-2023.3.1/pyproject.toml +115 -0
- {shepherd_data-2022.9.3 → shepherd_data-2023.3.1}/setup.cfg +9 -52
- {shepherd_data-2022.9.3 → shepherd_data-2023.3.1}/src/shepherd_data/__init__.py +2 -1
- {shepherd_data-2022.9.3 → shepherd_data-2023.3.1}/src/shepherd_data/calibration.py +17 -9
- {shepherd_data-2022.9.3 → shepherd_data-2023.3.1}/src/shepherd_data/cli.py +24 -12
- {shepherd_data-2022.9.3 → shepherd_data-2023.3.1}/src/shepherd_data/ivonne.py +35 -27
- {shepherd_data-2022.9.3 → shepherd_data-2023.3.1}/src/shepherd_data/mppt.py +12 -7
- {shepherd_data-2022.9.3 → shepherd_data-2023.3.1}/src/shepherd_data/reader.py +118 -77
- {shepherd_data-2022.9.3 → shepherd_data-2023.3.1}/src/shepherd_data/writer.py +111 -95
- {shepherd_data-2022.9.3 → shepherd_data-2023.3.1}/src/shepherd_data.egg-info/PKG-INFO +47 -31
- {shepherd_data-2022.9.3 → shepherd_data-2023.3.1}/src/shepherd_data.egg-info/SOURCES.txt +9 -1
- shepherd_data-2023.3.1/src/shepherd_data.egg-info/entry_points.txt +2 -0
- {shepherd_data-2022.9.3 → shepherd_data-2023.3.1}/src/shepherd_data.egg-info/requires.txt +2 -0
- shepherd_data-2023.3.1/tests/test_cli.py +8 -0
- shepherd_data-2023.3.1/tests/test_cli_downsample.py +51 -0
- shepherd_data-2023.3.1/tests/test_cli_extract.py +84 -0
- shepherd_data-2023.3.1/tests/test_cli_plot.py +128 -0
- shepherd_data-2023.3.1/tests/test_cli_validate.py +15 -0
- shepherd_data-2023.3.1/tests/test_ivonne.py +42 -0
- shepherd_data-2023.3.1/tests/test_reader.py +25 -0
- shepherd_data-2023.3.1/tests/test_writer.py +62 -0
- shepherd_data-2022.9.3/pyproject.toml +0 -3
- shepherd_data-2022.9.3/src/shepherd_data.egg-info/entry_points.txt +0 -2
- {shepherd_data-2022.9.3 → shepherd_data-2023.3.1}/LICENSE +0 -0
- {shepherd_data-2022.9.3 → shepherd_data-2023.3.1}/src/shepherd_data.egg-info/dependency_links.txt +0 -0
- {shepherd_data-2022.9.3 → shepherd_data-2023.3.1}/src/shepherd_data.egg-info/top_level.txt +0 -0
- {shepherd_data-2022.9.3 → shepherd_data-2023.3.1}/src/shepherd_data.egg-info/zip-safe +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: shepherd_data
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2023.3.1
|
|
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
|
|
@@ -20,52 +20,60 @@ Classifier: Development Status :: 5 - Production/Stable
|
|
|
20
20
|
Classifier: Intended Audience :: Developers
|
|
21
21
|
Classifier: Intended Audience :: Information Technology
|
|
22
22
|
Classifier: Intended Audience :: Science/Research
|
|
23
|
-
Classifier: Programming Language :: Python :: 3.6
|
|
24
23
|
Classifier: Programming Language :: Python :: 3.7
|
|
25
24
|
Classifier: Programming Language :: Python :: 3.8
|
|
26
25
|
Classifier: Programming Language :: Python :: 3.9
|
|
27
26
|
Classifier: Programming Language :: Python :: 3.10
|
|
27
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
28
28
|
Classifier: License :: OSI Approved :: MIT License
|
|
29
29
|
Classifier: Operating System :: OS Independent
|
|
30
30
|
Classifier: Natural Language :: English
|
|
31
|
-
Requires-Python: >=3.
|
|
31
|
+
Requires-Python: >=3.7
|
|
32
32
|
Description-Content-Type: text/markdown
|
|
33
33
|
Provides-Extra: dev
|
|
34
34
|
Provides-Extra: test
|
|
35
35
|
License-File: LICENSE
|
|
36
36
|
|
|
37
|
+
# Shepherd - Data
|
|
38
|
+
|
|
37
39
|
[](https://pypi.org/project/shepherd_data)
|
|
38
40
|
[](https://github.com/orgua/shepherd-datalib/actions/workflows/python-app.yml)
|
|
39
41
|
[](https://github.com/psf/black)
|
|
40
42
|
|
|
41
|
-
## Shepherd - Data
|
|
42
|
-
|
|
43
43
|
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.
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
---
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
**Main Project**: [https://github.com/orgua/shepherd](https://github.com/orgua/shepherd)
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
**Source Code**: [https://github.com/orgua/shepherd-datalib](https://github.com/orgua/shepherd-datalib)
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Installation
|
|
54
|
+
|
|
55
|
+
### PIP - Online
|
|
56
|
+
|
|
57
|
+
```shell
|
|
50
58
|
pip3 install shepherd-data
|
|
51
59
|
```
|
|
52
60
|
|
|
53
|
-
|
|
61
|
+
### PIP - Offline
|
|
54
62
|
|
|
55
63
|
- clone repository
|
|
56
64
|
- navigate shell into directory
|
|
57
65
|
- install local module
|
|
58
66
|
|
|
59
|
-
```
|
|
67
|
+
```shell
|
|
60
68
|
git clone https://github.com/orgua/shepherd-datalib
|
|
61
69
|
cd .\shepherd-datalib
|
|
62
70
|
|
|
63
71
|
pip3 install ./
|
|
64
72
|
```
|
|
65
73
|
|
|
66
|
-
|
|
74
|
+
## Development
|
|
67
75
|
|
|
68
|
-
|
|
76
|
+
### PipEnv
|
|
69
77
|
|
|
70
78
|
- clone repository
|
|
71
79
|
- navigate shell into directory
|
|
@@ -87,20 +95,20 @@ pipenv update
|
|
|
87
95
|
pipenv install --dev pytest
|
|
88
96
|
```
|
|
89
97
|
|
|
90
|
-
|
|
98
|
+
### running Testbench
|
|
91
99
|
|
|
92
100
|
- run pytest
|
|
93
101
|
|
|
94
|
-
```
|
|
102
|
+
```shell
|
|
95
103
|
pytest
|
|
96
104
|
```
|
|
97
105
|
|
|
98
|
-
|
|
106
|
+
### code coverage (with pytest)
|
|
99
107
|
|
|
100
108
|
- run coverage
|
|
101
109
|
- check results (in browser `./htmlcov/index.html`)
|
|
102
110
|
|
|
103
|
-
```
|
|
111
|
+
```shell
|
|
104
112
|
coverage run -m pytest
|
|
105
113
|
|
|
106
114
|
coverage html
|
|
@@ -108,11 +116,11 @@ coverage html
|
|
|
108
116
|
coverage report
|
|
109
117
|
```
|
|
110
118
|
|
|
111
|
-
|
|
119
|
+
## Programming Interface
|
|
112
120
|
|
|
113
|
-
|
|
121
|
+
### Basic Usage (recommendation)
|
|
114
122
|
|
|
115
|
-
```
|
|
123
|
+
```python
|
|
116
124
|
import shepherd_data as shpd
|
|
117
125
|
|
|
118
126
|
with shpd.Reader("./hrv_sawtooth_1h.h5") as db:
|
|
@@ -121,7 +129,7 @@ with shpd.Reader("./hrv_sawtooth_1h.h5") as db:
|
|
|
121
129
|
print(f"Config: {db.get_config()}")
|
|
122
130
|
```
|
|
123
131
|
|
|
124
|
-
|
|
132
|
+
### Available Functionality
|
|
125
133
|
|
|
126
134
|
- `Reader()`
|
|
127
135
|
- file can be checked for plausibility and validity (`is_valid()`)
|
|
@@ -156,7 +164,7 @@ with shpd.Reader("./hrv_sawtooth_1h.h5") as db:
|
|
|
156
164
|
- 50 Hz measurement with Short-Circuit-Current and two other parameters
|
|
157
165
|
- recorded with "IVonne"
|
|
158
166
|
|
|
159
|
-
|
|
167
|
+
## CLI-Interface
|
|
160
168
|
|
|
161
169
|
After installing the module the datalib offers some often needed functionality on the command line:
|
|
162
170
|
|
|
@@ -164,7 +172,7 @@ After installing the module the datalib offers some often needed functionality o
|
|
|
164
172
|
|
|
165
173
|
- takes a file or directory as an argument
|
|
166
174
|
|
|
167
|
-
```
|
|
175
|
+
```shell
|
|
168
176
|
shepherd-data validate dir_or_file
|
|
169
177
|
|
|
170
178
|
# examples:
|
|
@@ -177,7 +185,7 @@ shepherd-data validate hrv_saw_1h.h5
|
|
|
177
185
|
- takes a file or directory as an argument
|
|
178
186
|
- can take down-sample-factor as an argument
|
|
179
187
|
|
|
180
|
-
```
|
|
188
|
+
```shell
|
|
181
189
|
shepherd-data extract [-f ds-factor] [-s separator_symbol] dir_or_file
|
|
182
190
|
|
|
183
191
|
# examples:
|
|
@@ -189,7 +197,7 @@ shepherd-data extract -f 1000 -s ; hrv_saw_1h.h5
|
|
|
189
197
|
|
|
190
198
|
- takes a file or directory as an argument
|
|
191
199
|
|
|
192
|
-
```
|
|
200
|
+
```shell
|
|
193
201
|
shepherd-data extract-meta dir_or_file
|
|
194
202
|
|
|
195
203
|
# examples:
|
|
@@ -203,7 +211,7 @@ shepherd-data extract-meta hrv_saw_1h.h5
|
|
|
203
211
|
- can take start- and end-time as an argument
|
|
204
212
|
- can take image-width and -height as an argument
|
|
205
213
|
|
|
206
|
-
```
|
|
214
|
+
```shell
|
|
207
215
|
shepherd-data plot [-s start_time] [-e end_time] [-w plot_width] [-h plot_height] [--multiplot] dir_or_file
|
|
208
216
|
|
|
209
217
|
# examples:
|
|
@@ -217,7 +225,7 @@ shepherd-data plot -s10 -e20 hrv_saw_1h.h5
|
|
|
217
225
|
- takes a file or directory as an argument
|
|
218
226
|
- can take down-sample-factor as an argument
|
|
219
227
|
|
|
220
|
-
```
|
|
228
|
+
```shell
|
|
221
229
|
shepherd-data downsample [-f ds-factor] [-r sample-rate] dir_or_file
|
|
222
230
|
|
|
223
231
|
# examples:
|
|
@@ -226,7 +234,7 @@ shepherd-data downsample -f 1000 hrv_saw_1h.h5
|
|
|
226
234
|
shepherd-data downsample -r 100 hrv_saw_1h.h5
|
|
227
235
|
```
|
|
228
236
|
|
|
229
|
-
|
|
237
|
+
## Data-Layout and Design choices
|
|
230
238
|
|
|
231
239
|
Details about the file-structure can be found in the [main-project](https://github.com/orgua/shepherd/blob/main/docs/user/data_format.rst).
|
|
232
240
|
|
|
@@ -234,7 +242,7 @@ TODO:
|
|
|
234
242
|
- update design of file
|
|
235
243
|
- data dtype, mode, ...
|
|
236
244
|
|
|
237
|
-
|
|
245
|
+
### Modes and Datatypes
|
|
238
246
|
|
|
239
247
|
- Mode `harvester` recorded a harvesting-source like solar with one of various algorithms
|
|
240
248
|
- Datatype `ivsample` is directly usable by shepherd, input for virtual source / converter
|
|
@@ -243,7 +251,7 @@ TODO:
|
|
|
243
251
|
- Mode `emulator` replayed a harvester-recording through a virtual converter and supplied a target while recording the power-consumption
|
|
244
252
|
- Datatype `ivsample` is the only output of this mode
|
|
245
253
|
|
|
246
|
-
|
|
254
|
+
### Compression & Beaglebone
|
|
247
255
|
|
|
248
256
|
- supported are uncompressed, lzf and gzip with level 1 (order of recommendation)
|
|
249
257
|
- lzf seems better-suited due to lower load, or if space isn't a constraint: uncompressed (None as argument)
|
|
@@ -268,15 +276,23 @@ TODO:
|
|
|
268
276
|
emu_120s_unc_to_unc.h5 -> emulator, cpu_util [%] = 51.69, data-rate = 1564.0 KiB/s
|
|
269
277
|
```
|
|
270
278
|
|
|
271
|
-
|
|
279
|
+
## Release-Procedure
|
|
272
280
|
|
|
273
281
|
- increase version number in __init__.py
|
|
282
|
+
- install and run pre-commit, for QA-Checks, see steps below
|
|
274
283
|
- every commit get automatically tested by Github
|
|
275
284
|
- put together a release on Github - the tag should match current version-number
|
|
276
285
|
- Github automatically pushes release to pypi
|
|
277
286
|
|
|
278
|
-
|
|
287
|
+
```shell
|
|
288
|
+
pip3 install pre-commit
|
|
289
|
+
|
|
290
|
+
pre-commit run --all-files
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
## Open Tasks
|
|
279
294
|
|
|
295
|
+
- [click progressbar](https://click.palletsprojects.com/en/8.1.x/api/#click.progressbar) -> could replace tqdm
|
|
280
296
|
- implementations for this lib
|
|
281
297
|
- generalize up- and down-sampling, use out_sample_rate instead of ds-factor
|
|
282
298
|
- lib samplerate (tested) -> promising, but designed for float32 and range of +-1.0
|
|
@@ -1,35 +1,43 @@
|
|
|
1
|
+
# Shepherd - Data
|
|
2
|
+
|
|
1
3
|
[](https://pypi.org/project/shepherd_data)
|
|
2
4
|
[](https://github.com/orgua/shepherd-datalib/actions/workflows/python-app.yml)
|
|
3
5
|
[](https://github.com/psf/black)
|
|
4
6
|
|
|
5
|
-
## Shepherd - Data
|
|
6
|
-
|
|
7
7
|
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.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
---
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
**Main Project**: [https://github.com/orgua/shepherd](https://github.com/orgua/shepherd)
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
**Source Code**: [https://github.com/orgua/shepherd-datalib](https://github.com/orgua/shepherd-datalib)
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
### PIP - Online
|
|
20
|
+
|
|
21
|
+
```shell
|
|
14
22
|
pip3 install shepherd-data
|
|
15
23
|
```
|
|
16
24
|
|
|
17
|
-
|
|
25
|
+
### PIP - Offline
|
|
18
26
|
|
|
19
27
|
- clone repository
|
|
20
28
|
- navigate shell into directory
|
|
21
29
|
- install local module
|
|
22
30
|
|
|
23
|
-
```
|
|
31
|
+
```shell
|
|
24
32
|
git clone https://github.com/orgua/shepherd-datalib
|
|
25
33
|
cd .\shepherd-datalib
|
|
26
34
|
|
|
27
35
|
pip3 install ./
|
|
28
36
|
```
|
|
29
37
|
|
|
30
|
-
|
|
38
|
+
## Development
|
|
31
39
|
|
|
32
|
-
|
|
40
|
+
### PipEnv
|
|
33
41
|
|
|
34
42
|
- clone repository
|
|
35
43
|
- navigate shell into directory
|
|
@@ -51,20 +59,20 @@ pipenv update
|
|
|
51
59
|
pipenv install --dev pytest
|
|
52
60
|
```
|
|
53
61
|
|
|
54
|
-
|
|
62
|
+
### running Testbench
|
|
55
63
|
|
|
56
64
|
- run pytest
|
|
57
65
|
|
|
58
|
-
```
|
|
66
|
+
```shell
|
|
59
67
|
pytest
|
|
60
68
|
```
|
|
61
69
|
|
|
62
|
-
|
|
70
|
+
### code coverage (with pytest)
|
|
63
71
|
|
|
64
72
|
- run coverage
|
|
65
73
|
- check results (in browser `./htmlcov/index.html`)
|
|
66
74
|
|
|
67
|
-
```
|
|
75
|
+
```shell
|
|
68
76
|
coverage run -m pytest
|
|
69
77
|
|
|
70
78
|
coverage html
|
|
@@ -72,11 +80,11 @@ coverage html
|
|
|
72
80
|
coverage report
|
|
73
81
|
```
|
|
74
82
|
|
|
75
|
-
|
|
83
|
+
## Programming Interface
|
|
76
84
|
|
|
77
|
-
|
|
85
|
+
### Basic Usage (recommendation)
|
|
78
86
|
|
|
79
|
-
```
|
|
87
|
+
```python
|
|
80
88
|
import shepherd_data as shpd
|
|
81
89
|
|
|
82
90
|
with shpd.Reader("./hrv_sawtooth_1h.h5") as db:
|
|
@@ -85,7 +93,7 @@ with shpd.Reader("./hrv_sawtooth_1h.h5") as db:
|
|
|
85
93
|
print(f"Config: {db.get_config()}")
|
|
86
94
|
```
|
|
87
95
|
|
|
88
|
-
|
|
96
|
+
### Available Functionality
|
|
89
97
|
|
|
90
98
|
- `Reader()`
|
|
91
99
|
- file can be checked for plausibility and validity (`is_valid()`)
|
|
@@ -120,7 +128,7 @@ with shpd.Reader("./hrv_sawtooth_1h.h5") as db:
|
|
|
120
128
|
- 50 Hz measurement with Short-Circuit-Current and two other parameters
|
|
121
129
|
- recorded with "IVonne"
|
|
122
130
|
|
|
123
|
-
|
|
131
|
+
## CLI-Interface
|
|
124
132
|
|
|
125
133
|
After installing the module the datalib offers some often needed functionality on the command line:
|
|
126
134
|
|
|
@@ -128,7 +136,7 @@ After installing the module the datalib offers some often needed functionality o
|
|
|
128
136
|
|
|
129
137
|
- takes a file or directory as an argument
|
|
130
138
|
|
|
131
|
-
```
|
|
139
|
+
```shell
|
|
132
140
|
shepherd-data validate dir_or_file
|
|
133
141
|
|
|
134
142
|
# examples:
|
|
@@ -141,7 +149,7 @@ shepherd-data validate hrv_saw_1h.h5
|
|
|
141
149
|
- takes a file or directory as an argument
|
|
142
150
|
- can take down-sample-factor as an argument
|
|
143
151
|
|
|
144
|
-
```
|
|
152
|
+
```shell
|
|
145
153
|
shepherd-data extract [-f ds-factor] [-s separator_symbol] dir_or_file
|
|
146
154
|
|
|
147
155
|
# examples:
|
|
@@ -153,7 +161,7 @@ shepherd-data extract -f 1000 -s ; hrv_saw_1h.h5
|
|
|
153
161
|
|
|
154
162
|
- takes a file or directory as an argument
|
|
155
163
|
|
|
156
|
-
```
|
|
164
|
+
```shell
|
|
157
165
|
shepherd-data extract-meta dir_or_file
|
|
158
166
|
|
|
159
167
|
# examples:
|
|
@@ -167,7 +175,7 @@ shepherd-data extract-meta hrv_saw_1h.h5
|
|
|
167
175
|
- can take start- and end-time as an argument
|
|
168
176
|
- can take image-width and -height as an argument
|
|
169
177
|
|
|
170
|
-
```
|
|
178
|
+
```shell
|
|
171
179
|
shepherd-data plot [-s start_time] [-e end_time] [-w plot_width] [-h plot_height] [--multiplot] dir_or_file
|
|
172
180
|
|
|
173
181
|
# examples:
|
|
@@ -181,7 +189,7 @@ shepherd-data plot -s10 -e20 hrv_saw_1h.h5
|
|
|
181
189
|
- takes a file or directory as an argument
|
|
182
190
|
- can take down-sample-factor as an argument
|
|
183
191
|
|
|
184
|
-
```
|
|
192
|
+
```shell
|
|
185
193
|
shepherd-data downsample [-f ds-factor] [-r sample-rate] dir_or_file
|
|
186
194
|
|
|
187
195
|
# examples:
|
|
@@ -190,7 +198,7 @@ shepherd-data downsample -f 1000 hrv_saw_1h.h5
|
|
|
190
198
|
shepherd-data downsample -r 100 hrv_saw_1h.h5
|
|
191
199
|
```
|
|
192
200
|
|
|
193
|
-
|
|
201
|
+
## Data-Layout and Design choices
|
|
194
202
|
|
|
195
203
|
Details about the file-structure can be found in the [main-project](https://github.com/orgua/shepherd/blob/main/docs/user/data_format.rst).
|
|
196
204
|
|
|
@@ -198,7 +206,7 @@ TODO:
|
|
|
198
206
|
- update design of file
|
|
199
207
|
- data dtype, mode, ...
|
|
200
208
|
|
|
201
|
-
|
|
209
|
+
### Modes and Datatypes
|
|
202
210
|
|
|
203
211
|
- Mode `harvester` recorded a harvesting-source like solar with one of various algorithms
|
|
204
212
|
- Datatype `ivsample` is directly usable by shepherd, input for virtual source / converter
|
|
@@ -207,7 +215,7 @@ TODO:
|
|
|
207
215
|
- Mode `emulator` replayed a harvester-recording through a virtual converter and supplied a target while recording the power-consumption
|
|
208
216
|
- Datatype `ivsample` is the only output of this mode
|
|
209
217
|
|
|
210
|
-
|
|
218
|
+
### Compression & Beaglebone
|
|
211
219
|
|
|
212
220
|
- supported are uncompressed, lzf and gzip with level 1 (order of recommendation)
|
|
213
221
|
- lzf seems better-suited due to lower load, or if space isn't a constraint: uncompressed (None as argument)
|
|
@@ -232,15 +240,23 @@ TODO:
|
|
|
232
240
|
emu_120s_unc_to_unc.h5 -> emulator, cpu_util [%] = 51.69, data-rate = 1564.0 KiB/s
|
|
233
241
|
```
|
|
234
242
|
|
|
235
|
-
|
|
243
|
+
## Release-Procedure
|
|
236
244
|
|
|
237
245
|
- increase version number in __init__.py
|
|
246
|
+
- install and run pre-commit, for QA-Checks, see steps below
|
|
238
247
|
- every commit get automatically tested by Github
|
|
239
248
|
- put together a release on Github - the tag should match current version-number
|
|
240
249
|
- Github automatically pushes release to pypi
|
|
241
250
|
|
|
242
|
-
|
|
251
|
+
```shell
|
|
252
|
+
pip3 install pre-commit
|
|
253
|
+
|
|
254
|
+
pre-commit run --all-files
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
## Open Tasks
|
|
243
258
|
|
|
259
|
+
- [click progressbar](https://click.palletsprojects.com/en/8.1.x/api/#click.progressbar) -> could replace tqdm
|
|
244
260
|
- implementations for this lib
|
|
245
261
|
- generalize up- and down-sampling, use out_sample_rate instead of ds-factor
|
|
246
262
|
- lib samplerate (tested) -> promising, but designed for float32 and range of +-1.0
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[tool.pyright]
|
|
6
|
+
root = "./"
|
|
7
|
+
include = ['./src/shepherd_data', './src/examples', "./tests"]
|
|
8
|
+
pythonVersion = "3.8"
|
|
9
|
+
pythonPlatform = "All"
|
|
10
|
+
reportMissingParameterType = true
|
|
11
|
+
|
|
12
|
+
[tool.codespell]
|
|
13
|
+
builtin = "clear,rare,informal,usage,code,en-GB_to_en-US"
|
|
14
|
+
|
|
15
|
+
#skip = ""
|
|
16
|
+
#ignore-words-list = ""
|
|
17
|
+
|
|
18
|
+
# options without argument
|
|
19
|
+
check-filenames = ""
|
|
20
|
+
# check-hidden = ""
|
|
21
|
+
|
|
22
|
+
[tool.isort]
|
|
23
|
+
profile = "black"
|
|
24
|
+
filter_files = true
|
|
25
|
+
force_single_line = true
|
|
26
|
+
|
|
27
|
+
[tool.flake8]
|
|
28
|
+
max-line-length = 100
|
|
29
|
+
require-plugins = [
|
|
30
|
+
# https://github.com/DmytroLitvinov/awesome-flake8-extensions
|
|
31
|
+
|
|
32
|
+
### Bugs & Code-Smells
|
|
33
|
+
"flake8-bugbear",
|
|
34
|
+
"flake8-secure-coding-standard",
|
|
35
|
+
"flake8-bandit",
|
|
36
|
+
"flake8-builtins",
|
|
37
|
+
|
|
38
|
+
### Clean Code
|
|
39
|
+
"flake8-comprehensions",
|
|
40
|
+
"flake8-simplify",
|
|
41
|
+
"flake8-eradicate",
|
|
42
|
+
"flake8-commas",
|
|
43
|
+
|
|
44
|
+
### Limitations
|
|
45
|
+
"flake8-blind-except",
|
|
46
|
+
"flake8-logging-format",
|
|
47
|
+
"flake8-print",
|
|
48
|
+
|
|
49
|
+
### Documentation
|
|
50
|
+
"flake8-comments",
|
|
51
|
+
# flake8-docstrings
|
|
52
|
+
# flake8-rst-docstrings
|
|
53
|
+
|
|
54
|
+
### Test-Improvements
|
|
55
|
+
"flake8-assertive",
|
|
56
|
+
]
|
|
57
|
+
|
|
58
|
+
extend-ignore = [
|
|
59
|
+
# black-formatter-specific
|
|
60
|
+
"E203",
|
|
61
|
+
# open() vs os.open()
|
|
62
|
+
"SCS109",
|
|
63
|
+
# hideous commas
|
|
64
|
+
"C812",
|
|
65
|
+
"C815",
|
|
66
|
+
"C813",
|
|
67
|
+
# DOCString TODO: reduce here
|
|
68
|
+
"D100",
|
|
69
|
+
"D102",
|
|
70
|
+
"D103",
|
|
71
|
+
]
|
|
72
|
+
|
|
73
|
+
per-file-ignores = """
|
|
74
|
+
# asserts (in tests are ok), also allow print() instead of logger
|
|
75
|
+
tests/*: SCS108, S101, T201
|
|
76
|
+
# allow print()
|
|
77
|
+
src/examples/*: T201
|
|
78
|
+
"""
|
|
79
|
+
|
|
80
|
+
count = true
|
|
81
|
+
statistics = true
|
|
82
|
+
|
|
83
|
+
[tool.ruff] # TODO: once stable it replaces flake8, pyupgrade, isort, ...
|
|
84
|
+
line-length = 100
|
|
85
|
+
select = [
|
|
86
|
+
"A",
|
|
87
|
+
"ARG",
|
|
88
|
+
"B",
|
|
89
|
+
"C",
|
|
90
|
+
"C4",
|
|
91
|
+
"E",
|
|
92
|
+
"ERA",
|
|
93
|
+
"F",
|
|
94
|
+
# "I", # incomplete isort
|
|
95
|
+
"N",
|
|
96
|
+
"PLC",
|
|
97
|
+
"PLE",
|
|
98
|
+
"PLR",
|
|
99
|
+
"PLW",
|
|
100
|
+
"RET",
|
|
101
|
+
"S",
|
|
102
|
+
"T10",
|
|
103
|
+
"UP",
|
|
104
|
+
"W", # TODO: just a proposed starting-config
|
|
105
|
+
]
|
|
106
|
+
ignore = ["A003"]
|
|
107
|
+
target-version = "py38"
|
|
108
|
+
|
|
109
|
+
[tool.ruff.per-file-ignores]
|
|
110
|
+
"__init__.py" = ["F401"]
|
|
111
|
+
"tests/**" = ["ARG", "S"]
|
|
112
|
+
|
|
113
|
+
[tool.ruff.mccabe]
|
|
114
|
+
# Unlike Flake8, default to a complexity level of 10.
|
|
115
|
+
max-complexity = 10
|
|
@@ -20,11 +20,11 @@ classifiers =
|
|
|
20
20
|
Intended Audience :: Developers
|
|
21
21
|
Intended Audience :: Information Technology
|
|
22
22
|
Intended Audience :: Science/Research
|
|
23
|
-
Programming Language :: Python :: 3.6
|
|
24
23
|
Programming Language :: Python :: 3.7
|
|
25
24
|
Programming Language :: Python :: 3.8
|
|
26
25
|
Programming Language :: Python :: 3.9
|
|
27
26
|
Programming Language :: Python :: 3.10
|
|
27
|
+
Programming Language :: Python :: 3.11
|
|
28
28
|
License :: OSI Approved :: MIT License
|
|
29
29
|
Operating System :: OS Independent
|
|
30
30
|
Natural Language :: English
|
|
@@ -35,16 +35,16 @@ package_dir =
|
|
|
35
35
|
=src
|
|
36
36
|
zip_safe = True
|
|
37
37
|
include_package_data = True
|
|
38
|
-
python_requires = >= 3.
|
|
38
|
+
python_requires = >= 3.7
|
|
39
39
|
install_requires =
|
|
40
40
|
click
|
|
41
41
|
h5py
|
|
42
|
-
matplotlib
|
|
42
|
+
matplotlib # full-version
|
|
43
43
|
numpy
|
|
44
|
-
pandas
|
|
44
|
+
pandas # full-version
|
|
45
45
|
pyYAML
|
|
46
|
-
scipy
|
|
47
|
-
tqdm
|
|
46
|
+
scipy # full-version
|
|
47
|
+
tqdm # full-version
|
|
48
48
|
|
|
49
49
|
[options.extras_require]
|
|
50
50
|
dev =
|
|
@@ -53,6 +53,8 @@ dev =
|
|
|
53
53
|
flake8
|
|
54
54
|
twine
|
|
55
55
|
pre-commit
|
|
56
|
+
pyright
|
|
57
|
+
pandas-stubs
|
|
56
58
|
test =
|
|
57
59
|
pytest
|
|
58
60
|
pytest-click
|
|
@@ -60,7 +62,7 @@ test =
|
|
|
60
62
|
|
|
61
63
|
[options.entry_points]
|
|
62
64
|
console_scripts =
|
|
63
|
-
|
|
65
|
+
shepherd-data = shepherd_data.cli:cli
|
|
64
66
|
|
|
65
67
|
[options.packages.find]
|
|
66
68
|
where = src
|
|
@@ -77,51 +79,6 @@ test = pytest
|
|
|
77
79
|
[tool:pytest]
|
|
78
80
|
addopts = -vvv
|
|
79
81
|
|
|
80
|
-
[codespell]
|
|
81
|
-
builtin = clear,rare,informal,usage,code,en-GB_to_en-US
|
|
82
|
-
check-filenames =
|
|
83
|
-
check-hidden =
|
|
84
|
-
|
|
85
|
-
[isort]
|
|
86
|
-
profile = black
|
|
87
|
-
force_single_line = true
|
|
88
|
-
|
|
89
|
-
[flake8]
|
|
90
|
-
max-line-length = 100
|
|
91
|
-
require-plugins =
|
|
92
|
-
|
|
93
|
-
flake8-bugbear
|
|
94
|
-
flake8-secure-coding-standard
|
|
95
|
-
flake8-bandit
|
|
96
|
-
flake8-builtins
|
|
97
|
-
|
|
98
|
-
flake8-comprehensions
|
|
99
|
-
flake8-simplify
|
|
100
|
-
flake8-eradicate
|
|
101
|
-
flake8-commas
|
|
102
|
-
|
|
103
|
-
flake8-blind-except
|
|
104
|
-
flake8-logging-format
|
|
105
|
-
flake8-print
|
|
106
|
-
|
|
107
|
-
flake8-comments
|
|
108
|
-
|
|
109
|
-
flake8-assertive
|
|
110
|
-
extend-ignore =
|
|
111
|
-
E203
|
|
112
|
-
SCS109
|
|
113
|
-
C812
|
|
114
|
-
C815
|
|
115
|
-
C813
|
|
116
|
-
D100
|
|
117
|
-
D102
|
|
118
|
-
D103
|
|
119
|
-
per-file-ignores =
|
|
120
|
-
tests/*: SCS108 S101 T201
|
|
121
|
-
src/examples/*: T201
|
|
122
|
-
count = True
|
|
123
|
-
statistics = True
|
|
124
|
-
|
|
125
82
|
[egg_info]
|
|
126
83
|
tag_build =
|
|
127
84
|
tag_date = 0
|