From 44ef205770ccbd10e3a2815260f11c911cd63106 Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Thu, 5 Sep 2024 16:30:33 -0700 Subject: [PATCH] Expose cache_spec option in NWBHDF5IO.export (#1959) * Expose cache_spec option in NWBHDF5IO.export * Update changelog --- CHANGELOG.md | 1 + src/pynwb/__init__.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5350d081f..8c465adec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ ### Bug fixes - Fixed `can_read` method to return False if no nwbfile version can be found @stephprince [#1934](https://github.com/NeurodataWithoutBorders/pynwb/pull/1934) - Changed `epoch_tags` to be a NWBFile property instead of constructor argument. @stephprince [#1935](https://github.com/NeurodataWithoutBorders/pynwb/pull/1935) +- Exposed option to not cache the spec in `NWBHDF5IO.export`. @rly [#1959](https://github.com/NeurodataWithoutBorders/pynwb/pull/1959) ## PyNWB 2.8.1 (July 3, 2024) diff --git a/src/pynwb/__init__.py b/src/pynwb/__init__.py index 278e48948..727838821 100644 --- a/src/pynwb/__init__.py +++ b/src/pynwb/__init__.py @@ -368,7 +368,9 @@ def read(self, **kwargs): 'default': None}, {'name': 'write_args', 'type': dict, 'doc': 'arguments to pass to :py:meth:`~hdmf.backends.io.HDMFIO.write_builder`', - 'default': None}) + 'default': None}, + {'name': 'cache_spec', 'type': bool, 'doc': 'whether to cache the specification to file', + 'default': True}) def export(self, **kwargs): """ Export an NWB file to a new NWB file using the HDF5 backend.