Skip to content

Conversation

@moloney
Copy link
Contributor

@moloney moloney commented Jan 3, 2014

No description provided.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 87133b1 on moloney:bf-datafinder into * on nipy:master*.

1 similar comment
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 87133b1 on moloney:bf-datafinder into * on nipy:master*.

@mwaskom
Copy link
Member

mwaskom commented Jan 3, 2014

Thanks for fixing this. If possible, it would be nice to get a test case to cover this, since apparently the testing suite missed it.

@chrisgorgo
Copy link
Member

Yes! A test would be very welcomed!

@mih
Copy link
Member

mih commented Jan 8, 2014

A merge of this one would be awesome -- we experience a full stop of most of the nipype operations on our cluster after upgrading it to Debian wheezy/stable...

% find . ./findme.txt ./testme.py ./subdir ./subdir/dontfindme.txt ./subdir/findme.txt ./dontfindme.txt % cat testme.py from nipype.interfaces.io import DataFinder df = DataFinder() df.inputs.root_paths = '.' df.inputs.match_regex = '.*\.txt' result = df.run() print result.outputs.out_paths % python testme.py Traceback (most recent call last): File "testme.py", line 5, in <module> result = df.run() File "/usr/lib/pymodules/python2.7/nipype/interfaces/base.py", line 946, in run runtime = self._run_interface(runtime) File "/usr/lib/pymodules/python2.7/nipype/interfaces/io.py", line 831, in _run_interface raise RuntimeError("Regular expression did not match any files!") RuntimeError: Regular expression did not match any files! Interface DataFinder failed to run. 

and with the fix

% python testme.py ['./findme.txt', './dontfindme.txt', './subdir/dontfindme.txt', './subdir/findme.txt'] 
@chrisgorgo
Copy link
Member

We will do a quickfix release as soon as there is a test for this.

On Wed, Jan 8, 2014 at 12:09 PM, Michael Hanke notifications@github.comwrote:

A merge of this one would be awesome -- we experience a full stop of most
of the nipype operations on our cluster after upgrading it to Debian
wheezy/stable...

% find
.
./findme.txt
./testme.py
./subdir
./subdir/dontfindme.txt
./subdir/findme.txt
./dontfindme.txt

% cat testme.py
from nipype.interfaces.io import DataFinder
df = DataFinder()
df.inputs.root_paths = '.'
df.inputs.match_regex = '.*.txt'
result = df.run()
print result.outputs.out_paths

% python testme.py
Traceback (most recent call last):
File "testme.py", line 5, in
result = df.run()
File "/usr/lib/pymodules/python2.7/nipype/interfaces/base.py", line 946, in run
runtime = self._run_interface(runtime)
File "/usr/lib/pymodules/python2.7/nipype/interfaces/io.py", line 831, in _run_interface
raise RuntimeError("Regular expression did not match any files!")
RuntimeError: Regular expression did not match any files!
Interface DataFinder failed to run.

and with the fix

% python testme.py
['./findme.txt', './dontfindme.txt', './subdir/dontfindme.txt', './subdir/findme.txt']


Reply to this email directly or view it on GitHubhttps://github.com//pull/761#issuecomment-31822864
.

@yarikoptic
Copy link
Member

@chrisfilo do you mean that these lines are not included in those whooping 70%? !!! ay yay yay ;-)

@yarikoptic
Copy link
Member

IMHO no need to wait for a test, it is obviously a typo which was introduced

- if (not max_depth is None and - curr_depth >= max_depth): + if not max_depth is not None and curr_depth >= max_depth: sub_dirs[:] = [] files = [] 

Thus using my god powers (someone of cause is still welcome to provide a unittest), but we should kick out bugfix snapshot release asap for this

yarikoptic added a commit that referenced this pull request Jan 8, 2014
BF: Fix DataFinder bug introduced in d985f67 (Test is TODO)
@yarikoptic yarikoptic merged commit 8b1d21c into nipy:master Jan 8, 2014
@chrisgorgo
Copy link
Member

I was just trying to motivate someone to add a test so this would not
happen again...

On Wed, Jan 8, 2014 at 3:40 PM, Yaroslav Halchenko <notifications@github.com

wrote:

Merged #761 #761.


Reply to this email directly or view it on GitHubhttps://github.com//pull/761
.

@yarikoptic
Copy link
Member

yikes, according to coveralls.in _run_interface is not tested at all: https://coveralls.io/files/110506568#L780 . Probably nipype gurus should be the ones to craft an ultimate test to get it most useful

@yarikoptic
Copy link
Member

I was just trying to motivate someone

me too

@moloney
Copy link
Contributor Author

moloney commented Jan 9, 2014

Sorry to go MIA after opening the PR. I will see if there is anything I can contribute over in #765.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

6 participants