Skip to content

Commit fa6b558

Browse files
committed
temporarily disabled write support in NSDFIO, pending an update to support Group, ChannelView in place of ChannelIndex
In any case, the released version of the nsdf Python package does not yet support Python 3.
1 parent 93b1ce7 commit fa6b558

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

neo/io/nsdfio.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ class NSDFIO(BaseIO):
3636
It supports reading and writing: Block, Segment, AnalogSignal, ChannelIndex, with all relationships and metadata.
3737
"""
3838
is_readable = True
39-
is_writable = True
39+
is_writable = False # True - disabled pending update to Neo 0.9 API
4040

4141
supported_objects = [Block, Segment, AnalogSignal, ChannelIndex]
4242

4343
readable_objects = [Block, Segment]
44-
writeable_objects = [Block, Segment]
44+
writeable_objects = [] # [Block, Segment] - disabled pending update to Neo 0.9 API
4545

4646
has_header = False
4747
is_streameable = False
@@ -74,6 +74,7 @@ def write_all_blocks(self, blocks):
7474
7575
:param blocks: List of blocks to be written
7676
"""
77+
raise NotImplementedError("Implementation not yet updated for Neo 0.9")
7778
writer = self._init_writing()
7879
neo_model, blocks_model, segments_model = self._prepare_model_tree(writer)
7980

@@ -90,6 +91,7 @@ def write_block(self, block=None, name='0', writer=None, parent=None):
9091
:param writer: NSDFWriter instance (optional)
9192
:param parent: NSDF ModelComponent which will be the parent of block NSDF representation (optional)
9293
"""
94+
raise NotImplementedError("Implementation not yet updated for Neo 0.9")
9395
if not isinstance(block, Block):
9496
raise ValueError("Must provide a Block to write.")
9597

@@ -132,6 +134,7 @@ def write_segment(self, segment=None, name='0', writer=None, parent=None):
132134
:param writer: NSDFWriter instance (optional)
133135
:param parent: NSDF ModelComponent which will be the parent of segment NSDF representation (optional)
134136
"""
137+
raise NotImplementedError("Implementation not yet updated for Neo 0.9")
135138
if not isinstance(segment, Segment):
136139
raise ValueError("Must provide a Segment to write.")
137140

@@ -170,6 +173,7 @@ def write_analogsignal(self, signal, name, writer, parent):
170173
:param writer: NSDFWriter instance
171174
:param parent: NSDF ModelComponent which will be the parent of signal NSDF representation
172175
"""
176+
raise NotImplementedError("Implementation not yet updated for Neo 0.9")
173177
uid = uuid1().hex
174178
model = nsdf.ModelComponent(name, uid=uid, parent=parent)
175179

@@ -200,6 +204,7 @@ def write_channelindex(self, channelindex, name, writer, parent):
200204
:param writer: NSDFWriter instance
201205
:param parent: NSDF ModelComponent which will be the parent of channelindex NSDF representation
202206
"""
207+
raise NotImplementedError("Implementation not yet updated for Neo 0.9")
203208
uid = uuid1().hex
204209
model = nsdf.ModelComponent(name, uid=uid, parent=parent)
205210

0 commit comments

Comments
 (0)