Skip to content

Commit bb0ecff

Browse files
committed
tst+rf: run pybids with travis, minor tweaks to interface
1 parent 0b16c85 commit bb0ecff

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

.travis.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ before_install:
3737
conda config --add channels conda-forge &&
3838
conda install python=${TRAVIS_PYTHON_VERSION} &&
3939
conda install -y icu &&
40-
pip install -r requirements.txt; }
40+
pip install -r requirements.txt &&
41+
pushd $HOME;
42+
git clone https://github.com/INCF/pybids.git;
43+
cd pybids;
44+
pip install -e .;
45+
popd; }
4146
# Add install of vtk and mayavi to test mesh (disabled): conda install -y vtk mayavi
4247
- travis_retry apt_inst
4348
- travis_retry conda_inst

nipype/interfaces/bids_utils.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,7 @@ def __init__(self, infields=None, **kwargs):
103103
bids_config = json.load(open(bids_config, 'r'))
104104
infields = [i['name'] for i in bids_config['entities']]
105105

106-
self._infields = infields
107-
108-
# used for mandatory inputs check
109-
undefined_traits = {}
110-
for key in infields or []:
111-
self.inputs.add_trait(key, traits.Any)
112-
undefined_traits[key] = kwargs[key] if key in kwargs else Undefined
113-
114-
self.inputs.trait_set(trait_change_notify=False, **undefined_traits)
106+
self._infields = infields or []
115107

116108
def _run_interface(self, runtime):
117109
if not have_pybids:
@@ -121,6 +113,14 @@ def _run_interface(self, runtime):
121113
return runtime
122114

123115
def _list_outputs(self):
116+
# used for mandatory inputs check
117+
undefined_traits = {}
118+
for key in self._infields:
119+
self.inputs.add_trait(key, traits.Any)
120+
undefined_traits[key] = kwargs[key] if key in kwargs else Undefined
121+
122+
self.inputs.trait_set(trait_change_notify=False, **undefined_traits)
123+
124124
layout = gb.BIDSLayout(self.inputs.base_dir)
125125

126126
# If infield is not given nm input value, silently ignore

0 commit comments

Comments
 (0)