Skip to content

Commit 68c4f56

Browse files
authored
Release 2.5.0/ Update ExternalResources to HERD (#1754)
* Update ExternalResources to HERD * Update setup.py * Update requirements.txt * Update requirements-min.txt * Update environment-ros3.yml * Update CHANGELOG.md * Update environment-ros3.yml * Update run_tests.yml * Update run_all_tests.yml * Update run_tests.yml * Update run_all_tests.yml * Update run_all_tests.yml * Update run_tests.yml
1 parent 8eb9a36 commit 68c4f56

File tree

11 files changed

+31
-18
lines changed

11 files changed

+31
-18
lines changed

.github/workflows/run_all_tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ jobs:
108108
- uses: actions/checkout@v3
109109
with:
110110
submodules: 'recursive'
111+
fetch-depth: 0 # tags are required for versioneer to determine the version
111112

112113
- name: Set up Python
113114
uses: actions/setup-python@v4
@@ -151,6 +152,7 @@ jobs:
151152
- uses: actions/checkout@v3
152153
with:
153154
submodules: 'recursive'
155+
fetch-depth: 0 # tags are required for versioneer to determine the version
154156

155157
- name: Set up Conda
156158
uses: conda-incubator/setup-miniconda@v2
@@ -207,6 +209,7 @@ jobs:
207209
- uses: actions/checkout@v3
208210
with:
209211
submodules: 'recursive'
212+
fetch-depth: 0 # tags are required for versioneer to determine the version
210213

211214
- name: Set up Conda
212215
uses: conda-incubator/setup-miniconda@v2
@@ -253,6 +256,7 @@ jobs:
253256
- uses: actions/checkout@v3
254257
with:
255258
submodules: 'recursive'
259+
fetch-depth: 0 # tags are required for versioneer to determine the version
256260

257261
- name: Set up Conda
258262
uses: conda-incubator/setup-miniconda@v2
@@ -278,4 +282,4 @@ jobs:
278282
279283
- name: Run gallery ros3 tests
280284
run: |
281-
python test.py --example-ros3
285+
python test.py --example-ros3

.github/workflows/run_tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ jobs:
9292
- uses: actions/checkout@v3
9393
with:
9494
submodules: 'recursive'
95+
fetch-depth: 0 # tags are required for versioneer to determine the version
9596

9697
- name: Set up Python
9798
uses: actions/setup-python@v4
@@ -184,6 +185,7 @@ jobs:
184185
- uses: actions/checkout@v3
185186
with:
186187
submodules: 'recursive'
188+
fetch-depth: 0 # tags are required for versioneer to determine the version
187189

188190
- name: Set up Conda
189191
uses: conda-incubator/setup-miniconda@v2
@@ -228,6 +230,7 @@ jobs:
228230
- uses: actions/checkout@v3
229231
with:
230232
submodules: 'recursive'
233+
fetch-depth: 0 # tags are required for versioneer to determine the version
231234

232235
- name: Set up Conda
233236
uses: conda-incubator/setup-miniconda@v2
@@ -271,6 +274,7 @@ jobs:
271274
uses: actions/checkout@v3
272275
with:
273276
submodules: 'recursive'
277+
fetch-depth: 0 # tags are required for versioneer to determine the version
274278

275279
- name: Set up Python
276280
uses: actions/setup-python@v4

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
# PyNWB Changelog
22

3-
## PyNWB 2.5.0 (Upcoming)
3+
## PyNWB 2.5.0 (August 18, 2023)
44

55
### Enhancements and minor changes
66
- Add `TimeSeries.get_timestamps()`. @bendichter [#1741](https://github.com/NeurodataWithoutBorders/pynwb/pull/1741)
77
- Add `TimeSeries.get_data_in_units()`. @bendichter [#1745](https://github.com/NeurodataWithoutBorders/pynwb/pull/1745)
8+
- Updated `ExternalResources` name change to `HERD`, along with HDMF 3.9.0 being the new minimum. @mavaylon1 [#1754](https://github.com/NeurodataWithoutBorders/pynwb/pull/1754)
89

910
### Documentation and tutorial enhancements
1011
- Updated streaming tutorial to ensure code is run on tests and clarify text. @bendichter [#1760](https://github.com/NeurodataWithoutBorders/pynwb/pull/1760) @oruebel [#1762](https://github.com/NeurodataWithoutBorders/pynwb/pull/1762)

environment-ros3.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ dependencies:
1515
- dandi==0.55.1 # NOTE: dandi does not support osx-arm64
1616
- fsspec==2023.6.0
1717
- requests==2.28.1
18-
- aiohttp==3.8.3
18+
- aiohttp==3.8.3

requirements-min.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# minimum versions of package dependencies for installing PyNWB
22
h5py==2.10 # support for selection of datasets with list of indices added in 2.10
3-
hdmf==3.8.0
3+
hdmf==3.9.0
44
numpy==1.18
55
pandas==1.1.5
66
python-dateutil==2.7.3

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# pinned dependencies to reproduce an entire development environment to use PyNWB
22
h5py==3.8.0
3-
hdmf==3.8.0
3+
hdmf==3.9.0
44
numpy==1.24.2
55
pandas==2.0.0
66
python-dateutil==2.8.2

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
reqs = [
2222
'h5py>=2.10',
23-
'hdmf>=3.8.0',
23+
'hdmf>=3.9.0',
2424
'numpy>=1.16',
2525
'pandas>=1.1.5',
2626
'python-dateutil>=2.7.3',

src/pynwb/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,12 @@ class NWBHDF5IO(_HDF5IO):
216216
{'name': 'comm', 'type': "Intracomm", 'doc': 'the MPI communicator to use for parallel I/O',
217217
'default': None},
218218
{'name': 'driver', 'type': str, 'doc': 'driver for h5py to use when opening HDF5 file', 'default': None},
219-
{'name': 'external_resources_path', 'type': str, 'doc': 'The path to the ExternalResources',
219+
{'name': 'herd_path', 'type': str, 'doc': 'The path to the HERD',
220220
'default': None},)
221221
def __init__(self, **kwargs):
222-
path, mode, manager, extensions, load_namespaces, file_obj, comm, driver, external_resources_path =\
222+
path, mode, manager, extensions, load_namespaces, file_obj, comm, driver, herd_path =\
223223
popargs('path', 'mode', 'manager', 'extensions', 'load_namespaces',
224-
'file', 'comm', 'driver', 'external_resources_path', kwargs)
224+
'file', 'comm', 'driver', 'herd_path', kwargs)
225225
# Define the BuildManager to use
226226
if load_namespaces:
227227
if manager is not None:
@@ -251,7 +251,7 @@ def __init__(self, **kwargs):
251251
manager = get_manager()
252252
# Open the file
253253
super().__init__(path, manager=manager, mode=mode, file=file_obj, comm=comm,
254-
driver=driver, external_resources_path=external_resources_path)
254+
driver=driver, herd_path=herd_path)
255255

256256
@property
257257
def nwb_version(self):

src/pynwb/file.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import pandas as pd
99

1010
from hdmf.common import DynamicTableRegion, DynamicTable
11-
from hdmf.container import ExternalResourcesManager
11+
from hdmf.container import HERDManager
1212
from hdmf.utils import docval, getargs, get_docval, popargs, popargs_to_dict, AllowPositional
1313

1414
from . import register_class, CORE_NAMESPACE
@@ -150,7 +150,7 @@ def __init__(self, **kwargs):
150150

151151

152152
@register_class('NWBFile', CORE_NAMESPACE)
153-
class NWBFile(MultiContainerInterface, ExternalResourcesManager):
153+
class NWBFile(MultiContainerInterface, HERDManager):
154154
"""
155155
A representation of an NWB file.
156156
"""

src/pynwb/resources.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1-
from hdmf.common import ExternalResources as hdmf_ExternalResources
1+
from hdmf.common import HERD as hdmf_HERD
22
from . import get_type_map as tm
33
from hdmf.utils import docval, get_docval
44

55

6-
class ExternalResources(hdmf_ExternalResources):
7-
@docval(*get_docval(hdmf_ExternalResources.__init__))
6+
class HERD(hdmf_HERD):
7+
"""
8+
HDMF External Resources Data Structure.
9+
A table for mapping user terms (i.e. keys) to resource entities.
10+
"""
11+
@docval(*get_docval(hdmf_HERD.__init__))
812
def __init__(self, **kwargs):
913
kwargs['type_map'] = tm()
1014
super().__init__(**kwargs)

0 commit comments

Comments
 (0)