From 8958fc7711d00751514808f109e4303eaa0e2602 Mon Sep 17 00:00:00 2001 From: Jeremy Magland Date: Tue, 5 Mar 2024 10:42:20 -0500 Subject: [PATCH] default object_codec_class -> JSON --- src/hdmf_zarr/backend.py | 2 +- src/hdmf_zarr/nwb.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/hdmf_zarr/backend.py b/src/hdmf_zarr/backend.py index 6ae27a25..a876022f 100644 --- a/src/hdmf_zarr/backend.py +++ b/src/hdmf_zarr/backend.py @@ -94,7 +94,7 @@ def can_read(path): 'default': None}, {'name': 'object_codec_class', 'type': None, 'doc': 'Set the numcodec object codec class to be used to encode objects.' - 'Use numcodecs.pickles.Pickle by default.', + 'Use numcodecs.JSON by default.', 'default': None}, {'name': 'storage_options', 'type': dict, 'doc': 'Zarr storage options to read remote folders', diff --git a/src/hdmf_zarr/nwb.py b/src/hdmf_zarr/nwb.py index ed3d831c..9983c9b2 100644 --- a/src/hdmf_zarr/nwb.py +++ b/src/hdmf_zarr/nwb.py @@ -27,9 +27,10 @@ class NWBZarrIO(ZarrIO): 'doc': 'a path to a namespace, a TypeMap, or a list consisting paths to namespaces and TypeMaps', 'default': None}) def __init__(self, **kwargs): - path, mode, manager, extensions, load_namespaces, synchronizer, storage_options = \ + path, mode, manager, extensions, load_namespaces, synchronizer, storage_options, object_codec_class = \ popargs('path', 'mode', 'manager', 'extensions', - 'load_namespaces', 'synchronizer', 'storage_options', kwargs) + 'load_namespaces', 'synchronizer', 'storage_options', + 'object_codec_class', kwargs) if load_namespaces: if manager is not None: warn("loading namespaces from file - ignoring 'manager'") @@ -53,7 +54,8 @@ def __init__(self, **kwargs): manager=manager, mode=mode, synchronizer=synchronizer, - storage_options=storage_options) + storage_options=storage_options, + object_codec_class=object_codec_class) @docval({'name': 'src_io', 'type': HDMFIO, 'doc': 'the HDMFIO object for reading the data to export'}, {'name': 'nwbfile', 'type': 'NWBFile',