Skip to content

Improved alternate DataGrabber interface #623

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Aug 10, 2013

Conversation

mwaskom
Copy link
Member

@mwaskom mwaskom commented Aug 6, 2013

This alternate approach to the DataGrabber uses the {}-based string format syntax instead of the %-based syntax of the previous version. Because it is totally backwards incompatible with the original DataGrabber, I wrote it as as second class.

Please don't merge with the DataGrabber2 name, that is just a placeholder. Suggestions for other names are welcome. We could go with a name that distinguishes it from DataGrabber (e.g. FormatGrabber, although that doesn't make a lot of sense), or just a synonym (e.g. SelectFiles). I'd probably lead towards the latter.

I think this approach should cover (at least) as many use cases as the existing DataGrabber, but please let me know if there's something obvious I've left out.


>>> from nipype import SelectFiles, Node
>>> dg = SelectFiles(infields=["subject_id"],
... templates={"T1": "{subject_id}/struct/T1.nii",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we simply do it with templates and no infields? and use anything the person provides in {} to create dynamic inputs?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this was actually my original idea and then I forgot. I will implement this.

satra added a commit that referenced this pull request Aug 10, 2013
Improved alternate DataGrabber interface
@satra satra merged commit 07170ae into nipy:master Aug 10, 2013
@mwaskom mwaskom deleted the enh/better_datagrabber branch August 11, 2013 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants