Skip to content
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

Adding support to marshallers to require modules not present and read back approximate versions of the data, as well as lazy loading of required modules #49

Closed
frejanordsiek opened this issue Sep 14, 2016 · 2 comments

Comments

@frejanordsiek
Copy link
Owner

Adding marshallers to support types in more modules of the main Python libraries as well as external packages would increase loading time due to loading more packages and add dependencies for the way marshallers work in the 0.1.x series.

Thus, the parent marshaller class, hdf5storage.Marshallers.TypeMarshaller is being changed to support lists of required modules that can be lazy loaded when the marshaller is actually needed, and if they are not available, a read_approximate method to read back an approximate version of the data using standard python types and numpy types to be able to at least read something. The MarshallerCollection class as well as other classes are being changed to support this feature.

This is an API change, but it doesn't break compatibility so long as hdf5storage.Marshallers.TypeMarshaller or its descendants are still inherited from. Completely custom marshallers will no longer be compatible.

@frejanordsiek
Copy link
Owner Author

Done in commit 74d35c8

@frejanordsiek
Copy link
Owner Author

Changed in commit 260ff78 . examples/example_hdf5storage_marshaller_plugin/example_hdf5storage_marshaller_plugin.py has a good example of how it looks in addition to being an example of the plugin architecture (see Issue #65)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant