shepherd-core 2024.7.1__py3-none-any.whl → 2024.7.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_core/__init__.py +1 -1
- shepherd_core/inventory/system.py +7 -6
- shepherd_core/reader.py +10 -3
- {shepherd_core-2024.7.1.dist-info → shepherd_core-2024.7.2.dist-info}/METADATA +1 -1
- {shepherd_core-2024.7.1.dist-info → shepherd_core-2024.7.2.dist-info}/RECORD +8 -8
- {shepherd_core-2024.7.1.dist-info → shepherd_core-2024.7.2.dist-info}/WHEEL +0 -0
- {shepherd_core-2024.7.1.dist-info → shepherd_core-2024.7.2.dist-info}/top_level.txt +0 -0
- {shepherd_core-2024.7.1.dist-info → shepherd_core-2024.7.2.dist-info}/zip-safe +0 -0
shepherd_core/__init__.py
CHANGED
|
@@ -5,6 +5,7 @@ import subprocess
|
|
|
5
5
|
import time
|
|
6
6
|
from datetime import datetime
|
|
7
7
|
from pathlib import Path
|
|
8
|
+
from typing import List
|
|
8
9
|
from typing import Optional
|
|
9
10
|
|
|
10
11
|
from typing_extensions import Self
|
|
@@ -48,8 +49,8 @@ class SystemInventory(ShpModel):
|
|
|
48
49
|
# ip IPvAnyAddress
|
|
49
50
|
# mac MACStr
|
|
50
51
|
|
|
51
|
-
fs_root:
|
|
52
|
-
beagle:
|
|
52
|
+
fs_root: List[str] = None
|
|
53
|
+
beagle: List[str] = None
|
|
53
54
|
|
|
54
55
|
model_config = ConfigDict(str_min_length=0)
|
|
55
56
|
|
|
@@ -71,20 +72,20 @@ class SystemInventory(ShpModel):
|
|
|
71
72
|
uptime = time.time() - psutil.boot_time()
|
|
72
73
|
|
|
73
74
|
fs_cmd = ["/usr/bin/df", "-h", "/"]
|
|
74
|
-
fs_out =
|
|
75
|
+
fs_out = []
|
|
75
76
|
if Path(fs_cmd[0]).is_file():
|
|
76
77
|
reply = subprocess.run( # noqa: S603
|
|
77
78
|
fs_cmd, timeout=30, capture_output=True, check=False
|
|
78
79
|
)
|
|
79
|
-
fs_out = str(reply.stdout)
|
|
80
|
+
fs_out = str(reply.stdout).split(r"\n")
|
|
80
81
|
|
|
81
82
|
beagle_cmd = ["/usr/bin/beagle-version"]
|
|
82
|
-
beagle_out =
|
|
83
|
+
beagle_out = []
|
|
83
84
|
if Path(beagle_cmd[0]).is_file():
|
|
84
85
|
reply = subprocess.run( # noqa: S603
|
|
85
86
|
beagle_cmd, timeout=30, capture_output=True, check=False
|
|
86
87
|
)
|
|
87
|
-
beagle_out = str(reply.stdout)
|
|
88
|
+
beagle_out = str(reply.stdout).split(r"\n")
|
|
88
89
|
|
|
89
90
|
ptp_cmd = ["/usr/sbin/ptp4l", "-v"]
|
|
90
91
|
ptp_out = None
|
shepherd_core/reader.py
CHANGED
|
@@ -536,9 +536,9 @@ class Reader:
|
|
|
536
536
|
def count_errors_in_log(self, group_name: str = "sheep", min_level: int = 40) -> int:
|
|
537
537
|
if group_name not in self.h5file:
|
|
538
538
|
return 0
|
|
539
|
-
if "level" not in self.h5file[
|
|
539
|
+
if "level" not in self.h5file[group_name]:
|
|
540
540
|
return 0
|
|
541
|
-
_lvl = self.h5file[
|
|
541
|
+
_lvl = self.h5file[group_name]["level"]
|
|
542
542
|
if _lvl.shape[0] < 1:
|
|
543
543
|
return 0
|
|
544
544
|
_items = [1 for _x in _lvl[:] if _x >= min_level]
|
|
@@ -688,4 +688,11 @@ class Reader:
|
|
|
688
688
|
gpio_wf = pin_wf.astype(float)
|
|
689
689
|
gpio_wf[:, 0] = gpio_wf[:, 0] / 1e9
|
|
690
690
|
|
|
691
|
-
|
|
691
|
+
try:
|
|
692
|
+
return Uart(gpio_wf).get_lines()
|
|
693
|
+
except TypeError:
|
|
694
|
+
self._logger.error("TypeError: Extracting UART from GPIO failed - will skip file.")
|
|
695
|
+
return None
|
|
696
|
+
except ValueError:
|
|
697
|
+
self._logger.error("ValueError: Extracting UART from GPIO failed - will skip file.")
|
|
698
|
+
return None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: shepherd_core
|
|
3
|
-
Version: 2024.7.
|
|
3
|
+
Version: 2024.7.2
|
|
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>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
shepherd_core/__init__.py,sha256=
|
|
1
|
+
shepherd_core/__init__.py,sha256=18yq3YRDzCrO_xW5GXUgekF_LRg6kK87V2jnxE38d2E,1385
|
|
2
2
|
shepherd_core/calibration_hw_def.py,sha256=m5HDxHJ_blnn-C0Og5v6by1ApJRDT7RhytFbL-P5730,2548
|
|
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=
|
|
5
|
+
shepherd_core/reader.py,sha256=9BuArqou5pmPKUrJH9oiPYlU1DkMxUScL4nftDJuFIs,26790
|
|
6
6
|
shepherd_core/writer.py,sha256=xcLCw-YokKaN8TrkwD0IjRmn8xZU0Q8wwWp_1K8JFVY,14475
|
|
7
7
|
shepherd_core/data_models/__init__.py,sha256=IVjKbT2Ilz5bev325EvAuuhd9LfQgQ1u7qKo6dhVA2k,1866
|
|
8
8
|
shepherd_core/data_models/readme.md,sha256=1bdfEypY_0NMhXLxOPRnLAsFca0HuHdq7_01yEWxvUs,2470
|
|
@@ -57,7 +57,7 @@ shepherd_core/fw_tools/patcher.py,sha256=D6MHaCvKRRVQYSZozODAp_l7UnqxVsvnulPzpkf
|
|
|
57
57
|
shepherd_core/fw_tools/validation.py,sha256=hBLCKIUumPTA6iuXMVbMYph2jamaxeSTxRqsvl3C4-I,4699
|
|
58
58
|
shepherd_core/inventory/__init__.py,sha256=nRO11HG4eJ_FaXebSkE0dd1H6qvjrX5n3OQHOzKXVvk,3841
|
|
59
59
|
shepherd_core/inventory/python.py,sha256=OWNnyEt0IDPW9XGW-WloU0FExwgZzYNA05VpRj4cZGc,1250
|
|
60
|
-
shepherd_core/inventory/system.py,sha256=
|
|
60
|
+
shepherd_core/inventory/system.py,sha256=jRzko9QNPLaBiG7urVaeqqvb3GtCEYRwc0DAghRkLVo,3159
|
|
61
61
|
shepherd_core/inventory/target.py,sha256=Lq11j25tWieXheOxIDaQb-lc-2omxYVex5P6uGiLUyk,507
|
|
62
62
|
shepherd_core/testbed_client/__init__.py,sha256=lzi7F5Go-AsbTbiUCf9Rnu6pzmTZqmpIqoS1yCPal_c,175
|
|
63
63
|
shepherd_core/testbed_client/cache_path.py,sha256=tS0er9on5fw8wddMCt1jkc2uyYOdSTvX_UmfmYJf6tY,445
|
|
@@ -68,8 +68,8 @@ shepherd_core/vsource/__init__.py,sha256=dS33KYLq5GQ9_D8HfdP8iWSocWTghCi2ZZG2AJW
|
|
|
68
68
|
shepherd_core/vsource/virtual_converter_model.py,sha256=ZSoWVLfRmFEjeCNoQCg3BctzhdfayINUBDU_AJK1CR0,10404
|
|
69
69
|
shepherd_core/vsource/virtual_harvester_model.py,sha256=wCbFfsqDRC5Rfu8qANkmkP9XGJOPHJY9-iSnI850JI4,7817
|
|
70
70
|
shepherd_core/vsource/virtual_source_model.py,sha256=fjN8myTY3I_LpikF_aGAcxes3RGu1GP23P7XKC_UIyA,2737
|
|
71
|
-
shepherd_core-2024.7.
|
|
72
|
-
shepherd_core-2024.7.
|
|
73
|
-
shepherd_core-2024.7.
|
|
74
|
-
shepherd_core-2024.7.
|
|
75
|
-
shepherd_core-2024.7.
|
|
71
|
+
shepherd_core-2024.7.2.dist-info/METADATA,sha256=StULIM0aTJCmN4b1RQYkQsC5BniVCv7SEO4BJmuGHcg,7630
|
|
72
|
+
shepherd_core-2024.7.2.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
|
|
73
|
+
shepherd_core-2024.7.2.dist-info/top_level.txt,sha256=wy-t7HRBrKARZxa-Y8_j8d49oVHnulh-95K9ikxVhew,14
|
|
74
|
+
shepherd_core-2024.7.2.dist-info/zip-safe,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
75
|
+
shepherd_core-2024.7.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|