Skip to content

Commit 3455032

Browse files
authored
Merge pull request #157 from cpp-lln-lab/release_candidate_2.0
Release candidate 2.0
2 parents 57738dc + d3164c4 commit 3455032

File tree

107 files changed

+3961
-1262
lines changed

Some content is hidden

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

107 files changed

+3961
-1262
lines changed

.gitattributes

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.github/workflows/check_markdown.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Check Markdown
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches: '*'
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
17+
- uses: actions/checkout@v2
18+
with:
19+
submodules: true
20+
fetch-depth: 1
21+
22+
- uses: actions/setup-node@v2
23+
with:
24+
node-version: '10'
25+
26+
- name: Install dependencies and check markdown
27+
run: |
28+
npm install `cat npm-requirements.txt`
29+
npx remark README.md --frail
30+
npx remark ./notebooks/ --frail
31+
npx remark ./tests/ --frail
32+
npx remark ./docs/ --frail
33+
34+

.github/workflows/check_md_links.yml

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
push:
77
branches:
88
- master
9-
- dev
109
pull_request:
1110
branches: '*'
1211

.github/workflows/miss_hit.yml

+9-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches:
66
- master
7-
- dev
87
pull_request:
98
branches: '*'
109

@@ -28,12 +27,16 @@ jobs:
2827
- name: Install dependencies
2928
run: |
3029
python -m pip install --upgrade pip setuptools
31-
pip3 install install miss_hit
30+
pip3 install -r requirements.txt
3231
33-
- name: Miss_hit code quality
32+
- name: MISS_HIT Code style
3433
run: |
35-
mh_metric . --ci
34+
mh_style --process-slx
3635
37-
- name: Miss_hit code style
36+
- name: MISS_HIT Metrics
3837
run: |
39-
mh_style .
38+
mh_metric --ci
39+
40+
- name: MISS_HIT Bug finder
41+
run: |
42+
mh_lint

.github/workflows/moxunit.yml

+14-1
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,40 @@
1-
name: CI
1+
name: MOxUnit
22

33
on:
44
push:
55
branches:
66
- master
7+
- dev
78
pull_request:
89
branches: '*'
910

1011
jobs:
1112
build:
1213
runs-on: ubuntu-latest
1314
steps:
15+
1416
- uses: actions/checkout@v2
1517
with:
1618
submodules: true
1719
fetch-depth: 1
20+
21+
- name: Make jsonread for octave
22+
run: |
23+
sudo apt-get -y -qq update
24+
sudo apt-get -y install octave
25+
sudo apt-get -y install liboctave-dev
26+
cd lib/JSONio
27+
mkoctfile --mex jsonread.c jsmn.c -DJSMN_PARENT_LINKS
28+
# cd ../..
29+
1830
- name: MOxUnit Action
1931
uses: joergbrech/[email protected]
2032
with:
2133
tests: tests
2234
src: src
2335
with_coverage: true
2436
cover_xml_file: coverage.xml
37+
2538
- name: Code coverage
2639
uses: codecov/codecov-action@v1
2740
with:

.gitignore

