Skip to content

Commit ef5b390

Browse files
authored
Prepare 5.0.0 release (#1402)
1 parent a27f606 commit ef5b390

4 files changed

Lines changed: 12 additions & 13 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# HDMF Changelog
22

3-
## HDMF 5.0.0 (Upcoming)
3+
## HDMF 5.0.0 (March 2, 2026)
44

55
### Changed
66
- Refactored `TypeMap.load_namespaces` to register `TypeSource` placeholders for both source types and dependent types, enabling lazy class generation. Added `NamespaceCatalog.get_source_types` to get source types loaded for a namespace. Removed `TypeMap.container_types` property. Converted `TypeSource` to a frozen dataclass. @rly [#1372](https://github.com/hdmf-dev/hdmf/pull/1372)

src/hdmf/backends/io.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,6 @@
1212

1313
class HDMFIO(metaclass=ABCMeta):
1414

15-
@staticmethod
16-
@abstractmethod
17-
def can_read(path):
18-
"""Determines whether a given path is readable by this HDMFIO class"""
19-
pass
20-
2115
@docval({'name': 'manager', 'type': BuildManager,
2216
'doc': 'the BuildManager to use for I/O', 'default': None},
2317
{"name": "source", "type": (str, Path),
@@ -35,7 +29,6 @@ def __init__(self, **kwargs):
3529
source = os.path.abspath(source)
3630

3731
self.__manager = manager
38-
self.__built = dict()
3932
self.__source = source
4033
self.herd_path = herd_path
4134
self.herd = None
@@ -189,6 +182,12 @@ def close(self):
189182
''' Close this HDMFIO object to further reading/writing'''
190183
pass
191184

185+
@staticmethod
186+
@abstractmethod
187+
def can_read(path):
188+
"""Determines whether a given path is readable by this HDMFIO class"""
189+
pass
190+
192191
@classmethod
193192
@abstractmethod
194193
def load_namespaces(cls,

src/hdmf/build/manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ def __deepcopy__(self, memo):
463463

464464
def copy_mappers(self, type_map):
465465
warnings.warn(
466-
"copy_mappers is deprecated and will be removed in a future version. "
466+
"copy_mappers is deprecated and will be removed in HDMF 6.0. "
467467
"Use merge instead with the argument ns_catalog=False to copy only mappers without namespaces.",
468468
DeprecationWarning,
469469
)

tests/unit/test_io_hdf5_h5tools.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3646,7 +3646,7 @@ def tearDown(self):
36463646

36473647
def test_roundtrip_basic(self):
36483648
# Setup all the data we need
3649-
zarr.save(self.zarr_path, np.arange(50).reshape(5, 10))
3649+
zarr.save(self.zarr_path, np.arange(50))
36503650
zarr_data = zarr.open(self.zarr_path, 'r')
36513651
foo1 = Foo(name='foo1',
36523652
my_data=zarr_data,
@@ -3679,7 +3679,7 @@ def test_roundtrip_empty_dataset(self):
36793679
self.assertListEqual([], read_foofile.buckets['bucket1'].foos['foo1'].my_data[:].tolist())
36803680

36813681
def test_write_zarr_int32_dataset(self):
3682-
base_data = np.arange(50).reshape(5, 10).astype('int32')
3682+
base_data = np.arange(50).astype('int32')
36833683
zarr.save(self.zarr_path, base_data)
36843684
zarr_data = zarr.open(self.zarr_path, 'r')
36853685
io = HDF5IO(self.path, mode='a')
@@ -3693,7 +3693,7 @@ def test_write_zarr_int32_dataset(self):
36933693
base_data.tolist())
36943694

36953695
def test_write_zarr_float32_dataset(self):
3696-
base_data = np.arange(50).reshape(5, 10).astype('float32')
3696+
base_data = np.arange(50).astype('float32')
36973697
zarr.save(self.zarr_path, base_data)
36983698
zarr_data = zarr.open(self.zarr_path, 'r')
36993699
io = HDF5IO(self.path, mode='a')
@@ -3823,7 +3823,7 @@ def test_write_zarr_vlen_ascii_dataset(self):
38233823
np.testing.assert_array_equal(dset[:].astype(bytes), zarr_data[:])
38243824

38253825
def test_write_zarr_dataset_compress_gzip(self):
3826-
base_data = np.arange(50).reshape(5, 10).astype('float32')
3826+
base_data = np.arange(50).astype('float32')
38273827
zarr.save(self.zarr_path, base_data)
38283828
zarr_data = zarr.open(self.zarr_path, 'r')
38293829
a = H5DataIO(zarr_data,

0 commit comments

Comments
 (0)