Skip to content

Commit d2581de

Browse files
authored
Add 'target_tables' kwarg to DynamicTable subclasses
1 parent 7a38529 commit d2581de

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

src/pynwb/epoch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class TimeIntervals(DynamicTable):
2828
@docval({'name': 'name', 'type': str, 'doc': 'name of this TimeIntervals'}, # required
2929
{'name': 'description', 'type': str, 'doc': 'Description of this TimeIntervals',
3030
'default': "experimental intervals"},
31-
*get_docval(DynamicTable.__init__, 'id', 'columns', 'colnames'),
31+
*get_docval(DynamicTable.__init__, 'id', 'columns', 'colnames', 'target_tables'),
3232
allow_positional=AllowPositional.WARNING,)
3333
def __init__(self, **kwargs):
3434
super().__init__(**kwargs)

src/pynwb/icephys.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ class IntracellularElectrodesTable(DynamicTable):
422422
'table': False},
423423
)
424424

425-
@docval(*get_docval(DynamicTable.__init__, 'id', 'columns', 'colnames'),
425+
@docval(*get_docval(DynamicTable.__init__, 'id', 'columns', 'colnames', 'target_tables'),
426426
allow_positional=AllowPositional.WARNING,)
427427
def __init__(self, **kwargs):
428428
# Define defaultb name and description settings
@@ -452,7 +452,7 @@ class IntracellularStimuliTable(DynamicTable):
452452
'class': TimeSeriesReferenceVectorData},
453453
)
454454

455-
@docval(*get_docval(DynamicTable.__init__, 'id', 'columns', 'colnames'),
455+
@docval(*get_docval(DynamicTable.__init__, 'id', 'columns', 'colnames', 'target_tables'),
456456
allow_positional=AllowPositional.WARNING,)
457457
def __init__(self, **kwargs):
458458
# Define defaultb name and description settings
@@ -476,7 +476,7 @@ class IntracellularResponsesTable(DynamicTable):
476476
'class': TimeSeriesReferenceVectorData},
477477
)
478478

479-
@docval(*get_docval(DynamicTable.__init__, 'id', 'columns', 'colnames'),
479+
@docval(*get_docval(DynamicTable.__init__, 'id', 'columns', 'colnames', 'target_tables'),
480480
allow_positional=AllowPositional.WARNING,)
481481
def __init__(self, **kwargs):
482482
# Define defaultb name and description settings
@@ -493,7 +493,8 @@ class IntracellularRecordingsTable(AlignedDynamicTable):
493493
a single simultaneous_recording. Each row in the table represents a single recording consisting
494494
typically of a stimulus and a corresponding response.
495495
"""
496-
@docval(*get_docval(AlignedDynamicTable.__init__, 'id', 'columns', 'colnames', 'category_tables', 'categories'),
496+
@docval(*get_docval(AlignedDynamicTable.__init__, 'id', 'columns', 'colnames',
497+
'category_tables', 'categories', 'target_tables'),
497498
allow_positional=AllowPositional.WARNING,)
498499
def __init__(self, **kwargs):
499500
kwargs['name'] = 'intracellular_recordings'
@@ -782,7 +783,7 @@ class SimultaneousRecordingsTable(DynamicTable):
782783
'reading the Container from file as the table attribute is already populated in this case '
783784
'but otherwise this is required.',
784785
'default': None},
785-
*get_docval(DynamicTable.__init__, 'id', 'columns', 'colnames'),
786+
*get_docval(DynamicTable.__init__, 'id', 'columns', 'colnames', 'target_tables'),
786787
allow_positional=AllowPositional.WARNING,)
787788
def __init__(self, **kwargs):
788789
intracellular_recordings_table = popargs('intracellular_recordings_table', kwargs)
@@ -842,7 +843,7 @@ class SequentialRecordingsTable(DynamicTable):
842843
'column indexes. May be None when reading the Container from file as the '
843844
'table attribute is already populated in this case but otherwise this is required.',
844845
'default': None},
845-
*get_docval(DynamicTable.__init__, 'id', 'columns', 'colnames'),
846+
*get_docval(DynamicTable.__init__, 'id', 'columns', 'colnames', 'target_tables'),
846847
allow_positional=AllowPositional.WARNING,)
847848
def __init__(self, **kwargs):
848849
simultaneous_recordings_table = popargs('simultaneous_recordings_table', kwargs)
@@ -900,7 +901,7 @@ class RepetitionsTable(DynamicTable):
900901
'be None when reading the Container from file as the table attribute is already populated '
901902
'in this case but otherwise this is required.',
902903
'default': None},
903-
*get_docval(DynamicTable.__init__, 'id', 'columns', 'colnames'),
904+
*get_docval(DynamicTable.__init__, 'id', 'columns', 'colnames', 'target_tables'),
904905
allow_positional=AllowPositional.WARNING,)
905906
def __init__(self, **kwargs):
906907
sequential_recordings_table = popargs('sequential_recordings_table', kwargs)
@@ -953,7 +954,7 @@ class ExperimentalConditionsTable(DynamicTable):
953954
'type': RepetitionsTable,
954955
'doc': 'the RepetitionsTable table that the repetitions column indexes',
955956
'default': None},
956-
*get_docval(DynamicTable.__init__, 'id', 'columns', 'colnames'),
957+
*get_docval(DynamicTable.__init__, 'id', 'columns', 'colnames', 'target_tables'),
957958
allow_positional=AllowPositional.WARNING,)
958959
def __init__(self, **kwargs):
959960
repetitions_table = popargs('repetitions_table', kwargs)

src/pynwb/misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class Units(DynamicTable):
165165
)
166166

167167
@docval({'name': 'name', 'type': str, 'doc': 'Name of this Units interface', 'default': 'Units'},
168-
*get_docval(DynamicTable.__init__, 'id', 'columns', 'colnames'),
168+
*get_docval(DynamicTable.__init__, 'id', 'columns', 'colnames', 'target_tables'),
169169
{'name': 'description', 'type': str, 'doc': 'a description of what is in this table', 'default': None},
170170
{'name': 'electrode_table', 'type': DynamicTable,
171171
'doc': 'the table that the *electrodes* column indexes', 'default': None},

src/pynwb/ophys.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ class PlaneSegmentation(DynamicTable):
331331
{'name': 'name', 'type': str, 'doc': 'name of PlaneSegmentation.', 'default': None},
332332
{'name': 'reference_images', 'type': (ImageSeries, list, dict, tuple), 'default': None,
333333
'doc': 'One or more image stacks that the masks apply to (can be oneelement stack).'},
334-
*get_docval(DynamicTable.__init__, 'id', 'columns', 'colnames'),
334+
*get_docval(DynamicTable.__init__, 'id', 'columns', 'colnames', 'target_tables'),
335335
allow_positional=AllowPositional.WARNING,)
336336
def __init__(self, **kwargs):
337337
imaging_plane, reference_images = popargs('imaging_plane', 'reference_images', kwargs)

0 commit comments

Comments
 (0)