From 2beae7c25a8b644d3c1975ba1a1de0eb4903eee5 Mon Sep 17 00:00:00 2001 From: Oliver Ruebel Date: Tue, 29 Aug 2023 03:17:18 -0700 Subject: [PATCH 01/15] Fix #1768 Bad validation check for postion in ElectrodeGroup.__init__ --- src/pynwb/ecephys.py | 25 ++++++++++++++--- tests/integration/hdf5/test_ecephys.py | 3 ++- tests/unit/test_ecephys.py | 37 +++++++++++++++++++++++--- 3 files changed, 56 insertions(+), 9 deletions(-) diff --git a/src/pynwb/ecephys.py b/src/pynwb/ecephys.py index 3187cca4a..95ab1f778 100644 --- a/src/pynwb/ecephys.py +++ b/src/pynwb/ecephys.py @@ -26,13 +26,30 @@ class ElectrodeGroup(NWBContainer): {'name': 'location', 'type': str, 'doc': 'description of location of this electrode group'}, {'name': 'device', 'type': Device, 'doc': 'the device that was used to record from this electrode group'}, {'name': 'position', 'type': 'array_data', - 'doc': 'stereotaxic position of this electrode group (x, y, z)', 'default': None}) + 'doc': 'Compound dataset with stereotaxic position of this electrode group (x, y, z). ' + 'Each element of the data array must have three elements or the dtype of the ' + 'array must be `(float, float, float)', 'default': None}) def __init__(self, **kwargs): args_to_set = popargs_to_dict(('description', 'location', 'device', 'position'), kwargs) super().__init__(**kwargs) - if args_to_set['position'] and len(args_to_set['position']) != 3: - raise ValueError('ElectrodeGroup position argument must have three elements: x, y, z, but received: %s' - % str(args_to_set['position'])) + # position is a compound dataset, i.e., this must be an array with a compound data type of three floats + # or each element in the list must at least have three entries + if args_to_set['position'] is not None and len(args_to_set['position']) > 0: + # If we have a dtype, then check that it is valid + position_dtype_valid = True + if hasattr(args_to_set['position'], 'dtype'): + if len(args_to_set['position'].dtype) != 3: + print("H1", len(args_to_set['position'].dtype)) + position_dtype_valid = False + if position_dtype_valid: + try: + if len(args_to_set['position'][0]) != 3: + position_dtype_valid = False + except TypeError: # len not supported by first_position + position_dtype_valid = False + if not position_dtype_valid: + raise ValueError('ElectrodeGroup position dataset must have three components (x, y, z) ' + 'for each array element, but received: %s' % str(args_to_set['position'])) for key, val in args_to_set.items(): setattr(self, key, val) diff --git a/tests/integration/hdf5/test_ecephys.py b/tests/integration/hdf5/test_ecephys.py index df6e81dfa..805679984 100644 --- a/tests/integration/hdf5/test_ecephys.py +++ b/tests/integration/hdf5/test_ecephys.py @@ -25,7 +25,8 @@ def setUpContainer(self): eg = ElectrodeGroup(name='elec1', description='a test ElectrodeGroup', location='a nonexistent place', - device=self.dev1) + device=self.dev1, + position=[(1., 2., 3.), ]) return eg def addContainer(self, nwbfile): diff --git a/tests/unit/test_ecephys.py b/tests/unit/test_ecephys.py index 26320394b..9b80b0000 100644 --- a/tests/unit/test_ecephys.py +++ b/tests/unit/test_ecephys.py @@ -154,16 +154,23 @@ class ElectrodeGroupConstructor(TestCase): def test_init(self): dev1 = Device('dev1') - group = ElectrodeGroup('elec1', 'electrode description', 'electrode location', dev1, (1, 2, 3)) + group = ElectrodeGroup(name='elec1', + description='electrode description', + location='electrode location', + device=dev1, + position=[(1, 2, 3), ]) self.assertEqual(group.name, 'elec1') self.assertEqual(group.description, 'electrode description') self.assertEqual(group.location, 'electrode location') self.assertEqual(group.device, dev1) - self.assertEqual(group.position, (1, 2, 3)) + self.assertEqual(group.position, [(1, 2, 3), ]) def test_init_position_none(self): dev1 = Device('dev1') - group = ElectrodeGroup('elec1', 'electrode description', 'electrode location', dev1) + group = ElectrodeGroup(name='elec1', + description='electrode description', + location='electrode location', + device=dev1) self.assertEqual(group.name, 'elec1') self.assertEqual(group.description, 'electrode description') self.assertEqual(group.location, 'electrode location') @@ -173,7 +180,29 @@ def test_init_position_none(self): def test_init_position_bad(self): dev1 = Device('dev1') with self.assertRaises(ValueError): - ElectrodeGroup('elec1', 'electrode description', 'electrode location', dev1, (1, 2)) + ElectrodeGroup(name='elec1', + description='electrode description', + location='electrode location', + device=dev1, + position=(1, 2)) + with self.assertRaises(ValueError): + ElectrodeGroup(name='elec1', + description='electrode description', + location='electrode location', + device=dev1, + position=(1, 2, 3)) + with self.assertRaises(ValueError): + ElectrodeGroup(name='elec1', + description='electrode description', + location='electrode location', + device=dev1, + position=[(1, 2), ]) + with self.assertRaises(ValueError): + ElectrodeGroup(name='elec1', + description='electrode description', + location='electrode location', + device=dev1, + position=np.array([(1., 2.)], dtype=np.dtype([('x', float), ('y', float)]))) class EventDetectionConstructor(TestCase): From e031cd997daef3d2908c126030b2eeec9fa8e169 Mon Sep 17 00:00:00 2001 From: Oliver Ruebel Date: Tue, 29 Aug 2023 03:22:10 -0700 Subject: [PATCH 02/15] Update CHANGELOG --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9016dbb2e..5f3cb5454 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # PyNWB Changelog +## PyNWB 2.5.1 (Upcoming) + +### Bug fixes +- Fixed bug in how `ElectrodGroup.__init__` validates its `position` argument. @oruebel [#1770](https://github.com/NeurodataWithoutBorders/pynwb/pull/1770) + + ## PyNWB 2.5.0 (August 18, 2023) ### Enhancements and minor changes From dc8c1c48e1c421ee143c34ea161426db41e1ccfb Mon Sep 17 00:00:00 2001 From: Oliver Ruebel Date: Tue, 29 Aug 2023 03:23:55 -0700 Subject: [PATCH 03/15] Updated comments --- src/pynwb/ecephys.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pynwb/ecephys.py b/src/pynwb/ecephys.py index 95ab1f778..193cc4f43 100644 --- a/src/pynwb/ecephys.py +++ b/src/pynwb/ecephys.py @@ -35,13 +35,12 @@ def __init__(self, **kwargs): # position is a compound dataset, i.e., this must be an array with a compound data type of three floats # or each element in the list must at least have three entries if args_to_set['position'] is not None and len(args_to_set['position']) > 0: - # If we have a dtype, then check that it is valid position_dtype_valid = True - if hasattr(args_to_set['position'], 'dtype'): + if hasattr(args_to_set['position'], 'dtype'): # If we have a dtype, then check that it is valid if len(args_to_set['position'].dtype) != 3: print("H1", len(args_to_set['position'].dtype)) position_dtype_valid = False - if position_dtype_valid: + if position_dtype_valid: # If we have list of element, then check that the elements are of lenght 3 try: if len(args_to_set['position'][0]) != 3: position_dtype_valid = False From 60844f2847e7a5898873b829aaa1ac4fe82a4d57 Mon Sep 17 00:00:00 2001 From: Oliver Ruebel Date: Tue, 29 Aug 2023 04:46:37 -0700 Subject: [PATCH 04/15] Fix spelling in src/pynwb/ecephys.py --- src/pynwb/ecephys.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pynwb/ecephys.py b/src/pynwb/ecephys.py index 193cc4f43..7004b85f3 100644 --- a/src/pynwb/ecephys.py +++ b/src/pynwb/ecephys.py @@ -40,7 +40,7 @@ def __init__(self, **kwargs): if len(args_to_set['position'].dtype) != 3: print("H1", len(args_to_set['position'].dtype)) position_dtype_valid = False - if position_dtype_valid: # If we have list of element, then check that the elements are of lenght 3 + if position_dtype_valid: # If we have list of element, then check that the elements are of length 3 try: if len(args_to_set['position'][0]) != 3: position_dtype_valid = False From a214ad6d4b7be96ad4c8ef6448b4a7e2ce2d6889 Mon Sep 17 00:00:00 2001 From: Oliver Ruebel Date: Wed, 24 Jan 2024 20:41:21 -0800 Subject: [PATCH 05/15] Update src/pynwb/ecephys.py Co-authored-by: Cody Baker <51133164+CodyCBakerPhD@users.noreply.github.com> --- src/pynwb/ecephys.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pynwb/ecephys.py b/src/pynwb/ecephys.py index 7004b85f3..cd268aaa5 100644 --- a/src/pynwb/ecephys.py +++ b/src/pynwb/ecephys.py @@ -38,7 +38,6 @@ def __init__(self, **kwargs): position_dtype_valid = True if hasattr(args_to_set['position'], 'dtype'): # If we have a dtype, then check that it is valid if len(args_to_set['position'].dtype) != 3: - print("H1", len(args_to_set['position'].dtype)) position_dtype_valid = False if position_dtype_valid: # If we have list of element, then check that the elements are of length 3 try: From f4ff6059c0fcb3e14fb8c32b13154d62f830a3d4 Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Tue, 5 Mar 2024 11:22:46 -0800 Subject: [PATCH 06/15] add len check for all position elements --- src/pynwb/ecephys.py | 3 +-- tests/unit/test_ecephys.py | 6 ++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/pynwb/ecephys.py b/src/pynwb/ecephys.py index cd268aaa5..759661435 100644 --- a/src/pynwb/ecephys.py +++ b/src/pynwb/ecephys.py @@ -41,8 +41,7 @@ def __init__(self, **kwargs): position_dtype_valid = False if position_dtype_valid: # If we have list of element, then check that the elements are of length 3 try: - if len(args_to_set['position'][0]) != 3: - position_dtype_valid = False + position_dtype_valid = all([len(pos) == 3 for pos in args_to_set['position']]) except TypeError: # len not supported by first_position position_dtype_valid = False if not position_dtype_valid: diff --git a/tests/unit/test_ecephys.py b/tests/unit/test_ecephys.py index cf967230e..4c6fd5c4c 100644 --- a/tests/unit/test_ecephys.py +++ b/tests/unit/test_ecephys.py @@ -223,6 +223,12 @@ def test_init_position_bad(self): location='electrode location', device=dev1, position=np.array([(1., 2.)], dtype=np.dtype([('x', float), ('y', float)]))) + with self.assertRaises(ValueError): + ElectrodeGroup(name='elec1', + description='electrode description', + location='electrode location', + device=dev1, + position=[(1, 2, 3), (4, 5)]) class EventDetectionConstructor(TestCase): From ecd7de28185b1886abdba839ff474b0a344a2c04 Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Tue, 5 Mar 2024 14:20:13 -0800 Subject: [PATCH 07/15] update CHANGELOG.md --- CHANGELOG.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c05fddfe8..a0a9f0cba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,6 @@ ### Bug fixes - Fixed bug in how `ElectrodeGroup.__init__` validates its `position` argument. @oruebel [#1770](https://github.com/NeurodataWithoutBorders/pynwb/pull/1770) - ## PyNWB 2.6.0 (February 21, 2024) ### Enhancements and minor changes @@ -32,7 +31,6 @@ - Fix internal links in docstrings and tutorials. @stephprince [#1827](https://github.com/NeurodataWithoutBorders/pynwb/pull/1827) - Add Zarr IO tutorial @bendichter [#1834](https://github.com/NeurodataWithoutBorders/pynwb/pull/1834) - ## PyNWB 2.5.0 (August 18, 2023) ### Enhancements and minor changes From a21f672859ba24a3e6a21d3114271d3149408a9e Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Tue, 5 Mar 2024 14:28:36 -0800 Subject: [PATCH 08/15] update docstring to fix broken reference --- src/pynwb/ecephys.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pynwb/ecephys.py b/src/pynwb/ecephys.py index 759661435..f49a4fa09 100644 --- a/src/pynwb/ecephys.py +++ b/src/pynwb/ecephys.py @@ -28,7 +28,7 @@ class ElectrodeGroup(NWBContainer): {'name': 'position', 'type': 'array_data', 'doc': 'Compound dataset with stereotaxic position of this electrode group (x, y, z). ' 'Each element of the data array must have three elements or the dtype of the ' - 'array must be `(float, float, float)', 'default': None}) + 'array must be ``(float, float, float)``', 'default': None}) def __init__(self, **kwargs): args_to_set = popargs_to_dict(('description', 'location', 'device', 'position'), kwargs) super().__init__(**kwargs) From 4ec3b934d7032666fec69993dc532a74d2e9e060 Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Tue, 16 Jul 2024 14:06:57 -0700 Subject: [PATCH 09/15] update CHANGELOG.md --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae01acb2a..af9aa46d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ ### Documentation and tutorial enhancements - Added pre-release pull request instructions to release process documentation @stephprince [#1928](https://github.com/NeurodataWithoutBorders/pynwb/pull/1928) +### Bug fixes +- Fixed bug in how `ElectrodeGroup.__init__` validates its `position` argument. @oruebel [#1770](https://github.com/NeurodataWithoutBorders/pynwb/pull/1770) + ## PyNWB 2.8.1 (July 3, 2024) ### Documentation and tutorial enhancements @@ -42,7 +45,6 @@ - Updated testing to not install in editable mode and not run `coverage` by default. [#1897](https://github.com/NeurodataWithoutBorders/pynwb/pull/1897) ### Bug fixes -- Fixed bug in how `ElectrodeGroup.__init__` validates its `position` argument. @oruebel [#1770](https://github.com/NeurodataWithoutBorders/pynwb/pull/1770) - Fix bug with reading file with linked `TimeSeriesReferenceVectorData` @rly [#1865](https://github.com/NeurodataWithoutBorders/pynwb/pull/1865) - Fix bug where extra keyword arguments could not be passed to `NWBFile.add_{x}_column` for use in custom `VectorData` classes. @rly [#1861](https://github.com/NeurodataWithoutBorders/pynwb/pull/1861) From aecfbc6cb95453585d24e2d0c1b24e05eb2687b4 Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Wed, 17 Jul 2024 00:39:01 -0700 Subject: [PATCH 10/15] update validation checks for scalar compound dataset --- src/pynwb/ecephys.py | 26 +++++++++++++------------- tests/unit/test_ecephys.py | 6 ------ 2 files changed, 13 insertions(+), 19 deletions(-) diff --git a/src/pynwb/ecephys.py b/src/pynwb/ecephys.py index f49a4fa09..09ab355eb 100644 --- a/src/pynwb/ecephys.py +++ b/src/pynwb/ecephys.py @@ -32,21 +32,21 @@ class ElectrodeGroup(NWBContainer): def __init__(self, **kwargs): args_to_set = popargs_to_dict(('description', 'location', 'device', 'position'), kwargs) super().__init__(**kwargs) + # position is a compound dataset, i.e., this must be an array with a compound data type of three floats - # or each element in the list must at least have three entries + # or is a list/tuple of three entries or a list with a single element with three entries if args_to_set['position'] is not None and len(args_to_set['position']) > 0: - position_dtype_valid = True - if hasattr(args_to_set['position'], 'dtype'): # If we have a dtype, then check that it is valid - if len(args_to_set['position'].dtype) != 3: - position_dtype_valid = False - if position_dtype_valid: # If we have list of element, then check that the elements are of length 3 - try: - position_dtype_valid = all([len(pos) == 3 for pos in args_to_set['position']]) - except TypeError: # len not supported by first_position - position_dtype_valid = False - if not position_dtype_valid: - raise ValueError('ElectrodeGroup position dataset must have three components (x, y, z) ' - 'for each array element, but received: %s' % str(args_to_set['position'])) + # If we have a dtype, then check that it is valid length + is_valid_dtype = not hasattr(args_to_set['position'], 'dtype') or len(args_to_set['position'].dtype) == 3 + + # check data is a valid shape + is_valid_shape = len(args_to_set['position']) == 3 or \ + (len(args_to_set['position']) == 1 and len(args_to_set['position'][0]) == 3) + + if not is_valid_dtype or not is_valid_shape: + raise ValueError('ElectrodeGroup position dataset must have three components (x, y, z) or [(x, y, z)] ' + 'but received: %s' % str(args_to_set['position'])) + for key, val in args_to_set.items(): setattr(self, key, val) diff --git a/tests/unit/test_ecephys.py b/tests/unit/test_ecephys.py index 45545b33e..4dc93c04a 100644 --- a/tests/unit/test_ecephys.py +++ b/tests/unit/test_ecephys.py @@ -209,12 +209,6 @@ def test_init_position_bad(self): location='electrode location', device=dev1, position=(1, 2)) - with self.assertRaises(ValueError): - ElectrodeGroup(name='elec1', - description='electrode description', - location='electrode location', - device=dev1, - position=(1, 2, 3)) with self.assertRaises(ValueError): ElectrodeGroup(name='elec1', description='electrode description', From 33110b7bad16ee65611c38aa70cc76c23c24b134 Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Wed, 4 Sep 2024 00:33:21 -0700 Subject: [PATCH 11/15] update position validation --- src/pynwb/ecephys.py | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/src/pynwb/ecephys.py b/src/pynwb/ecephys.py index 09ab355eb..e6dadbe97 100644 --- a/src/pynwb/ecephys.py +++ b/src/pynwb/ecephys.py @@ -1,4 +1,5 @@ import warnings +import numpy as np from collections.abc import Iterable from hdmf.common import DynamicTableRegion @@ -27,25 +28,29 @@ class ElectrodeGroup(NWBContainer): {'name': 'device', 'type': Device, 'doc': 'the device that was used to record from this electrode group'}, {'name': 'position', 'type': 'array_data', 'doc': 'Compound dataset with stereotaxic position of this electrode group (x, y, z). ' - 'Each element of the data array must have three elements or the dtype of the ' + 'The data array must have three elements or the dtype of the ' 'array must be ``(float, float, float)``', 'default': None}) def __init__(self, **kwargs): args_to_set = popargs_to_dict(('description', 'location', 'device', 'position'), kwargs) super().__init__(**kwargs) - # position is a compound dataset, i.e., this must be an array with a compound data type of three floats - # or is a list/tuple of three entries or a list with a single element with three entries - if args_to_set['position'] is not None and len(args_to_set['position']) > 0: - # If we have a dtype, then check that it is valid length - is_valid_dtype = not hasattr(args_to_set['position'], 'dtype') or len(args_to_set['position'].dtype) == 3 - - # check data is a valid shape - is_valid_shape = len(args_to_set['position']) == 3 or \ - (len(args_to_set['position']) == 1 and len(args_to_set['position'][0]) == 3) - - if not is_valid_dtype or not is_valid_shape: - raise ValueError('ElectrodeGroup position dataset must have three components (x, y, z) or [(x, y, z)] ' - 'but received: %s' % str(args_to_set['position'])) + # position is a compound dataset, i.e., this must be a scalar with a + # compound data type of three floats or a list/tuple of three entries + position = args_to_set['position'] + if position: + # check position argument is valid + position_dtype_invalid = ( + (hasattr(position, 'dtype') and len(position.dtype) != 3) or + (not hasattr(position, 'dtype') and len(position) != 3) or + (len(np.shape(position)) > 1) + ) + if position_dtype_invalid: + raise ValueError(f"ElectrodeGroup position argument must have three elements: x, y, z," + f"but received: {position}") + + # convert position to scalar with compound data type if needed + if not hasattr(position, 'dtype'): + args_to_set['position'] = np.array(tuple(position), dtype=[('x', float), ('y', float), ('z', float)]) for key, val in args_to_set.items(): setattr(self, key, val) From 33d34d042aa71a57282dc15933d4df1c742397ec Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Wed, 4 Sep 2024 00:34:27 -0700 Subject: [PATCH 12/15] update tests for electrode group validation --- tests/integration/hdf5/test_ecephys.py | 2 +- tests/unit/test_ecephys.py | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/tests/integration/hdf5/test_ecephys.py b/tests/integration/hdf5/test_ecephys.py index 3dad4f37d..c44725277 100644 --- a/tests/integration/hdf5/test_ecephys.py +++ b/tests/integration/hdf5/test_ecephys.py @@ -27,7 +27,7 @@ def setUpContainer(self): description='a test ElectrodeGroup', location='a nonexistent place', device=self.dev1, - position=[(1., 2., 3.), ]) + position=(1., 2., 3.)) return eg def addContainer(self, nwbfile): diff --git a/tests/unit/test_ecephys.py b/tests/unit/test_ecephys.py index 4dc93c04a..1415c3d30 100644 --- a/tests/unit/test_ecephys.py +++ b/tests/unit/test_ecephys.py @@ -182,12 +182,23 @@ def test_init(self): description='electrode description', location='electrode location', device=dev1, - position=[(1, 2, 3), ]) + position=(1, 2, 3)) self.assertEqual(group.name, 'elec1') self.assertEqual(group.description, 'electrode description') self.assertEqual(group.location, 'electrode location') self.assertEqual(group.device, dev1) - self.assertEqual(group.position, [(1, 2, 3), ]) + self.assertEqual(group.position.tolist(), (1, 2, 3)) + + def test_init_position_array(self): + position = np.array((1, 2, 3), dtype=np.dtype([('x', float), ('y', float), ('z', float)])) + dev1 = Device('dev1') + group = ElectrodeGroup('elec1', 'electrode description', 'electrode location', dev1, + position) + self.assertEqual(group.name, 'elec1') + self.assertEqual(group.description, 'electrode description') + self.assertEqual(group.location, 'electrode location') + self.assertEqual(group.device, dev1) + self.assertEqual(group.position, position) def test_init_position_none(self): dev1 = Device('dev1') @@ -226,7 +237,7 @@ def test_init_position_bad(self): description='electrode description', location='electrode location', device=dev1, - position=[(1, 2, 3), (4, 5)]) + position=[(1, 2, 3), (4, 5, 6), (7, 8, 9)]) class EventDetectionConstructor(TestCase): From 5419275f895cb1d6880f65333fba8eea547367d8 Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Thu, 10 Oct 2024 09:36:01 -0700 Subject: [PATCH 13/15] Require hdmf 3.14.5 --- pyproject.toml | 2 +- requirements-min.txt | 2 +- requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3ab85a4ae..94a8bf162 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,7 @@ classifiers = [ ] dependencies = [ "h5py>=2.10", - "hdmf>=3.14.3", + "hdmf>=3.14.5", "numpy>=1.18", "pandas>=1.1.5", "python-dateutil>=2.7.3", diff --git a/requirements-min.txt b/requirements-min.txt index eef051b25..feed604bc 100644 --- a/requirements-min.txt +++ b/requirements-min.txt @@ -1,6 +1,6 @@ # minimum versions of package dependencies for installing PyNWB h5py==2.10 # support for selection of datasets with list of indices added in 2.10 -hdmf==3.14.3 +hdmf==3.14.5 numpy==1.18 pandas==1.1.5 python-dateutil==2.7.3 diff --git a/requirements.txt b/requirements.txt index 27716cf5a..2b82c97f6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ # pinned dependencies to reproduce an entire development environment to use PyNWB h5py==3.11.0 -hdmf==3.14.3 +hdmf==3.14.5 numpy==2.1.1 pandas==2.2.2 python-dateutil==2.9.0.post0 From b11ff878a09e9f6bb9e22c67406a8a25eedb5561 Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Thu, 10 Oct 2024 10:05:27 -0700 Subject: [PATCH 14/15] Try removing deprecated call to get_html_theme_path --- docs/source/conf.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 4eaf1a19b..eabca22c7 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -244,7 +244,6 @@ def __call__(self, filename): # html_theme = 'default' # html_theme = "sphinxdoc" html_theme = "sphinx_rtd_theme" -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the @@ -260,9 +259,6 @@ def __call__(self, filename): 'css/custom.css', ] -# Add any paths that contain custom themes here, relative to this directory. -# html_theme_path = [] - # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". # html_title = None From 3fe93ebeffec5019b588a2dcb957f5e729f95700 Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Mon, 14 Oct 2024 12:50:14 -0700 Subject: [PATCH 15/15] Update CHANGELOG.md --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 51e22ee1a..16e504659 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ ### Performance - Cache global type map to speed import 3X. @sneakers-the-rat [#1931](https://github.com/NeurodataWithoutBorders/pynwb/pull/1931) +### Bug fixes +- Fixed bug in how `ElectrodeGroup.__init__` validates its `position` argument. @oruebel [#1770](https://github.com/NeurodataWithoutBorders/pynwb/pull/1770) + ## PyNWB 2.8.2 (September 9, 2024) ### Enhancements and minor changes @@ -20,9 +23,6 @@ - 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) -### Bug fixes -- Fixed bug in how `ElectrodeGroup.__init__` validates its `position` argument. @oruebel [#1770](https://github.com/NeurodataWithoutBorders/pynwb/pull/1770) - ## PyNWB 2.8.1 (July 3, 2024) ### Documentation and tutorial enhancements