Skip to content

Commit

Permalink
show options in debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi-Gau committed Jul 7, 2024
1 parent 1546e50 commit 1e4f4c9
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
--action default_model \
--task balloonanalogrisktask \
--space MNI152NLin2009cAsym \
--verbosity 2
--verbosity 3
cat ${HOME}/outputs/ds000001/derivatives/models/*.json
Expand All @@ -120,7 +120,7 @@ jobs:
--action default_model \
--task balloonanalogrisktask \
--space MNI152NLin2009cAsym \
--verbosity 2
--verbosity 3
cat ${HOME}/outputs/ds000001/derivatives/models/*.json
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
--participant_label 01 02 \
--space MNI152NLin2009cAsym \
--fwhm 8 \
--verbosity 2
--verbosity 3
# needed to access the model
- checkout
Expand All @@ -179,7 +179,7 @@ jobs:
--skip_validation \
--fwhm 0 \
--participant_label 01 02 \
--verbosity 2 \
--verbosity 3 \
--options /options/ds000001.json
- run:
Expand All @@ -201,7 +201,7 @@ jobs:
--space MNI152NLin2009cAsym \
--skip_validation \
--fwhm 0 \
--verbosity 2 \
--verbosity 3 \
--options /options/ds000001.json
deploy:
Expand Down
2 changes: 1 addition & 1 deletion bidspm.m
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ function updateMacstoolbox()
end

if exist(target_dir, 'dir') == 7
msg = sprintf('updating MACS toolbox: ');
msg = sprintf('updating MACS toolbox\n');
fprintf(1, msg);
[status, cmdout] = system(sprintf('git -C %s pull', target_dir));
if status ~= 0
Expand Down
8 changes: 6 additions & 2 deletions src/bidspm/matlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@


def matlab() -> str:
"""Return the path to the Matlab executable.
r"""Return the path to the Matlab executable.
Modify this value to match your Matlab installation.
The MATLAB 'matlabroot' should tell you where MATLAB is installed.
The 'matlab' executable is usually in the 'bin' subdirectory.
- Windows: ``'C:\\Program Files\\MATLAB\\R20XXx\bin\\matlab.exe'``
- Mac: ``'/Applications/Matlab_R20XXx.app/bin/matlab'``
- Linux: ``'/usr/local/MATLAB/R20XXx/bin/matlab'``
"""
return "/usr/local/MATLAB/R2018a/ bin/matlab"
return "/usr/local/MATLAB/R2018a/bin/matlab"

Check warning on line 17 in src/bidspm/matlab.py

View check run for this annotation

Codecov / codecov/patch

src/bidspm/matlab.py#L17

Added line #L17 was not covered by tests
2 changes: 1 addition & 1 deletion src/bidspm/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def common_parser() -> argparse.ArgumentParser:
help="""
Verbosity level.
""",
choices=[0, 1, 2],
choices=[0, 1, 2, 3],
default=2,
type=int,
nargs=1,
Expand Down
9 changes: 9 additions & 0 deletions src/cli/getOptionsFromCliArgument.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@
opt.toolbox.MACS.model.dir = args.Results.models_dir;
end

if opt.verbosity > 3
unfold(opt);
end
unfold(opt);

end

function opt = optionsPreprocessing(opt, args, action)
Expand Down Expand Up @@ -147,10 +152,14 @@
end

function opt = getOptions(args)

if isstruct(args.Results.options)
opt = args.Results.options;
elseif exist(args.Results.options, 'file') == 2
opt = bids.util.jsondecode(args.Results.options);
opt = checkOptions(opt);
logger('INFO', ['options loaded from file:\n', args.Results.options], ...
'options', opt);
end
if isempty(opt)
% set defaults
Expand Down
2 changes: 1 addition & 1 deletion src/infra/checkToolbox.m
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function updateMacstoolbox()
end

if exist(target_dir, 'dir') == 7
msg = sprintf('updating MACS toolbox: ');
msg = sprintf('updating MACS toolbox\n');
fprintf(1, msg);
system(sprintf('git -C %s pull', ...
target_dir));
Expand Down

0 comments on commit 1e4f4c9

Please sign in to comment.