Skip to content

Commit 8fcc3cd

Browse files
authored
Merge pull request #168 from cpp-lln-lab/release-2.1.0
[REL] Release 2.1.0
2 parents 3455032 + 04d5166 commit 8fcc3cd

22 files changed

+278
-104
lines changed

.github/workflows/bids_validator.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: BIDS validator
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches: 'master'
9+
10+
env:
11+
OCTFLAGS: --no-gui --no-window-system --silent
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-20.04
16+
steps:
17+
18+
- uses: actions/checkout@v2
19+
with:
20+
submodules: true
21+
fetch-depth: 1
22+
23+
- name: Make jsonread for octave
24+
run: |
25+
sudo apt-get -y -qq update
26+
sudo apt-get -y install octave
27+
sudo apt-get -y install liboctave-dev
28+
cd lib/JSONio
29+
mkoctfile --mex jsonread.c jsmn.c -DJSMN_PARENT_LINKS
30+
cd ..
31+
32+
- name: Update octave path
33+
run: |
34+
octave $OCTFLAGS --eval "addpath(genpath(fullfile(pwd, 'lib'))); savepath();"
35+
octave $OCTFLAGS --eval "addpath(genpath(fullfile(pwd, 'src'))); savepath();"
36+
37+
- name: Install BIDS validator
38+
run: |
39+
sudo npm install -g [email protected]
40+
41+
- name: Create dummy dataset and validate it
42+
run: |
43+
cd tests/manualTests
44+
octave $OCTFLAGS --eval "test_makeRawDataset" && bids-validator `pwd`/output/raw/ --ignoreNiftiHeaders
45+
46+
47+
48+
49+

.github/workflows/moxunit.yml renamed to .github/workflows/run_tests.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: MOxUnit
1+
name: tests and coverage
22

33
on:
44
push:
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
build:
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-20.04
1414
steps:
1515

1616
- uses: actions/checkout@v2
@@ -25,13 +25,14 @@ jobs:
2525
sudo apt-get -y install liboctave-dev
2626
cd lib/JSONio
2727
mkoctfile --mex jsonread.c jsmn.c -DJSMN_PARENT_LINKS
28-
# cd ../..
2928
3029
- name: MOxUnit Action
31-
uses: joergbrech/moxunit-action@v1.1
30+
uses: joergbrech/moxunit-action@master
3231
with:
33-
tests: tests
34-
src: src
32+
tests: tests # files or directories containing the MOxUnit test cases
33+
src: src # directories to be added to the Octave search path before running the tests.
34+
ext: tests/utils # External resources to add to the search put (excluded from coverage)
35+
# data: # Directory for test data
3536
with_coverage: true
3637
cover_xml_file: coverage.xml
3738

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ before_install:
2828
- travis_retry sudo apt-get -y install nodejs
2929
- travis_retry sudo apt-get -y install npm
3030
# Install BIDS-Validator
31-
- sudo npm install -g bids-validator@1.5.7
31+
- sudo npm install -g bids-validator@1.6.2
3232

3333
install:
3434
# make octave file the JSONio submodule
@@ -39,7 +39,7 @@ before_script:
3939
# Add to src functions to path
4040
- octave $OCTFLAGS --eval "addpath(genpath(fullfile(pwd, 'src'))); savepath ();"
4141
# Change current directory
42-
- cd manualTests
42+
- cd tests/manualTests
4343

4444
jobs:
4545
include:

manualTests/dummyData/README

Lines changed: 0 additions & 1 deletion
This file was deleted.

manualTests/miss_hit.cfg

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

src/convertSourceToRaw.m

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,13 @@ function convertSourceToRaw(cfg)
2323
rawDir = fullfile(cfg.dir.output, 'raw');
2424

2525
% add dummy README and CHANGE file
26-
copyfile(fullfile( ...
27-
fileparts(mfilename('fullpath')), '..', 'manualTests', 'dummyData', ...
28-
'README'), ...
26+
templateFolder = fullfile(fileparts(mfilename('fullpath')), '..', 'templates');
27+
28+
copyfile(fullfile(templateFolder, 'README'), ...
2929
sourceDir);
30-
copyfile(fullfile( ...
31-
fileparts(mfilename('fullpath')), '..', 'manualTests', 'dummyData', ...
32-
'CHANGES'), ...
30+
copyfile(fullfile(templateFolder, 'CHANGES'), ...
3331
sourceDir);
34-
copyfile(fullfile( ...
35-
fileparts(mfilename('fullpath')), '..', 'manualTests', 'dummyData', ...
36-
'.bidsignore'), ...
32+
copyfile(fullfile(templateFolder, '.bidsignore'), ...
3733
sourceDir);
3834

3935
copyfile(sourceDir, rawDir);

src/saveEventsFile.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
'Units', 's'), ...
190190
'trial_type', struct( ...
191191
'Description', 'types of trial', ...
192-
'Levels', ''), ...
192+
'Levels', struct()), ...
193193
'duration', struct( ...
194194
'Description', ...
195195
'duration of the event or the block', ...

src/templates/test_templateTest.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ function test_templateTestBasic()
2323
% expectedOuput = X;
2424

2525
% assertEqual(actualOupout, expectedOuput)
26+
% assertTrue( );
27+
% assertFalse( );
2628

2729
%% clean up (delete temporary files that were created)
2830

src/utils/initializeExtraColumns.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
fieldsToSet.length = 1;
2424
fieldsToSet.bids.LongName = '';
2525
fieldsToSet.bids.Description = '';
26-
fieldsToSet.bids.Levels = '';
26+
fieldsToSet.bids.Levels = struct();
2727
fieldsToSet.bids.TermURL = '';
2828
fieldsToSet.bids.Units = '';
2929

File renamed without changes.

0 commit comments

Comments
 (0)