Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ before_script:
jobs:
include:
- name: "BIDS validator: create and check dataset"
script: octave $OCTFLAGS --eval "test_makeRawDataset" && bids-validator `pwd`/output/rawdata/ --ignoreNiftiHeaders
script: octave $OCTFLAGS --eval "test_makeRawDataset" && bids-validator `pwd`/output/raw/ --ignoreNiftiHeaders
- name: "miss_hit: checking code quality"
script: mh_metric . --ci
- name: "miss_hit: checking code style"
Expand Down
2 changes: 1 addition & 1 deletion src/convertSourceToRaw.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function convertSourceToRaw(cfg)
% Only covers func folder at the moment

sourceDir = fullfile(cfg.dir.output, 'source');
rawDir = fullfile(cfg.dir.output, 'rawdata');
rawDir = fullfile(cfg.dir.output, 'raw');

% add dummy README and CHANGE file
copyfile(fullfile( ...
Expand Down
12 changes: 6 additions & 6 deletions src/createFilename.m
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
'echo', ...
'phaseEncodingDirection', ...
'reconstruction', ...
'recording', ...
'recording' ...
};

targetFields = { ...
Expand All @@ -114,7 +114,7 @@
'echo', ...
'dir', ...
'rec', ...
'recording', ...
'recording' ...
};

for iField = 1:numel(fields2Check)
Expand Down Expand Up @@ -146,10 +146,10 @@
pattern = cfg.fileName.pattern;

runSuffix = cfg.fileName.suffix.run;
acqSuffix = cfg.fileName.suffix.acquisition ;
ceSuffix = cfg.fileName.suffix.contrastEnhancement ;
dirSuffix = cfg.fileName.suffix.phaseEncodingDirection ;
recSuffix = cfg.fileName.suffix.reconstruction ;
acqSuffix = cfg.fileName.suffix.acquisition;
ceSuffix = cfg.fileName.suffix.contrastEnhancement;
dirSuffix = cfg.fileName.suffix.phaseEncodingDirection;
recSuffix = cfg.fileName.suffix.reconstruction;
echoSuffix = cfg.fileName.suffix.echo;
recordingSuffix = cfg.fileName.suffix.recording;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function checkCppBidsDependencies(cfg)

elseif isempty(GITHUB_WORKSPACE) % local

pth = fullfile(fileparts(mfilename('fullpath')), '..');
pth = fullfile(fileparts(mfilename('fullpath')), '..', '..');
checkSubmodule(fullfile(pth, 'lib', 'JSONio'));
checkSubmodule(fullfile(pth, 'lib', 'bids-matlab'));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
function printCreditsCppBids(cfg)

try
version = fileread(fullfile(fileparts(mfilename('fullpath')), ...
'..', '..', 'version.txt'));
catch
version = 'v1.0.0';
end

verbose = true;
if ~isempty(cfg) && isfield(cfg, 'verbose') && ~isempty(cfg.verbose)
verbose = cfg.verbose;
end

if verbose

version = '0.0.1';

contributors = { ...
'Rémi Gau', ...
'Marco Barilari', ...
Expand Down
10 changes: 5 additions & 5 deletions tests/test_getIsQuestionToAsk.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
function test_isPositiveIntegerBasic()

questions.questionsToAsk = { ...
[], 1 ; ...
[], 0 ; ...
[], 1 ; ...
[], 0 ; ...
[], 1; ...
[], 0; ...
[], 1; ...
[], 0; ...
};

responses = { ...
Expand All @@ -24,6 +24,6 @@ function test_isPositiveIntegerBasic()

isQuestionToAsk = getIsQuestionToAsk(questions, responses);

assertEqual(isQuestionToAsk, [false;false;true;false]);
assertEqual(isQuestionToAsk, [false; false; true; false]);

end
14 changes: 7 additions & 7 deletions tests/test_removeDateSuffix.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ function test_removeDateSuffixBasic()
stimNameZipped = 'test2_stim_date-202008050730.tsv.gz';

filesToProcess = { ...
boldName ;
boldName2 ;
boldName3 ;
jsonName ;
eventsName ;
stimName ;
stimNameZipped ;
boldName;
boldName2;
boldName3;
jsonName;
eventsName;
stimName;
stimNameZipped;
};

% create new files for new tests
Expand Down
17 changes: 17 additions & 0 deletions tests/test_utils.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
function test_suite = test_utils %#ok<*STOUT>
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
test_functions = localfunctions(); %#ok<*NASGU>
catch % no problem; early Matlab versions can use initTestSuite fine
end
initTestSuite;
end

function test_utilsBasic()

cfg.verbose = true;

printCreditsCppBids(cfg);

checkCppBidsDependencies(cfg);

end
1 change: 1 addition & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v1.0.0