Skip to content

Commit b6b6930

Browse files
authored
Remove NwbImageSeries type (#2)
1 parent c93c2ef commit b6b6930

File tree

10 files changed

+27
-141
lines changed

10 files changed

+27
-141
lines changed

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,4 @@ Representation of CameraDevice object in NWB <br>
8585
**lens** `string`: info about lens in this camera <br>
8686
**camera_name** `string`: name of this camera <br>
8787

88-
#### NbwTimeSeries
89-
Extension of ImageSeries object in NWB <br>
90-
**Attributes:** <br>
91-
**devices** `list of Device`: devices used to record video <br>
92-
9388
This extension was created using [ndx-template](https://github.com/nwb-extensions/ndx-template).

requirements.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
hdmf_docutils
2-
hdmf
3-
pynwb
1+
# pinned dependencies to reproduce a working development environment
2+
hdmf_docutils==0.4.4
3+
hdmf==3.1.1
4+
pynwb==2.0.0

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
'url': '',
3535
'license': 'BSD 3-Clause',
3636
'install_requires': [
37-
'pynwb'
37+
'hdmf>=3.1.1,<4',
38+
'pynwb>=2.0.0,<3'
3839
],
3940
'packages': find_packages('src/pynwb'),
4041
'package_dir': {'': 'src/pynwb'},

spec/ndx-franklab-novela.extensions.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,6 @@ groups:
8181
- name: lens
8282
dtype: text
8383
doc: lens info
84-
- neurodata_type_def: NwbImageSeries
85-
neurodata_type_inc: ImageSeries
86-
doc: Extension of ImageSeries object in NWB
87-
groups:
88-
- neurodata_type_inc: Device
89-
doc: devices used to record video
90-
quantity: '*'
9184
- neurodata_type_def: HeaderDevice
9285
neurodata_type_inc: Device
9386
doc: metadata from global configuration from header
Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
namespaces:
22
- author:
33
- NovelaDevops
4+
- Loren Frank
5+
- Eric Denovellis
6+
- Ryan Ly
47
contact:
58
6-
doc: NovelaNeurotechnologies Namespaces
9+
10+
11+
12+
doc: NWB extension to store additional metadata and data types for Loren Frank's
13+
Lab
714
name: ndx-franklab-novela
815
schema:
916
- namespace: core
1017
neurodata_types:
1118
- ElectrodeGroup
1219
- Device
1320
- NWBDataInterface
14-
- ImageSeries
1521
- source: ndx-franklab-novela.extensions.yaml
16-
version: 0.0.011.36
22+
version: 0.1.0

src/pynwb/ndx_franklab_novela/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,4 @@
2828
from .data_acq_device import DataAcqDevice
2929
from .header_device import HeaderDevice
3030
from .nwb_electrode_group import NwbElectrodeGroup
31-
from .nwb_image_series import NwbImageSeries
3231
from .probe import Probe, Shank, ShanksElectrode

src/pynwb/ndx_franklab_novela/nwb_image_series.py

Lines changed: 0 additions & 31 deletions
This file was deleted.

src/pynwb/tests/test_nwbImageSeries.py

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/pynwb/tests/test_read_nwb.py

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@
55
from dateutil.tz import tzlocal
66
from pynwb import NWBFile
77
from pynwb import NWBHDF5IO, ProcessingModule
8-
from pynwb.behavior import BehavioralEvents
98
from pynwb.device import Device
109
from pynwb.testing import TestCase
1110

1211
from src.pynwb.ndx_franklab_novela import CameraDevice, AssociatedFiles
1312
from src.pynwb.ndx_franklab_novela import DataAcqDevice
1413
from src.pynwb.ndx_franklab_novela import HeaderDevice
1514
from src.pynwb.ndx_franklab_novela import NwbElectrodeGroup
16-
from src.pynwb.ndx_franklab_novela import NwbImageSeries
1715
from src.pynwb.ndx_franklab_novela import Probe, Shank, ShanksElectrode
1816

1917

@@ -140,43 +138,6 @@ def test_read_nwb_camera_device_successfully(self):
140138

141139
self.delete_nwb('camera_device')
142140

143-
def test_read_nwb_nwb_image_series_successfully(self):
144-
device_1 = Device('device1')
145-
device_2 = Device('device2')
146-
mock_timestamps = [1, 2, 3]
147-
mock_external_file = ['some file']
148-
149-
nwb_image_series = NwbImageSeries(
150-
name='NwbImageSeries1',
151-
timestamps=mock_timestamps,
152-
external_file=mock_external_file,
153-
devices=[device_1, device_2]
154-
)
155-
156-
behavioral_time_series = BehavioralEvents(name="BehavioralTimeSeries")
157-
behavioral_time_series.add_timeseries(nwb_image_series)
158-
processing_module = ProcessingModule(name='ProcessingModule', description='')
159-
processing_module.add_data_interface(behavioral_time_series)
160-
self.nwb_file_content.add_processing_module(processing_module)
161-
162-
self.nwb_file_content.add_stimulus_template(nwb_image_series)
163-
164-
nwb_file_handler = NWBHDF5IO('nwb_image_series.nwb', mode='w')
165-
nwb_file_handler.write(self.nwb_file_content)
166-
nwb_file_handler.close()
167-
168-
self.assertTrue(os.path.exists('nwb_image_series.nwb'))
169-
with pynwb.NWBHDF5IO('nwb_image_series.nwb', 'r', load_namespaces=True) as nwb_file_handler:
170-
nwb_file = nwb_file_handler.read()
171-
self.assertContainerEqual(nwb_file.stimulus_template['NwbImageSeries1'], nwb_image_series)
172-
self.assertContainerEqual(
173-
nwb_file.processing['ProcessingModule'].data_interfaces['BehavioralTimeSeries'].
174-
time_series['NwbImageSeries1'],
175-
nwb_image_series
176-
)
177-
178-
self.delete_nwb('nwb_image_series')
179-
180141
def test_read_nwb_nwb_electrode_group_successfully(self):
181142
device = Device('device_0')
182143
self.nwb_file_content.add_device(device)

src/spec/create_extension_spec.py

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@
88
def main():
99
# these arguments were auto-generated from your cookiecutter inputs
1010
ns_builder = NWBNamespaceBuilder(
11-
doc="""NovelaNeurotechnologies Namespaces""",
11+
doc="""NWB extension to store additional metadata and data types for Loren Frank's Lab""",
1212
name="""ndx-franklab-novela""",
13-
14-
version="""0.0.011.36""",
15-
16-
author=list(map(str.strip, """NovelaDevops""".split(','))),
17-
contact=list(map(str.strip, """[email protected]""".split(',')))
13+
version="""0.1.0""",
14+
author=["NovelaDevops", "Loren Frank", "Eric Denovellis", "Ryan Ly"],
15+
1816
)
1917

2018
# # as in which namespace they are found
@@ -23,7 +21,6 @@ def main():
2321
ns_builder.include_type('ElectrodeGroup', namespace='core')
2422
ns_builder.include_type('Device', namespace='core')
2523
ns_builder.include_type('NWBDataInterface', namespace='core')
26-
ns_builder.include_type('ImageSeries', namespace='core')
2724

2825
# see https://pynwb.readthedocs.io/en/latest/extensions.html#extending-nwb
2926
# for more information
@@ -195,19 +192,6 @@ def main():
195192
]
196193
)
197194

198-
nwb_image_series = NWBGroupSpec(
199-
neurodata_type_def='NwbImageSeries',
200-
neurodata_type_inc='ImageSeries',
201-
doc='Extension of ImageSeries object in NWB',
202-
groups=[
203-
NWBGroupSpec(
204-
neurodata_type_inc='Device',
205-
doc='devices used to record video',
206-
quantity='*'
207-
)
208-
],
209-
)
210-
211195
header_device = NWBGroupSpec(
212196
doc='metadata from global configuration from header',
213197
neurodata_type_def='HeaderDevice',
@@ -350,7 +334,14 @@ def main():
350334
)
351335

352336
new_data_types = [
353-
shanks_electrode, shanks, probe, data_acq_device, camera_device, nwb_image_series, header_device, associated_files, nwb_electrode_group
337+
shanks_electrode,
338+
shanks,
339+
probe,
340+
data_acq_device,
341+
camera_device,
342+
header_device,
343+
associated_files,
344+
nwb_electrode_group
354345
]
355346

356347
# export the spec to yaml files in the spec folder

0 commit comments

Comments
 (0)