shepherd-data 2023.12.1__py3-none-any.whl → 2024.4.2__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 +8 -5
- shepherd_data/cli.py +29 -29
- shepherd_data/ivonne.py +11 -11
- shepherd_data/mppt.py +22 -15
- shepherd_data/reader.py +31 -23
- shepherd_data-2024.4.2.dist-info/METADATA +88 -0
- shepherd_data-2024.4.2.dist-info/RECORD +11 -0
- {shepherd_data-2023.12.1.dist-info → shepherd_data-2024.4.2.dist-info}/WHEEL +1 -1
- {shepherd_data-2023.12.1.dist-info → shepherd_data-2024.4.2.dist-info}/top_level.txt +0 -1
- shepherd_data/debug_resampler.py +0 -30
- shepherd_data-2023.12.1.dist-info/METADATA +0 -274
- shepherd_data-2023.12.1.dist-info/RECORD +0 -22
- tests/__init__.py +0 -0
- tests/conftest.py +0 -33
- tests/test_cli.py +0 -8
- tests/test_cli_downsample.py +0 -47
- tests/test_cli_extract.py +0 -80
- tests/test_cli_plot.py +0 -120
- tests/test_cli_validate.py +0 -15
- tests/test_examples.py +0 -26
- tests/test_ivonne.py +0 -42
- tests/test_reader.py +0 -3
- {shepherd_data-2023.12.1.dist-info → shepherd_data-2024.4.2.dist-info}/entry_points.txt +0 -0
- {shepherd_data-2023.12.1.dist-info → shepherd_data-2024.4.2.dist-info}/zip-safe +0 -0
tests/test_ivonne.py
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
from pathlib import Path
|
|
2
|
-
|
|
3
|
-
import pytest
|
|
4
|
-
|
|
5
|
-
from shepherd_data import Reader
|
|
6
|
-
from shepherd_data import ivonne
|
|
7
|
-
from shepherd_data import mppt
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
@pytest.fixture
|
|
11
|
-
def example_path() -> Path:
|
|
12
|
-
here = Path(__file__).resolve().parent
|
|
13
|
-
return here.parent / "examples"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
def test_convert_ivonne(tmp_path: Path, example_path: Path) -> None:
|
|
17
|
-
input_file = "jogging_10m"
|
|
18
|
-
inp_path = example_path / (input_file + ".iv")
|
|
19
|
-
isc_path = tmp_path / (input_file + "_isc.h5")
|
|
20
|
-
ivc_path = tmp_path / (input_file + "_ivc.h5")
|
|
21
|
-
voc_path = tmp_path / (input_file + "_voc.h5")
|
|
22
|
-
opt_path = tmp_path / (input_file + "_opt.h5")
|
|
23
|
-
|
|
24
|
-
with ivonne.Reader(inp_path) as ifr:
|
|
25
|
-
ifr.upsample_2_isc_voc(isc_path, duration_s=20)
|
|
26
|
-
ifr.convert_2_ivcurves(ivc_path, duration_s=20)
|
|
27
|
-
|
|
28
|
-
tr_voc = mppt.OpenCircuitTracker(ratio=0.76)
|
|
29
|
-
tr_opt = mppt.OptimalTracker()
|
|
30
|
-
|
|
31
|
-
ifr.convert_2_ivsamples(voc_path, tracker=tr_voc, duration_s=20)
|
|
32
|
-
ifr.convert_2_ivsamples(opt_path, tracker=tr_opt, duration_s=20)
|
|
33
|
-
|
|
34
|
-
energies = {}
|
|
35
|
-
for file_path in [isc_path, ivc_path, voc_path, opt_path]:
|
|
36
|
-
with Reader(file_path) as sfr:
|
|
37
|
-
assert sfr.runtime_s == 20
|
|
38
|
-
energies[file_path.stem[-3:]] = sfr.energy()
|
|
39
|
-
|
|
40
|
-
assert energies["isc"] > energies["opt"]
|
|
41
|
-
assert energies["opt"] > energies["voc"]
|
|
42
|
-
assert energies["voc"] > energies["ivc"]
|
tests/test_reader.py
DELETED
|
File without changes
|
|
File without changes
|