Skip to content

Commit 90a1726

Browse files
Merge pull request #54 from Remi-Gau/bump_submod
[ENH] bump submod
2 parents e92ff83 + 2410e55 commit 90a1726

File tree

7 files changed

+60
-17
lines changed

7 files changed

+60
-17
lines changed

.github/workflows/moxunit.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,19 @@ jobs:
1515
with:
1616
submodules: true
1717
fetch-depth: 1
18+
1819
- name: MOxUnit Action
19-
uses: joergbrech/moxunit-action@v1.1
20+
uses: joergbrech/moxunit-action@v1.2.0
2021
with:
2122
tests: tests
2223
src: subfun
24+
# add CPP_PTB to the path but don't include it the coverage
25+
ext: lib/CPP_PTB/src
26+
# Octave packages needed
27+
pkg: statistics
2328
with_coverage: true
2429
cover_xml_file: coverage.xml
30+
2531
- name: Code coverage
2632
uses: codecov/codecov-action@v1
2733
with:

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
*.tsv
77
*.mat
88

9+
% tests and coverage
10+
coverage*
11+
test_report.log
12+
913
output
1014

1115
## virtual env

lib/CPP_BIDS

Submodule CPP_BIDS updated 79 files

runTests.m

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
function runTests()
2+
%
3+
% (C) Copyright 2022 CPP visual motion localizer developers
4+
5+
% Elapsed time is ??? seconds.
6+
7+
tic;
8+
9+
initEnv();
10+
11+
if bids.internal.is_github_ci
12+
fprintf(1, '\nThis is github CI\n');
13+
else
14+
fprintf(1, '\nThis is not github CI\n');
15+
end
16+
17+
fprintf('\nHome is %s\n', getenv('HOME'));
18+
19+
warning('OFF');
20+
21+
folderToCover = fullfile(pwd, 'subfun');
22+
testFolder = fullfile(pwd, 'tests');
23+
24+
success = moxunit_runtests(testFolder, ...
25+
'-verbose', '-recursive', '-with_coverage', ...
26+
'-cover', folderToCover, ...
27+
'-cover_xml_file', 'coverage.xml', ...
28+
'-cover_html_dir', fullfile(pwd, 'coverage_html'));
29+
30+
if success
31+
system('echo 0 > test_report.log');
32+
else
33+
system('echo 1 > test_report.log');
34+
end
35+
36+
toc;
37+
38+
end

setParameters.m

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
% change that if you want the data to be saved somewhere else
1111
cfg.dir.output = fullfile(fileparts(mfilename('fullpath')), 'output');
1212

13+
cfg.subject.subjectGrp = 'pilot';
14+
cfg.subject.sessionNb = 1;
15+
cfg.subject.askGrpSess = [true true];
16+
1317
%% Debug mode settings
1418

1519
cfg.debug.do = false; % To test the script out of the scanner, skip PTB sync
@@ -22,27 +26,22 @@
2226
cfg.audio.devIdx = 3; % 5 %11
2327

2428
%% Engine parameters
25-
2629
cfg.testingDevice = 'mri';
2730
cfg.eyeTracker.do = false;
2831
cfg.audio.do = true;
2932

3033
cfg = setMonitor(cfg);
3134

32-
% Keyboards
3335
cfg = setKeyboards(cfg);
3436

35-
% MRI settings
36-
3737
cfg = setMRI(cfg);
38-
cfg.suffix.acquisition = '0p75mmEv';
3938

40-
cfg.pacedByTriggers.do = false;
39+
cfg.pacedByTriggers.do = true;
4140

4241
%% Experiment Design
4342

44-
% cfg.design.motionType = 'translation';
45-
% cfg.design.motionType = 'radial';
43+
% cfg.design.motionType = 'translation';
44+
% cfg.design.motionType = 'radial';
4645
cfg.design.motionType = 'translation';
4746
cfg.design.names = {'static'; 'motion'};
4847
% 0: L--R--L; 180: R--L--R;
@@ -158,8 +157,8 @@
158157

159158
cfg.mri.repetitionTime = 1.8;
160159

161-
cfg.bids.MRI.Instructions = ['1 - Detect the RED fixation cross\n' ...
160+
cfg.bids.mri.Instructions = ['1 - Detect the RED fixation cross\n' ...
162161
'2 - Detected the shorter repeated sounds'];
163-
cfg.bids.MRI.TaskDescription = [];
162+
cfg.bids.mri.TaskDescription = [];
164163

165164
end

tests/test_expDesign.m

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88

99
function test_exDesignBasic()
1010

11-
initEnv();
12-
1311
cfg.design.motionType = 'translation';
1412
cfg.design.motionDirections = [0 0 180 180];
1513
cfg.design.names = {'static'; 'motion'};
@@ -43,8 +41,6 @@ function test_exDesignBasic()
4341

4442
function test_exDesignBasicOtherSetUp()
4543

46-
initEnv();
47-
4844
cfg.design.motionType = 'translation';
4945
cfg.design.motionDirections = [0 90 180 270];
5046
cfg.design.names = {'static'; 'motion'};

0 commit comments

Comments
 (0)