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

+49
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

+7-6
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

+2-2
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

-1
This file was deleted.

manualTests/miss_hit.cfg

-9
This file was deleted.

src/convertSourceToRaw.m

+5-9
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

+1-1
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

+2
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

+1-1
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.
File renamed without changes.

templates/README

+157
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
# README
2+
3+
(template copied from the BIDS starter kit:
4+
https://github.com/bids-standard/bids-starter-kit)
5+
6+
The README is usually the starting point for researchers using your data
7+
and serves as a guidepost for users of your data. A clear and informative
8+
README makes your data much more usable.
9+
10+
In general you can include information in the README that is not captured by some other
11+
files in the BIDS dataset (dataset_description.json, events.tsv, ...).
12+
13+
It can also be useful to also include information that might already be
14+
present in another file of the dataset but might be important for users to be aware of
15+
before preprocessing or analysing the data.
16+
17+
If the README gets too long you have the possibility to create a `/doc` folder
18+
and add it to the `.bidsignore` file to make sure it is ignored by the BIDS validator.
19+
20+
More info here: https://neurostars.org/t/where-in-a-bids-dataset-should-i-put-notes-about-individual-mri-acqusitions/17315/3
21+
22+
## Details related to access to the data
23+
24+
- [ ] Data user agreement
25+
26+
If the dataset requires a data user agreement, link to the relevant information.
27+
28+
- [ ] Contact person
29+
30+
Indicate the name and contact details (email and ORCID) of the person responsible for additional information.
31+
32+
- [ ] Practical information to access the data
33+
34+
If there is any special information related to access rights or
35+
how to download the data make sure to include it.
36+
For example, if the dataset was curated using datalad,
37+
make sure to include the relevant section from the datalad handbook:
38+
http://handbook.datalad.org/en/latest/basics/101-180-FAQ.html#how-can-i-help-others-get-started-with-a-shared-dataset
39+
40+
## Overview
41+
42+
- [ ] Project name (if relevant)
43+
44+
- [ ] Year(s) that the project ran
45+
46+
If no `scans.tsv` is included, this could at least cover when the data acquisition
47+
starter and ended. Local time of day is particularly relevant to subject state.
48+
49+
- [ ] Brief overview of the tasks in the experiment
50+
51+
A paragraph giving an overview of the experiment. This should include the
52+
goals or purpose and a discussion about how the experiment tries to achieve
53+
these goals.
54+
55+
- [ ] Description of the contents of the dataset
56+
57+
An easy thing to add is the output of the bids-validator that describes what type of
58+
data and the number of subject one can expect to find in the dataset.
59+
60+
- [ ] Independent variables
61+
62+
A brief discussion of condition variables (sometimes called contrasts
63+
or independent variables) that were varied across the experiment.
64+
65+
- [ ] Dependent variables
66+
67+
A brief discussion of the response variables (sometimes called the
68+
dependent variables) that were measured and or calculated to assess
69+
the effects of varying the condition variables. This might also include
70+
questionnaires administered to assess behavioral aspects of the experiment.
71+
72+
- [ ] Control variables
73+
74+
A brief discussion of the control variables --- that is what aspects
75+
were explicitly controlled in this experiment. The control variables might
76+
include subject pool, environmental conditions, set up, or other things
77+
that were explicitly controlled.
78+
79+
- [ ] Quality assessment of the data
80+
81+
Provide a short summary of the quality of the data ideally with descriptive statistics if relevant
82+
and with a link to more comprehensive description (like with MRIQC) if possible.
83+
84+
## Methods
85+
86+
### Subjects
87+
88+
A brief sentence about the subject pool in this experiment.
89+
90+
Remember that `Control` or `Patient` status should be defined in the `participants.tsv`
91+
using a group column.
92+
93+
- [ ] Information about the recruitment procedure
94+
- [ ] Subject inclusion criteria (if relevant)
95+
- [ ] Subject exclusion criteria (if relevant)
96+
97+
### Apparatus
98+
99+
A summary of the equipment and environment setup for the
100+
experiment. For example, was the experiment performed in a shielded room
101+
with the subject seated in a fixed position.
102+
103+
### Initial setup
104+
105+
A summary of what setup was performed when a subject arrived.
106+
107+
### Task organization
108+
109+
How the tasks were organized for a session.
110+
This is particularly important because BIDS datasets usually have task data
111+
separated into different files.)
112+
113+
- [ ] Was task order counter-balanced?
114+
- [ ] What other activities were interspersed between tasks?
115+
116+
- [ ] In what order were the tasks and other activities performed?
117+
118+
### Task details
119+
120+
As much detail as possible about the task and the events that were recorded.
121+
122+
### Additional data acquired
123+
124+
A brief indication of data other than the
125+
imaging data that was acquired as part of this experiment. In addition
126+
to data from other modalities and behavioral data, this might include
127+
questionnaires and surveys, swabs, and clinical information. Indicate
128+
the availability of this data.
129+
130+
This is especially relevant if the data are not included in a `phenotype` folder.
131+
https://bids-specification.readthedocs.io/en/stable/03-modality-agnostic-files.html#phenotypic-and-assessment-data
132+
133+
### Experimental location
134+
135+
This should include any additional information regarding the
136+
the geographical location and facility that cannot be included
137+
in the relevant json files.
138+
139+
### Missing data
140+
141+
Mention something if some participants are missing some aspects of the data.
142+
This can take the form of a processing log and/or abnormalities about the dataset.
143+
144+
Some examples:
145+
146+
- A brain lesion or defect only present in one participant
147+
- Some experimental conditions missing on a given run for a participant because
148+
of some technical issue.
149+
- Any noticeable feature of the data for certain participants
150+
- Differences (even slight) in protocol for certain participants.
151+
152+
### Notes
153+
154+
Any additional information or pointers to information that
155+
might be helpful to users of the dataset. Include qualitative information
156+
related to how the data acquisition went.
157+
File renamed without changes.

0 commit comments

Comments
 (0)