+14-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,20 @@ tests/*.tsv*
2323
check_my_code_report.txt
2424

2525
# jupyter notebook checkpoints
26-
.ipynb_checkpoints
27-
*/.ipynb_checkpoints/*
26+
notebooks/.ipynb_checkpoints/*
27+
notebooks/source/*
28+
notebooks/output/*
29+
notebooks/new_experiment/*
2830

31+
# ignore node js files
32+
node_modules/*
33+
package-lock.json
2934

35+
# visual studio code stuff
36+
.vscode
3037

38+
# virtual env
39+
cpp_bids/*
40+
41+
# documentation
42+
docs/build/*

.readthedocs.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# .readthedocs.yml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Build documentation in the docs/ directory with Sphinx
9+
sphinx:
10+
configuration: docs/source/conf.py
11+
builder: html
12+
fail_on_warning: true
13+
14+
# Build documentation with MkDocs
15+
#mkdocs:
16+
# configuration: mkdocs.yml
17+
18+
# Optionally build your docs in additional formats such as PDF
19+
formats:
20+
- pdf
21+
22+
# Optionally set the version of Python and requirements required to build your docs
23+
python:
24+
version: 3.7
25+
install:
26+
- requirements: requirements.txt

.travis.yml

+3-17
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,12 @@
33
# have set it up to run continuous integration on this this repo
44

55
# Linux distribution (bionic beaver)
6-
dist: bionic
6+
dist: focal
77

88
# Language and version
99
language: node_js
1010
node_js:
11-
- "10"
12-
13-
cache:
14-
apt: true # only works with Pro version
15-
directories:
16-
- node_modules # NPM packages for the remark markdown linter
11+
- "11"
1712

1813
branches:
1914
only: # only run the CI for those branches
@@ -33,7 +28,7 @@ before_install:
3328
- travis_retry sudo apt-get -y install nodejs
3429
- travis_retry sudo apt-get -y install npm
3530
# Install BIDS-Validator
36-
- sudo npm install -g [email protected].4
31+
- sudo npm install -g [email protected].7
3732

3833
install:
3934
# make octave file the JSONio submodule
@@ -51,12 +46,3 @@ jobs:
5146

5247
- name: "BIDS validator: create and check dataset"
5348
script: octave $OCTFLAGS --eval "test_makeRawDataset" && bids-validator `pwd`/output/raw/ --ignoreNiftiHeaders
54-
55-
- name: "Check markdown"
56-
before_script:
57-
- npm install `cat npm-requirements.txt`
58-
script:
59-
- remark README.md --frail
60-
- remark ./notebooks/ --frail
61-
- remark ./tests/ --frail
62-
- remark ./docs/ --frail

.zenodo.json

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"title": "CPP_BIDS",
3+
"description": "A lightweight Octave/MATLAB toolbox to help create BIDS data sets from source.",
4+
"creators": [
5+
{
6+
"affiliation": "Université Catholique de Louvain",
7+
"name": "Gau, Rémi",
8+
"orcid": "0000-0002-1535-9767"
9+
},
10+
{
11+
"affiliation": "Université Catholique de Louvain",
12+
"name": "Barilari, Marco",
13+
"orcid": "0000-0002-3313-3120"
14+
},
15+
{
16+
"affiliation": "Université Catholique de Louvain",
17+
"name": "Battal, Ceren",
18+
"orcid": "0000-0002-9844-7630"
19+
},
20+
{
21+
"affiliation": "Université Catholique de Louvain",
22+
"name": "Lenc, Thomas",
23+
"orcid": "0000-0001-5796-1388"
24+
}
25+
],
26+
"keywords": [
27+
"BIDS",
28+
"brain imaging data structure",
29+
"neuroscience",
30+
"MATLAB",
31+
"Octave"
32+
],
33+
"license": "MIT license",
34+
"upload_type": "software"
35+
}

README.md

+45-41
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44

55
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/cpp-lln-lab/CPP_BIDS/master?filepath=notebooks%2Fbasic_usage.ipynb)
66

7+
**Documentation**
8+
9+
[![Documentation Status: stable](https://readthedocs.org/projects/cpp-bids/badge/?version=stable)](https://cpp-bids.readthedocs.io/en/stable/?badge=stable)
10+
11+
**Cite it**
12+
13+
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4007674.svg)](https://doi.org/10.5281/zenodo.4007674)
14+
715
**Unit tests and coverage**
816

917
[![](https://img.shields.io/badge/Octave-CI-blue?logo=Octave&logoColor=white)](https://github.com/cpp-lln-lab/CPP_BIDS/actions)
@@ -19,7 +27,7 @@
1927

2028
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)
2129

22-
* * *
30+
---
2331

2432
# CPP_BIDS
2533

@@ -44,42 +52,24 @@ A set of function for matlab and octave to create
4452
structure and filenames for the output of behavioral, EEG, fMRI, eyetracking
4553
studies.
4654

47-
## Output format
48-
49-
### Modality agnostic aspect
50-
51-
Subjects, session and run number labels will be numbers with zero padding up to
52-
3 values (e.g subject 1 will become `sub-001`).
53-
54-
A session folder will ALWAYS be created even if not requested (default will be
55-
`ses-001`).
56-
57-
Task labels will be printed in camelCase in the filenames.
58-
59-
Time stamps are added directly in the filename by adding a suffix
60-
`_date-YYYYMMDDHHMM` which makes the file name non-BIDS compliant. This was
61-
added to prevent overwriting files in case a certain run needs to be done a
62-
second time because of a crash (Some of us are paranoid about keeping even
63-
cancelled runs during my experiments). This suffix should be removed to make the
64-
data set BIDS compliant. See `convertSourceToRaw.m` for more details.
65-
66-
For example:
67-
68-
```bash
69-
sub-090/ses-003/sub-090_ses-003_task-auditoryTask_run-023_events_date-202007291536.tsv
70-
```
71-
7255
## Documentation
7356

7457
- [Installation](./docs/installation.md)
7558
- [How to use it: jupyter notebooks](./notebooks)
76-
- [Functions description](./docs/functions-description.md)
59+
- [General documentation](https://cpp-bids.readthedocs.io/en/dev/index.html)
7760

7861
## Contributing
7962

8063
Feel free to open issues to report a bug and ask for improvements.
8164

82-
### Guidestyle
65+
If you want to contribute, have a look at our
66+
[contributing guidelines](https://github.com/cpp-lln-lab/.github/blob/main/CONTRIBUTING.md)
67+
that are meant to guide you and help you get started. If something is not clear
68+
or you get stuck: it is more likely we did not do good enough a job at
69+
explaining things. So do not hesitate to open an issue, just to ask for
70+
clarification.
71+
72+
### Style guide
8373

8474
- We use camelCase.
8575

@@ -97,23 +87,31 @@ Here are the naming templates used.
9787

9888
- Behavior
9989

100-
`sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_run-<index>]_events.tsv`
101-
`sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_run-<index>]_events.json`
102-
`sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_run-<index>]_beh.tsv`
103-
`sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_run-<index>]_beh.json`
90+
```bash
91+
sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_run-<index>]_events.tsv
92+
sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_run-<index>]_events.json
93+
sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_run-<index>]_beh.tsv
94+
sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_run-<index>]_beh.json
95+
```
10496

10597
- BOLD
10698

107-
`sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_ce-<label>][_dir-<label>][_rec-<label>][_run-<index>][_echo-<index>]_<contrast_label>.nii[.gz]`
99+
```bash
100+
sub-<label>[_ses-<label>]_task-<label>[_acq-<label>][_ce-<label>][_dir-<label>][_rec-<label>][_run-<index>][_echo-<index>]_<contrast_label>.nii[.gz]
101+
```
108102

109103
- iEEG
110104

111-
`sub-<label>[_ses-<label>]_task-<task_label>[_run-<index>]_ieeg.json`
105+
```bash
106+
sub-<label>[_ses-<label>]_task-<task_label>[_run-<index>]_ieeg.json
107+
```
112108

113109
- EEG
114110

115-
`sub-<label>[_ses-<label>]_task-<label>[_run-<index>]_eeg.<manufacturer_specific_extension>`
116-
`sub-<label>[_ses-<label>]_task-<label>[_run-<index>]_eeg.json`
111+
```bash
112+
sub-<label>[_ses-<label>]_task-<label>[_run-<index>]_eeg.<manufacturer_specific_extension>
113+
sub-<label>[_ses-<label>]_task-<label>[_run-<index>]_eeg.json
114+
```
117115

118116
<!-- European data format (Each recording consisting of a .edf file)
119117
@@ -132,14 +130,19 @@ Biosemi data format (Each recording consisting of a .bdf file) -->
132130
current format `<matches>_recording-eyetracking_physio.tsv.gz`
133131

134132
future BEP format in a dedicated eyetracker folder
135-
`sub-<participant_label>[_ses-<label>][_acq-<label>]_task-<task_label>_eyetrack.<manufacturer_specific_extension>`
133+
134+
```bash
135+
sub-<participant_label>[_ses-<label>][_acq-<label>]_task-<task_label>_eyetrack.<manufacturer_specific_extension>
136+
```
136137

137138
- Stim and physio
138139

139-
`<matches>[_recording-<label>]_physio.tsv.gz`
140-
`<matches>[_recording-<label>]_physio.json`
141-
`<matches>[_recording-<label>]_stim.tsv.gz`
142-
`<matches>[_recording-<label>]_stim.json`
140+
```bash
141+
<matches>[_recording-<label>]_physio.tsv.gz
142+
<matches>[_recording-<label>]_physio.json
143+
<matches>[_recording-<label>]_stim.tsv.gz
144+
<matches>[_recording-<label>]_stim.json
145+
```
143146

144147
### Change log
145148

@@ -164,6 +167,7 @@ Thanks goes to these wonderful people
164167

165168
<!-- markdownlint-enable -->
166169
<!-- prettier-ignore-end -->
170+
167171
<!-- ALL-CONTRIBUTORS-LIST:END -->
168172

169173
This project follows the

0 commit comments

Comments
 (0)