From d2fe84d96b72ae6ff7ede3a7a7f819d3928e69db Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Fri, 15 Nov 2024 14:06:05 -0800 Subject: [PATCH] Remove references to region references/builders for HDMF 4.0 (#1991) --- CHANGELOG.md | 1 + docs/source/overview_software_architecture.rst | 2 +- src/pynwb/io/core.py | 15 +-------------- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23495df7c..ed6eead1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Enhancements and minor changes * Added `NWBHDF5IO.read_nwb` convenience method to simplify reading an NWB file. @h-mayorquin [#1979](https://github.com/NeurodataWithoutBorders/pynwb/pull/1979) +* Removed unused references to region references and builders in preparation for changes in HDMF 4.0. @rly [#1991](https://github.com/NeurodataWithoutBorders/pynwb/pull/1991) ### Documentation and tutorial enhancements - Added documentation example for `SpikeEventSeries`. @stephprince [#1983](https://github.com/NeurodataWithoutBorders/pynwb/pull/1983) diff --git a/docs/source/overview_software_architecture.rst b/docs/source/overview_software_architecture.rst index f2e3edc43..c1bf4a411 100644 --- a/docs/source/overview_software_architecture.rst +++ b/docs/source/overview_software_architecture.rst @@ -69,7 +69,7 @@ Builder * :py:class:`~hdmf.build.builders.GroupBuilder` - represents a collection of objects * :py:class:`~hdmf.build.builders.DatasetBuilder` - represents data * :py:class:`~hdmf.build.builders.LinkBuilder` - represents soft-links - * :py:class:`~hdmf.build.builders.RegionBuilder` - represents a slice into data (Subclass of :py:class:`~hdmf.build.builders.DatasetBuilder`) + * :py:class:`~hdmf.build.builders.ReferenceBuilder` - represents a reference to another group or dataset * **Main Module:** :py:mod:`hdmf.build.builders` diff --git a/src/pynwb/io/core.py b/src/pynwb/io/core.py index be9b234d8..0e0378c58 100644 --- a/src/pynwb/io/core.py +++ b/src/pynwb/io/core.py @@ -1,4 +1,4 @@ -from hdmf.build import ObjectMapper, RegionBuilder +from hdmf.build import ObjectMapper from hdmf.common import VectorData from hdmf.utils import getargs, docval from hdmf.spec import AttributeSpec @@ -40,19 +40,6 @@ def __init__(self, spec): self.map_spec('description', spec.get_attribute('notes')) -class NWBTableRegionMap(NWBDataMap): - - @ObjectMapper.constructor_arg('table') - def carg_table(self, builder, manager): - return manager.construct(builder.data.builder) - - @ObjectMapper.constructor_arg('region') - def carg_region(self, builder, manager): - if not isinstance(builder.data, RegionBuilder): - raise ValueError("'builder' must be a RegionBuilder") - return builder.data.region - - @register_map(VectorData) class VectorDataMap(ObjectMapper):