Skip to content

Commit 17ab12d

Browse files
committed
Merge tag 'v1.0.0'
2 parents bc0aaa6 + 962c947 commit 17ab12d

29 files changed

+1888
-552
lines changed

.travis.yml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,39 @@
11
# Travis CI (https://travis-ci.org/)
2+
# This will only work on your repo if you have an account on travis and you
3+
# have set it up to run continuous integration on this this repo
4+
5+
# Linux distribution (bionic beaver)
6+
dist: bionic
7+
8+
# Language and version
9+
language: python
10+
python:
11+
- "3.6" # current default Python on Travis CI
212

3-
language: c
4-
dist: bionic # based on bionic beaver ubuntu distribution
513
cache:
614
apt: true # only works with Pro version
715

816
env:
9-
global: # define environment variables for bash
17+
global: # Define environment variables for bash
1018
- OCTFLAGS="--no-gui --no-window-system --silent"
1119

1220
before_install:
1321
- travis_retry sudo apt-get -y -qq update
14-
# install octave
22+
# Install octave
1523
- travis_retry sudo apt-get -y install octave
1624
- travis_retry sudo apt-get -y install liboctave-dev
17-
# install javascript
25+
# Install javascript node and node package manager necessary to run the validator
1826
- travis_retry sudo apt-get -y install nodejs
1927
- travis_retry sudo apt-get -y install npm
20-
# install miss_hit linter
21-
- cd .. && git clone https://github.com/florianschanda/miss_hit.git && export PATH=$PATH:`pwd`/miss_hit && cd CPP_BIDS
22-
28+
# Install BIDS-Validator
29+
- sudo npm install -g bids-validator
30+
# Install miss_hit linter
31+
- pip3 install miss_hit
2332

2433
install:
2534
# make octave file the JSONio submodule
2635
- cd lib/JSONio; mkoctfile --mex jsonread.c jsmn.c -DJSMN_PARENT_LINKS; cd ../..
2736
- octave $OCTFLAGS --eval "addpath (pwd); savepath ();"
28-
# Install BIDS-Validator
29-
- sudo npm install -g bids-validator
3037

3138
before_script:
3239
# Add to src functions to path
@@ -36,11 +43,9 @@ before_script:
3643

3744
jobs:
3845
include:
39-
- stage: "BIDS validator"
40-
name: "Create and check dataset"
46+
- name: "BIDS validator: create and check dataset"
4147
script: octave $OCTFLAGS --eval "test_makeRawDataset" && bids-validator `pwd`/output/rawdata/ --ignoreNiftiHeaders
42-
- stage: "Linter"
43-
name: "miss_hit"
44-
script: cd .. && mh_style `pwd`
45-
46-
48+
- name: "miss_hit: checking code quality"
49+
script: mh_metric . --ci
50+
- name: "miss_hit: checking code style"
51+
script: mh_style .

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ sub-090/ses-003/sub-090_ses-003_task-auditoryTask_run-023_events_date-2020072915
5959
## 2. <a name='Documentation'></a>Documentation
6060

6161
- [Installation](./docs/installation.md)
62-
- [How to use it](./docs/usage.md)
63-
- [Jupyter notebooks](./notebooks/README.md)
62+
- [How to use it: jupyter notebooks](./notebooks)
6463
- [Functions description](./docs/functions_description.md)
6564

6665
## 3. <a name='Contributing'></a>Contributing
@@ -77,6 +76,13 @@ Feel free to open issues to report a bug and ask for improvements.
7776

7877
Here are the naming templates used.
7978

79+
- Behavior
80+
81+
`sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_run-<index>]_events.tsv`
82+
`sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_run-<index>]_events.json`
83+
`sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_run-<index>]_beh.tsv`
84+
`sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_run-<index>]_beh.json`
85+
8086
- BOLD
8187

8288
`sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_ce-<label>][_dir-<label>][_rec-<label>][_run-<index>][_echo-<index>]_<contrast_label>.nii[.gz]`
@@ -88,15 +94,37 @@ Here are the naming templates used.
8894
- EEG
8995

9096
`sub-<label>[_ses-<label>]_task-<label>[_run-<index>]_eeg.<manufacturer_specific_extension>`
97+
`sub-<label>[_ses-<label>]_task-<label>[_run-<index>]_eeg.json`
98+
99+
<!-- European data format (Each recording consisting of a .edf file)
100+
101+
BrainVision Core Data Format (Each recording consisting of a .vhdr, .vmrk, .eeg file triplet)
102+
103+
The format used by the MATLAB toolbox EEGLAB (Each recording consisting of a .set file with an optional .fdt file)
104+
105+
Biosemi data format (Each recording consisting of a .bdf file) -->
106+
107+
91108

