Skip to content

Commit 1521b4f

Browse files
committed
fix tests
1 parent 8334de1 commit 1521b4f

File tree

3 files changed

+17
-25
lines changed

3 files changed

+17
-25
lines changed

checkCppBidsDependencies.m

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
function checkCppBidsDependencies()
1+
function checkCppBidsDependencies(cfg)
22
% (C) Copyright 2020 CPP_BIDS developers
33

44
warning(sprintf(['\n\nDEPRECATION WARNING:\n', ...
55
'"checkCppBidsDependencies" is deprecated ', ...
66
'and will be removed in a future release.\n', ...
77
'\nPlease use "cpp_bids(''init'')" instead.'])); %#ok<SPWRN>
88

9-
cpp_bids('init');
9+
verbose = false;
10+
if nargin > 0 && ~isempty(cfg) && isfield(cfg, 'verbose') && ~isempty(cfg.verbose)
11+
verbose = cfg.verbose;
12+
end
13+
14+
cpp_bids('init', 'verbose', verbose);
1015

1116
end

cpp_bids.m

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,18 @@ function cpp_bids(varargin)
2323
defaultAction = 'init';
2424

2525
addOptional(p, 'action', defaultAction, @ischar);
26+
addOptional(p, 'verbose', true);
2627

2728
parse(p, varargin{:});
2829

2930
action = p.Results.action;
31+
verbose = p.Results.verbose;
3032

3133
switch lower(action)
3234

3335
case 'init'
3436

35-
initCppBids();
37+
initCppBids(verbose);
3638

3739
case 'uninit'
3840

@@ -46,7 +48,7 @@ function cpp_bids(varargin)
4648

4749
end
4850

49-
function initCppBids()
51+
function initCppBids(verbose)
5052
%
5153
% Adds the relevant folders to the path for a given session.
5254
% Has to be run to be able to use CPP_BIDS.
@@ -86,10 +88,14 @@ function initCppBids()
8688

8789
detectCppBids();
8890

89-
printCreditsCppBids();
91+
if verbose
92+
printCreditsCppBids();
93+
end
9094

9195
else
92-
fprintf('\n\nCPP_BIDS already initialized\n\n');
96+
if verbose
97+
fprintf('\n\nCPP_BIDS already initialized\n\n');
98+
end
9399

94100
end
95101

tests/test_utils.m

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)