Skip to content

BIDSDataGrabber doesn't populate outputspec when outfields is defined #2333

Closed
@mvdoc

Description

@mvdoc

Summary

When defining custom fields BIDSDataGrabber doesn't add the corresponding traits to output_spec, so it's not possible to link nodes in a workflow.

Actual behavior

In [1]: from nipype.interfaces.bids_utils import BIDSDataGrabber

In [2]: bg = BIDSDataGrabber(infields=['infield1', 'infield2'], outfields=['outfield1', 'outfield2'])

In [3]: bg._outputs()
Out[3]: 

Expected behavior

In [1]: from nipype.interfaces.bids_utils import BIDSDataGrabber

In [2]: bg = BIDSDataGrabber(infields=['infield1', 'infield2'], outfields=['outfield1', 'outfield2'])

In [3]: bg._outputs()
Out[3]: 

outfield1 = <undefined>
outfield2 = <undefined>

I started working on a fix for this, and it seems to me that perhaps subclassing IOBase instead of BaseInterface might be a solution. But I was wondering what you think it would be better.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions