legend-pydataobj 1.11.12__py3-none-any.whl → 1.11.13__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.
- {legend_pydataobj-1.11.12.dist-info → legend_pydataobj-1.11.13.dist-info}/METADATA +1 -1
- {legend_pydataobj-1.11.12.dist-info → legend_pydataobj-1.11.13.dist-info}/RECORD +10 -9
- {legend_pydataobj-1.11.12.dist-info → legend_pydataobj-1.11.13.dist-info}/WHEEL +1 -1
- lgdo/_version.py +2 -2
- lgdo/lh5/__init__.py +2 -2
- lgdo/lh5/_serializers/write/array.py +2 -3
- lgdo/lh5/settings.py +34 -0
- {legend_pydataobj-1.11.12.dist-info → legend_pydataobj-1.11.13.dist-info}/entry_points.txt +0 -0
- {legend_pydataobj-1.11.12.dist-info → legend_pydataobj-1.11.13.dist-info}/licenses/LICENSE +0 -0
- {legend_pydataobj-1.11.12.dist-info → legend_pydataobj-1.11.13.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
legend_pydataobj-1.11.
|
1
|
+
legend_pydataobj-1.11.13.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
2
2
|
lgdo/__init__.py,sha256=QMYK9HhoMi0pbahPN8mPD18gyTxscFgo7QKfCxVhy-0,3196
|
3
|
-
lgdo/_version.py,sha256=
|
3
|
+
lgdo/_version.py,sha256=Qst-iXDl1kYXwH8uB96MoJHj4GrtPgOsKRVwqxfnymw,515
|
4
4
|
lgdo/cli.py,sha256=s_EWTBWW76l7zWb6gaTSTjiT-0RzzcYEmjeFEQCVxfk,4647
|
5
5
|
lgdo/lgdo_utils.py,sha256=6a2YWEwpyEMXlAyTHZMO01aqxy6SxJzPZkGNWKNWuS0,2567
|
6
6
|
lgdo/lh5_store.py,sha256=5BzbJA9sLcqjp8bJDc2olwOiw0VS6rmfg3cfh1kQkRY,8512
|
@@ -13,12 +13,13 @@ lgdo/compression/generic.py,sha256=tF3UhLJbUDcovLxpIzgQRxFSjZ5Fz3uDRy9kI4mFntQ,2
|
|
13
13
|
lgdo/compression/radware.py,sha256=GcNTtjuyL7VBBqziUBmSqNXuhqy1bJJgvcyvyumPtrc,23839
|
14
14
|
lgdo/compression/utils.py,sha256=W2RkBrxPpXlat84dnU9Ad7d_tTws0irtGl7O1dNWjnk,1140
|
15
15
|
lgdo/compression/varlen.py,sha256=6ZZUItyoOfygDdE0DyoISeFZfqdbH6xl7T0eclfarzg,15127
|
16
|
-
lgdo/lh5/__init__.py,sha256
|
16
|
+
lgdo/lh5/__init__.py,sha256=-LtqfwKYaongsORkr3woqM2wVVcdVIIp1PI-jogmK8k,800
|
17
17
|
lgdo/lh5/concat.py,sha256=5nO7dNSb0UEP9rZiWGTKH5Cfwsm5LSm3tBJM4Kd70u0,6336
|
18
18
|
lgdo/lh5/core.py,sha256=HT50rolOtTijgaGFskRgzoRbC0w-kxrRS2v9O5Q9Ugo,14067
|
19
19
|
lgdo/lh5/datatype.py,sha256=ry3twFaosuBoskiTKqtBYRMk9PQAf403593xKaItfog,1827
|
20
20
|
lgdo/lh5/exceptions.py,sha256=3kj8avXl4eBGvebl3LG12gJEmw91W0T8PYR0AfvUAyM,1211
|
21
21
|
lgdo/lh5/iterator.py,sha256=ZaBBnmuNIjinwO0JUY55wLxX8Om9rVRRzXBC5uHmSKM,19772
|
22
|
+
lgdo/lh5/settings.py,sha256=cmPd6ZvneAF5sFMA1qf-9g_YSSygJcQSRmZDp1_sBEU,1001
|
22
23
|
lgdo/lh5/store.py,sha256=3wAaQDd1Zmo0_bQ9DbB-FbKS4Uy_Tb642qKHXtZpSw4,10643
|
23
24
|
lgdo/lh5/tools.py,sha256=T9CgHA8A3_tVBMtiNJ6hATQKhdqI61m3cX4p2wGKc6c,9937
|
24
25
|
lgdo/lh5/utils.py,sha256=ioz8DlyXZsejwnU2qYdIccdHcF12H62jgLkZsiDOLSM,6243
|
@@ -32,7 +33,7 @@ lgdo/lh5/_serializers/read/scalar.py,sha256=kwhWm1T91pXf86CqtUUD8_qheSR92gXZrQVt
|
|
32
33
|
lgdo/lh5/_serializers/read/utils.py,sha256=YfSqPO-83A1XvhhuULxQ0Qz2A5ODa3sb7ApNxQVJXd0,7581
|
33
34
|
lgdo/lh5/_serializers/read/vector_of_vectors.py,sha256=765P8mElGArAaEPkHTAUXFQ47t1_3-3BQAete0LckBQ,7207
|
34
35
|
lgdo/lh5/_serializers/write/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
35
|
-
lgdo/lh5/_serializers/write/array.py,sha256=
|
36
|
+
lgdo/lh5/_serializers/write/array.py,sha256=gAB1EjPa9YojPqohVwY_VPeuY7_bLN-lttCmfgty-qk,3175
|
36
37
|
lgdo/lh5/_serializers/write/composite.py,sha256=qYJIqpQxc1a0hmazxYCPMv-ar9_TsyK-zWcBmPleMfM,10011
|
37
38
|
lgdo/lh5/_serializers/write/scalar.py,sha256=JPt_fcdTKOSFp5hfJdcKIfK4hxhcD8vhOlvDF-7btQ8,763
|
38
39
|
lgdo/lh5/_serializers/write/vector_of_vectors.py,sha256=puGQX9XF5P_5DVbm_Cc6TvPrsDywgBLSYtkqFNltbB4,3493
|
@@ -49,8 +50,8 @@ lgdo/types/table.py,sha256=VIHQOPXJHJgiCjMMb_p7EdbcCqLFSObHMdHSxC1Dm5Y,19212
|
|
49
50
|
lgdo/types/vectorofvectors.py,sha256=K8w7CZou857I9YGkeOe2uYB20gbHl4OV9xhnnJPNOjc,24665
|
50
51
|
lgdo/types/vovutils.py,sha256=7BWPP0BSj-92ifbCIUBcfqxG5-TS8uxujTyJJuDFI04,10302
|
51
52
|
lgdo/types/waveformtable.py,sha256=f2tS4f1OEoYaTM5ldCX9zmw8iSISCT3t3wS1SrPdu_o,9901
|
52
|
-
legend_pydataobj-1.11.
|
53
|
-
legend_pydataobj-1.11.
|
54
|
-
legend_pydataobj-1.11.
|
55
|
-
legend_pydataobj-1.11.
|
56
|
-
legend_pydataobj-1.11.
|
53
|
+
legend_pydataobj-1.11.13.dist-info/METADATA,sha256=f1aDC_Ev6RoXyH2PWkyHj2rCSkooR6n1bCFG84__0x4,44444
|
54
|
+
legend_pydataobj-1.11.13.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
55
|
+
legend_pydataobj-1.11.13.dist-info/entry_points.txt,sha256=0KWfnwbuwhNn0vPUqARukjp04Ca6lzfZBSirouRmk7I,76
|
56
|
+
legend_pydataobj-1.11.13.dist-info/top_level.txt,sha256=KyR-EUloqiXcQ62IWnzBmtInDtvsHl4q2ZJAZgTcLXE,5
|
57
|
+
legend_pydataobj-1.11.13.dist-info/RECORD,,
|
lgdo/_version.py
CHANGED
lgdo/lh5/__init__.py
CHANGED
@@ -7,7 +7,6 @@ browsed easily in python like any `HDF5 <https://www.hdfgroup.org>`_ file using
|
|
7
7
|
|
8
8
|
from __future__ import annotations
|
9
9
|
|
10
|
-
from ._serializers.write.array import DEFAULT_HDF5_SETTINGS
|
11
10
|
from .core import read, read_as, write
|
12
11
|
from .iterator import LH5Iterator
|
13
12
|
from .store import LH5Store
|
@@ -15,16 +14,17 @@ from .tools import load_dfs, load_nda, ls, show
|
|
15
14
|
from .utils import read_n_rows
|
16
15
|
|
17
16
|
__all__ = [
|
18
|
-
"DEFAULT_HDF5_SETTINGS",
|
19
17
|
"LH5Iterator",
|
20
18
|
"LH5Store",
|
21
19
|
"concat",
|
20
|
+
"default_hdf5_settings",
|
22
21
|
"load_dfs",
|
23
22
|
"load_nda",
|
24
23
|
"ls",
|
25
24
|
"read",
|
26
25
|
"read_as",
|
27
26
|
"read_n_rows",
|
27
|
+
"reset_default_hdf5_settings",
|
28
28
|
"show",
|
29
29
|
"write",
|
30
30
|
]
|
@@ -6,12 +6,11 @@ import h5py
|
|
6
6
|
import numpy as np
|
7
7
|
|
8
8
|
from .... import types
|
9
|
+
from ... import settings
|
9
10
|
from ...exceptions import LH5EncodeError
|
10
11
|
|
11
12
|
log = logging.getLogger(__name__)
|
12
13
|
|
13
|
-
DEFAULT_HDF5_SETTINGS: dict[str, ...] = {"shuffle": True, "compression": "gzip"}
|
14
|
-
|
15
14
|
|
16
15
|
def _h5_write_array(
|
17
16
|
obj,
|
@@ -49,7 +48,7 @@ def _h5_write_array(
|
|
49
48
|
del group[name]
|
50
49
|
|
51
50
|
# set default compression options
|
52
|
-
for k, v in DEFAULT_HDF5_SETTINGS.items():
|
51
|
+
for k, v in settings.DEFAULT_HDF5_SETTINGS.items():
|
53
52
|
h5py_kwargs.setdefault(k, v)
|
54
53
|
|
55
54
|
# compress using the 'compression' LGDO attribute, if available
|
lgdo/lh5/settings.py
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
from __future__ import annotations
|
2
|
+
|
3
|
+
from typing import Any
|
4
|
+
|
5
|
+
|
6
|
+
def default_hdf5_settings() -> dict[str, Any]:
|
7
|
+
"""Returns the HDF5 settings for writing data to disk to the pydataobj defaults.
|
8
|
+
|
9
|
+
Examples
|
10
|
+
--------
|
11
|
+
>>> from lgdo import lh5
|
12
|
+
>>> lh5.DEFAULT_HDF5_SETTINGS["compression"] = "lzf"
|
13
|
+
>>> lh5.write(data, "data", "file.lh5") # compressed with LZF
|
14
|
+
>>> lh5.DEFAULT_HDF5_SETTINGS = lh5.default_hdf5_settings()
|
15
|
+
>>> lh5.write(data, "data", "file.lh5", "of") # compressed with default settings (GZIP)
|
16
|
+
"""
|
17
|
+
|
18
|
+
return {
|
19
|
+
"shuffle": True,
|
20
|
+
"compression": "gzip",
|
21
|
+
}
|
22
|
+
|
23
|
+
|
24
|
+
DEFAULT_HDF5_SETTINGS: dict[str, ...] = default_hdf5_settings()
|
25
|
+
"""Global dictionary storing the default HDF5 settings for writing data to disk.
|
26
|
+
|
27
|
+
Modify this global variable before writing data to disk with this package.
|
28
|
+
|
29
|
+
Examples
|
30
|
+
--------
|
31
|
+
>>> from lgdo import lh5
|
32
|
+
>>> lh5.DEFAULT_HDF5_SETTINGS["compression"] = "lzf"
|
33
|
+
>>> lh5.write(data, "data", "file.lh5") # compressed with LZF
|
34
|
+
"""
|
File without changes
|
File without changes
|
File without changes
|