Skip to content

Commit d9eeb94

Browse files
committed
tmp remove recreate all dummy data
1 parent 124efc7 commit d9eeb94

19 files changed

+65
-35
lines changed

demos/MoAE/test_moae.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
download_moae_ds(download_data, clean);
2828
end
2929

30+
warning('off', 'SPM:noDisplay');
3031
if isOctave
3132
warning('off', 'setGraphicWindow:noGraphicWindow');
3233
end

demos/face_repetition/test_face_rep.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
download_face_rep_ds(download_data);
2222
end
2323

24+
warning('off', 'SPM:noDisplay');
2425
if isOctave
2526
warning('off', 'setGraphicWindow:noGraphicWindow');
2627
end

src/IO/unzipAndReturnsFullpathName.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
errorHandling(mfilename(), 'emptyInput', msg, false, true);
2828
end
2929

30-
for iFile = 1:size(fullpathName)
30+
for iFile = 1:size(fullpathName, 1)
3131

3232
[directory, filename, ext] = spm_fileparts(fullpathName(iFile, :));
3333

src/messages/createUnorderedList.m

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,30 @@
2121
end
2222

2323
if iscell(list)
24+
25+
for i = 1:numel(list)
26+
if isnumeric(list{i})
27+
list{i} = num2str(list{i});
28+
end
29+
end
30+
2431
list = sprintf([prefix, strjoin(list, prefix), '\n']);
2532

2633
elseif isstruct(list)
34+
2735
output = [];
2836
fields = fieldnames(list);
37+
2938
for i = 1:numel(fields)
3039
content = list.(fields{i});
3140
if ~iscell(content)
3241
content = {content};
3342
end
3443
output = [output prefix fields{i} ': {' strjoin(content, ', ') '}'];
3544
end
45+
3646
list = sprintf(output);
47+
3748
end
49+
3850
end

src/subject_level/getConfoundsRegressorFilename.m

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function filename = getConfoundsRegressorFilename(BIDS, opt, subLabel, session, run)
1+
function filenames = getConfoundsRegressorFilename(BIDS, opt, subLabel, session, run)
22
%
33
% Gets the potential confounds files for a given subject, session, run
44
%
@@ -33,19 +33,20 @@
3333
filter = fileFilterForBold(opt, subLabel, 'confounds');
3434
filter.ses = session;
3535
filter.run = run;
36-
filename = bids.query(BIDS, 'data', filter);
36+
filenames = bids.query(BIDS, 'data', filter);
3737

38-
if numel(filename) > 1
39-
disp(filename);
40-
errorHandling(mfilename(), 'tooManyFiles', 'This should only get one file.', false, true);
38+
if numel(filenames) > 1
39+
msg = ['Found several confounds files:' createUnorderedList(filenames)];
40+
errorHandling(mfilename(), 'tooManyFiles', msg, true, true);
4141

42-
elseif isempty(filename)
42+
elseif isempty(filenames)
4343
msg = sprintf('No TSV file found in:\n\t%s\nfor query:%s\n', ...
4444
BIDS.pth, ...
4545
createUnorderedList(opt.query));
4646
errorHandling(mfilename(), 'noFileFound', msg, true, true);
47+
4748
end
4849

49-
filename = filename{1};
50+
filenames = filenames{1};
5051

5152
end

tests/Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
clean:
1+
clean: clean_local
2+
rm -rf bids-examples
3+
mkdir bids-examples && touch bids-examples/.gitkeep
4+
5+
clean_local:
26
rm -rf dummyData/derivatives/bidspm-preproc/sub-*
37
rm -rf dummyData/derivatives/bidspm-stats/sub-*
48
rm -rf dummyData/bidspm-raw/sub-*
59
rm -rf dummyData/derivatives/bidspm-stats/group
610
rm -rf dummyData/derivatives/bidspm-*/jobs
7-
rm -rf bids-examples
8-
mkdir bids-examples && touch bids-examples/.gitkeep
911

1012
data: clean
1113
sh createDummyDataSet.sh

tests/tests_batches/preproc/test_setBatchSmoothConImages.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
function test_setBatchSmoothConImages_basic()
1212

13-
createDummyData();
13+
% createDummyData();
1414

1515
opt = setOptions('vismotion', {'01', 'blind01'}, 'pipelineType', 'stats');
1616

tests/tests_batches/stats/test_setBatchFactorialDesign.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
function test_setBatchFactorialDesign_within_group()
1212

13-
createDummyData();
13+
% createDummyData();
1414

1515
opt = setOptions('vislocalizer', '', 'pipelineType', 'stats');
1616

@@ -33,7 +33,7 @@ function test_setBatchFactorialDesign_within_group()
3333

3434
function test_setBatchFactorialDesign_complex()
3535

36-
createDummyData();
36+
% createDummyData();
3737

3838
opt = setOptions('vismotion', {'01' 'ctrl01'}, 'pipelineType', 'stats');
3939

@@ -79,7 +79,7 @@ function test_setBatchFactorialDesign_complex()
7979

8080
function test_setBatchFactorialDesign_basic()
8181

82-
createDummyData();
82+
% createDummyData();
8383

8484
opt = setOptions('vismotion', {'01' 'ctrl01'}, 'pipelineType', 'stats');
8585

tests/tests_batches/stats/test_setBatchSubjectLevelResults.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
function test_setBatchSubjectLevelResults_basic()
1212

13-
createDummyData();
13+
% createDummyData();
1414

1515
% IF
1616
contrast_name = 'VisMot';
@@ -91,7 +91,7 @@ function test_setBatchSubjectLevelResults_error_no_matching_contrast()
9191

9292
function [subLabel, opt, result] = setUp(task, contrastName)
9393

94-
createDummyData();
94+
% createDummyData();
9595

9696
iCon = 1;
9797

tests/tests_batches/test_setBatchMeanAnatAndMask.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
function test_setBatchMeanAnatAndMask_basic()
1212

13-
createDummyData();
13+
% createDummyData();
1414

1515
opt = setOptions('vismotion', {'01', 'ctrl01'}, 'pipelinetype', 'stats');
1616

0 commit comments

Comments
 (0)