Skip to content

Commit 2bffcfe

Browse files
authored
Merge pull request #373 from t20100/add-properties-get_config-repr
Added `get_config` method and `repr` support to all filters; Add parameter properties to some filters
2 parents 9b731c2 + 559fe8b commit 2bffcfe

File tree

5 files changed

+317
-73
lines changed

5 files changed

+317
-73
lines changed

doc/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,5 @@
4545
# a list of builtin themes.
4646
#
4747
html_theme = "sphinx_rtd_theme"
48+
49+
autodoc_member_order = "bysource"

doc/usage.rst

Lines changed: 38 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -58,106 +58,89 @@ Bitshuffle
5858

5959
.. autoclass:: Bitshuffle
6060
:members:
61+
:inherited-members: FilterRefBase, Mapping
6162
:undoc-members:
6263

6364
Blosc
6465
=====
6566

6667
.. autoclass:: Blosc
6768
:members:
69+
:inherited-members: FilterRefBase, Mapping
6870
:undoc-members:
6971

7072
Blosc2
7173
======
7274

7375
.. autoclass:: Blosc2
7476
:members:
77+
:inherited-members: FilterRefBase, Mapping
7578
:undoc-members:
7679

7780
BZip2
7881
=====
7982

8083
.. autoclass:: BZip2
8184
:members:
85+
:inherited-members: FilterRefBase, Mapping
8286
:undoc-members:
8387

8488
FciDecomp
8589
=========
8690

8791
.. autoclass:: FciDecomp
8892
:members:
93+
:inherited-members: FilterRefBase, Mapping
8994
:undoc-members:
9095

9196
LZ4
9297
===
9398

9499
.. autoclass:: LZ4
95100
:members:
101+
:inherited-members: FilterRefBase, Mapping
96102
:undoc-members:
97103

98104
Sperr
99105
=====
100106

101107
.. autoclass:: Sperr
102108
:members:
109+
:inherited-members: FilterRefBase, Mapping
103110
:undoc-members:
104111

105112
SZ
106113
==
107114

108115
.. autoclass:: SZ
109116
:members:
117+
:inherited-members: FilterRefBase, Mapping
110118
:undoc-members:
111119

112120
SZ3
113121
===
114122

115123
.. autoclass:: SZ3
116124
:members:
125+
:inherited-members: FilterRefBase, Mapping
117126
:undoc-members:
118127

119128
Zfp
120129
===
121130

122131
.. autoclass:: Zfp
123132
:members:
133+
:inherited-members: FilterRefBase, Mapping
124134
:undoc-members:
125135

126136
Zstd
127137
====
128138

129139
.. autoclass:: Zstd
130140
:members:
141+
:inherited-members: FilterRefBase, Mapping
131142
:undoc-members:
132143

133-
134-
Get dataset compression
135-
+++++++++++++++++++++++
136-
137-
For **built-in** compression filters (i.e., GZIP, LZF, SZIP),
138-
dataset compression configuration can be retrieved with `h5py.Dataset`_'s
139-
`compression <https://docs.h5py.org/en/stable/high/dataset.html#h5py.Dataset.compression>`_ and
140-
`compression_opts <https://docs.h5py.org/en/stable/high/dataset.html#h5py.Dataset.compression_opts>`_ properties.
141-
142-
For **third-party** compression filters such as the one supported by `hdf5plugin`,
143-
the dataset compression configuration is stored in HDF5
144-
`filter pipeline <https://docs.h5py.org/en/stable/high/dataset.html#filter-pipeline>`_.
145-
This filter pipeline configuration can be retrieved with `h5py.Dataset`_ "low level" API.
146-
For a given `h5py.Dataset`_, ``dataset``:
147-
148-
.. code-block:: python
149-
150-
create_plist = dataset.id.get_create_plist()
151-
152-
for index in range(create_plist.get_nfilters()):
153-
filter_id, _, filter_options, _ = create_plist.get_filter(index)
154-
print(filter_id, filter_options)
155-
156-
For compression filters supported by `hdf5plugin`,
157-
:func:`hdf5plugin.from_filter_options` instantiates the filter configuration from the filter id and options.
158-
159-
.. autofunction:: from_filter_options
160-
161144
Get information about hdf5plugin
162145
++++++++++++++++++++++++++++++++
163146

@@ -186,6 +169,33 @@ Registering with this function is required to perform additional initialisation
186169

187170
.. autofunction:: register
188171

172+
Get dataset compression
173+
+++++++++++++++++++++++
174+
175+
For **built-in** compression filters (i.e., GZIP, LZF, SZIP),
176+
dataset compression configuration can be retrieved with `h5py.Dataset`_'s
177+
`compression <https://docs.h5py.org/en/stable/high/dataset.html#h5py.Dataset.compression>`_ and
178+
`compression_opts <https://docs.h5py.org/en/stable/high/dataset.html#h5py.Dataset.compression_opts>`_ properties.
179+
180+
For **third-party** compression filters such as the one supported by `hdf5plugin`,
181+
the dataset compression configuration is stored in HDF5
182+
`filter pipeline <https://docs.h5py.org/en/stable/high/dataset.html#filter-pipeline>`_.
183+
This filter pipeline configuration can be retrieved with `h5py.Dataset`_ "low level" API.
184+
For a given `h5py.Dataset`_, ``dataset``:
185+
186+
.. code-block:: python
187+
188+
create_plist = dataset.id.get_create_plist()
189+
190+
for index in range(create_plist.get_nfilters()):
191+
filter_id, _, filter_options, _ = create_plist.get_filter(index)
192+
print(filter_id, filter_options)
193+
194+
For compression filters supported by `hdf5plugin`,
195+
:func:`hdf5plugin.from_filter_options` instantiates the filter configuration from the filter id and options.
196+
197+
.. autofunction:: from_filter_options
198+
189199
Use HDF5 filters in other applications
190200
++++++++++++++++++++++++++++++++++++++
191201

0 commit comments

Comments
 (0)