legend-pydataobj 1.14.2__tar.gz → 1.14.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.
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/PKG-INFO +1 -1
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/legend_pydataobj.egg-info/PKG-INFO +1 -1
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/__init__.py +4 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/_version.py +2 -2
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/tools.py +26 -15
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/LICENSE +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/README.md +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/pyproject.toml +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/setup.cfg +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/legend_pydataobj.egg-info/SOURCES.txt +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/legend_pydataobj.egg-info/dependency_links.txt +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/legend_pydataobj.egg-info/entry_points.txt +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/legend_pydataobj.egg-info/not-zip-safe +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/legend_pydataobj.egg-info/requires.txt +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/legend_pydataobj.egg-info/top_level.txt +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/cli.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/compression/__init__.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/compression/base.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/compression/generic.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/compression/radware.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/compression/utils.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/compression/varlen.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lgdo_utils.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/__init__.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/_serializers/__init__.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/_serializers/read/__init__.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/_serializers/read/array.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/_serializers/read/composite.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/_serializers/read/encoded.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/_serializers/read/ndarray.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/_serializers/read/scalar.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/_serializers/read/utils.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/_serializers/read/vector_of_vectors.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/_serializers/write/__init__.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/_serializers/write/array.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/_serializers/write/composite.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/_serializers/write/scalar.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/_serializers/write/vector_of_vectors.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/concat.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/core.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/datatype.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/exceptions.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/iterator.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/settings.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/store.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/utils.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/logging.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/types/__init__.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/types/array.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/types/arrayofequalsizedarrays.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/types/encoded.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/types/fixedsizearray.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/types/histogram.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/types/lgdo.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/types/scalar.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/types/struct.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/types/table.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/types/vectorofvectors.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/types/vovutils.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/types/waveformtable.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/units.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/utils.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/compression/conftest.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/compression/sigcompress/LDQTA_r117_20200110T105115Z_cal_geds_raw-0.dat +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/compression/sigcompress/special-wf-clipped.dat +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/compression/test_compression.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/compression/test_radware_sigcompress.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/compression/test_str2wfcodec.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/compression/test_uleb128_zigzag_diff.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/conftest.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/lh5/conftest.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/lh5/test_concat.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/lh5/test_core.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/lh5/test_exceptions.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/lh5/test_lh5_datatype.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/lh5/test_lh5_iterator.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/lh5/test_lh5_store.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/lh5/test_lh5_tools.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/lh5/test_lh5_utils.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/lh5/test_lh5_write.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/lh5/test_pathlib.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/test_cli.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/test_lgdo_utils.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/types/test_array.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/types/test_arrayofequalsizedarrays.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/types/test_encoded.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/types/test_fixedsizearray.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/types/test_histogram.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/types/test_representations.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/types/test_scalar.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/types/test_struct.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/types/test_table.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/types/test_table_eval.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/types/test_vectorofvectors.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/types/test_vovutils.py +0 -0
- {legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/types/test_waveformtable.py +0 -0
@@ -44,6 +44,10 @@ browsed easily in python like any `HDF5 <https://www.hdfgroup.org>`_ file using
|
|
44
44
|
|
45
45
|
from __future__ import annotations
|
46
46
|
|
47
|
+
# import this so users can transparently decode data compressed with hdf5plugin
|
48
|
+
# filters
|
49
|
+
import hdf5plugin # noqa: F401
|
50
|
+
|
47
51
|
from ._version import version as __version__
|
48
52
|
from .lh5 import LH5Iterator, ls, read, read_as, read_n_rows, show, write
|
49
53
|
from .types import (
|
@@ -149,17 +149,27 @@ def show(
|
|
149
149
|
|
150
150
|
# loop over keys
|
151
151
|
while True:
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
152
|
+
is_link = False
|
153
|
+
link_type = lh5_file.get(key, getlink=True)
|
154
|
+
if isinstance(link_type, (h5py.SoftLink, h5py.ExternalLink)):
|
155
|
+
desc = f"-> {link_type.path}"
|
156
|
+
is_link = True
|
157
|
+
|
158
|
+
else:
|
159
|
+
val = lh5_file[key]
|
160
|
+
|
161
|
+
# we want to print the LGDO datatype
|
162
|
+
dtype = val.attrs.get("datatype", default="no datatype")
|
163
|
+
if dtype == "no datatype" and isinstance(val, h5py.Group):
|
164
|
+
dtype = "HDF5 group"
|
165
|
+
|
166
|
+
_attrs = ""
|
167
|
+
if attrs:
|
168
|
+
attrs_d = dict(val.attrs)
|
169
|
+
attrs_d.pop("datatype", "")
|
170
|
+
_attrs = "── " + str(attrs_d) if attrs_d else ""
|
171
|
+
|
172
|
+
desc = f"· {dtype} {_attrs}"
|
163
173
|
|
164
174
|
# is this the last key?
|
165
175
|
killme = False
|
@@ -171,9 +181,10 @@ def show(
|
|
171
181
|
else:
|
172
182
|
char = "├──"
|
173
183
|
|
174
|
-
print(f"{indent}{char} \033[1m{key}\033[0m
|
184
|
+
print(f"{indent}{char} \033[1m{key}\033[0m {desc}") # noqa: T201
|
175
185
|
|
176
|
-
if detail and isinstance(val, h5py.Dataset):
|
186
|
+
if not is_link and detail and isinstance(val, h5py.Dataset):
|
187
|
+
val = lh5_file[key]
|
177
188
|
char = "| "
|
178
189
|
if killme:
|
179
190
|
char = " "
|
@@ -207,9 +218,9 @@ def show(
|
|
207
218
|
print(toprint) # noqa: T201
|
208
219
|
|
209
220
|
# if it's a group, call this function recursively
|
210
|
-
if isinstance(val, h5py.Group):
|
221
|
+
if not is_link and isinstance(val, h5py.Group):
|
211
222
|
show(
|
212
|
-
|
223
|
+
lh5_file[key],
|
213
224
|
indent=indent + (" " if killme else "│ "),
|
214
225
|
header=False,
|
215
226
|
attrs=attrs,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/legend_pydataobj.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
{legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/legend_pydataobj.egg-info/entry_points.txt
RENAMED
File without changes
|
{legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/legend_pydataobj.egg-info/not-zip-safe
RENAMED
File without changes
|
{legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/legend_pydataobj.egg-info/requires.txt
RENAMED
File without changes
|
{legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/legend_pydataobj.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/_serializers/read/__init__.py
RENAMED
File without changes
|
File without changes
|
{legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/_serializers/read/composite.py
RENAMED
File without changes
|
{legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/_serializers/read/encoded.py
RENAMED
File without changes
|
{legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/_serializers/read/ndarray.py
RENAMED
File without changes
|
{legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/_serializers/read/scalar.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/_serializers/write/__init__.py
RENAMED
File without changes
|
{legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/_serializers/write/array.py
RENAMED
File without changes
|
{legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/_serializers/write/composite.py
RENAMED
File without changes
|
{legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/lh5/_serializers/write/scalar.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/src/lgdo/types/arrayofequalsizedarrays.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/compression/test_radware_sigcompress.py
RENAMED
File without changes
|
File without changes
|
{legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/compression/test_uleb128_zigzag_diff.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{legend_pydataobj-1.14.2 → legend_pydataobj-1.14.4}/tests/types/test_arrayofequalsizedarrays.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|