-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added get_config()
function to retrieve information
#187
Conversation
46fc808
to
03af1b7
Compare
Well, I find it somewhere else. Probably it is somehow fetched from |
The situation is:
|
To me the last point "what filters have been registered" is in a wider scope than |
Yes, the constants are now documented with |
I agree it is a more generic functionality to retrieve all filters. However, in the case we have skipped a filter because it was already loaded, I think we should somehow let the user retrieve that information without having to toggle the logging level and (perhaps) restart again. @aragilar suggested to provide hdf5plugin loaded filters and used path (obviously if we load them we use |
Basically I am suggesting to add |
Yes I agree. As it is, one can already find this information by checking both |
I added a status message to the In [1]: import hdf5plugin
In [2]: hdf5plugin.get_config().registered_filters
Out[2]:
{'blosc': FilterStatus(status='Missing: not embedded in hdf5plugin', filename=None),
'bshuf': FilterStatus(status='Missing: not embedded in hdf5plugin', filename=None),
'bzip2': FilterStatus(status='Missing: not embedded in hdf5plugin', filename=None),
'lz4': FilterStatus(status='Registered', filename='/hdf5plugin/plugins/libh5lz4.dylib'),
'zfp': FilterStatus(status='Missing: not embedded in hdf5plugin', filename=None),
'zstd': FilterStatus(status='Missing: not embedded in hdf5plugin', filename=None),
'fcidecomp': FilterStatus(status='Missing: not embedded in hdf5plugin', filename=None)} but it's maybe too much, this is already in the logging message, maybe better to keep it simple. |
I think the requests are already fulfilled. The rest is just a question of taste. |
This PR:
get_config()
function with provides access to both build-time options and runtime registered filters.Previously
hdf5plugin.config
was available (and still is) to provide build time config but it is not documented.I hesitated between providing a dedicated
get_registered_filters()
function and providing a more generalget_config()
one as this PR proposes. I chose the later to avoid having too many functions for accessing debug/more advanced information. Any other opinion? Better naming?closes #185