Skip to content

Commit 86ebdd1

Browse files
authored
Merge pull request #79 from cpp-lln-lab/remi-highres_pip_refactor
major refactoring reporting for duty
2 parents 9ce5b07 + 7ec8081 commit 86ebdd1

42 files changed

Lines changed: 1278 additions & 1192 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
.DS_Store
33
*.asv
44
*.m~
5+
*.mat
56
*.nii
67
*.xml
78
*.log
89
*.html
10+
*.zip
911

10-
*.mat
1112

1213
# files in the demo folder related to running the demo analysis
1314
demo/*.zip

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@ before_install:
3737
- make -C spm12/src PLATFORM=octave distclean
3838
- make -C spm12/src PLATFORM=octave
3939
- make -C spm12/src PLATFORM=octave install
40-
- cd tests
4140

4241
script:
4342
- octave $OCTFLAGS --eval "runTests"
4443
- cat test_report.log | grep 0
4544

45+
after_success:
46+
- bash <(curl -s https://codecov.io/bash)
47+
4648

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1+
**Code quality and style**
2+
13
[![](https://img.shields.io/badge/Octave-CI-blue?logo=Octave&logoColor=white)](https://github.com/cpp-lln-lab/CPP_BIDS_SPM_pipeline/actions)
24
![](https://github.com/cpp-lln-lab/CPP_BIDS_SPM_pipeline/workflows/CI/badge.svg)
35

4-
[![Build Status](https://travis-ci.com/cpp-lln-lab/CPP_BIDS_SPM_pipeline.svg?branch=master)](https://travis-ci.com/cpp-lln-lab/CPP_BIDS_SPM_pipeline)
6+
**Unit tests and coverage**
57

8+
[![Build Status](https://travis-ci.com/cpp-lln-lab/CPP_BIDS_SPM_pipeline.svg?branch=master)](https://travis-ci.com/cpp-lln-lab/CPP_BIDS_SPM_pipeline)
69
[![codecov](https://codecov.io/gh/cpp-lln-lab/CPP_BIDS_SPM_pipeline/branch/master/graph/badge.svg)](https://codecov.io/gh/cpp-lln-lab/CPP_BIDS_SPM_pipeline)
710

11+
**How to cite**
12+
13+
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3556173.svg)](https://doi.org/10.5281/zenodo.3556173)
14+
15+
**Contributors**
816
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
917
[![All Contributors](https://img.shields.io/badge/all_contributors-5-orange.svg?style=flat-square)](#contributors)
10-
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3556173.svg)](https://doi.org/10.5281/zenodo.3556173)
1118
<!-- ALL-CONTRIBUTORS-BADGE:END -->
1219

1320
# Instructions for SPM12 Preprocessing Pipeline

demo/batch_download_run.m

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
WD = fileparts(mfilename('fullpath'));
1919

2020
% we add all the subfunctions that are in the sub directories
21-
addpath(genpath(fullfile(WD, '..')));
21+
addpath(genpath(fullfile(WD, '..', 'src')));
22+
addpath(genpath(fullfile(WD, '..', 'lib')));
2223

2324
%% Set options
2425
opt = getOption();
@@ -37,7 +38,7 @@
3738
opt.STC_referenceSlice = [];
3839
opt.sliceOrder = [];
3940
opt.funcVoxelDims = [];
40-
opt.JOBS_dir = fullfile(opt.dataDir, '..', 'derivatives', 'SPM12_CPPL', 'JOBS', opt.taskName);
41+
opt.jobsDir = fullfile(opt.dataDir, '..', 'derivatives', 'SPM12_CPPL', 'JOBS', opt.taskName);
4142

4243
% specify the model file that contains the contrasts to compute
4344
opt = rmfield(opt, 'model');
@@ -63,9 +64,9 @@
6364
'NIDM', true);
6465

6566
%% Get data
66-
fprintf('%-40s:', 'Downloading dataset...');
67-
urlwrite(URL, 'MoAEpilot.zip');
68-
unzip('MoAEpilot.zip', fullfile(WD, 'output'));
67+
% fprintf('%-40s:', 'Downloading dataset...');
68+
% urlwrite(URL, 'MoAEpilot.zip');
69+
% unzip('MoAEpilot.zip', fullfile(WD, 'output'));
6970

7071
%% Check dependencies
7172
% If toolboxes are not in the MATLAB Directory and needed to be added to
@@ -80,10 +81,10 @@
8081
checkDependencies();
8182

8283
%% Run batches
83-
BIDS_copyRawFolder(opt, 1);
84-
BIDS_STC(opt);
85-
BIDS_SpatialPrepro(opt);
86-
BIDS_Smoothing(FWHM, opt);
87-
BIDS_FFX(1, FWHM, opt, 0);
88-
BIDS_FFX(2, FWHM, opt, 0);
89-
BIDS_Results(FWHM, opt, 0);
84+
bidsCopyRawFolder(opt, 1);
85+
bidsSTC(opt);
86+
bidsSpatialPrepro(opt);
87+
bidsSmoothing(FWHM, opt);
88+
bidsFFX(1, FWHM, opt, 0);
89+
bidsFFX(2, FWHM, opt, 0);
90+
bidsResults(FWHM, [], opt, 0);

getOption.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
opt.funcVoxelDims = [];
6969

7070
% Suffix output directory for the saved jobs
71-
opt.JOBS_dir = fullfile( ...
71+
opt.jobsDir = fullfile( ...
7272
opt.dataDir, '..', 'derivatives', ...
7373
'SPM12_CPPL', 'JOBS', opt.taskName);
7474

miss_hit.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# styly guide (https://florianschanda.github.io/miss_hit/style_checker.html)
22
line_length: 100
3-
regex_function_name: "[a-z]+(([A-Z]){1}[A-Za-z]+)*"
3+
regex_function_name: "[a-z]+(_*([a-zA-Z0-9]){1}[A-Za-z]+)*" # almost anything goes in the root folder
44
suppress_rule: "copyright_notice"
55
exclude_dir: "lib"
66

runTests.m

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
warning('OFF');
2+
3+
addpath(fullfile(pwd, 'spm12'));
4+
addpath(genpath(fullfile(pwd, 'src')));
5+
addpath(genpath(fullfile(pwd, 'lib')));
6+
7+
spm('defaults', 'fMRI');
8+
9+
folderToCover = fullfile(pwd, 'src');
10+
testFolder = fullfile(pwd, 'tests');
11+
12+
success = moxunit_runtests( ...
13+
testFolder, ...
14+
'-verbose', '-recursive', '-with_coverage', ...
15+
'-cover', folderToCover, ...
16+
'-cover_xml_file', 'coverage.xml', ...
17+
'-cover_html_dir', fullfile(pwd, 'coverage_html'));
18+
19+
if success
20+
system('echo 0 > test_report.log');
21+
else
22+
system('echo 1 > test_report.log');
23+
end
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
function [fileName, subFuncDataDir] = getBoldFilename(BIDS, subNumber, sessions, runs, opt)
1+
function [fileName, subFuncDataDir] = getBoldFilename(varargin)
2+
3+
[BIDS, subNumber, sessions, runs, opt] = deal(varargin{:});
24

35
% get the filename for this bold run for this task
46
fileName = getInfo(BIDS, subNumber, opt, 'Filename', sessions, runs, 'bold');

0 commit comments

Comments
 (0)