Skip to content

Commit ab06459

Browse files
authored
Merge pull request #192 from Remi-Gau/dev
[ENH & REF] improve and refactor UI
2 parents 3a67904 + b61b499 commit ab06459

30 files changed

+662
-428
lines changed

.gitignore

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,31 @@
22
*DS_Store
33

44
# exclude content of logfiles folders
5-
*output*
5+
output
6+
67
*.mat
78

89
# exclude temp files from tests and coverage
910
*test_code_report.txt
1011
test_report.log
1112
*coverage*
13+
test_report.log
14+
check_my_code_report.txt
1215

1316
*filteredBy*
1417

1518
tests/*.nii*
1619
tests/*.json*
1720
tests/*.tsv*
1821

19-
# exclude report from check_my_code
20-
check_my_code_report.txt
21-
2222
# jupyter notebook checkpoints
23+
.ipynb_checkpoints
2324
notebooks/source/*
24-
notebooks/output/*
2525
notebooks/new_experiment/*
2626

2727
# ignore node js files
2828
node_modules/*
29+
package.json
2930
package-lock.json
3031
package.json
3132

@@ -34,14 +35,11 @@ package.json
3435

3536
# virtual env
3637
cpp_bids/*
37-
env/
38+
env
3839

3940
# documentation
4041
docs/build/*
4142

42-
# jupyter notebooks
43-
.ipynb_checkpoints
44-
4543
## MATLAB / OCTAVE gitignore template
4644

4745
# From : https://github.com/github/gitignore/blob/master/Global/MATLAB.gitignore

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22
MATLAB = /usr/local/MATLAB/R2017a/bin/matlab
33
ARG = -nodisplay -nosplash -nodesktop
44

5+
<<<<<<< HEAD
6+
=======
57
.PHONY: clean manual clean_demos fix_submodule
68
clean: clean_demos
79
rm -rf version.txt
810

911
fix_submodule:
1012
git submodule update --init --recursive && git submodule update --recursive
1113

14+
>>>>>>> 3a67904c66439e90c8fc528ac8729254b91d56d6
1215
lint:
1316
mh_style --fix && mh_metric --ci && mh_lint
1417

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<!-- markdown-link-check-disable -->
2+
13
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/cpp-lln-lab/CPP_BIDS/master?filepath=notebooks%2Fbasic_usage.ipynb)
24
[![Documentation Status: stable](https://readthedocs.org/projects/cpp-bids/badge/?version=stable)](https://cpp-bids.readthedocs.io/en/stable/?badge=stable)
35
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4007674.svg)](https://doi.org/10.5281/zenodo.4007674)
@@ -6,6 +8,8 @@
68
[![codecov](https://codecov.io/gh/cpp-lln-lab/CPP_BIDS/branch/master/graph/badge.svg)](https://codecov.io/gh/cpp-lln-lab/CPP_BIDS)
79
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)
810

11+
<!-- markdown-link-check-enable -->
12+
913
# CPP_BIDS
1014

1115
A set of function for matlab and octave to create

checkCppBidsDependencies.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function checkCppBidsDependencies(cfg)
4646
CPP_BIDS_INITIALIZED = true();
4747

4848
else
49-
if cfg.verbose
49+
if ~isfield(cfg, 'versbose') || cfg.verbose
5050
fprintf(1, '\n\nCPP_BIDS already initialized\n\n');
5151
end
5252

docs/cpp_bids-manual.pdf

1.88 KB
Binary file not shown.

docs/source/gui.rst

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

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Welcome to CPP BIDS documentation!
1010
set_up
1111
function_description
1212
utilities
13-
gui
13+
ui
1414

1515
A set of function for matlab and octave to create
1616
`BIDS-compatible <https://bids-specification.readthedocs.io/en/stable/>`_

docs/source/ui.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
User interface
2+
*****************
3+
4+
List of functions in the ``ui`` folder: those are mostly to handle the "graphic interface"
5+
that can be used to deal with ``userInputs()``.
6+
7+
----
8+
9+
.. automodule:: src.ui
10+
11+
.. autofunction:: askUserCli
12+
.. autofunction:: askUserGui
13+
14+
.. autofunction:: createQuestionnaire
15+
.. autofunction:: askForGroupAndOrSession
16+
.. autofunction:: getIsQuestionToAsk

docs/source/utilities.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,3 @@ List of functions in the ``utils`` folder.
1717
.. autofunction:: returnNamesExtraColumns
1818
.. autofunction:: returnNbColumns
1919
.. autofunction:: setDefaultFields
20-
21-
.. automodule:: src.gui
22-
23-
.. autofunction:: askUserCli

lib/bids-matlab

Submodule bids-matlab updated 46 files

runTests.m

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,28 @@ function runTests()
66

77
tic;
88

9-
cd(fileparts(mfilename('fullpath')));
10-
11-
cfg.verbose = 0;
12-
checkCppBidsDependencies(cfg);
13-
14-
if bids.internal.is_github_ci
15-
fprintf(1, '\nThis is github CI\n');
16-
else
17-
fprintf(1, '\nThis is not github CI\n');
18-
end
9+
thisPath = fileparts(mfilename('fullpath'));
1910

11+
cd(thisPath);
2012
fprintf('\nHome is %s\n', getenv('HOME'));
2113

2214
warning('OFF');
2315

24-
folderToCover = fullfile(pwd, 'src');
25-
testFolder = fullfile(pwd, 'tests');
16+
addpath(fullfile(thisPath, 'lib', 'JSONio'));
17+
addpath(fullfile(thisPath, 'lib', 'bids-matlab'));
18+
19+
folderToCover = fullfile(thisPath, 'src');
20+
addpath(genpath(folderToCover));
21+
testFolder = fullfile(thisPath, 'tests');
22+
addpath(testFolder);
2623

2724
addpath(fullfile(testFolder, 'utils'));
2825

2926
success = moxunit_runtests(testFolder, ...
3027
'-verbose', '-recursive', '-with_coverage', ...
3128
'-cover', folderToCover, ...
3229
'-cover_xml_file', 'coverage.xml', ...
33-
'-cover_html_dir', fullfile(pwd, 'coverage_html'));
30+
'-cover_html_dir', fullfile(thisPath, 'coverage_html'));
3431

3532
if success
3633
system('echo 0 > test_report.log');

src/checkCFG.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,10 @@
202202
'output');
203203

204204
fieldsToSet.subject.askGrpSess = [true true];
205-
fieldsToSet.subject.sessionNb = 1; % in case no session was provided
206-
fieldsToSet.subject.subjectGrp = ''; % in case no group was provided
205+
fieldsToSet.subject.sessionNb = []; % in case no session was provided
206+
fieldsToSet.subject.subjectGrp = []; % in case no group was provided
207+
fieldsToSet.subject.runNb = [];
208+
fieldsToSet.subject.subjectNb = [];
207209

208210
fieldsToSet.testingDevice = 'pc';
209211

src/gui/askUserCli.m

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

src/gui/askUserGui.m

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

src/gui/createQuestionList.m

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

0 commit comments

Comments
 (0)