datalad / datalad-neuroimaging

DataLad extension for neuroimaging research
http://datalad.org
Other
17 stars 13 forks source link

bids extractor: succeptable to symlinks in the path #54

Open yarikoptic opened 6 years ago

yarikoptic commented 6 years ago

What is the problem?

it seems that somewhere paths resolution/matching is happening and symlinks in the path gets resolved but not "consistently", which results in tests failing for me -- don't those test run also on travis in a similar setup???

$> TMPDIR=/tmp python -m nose -s -v --pdb datalad/metadata/extractors/tests/test_bids.py 
datalad.metadata.extractors.tests.test_bids.test_get_metadata ... ok
datalad.metadata.extractors.tests.test_bids.test_get_metadata_with_README ... ok
datalad.metadata.extractors.tests.test_bids.test_get_metadata_with_description_and_README ... ok
Versions: appdirs=1.4.3 boto=2.44.0 cmd:annex=6.20180206+gitg638032f3a-1~ndall+1 cmd:git=2.11.0 cmd:system-git=2.15.1 cmd:system-ssh=7.6p1 git=2.1.8 gitdb=2.0.2 humanize=0.5.1 iso8601=0.1.11 msgpack=0.4.8 requests=2.18.4 scrapy=1.4.0 six=1.11.0 tqdm=4.19.5 wrapt=1.10.11

----------------------------------------------------------------------
Ran 3 tests in 3.322s

OK

passes, but with symlinked /tmp/ -- fail!:

$> TMPDIR=$HOME/.tmp python -m nose -s -v --pdb datalad/metadata/extractors/tests/test_bids.py 
datalad.metadata.extractors.tests.test_bids.test_get_metadata ... > /home/yoh/proj/bids/pybids/bids/grabbids/bids_layout.py(64)_get_nearest_helper()
-> if 'type' not in self.files[path].entities:
(Pdb) p self.files
{}
mih commented 6 years ago

Please see https://github.com/datalad/datalad/issues/2326 for a related RF.