92109
- MEG
93110

94111
???
95112

96113
- Eyetracker
97114

115+
current format
116+
`<matches>_recording-eyetracking_physio.tsv.gz`
117+
118+
future BEP format in a dedicated eyetracker folder
98119
`sub-<participant_label>[_ses-<label>][_acq-<label>]_task-<task_label>_eyetrack.<manufacturer_specific_extension>`
99120

121+
- Stim and physio
122+
123+
`<matches>[_recording-<label>]_physio.tsv.gz`
124+
`<matches>[_recording-<label>]_physio.json`
125+
`<matches>[_recording-<label>]_stim.tsv.gz`
126+
`<matches>[_recording-<label>]_stim.json`
127+
100128
### 3.3. <a name='Contributors'></a>Contributors ✨
101129

102130
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

docs/functions_description.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
* 2. [createFilename](#createFilename)
66
* 3. [saveEventsFile](#saveEventsFile)
77
* 4. [checkCFG](#checkCFG)
8-
* 5. [CFG content](#CFGcontent)
9-
* 6. [createBoldJson](#createBoldJson)
8+
* 4.1. [CFG content](#CFGcontent)
9+
* 5. [createBoldJson](#createBoldJson)
1010

1111
<!-- vscode-markdown-toc-config
1212
numbering=true
@@ -57,7 +57,7 @@ If the user DOES NOT provide `onset`, `trial_type`, this events will be skipped.
5757

5858
Check that we have all the fields that we need in the experiment parameters.
5959

60-
## 5. <a name='CFGcontent'></a>CFG content
60+
### 4.1. <a name='CFGcontent'></a>CFG content
6161

6262
```matlab
6363
% The following can be modified by users but their effect might
@@ -123,7 +123,7 @@ cfg.fileName.datasetDescription
123123
124124
```
125125

126-
## 6. <a name='createBoldJson'></a>createBoldJson
126+
## 5. <a name='createBoldJson'></a>createBoldJson
127127

128128
```
129129
createBoldJson(cfg)

docs/usage.md

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

manualTests/dummyData/.bidsignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
*_beh.*
2+
*_eeg.*
3+
*_ieeg.*
4+
*_meg.*
5+
6+
# *_beh.tsv
7+
# *_eeg.edf
8+
# *_ieeg.edf
9+
# *_meg.fif
10+
11+
# *_bold.nii.gz

manualTests/miss_hit.cfg

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# style guide (https://florianschanda.github.io/miss_hit/style_checker.html)
12
line_length: 100
2-
regex_function_name: "(test_[a-z]+)(([A-Z]){1}[A-Za-z]+)*"
3-
suppress_rule: "copyright_notice"
3+
regex_function_name: "((test_[a-z]+)|[a-z]+)(([A-Z]){1}[A-Za-z]+)*"
4+
suppress_rule: "copyright_notice"
5+
6+
# metrics limit for the code quality (https://florianschanda.github.io/miss_hit/metrics.html)
7+
metric "cnest": limit 4
8+
metric "file_length": limit 500
9+
metric "cyc": limit 15
10+
metric "parameters": limit 5
File renamed without changes.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
function test_suite = test_createBoldJson %#ok<*STOUT>
1+
function test_suite = test_createJson %#ok<*STOUT>
22
try % assignment of 'localfunctions' is necessary in Matlab >= 2016
33
test_functions = localfunctions(); %#ok<*NASGU>
44
catch % no problem; early Matlab versions can use initTestSuite fine
55
end
66
initTestSuite;
77
end
88

9-
function test_createBoldJsonExtra()
9+
function test_createJsonExtra()
1010

1111
outputDir = fullfile(fileparts(mfilename('fullpath')), 'output');
1212

@@ -29,7 +29,7 @@ function test_createBoldJsonExtra()
2929

3030
extraInfo = struct('extraInfo', struct('nestedExtraInfo', 'something extra'));
3131

32-
createBoldJson(cfg, extraInfo);
32+
createJson(cfg, extraInfo);
3333

3434
%% check content
3535
fileName = strrep(cfg.fileName.events, '_events', '_bold');

0 commit comments

Comments
 (0)