Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
9aa30db
Merge remote-tracking branch 'cpp-lln-lab/master'
CerenB Aug 7, 2020
bc0aaa6
Merge remote-tracking branch 'cpp-lln-lab/master'
CerenB Aug 9, 2020
0ca7fd8
add some initialization for eyetracking
Remi-Gau Aug 18, 2020
17ab12d
Merge tag 'v1.0.0'
CerenB Aug 31, 2020
6df2e7f
Merge remote-tracking branch 'cpp-lln-lab/master' into cer-readme_sug…
CerenB Sep 16, 2020
8e7aace
juptyer notebook installation suggestion
CerenB Sep 16, 2020
e88b83b
Merge branch 'master' into cer-readme_suggest
Remi-Gau Sep 17, 2020
41459cf
Merge branch 'master' into cer-readme_suggest
Remi-Gau Sep 17, 2020
88f62e7
add copyright
Remi-Gau Sep 17, 2020
270e750
rm extra mh cfg file
Remi-Gau Sep 17, 2020
b1efc29
Merge pull request #97 from cpp-lln-lab/remi-motion_prf
Remi-Gau Sep 17, 2020
82fcbe9
add some initialization for eyetracking
Remi-Gau Aug 18, 2020
5a964cf
fix wrong stim.json save
Remi-Gau Sep 23, 2020
942a08a
mh fix
Remi-Gau Sep 23, 2020
82efd6f
Merge pull request #99 from Remi-Gau/remi-event_stim_log
Remi-Gau Sep 23, 2020
1cf568d
add remark and check_links
Remi-Gau Sep 24, 2020
fc32150
mh fix
Remi-Gau Sep 24, 2020
2210b07
update CI
Remi-Gau Sep 24, 2020
8af2db0
fix markdown
Remi-Gau Sep 24, 2020
d0dc3dd
make CI jobs run in parallel
Remi-Gau Sep 24, 2020
c34a630
use github action for miss_hit linter
Remi-Gau Sep 24, 2020
8a90f4e
use node and not python for travis
Remi-Gau Sep 24, 2020
1c905c5
Merge pull request #101 from Remi-Gau/remi-markdown_linting
Remi-Gau Sep 24, 2020
074ef32
fix removing date from _stim.json
Remi-Gau Sep 24, 2020
d2a91d3
mh fix
Remi-Gau Sep 24, 2020
faf45ad
Merge pull request #103 from Remi-Gau/remi-markdown_linting
Remi-Gau Sep 24, 2020
26a0bb0
add filter function
marcobarilari Sep 26, 2020
636bef4
update bids submodule
marcobarilari Sep 26, 2020
06e6718
add tsvwrite option
marcobarilari Sep 26, 2020
b3af2bd
mh fix
marcobarilari Sep 26, 2020
e8fd1a7
create test for read and filter log
Remi-Gau Sep 27, 2020
33706ec
mh fix
Remi-Gau Sep 27, 2020
627016a
move utility files for tests
Remi-Gau Sep 27, 2020
b0db59c
fix dataset non existing on octave
Remi-Gau Sep 27, 2020
26cd875
Merge pull request #104 from marcobarilari/marco_add-update-filter-func
Remi-Gau Sep 27, 2020
f85e02d
Merge branch 'master' into remi-eyetracker
Remi-Gau Oct 2, 2020
5cde5e2
Update notebooks/README.md
marcobarilari Oct 3, 2020
00adc35
Update notebooks/README.md
marcobarilari Oct 3, 2020
8dd99aa
Merge remote-tracking branch 'origin/remi-eyetracker' into remi-eyetr…
Remi-Gau Oct 5, 2020
912b015
update test for checkCFG
Remi-Gau Oct 5, 2020
5a63f1b
mh fix
Remi-Gau Oct 5, 2020
2986e21
Merge pull request #106 from Remi-Gau/remi-eyetracker
Remi-Gau Oct 5, 2020
52f3039
[FIX] make data saving after filtering all the relevant lines #105
Remi-Gau Oct 5, 2020
e82e0db
Merge pull request #108 from CerenB/cer-readme_suggest
Remi-Gau Oct 5, 2020
d332562
Merge pull request #107 from Remi-Gau/remi-change_read_filter_save
Remi-Gau Oct 5, 2020
91e800f
mh fix
Remi-Gau Oct 7, 2020
e7c7624
fix markdown
Remi-Gau Oct 13, 2020
4a5dbe8
make travis run remark on certain files or folders
Remi-Gau Oct 13, 2020
48acd6b
lock bids validator version at 1.5.4
Remi-Gau Oct 13, 2020
92dd809
fix markdown
Remi-Gau Oct 13, 2020
e303b20
fix markdown
Remi-Gau Oct 13, 2020
caec75b
fix link
Remi-Gau Oct 13, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/check_md_links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Check Markdown links

# checking for any dead links in markdown files

on:
push:
branches:
- master
- dev
pull_request:
branches: '*'

jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: gaurav-nelson/github-action-markdown-link-check@v1
39 changes: 39 additions & 0 deletions .github/workflows/miss_hit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: miss_hit

on:
push:
branches:
- master
- dev
pull_request:
branches: '*'

jobs:
build:

runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 1

- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
python-version: 3.6

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools
pip3 install install miss_hit
- name: Miss_hit code quality
run: |
mh_metric . --ci
- name: Miss_hit code style
run: |
mh_style .
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@

# exclude content of logfiles folders
*output*
*.tsv
*.mat

# exclude temp files from tests and coverage
*test_code_report.txt
*coverage*

*filteredBy*

tests/*.nii*
tests/*.json*
tests/*.tsv*
Expand Down
13 changes: 13 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parser": "markdown",
"proseWrap": "always",
"tabWidth": 2,
"overrides": [
{
"files": "*.md",
"options": {
"tabWidth": 4
}
}
]
}
11 changes: 11 additions & 0 deletions .remarkrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plugins": [
"preset-lint-consistent",
"preset-lint-markdown-style-guide",
"preset-lint-recommended",
["lint-no-duplicate-headings", false],
["lint-list-item-indent", "tab-size"],
["lint-maximum-line-length", true],
["lint-maximum-heading-length", false]
]
}
31 changes: 21 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@
dist: bionic

# Language and version
language: python
python:
- "3.6" # current default Python on Travis CI
language: node_js
node_js:
- "10"

cache:
apt: true # only works with Pro version
directories:
- node_modules # NPM packages for the remark markdown linter

branches:
only: # only run the CI for those branches
- master
- dev

env:
global: # Define environment variables for bash
Expand All @@ -26,9 +33,7 @@ before_install:
- travis_retry sudo apt-get -y install nodejs
- travis_retry sudo apt-get -y install npm
# Install BIDS-Validator
- sudo npm install -g bids-validator
# Install miss_hit linter
- pip3 install miss_hit
- sudo npm install -g bids-validator@1.5.4

install:
# make octave file the JSONio submodule
Expand All @@ -43,9 +48,15 @@ before_script:

jobs:
include:

- name: "BIDS validator: create and check dataset"
script: octave $OCTFLAGS --eval "test_makeRawDataset" && bids-validator `pwd`/output/raw/ --ignoreNiftiHeaders
- name: "miss_hit: checking code quality"
script: mh_metric . --ci
- name: "miss_hit: checking code style"
script: mh_style .

- name: "Check markdown"
before_script:
- npm install `cat npm-requirements.txt`
script:
- remark README.md --frail
- remark ./notebooks/ --frail
- remark ./tests/ --frail
- remark ./docs/ --frail
106 changes: 65 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<!-- lint disable -->

**Try it**

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

**Unit tests and coverage**

[![](https://img.shields.io/badge/Octave-CI-blue?logo=Octave&logoColor=white)](https://github.com/cpp-lln-lab/CPP_BIDS/actions)
![](https://github.com/cpp-lln-lab/CPP_BIDS/workflows/CI/badge.svg)
![](https://github.com/cpp-lln-lab/CPP_BIDS/workflows/CI/badge.svg)

[![codecov](https://codecov.io/gh/cpp-lln-lab/CPP_BIDS/branch/master/graph/badge.svg)](https://codecov.io/gh/cpp-lln-lab/CPP_BIDS)

Expand All @@ -15,64 +17,81 @@

**Contributors**

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

* * *

---

# CPP_BIDS

<!-- vscode-markdown-toc -->
* 1. [Output format](#Outputformat)
* 1.1. [Modality agnostic aspect](#Modalityagnosticaspect)
* 2. [Documentation](#Documentation)
* 3. [Contributing](#Contributing)
* 3.1. [Guidestyle](#Guidestyle)
* 3.2. [BIDS naming convention](#BIDSnamingconvention)
* 3.3. [Contributors ✨](#Contributors)
<!-- TOC -->

- [CPP_BIDS](#cpp_bids)
- [Output format](#output-format)
- [Modality agnostic aspect](#modality-agnostic-aspect)
- [Documentation](#documentation)
- [Contributing](#contributing)
- [Guidestyle](#guidestyle)
- [BIDS naming convention](#bids-naming-convention)
- [Change log](#change-log)
- [Contributors ✨](#contributors-)

<!-- /TOC -->

<!-- vscode-markdown-toc-config
numbering=true
autoSave=true
/vscode-markdown-toc-config -->
<!-- /vscode-markdown-toc -->
<!-- lint enable -->

A set of function for matlab and octave to create [BIDS-compatible](https://bids-specification.readthedocs.io/en/stable/) folder structure and filenames for the output of behavioral, EEG, fMRI, eyetracking studies.
A set of function for matlab and octave to create
[BIDS-compatible](https://bids-specification.readthedocs.io/en/stable/) folder
structure and filenames for the output of behavioral, EEG, fMRI, eyetracking
studies.

## 1. <a name='Outputformat'></a>Output format
## Output format

### 1.1. <a name='Modalityagnosticaspect'></a>Modality agnostic aspect
### Modality agnostic aspect

Subjects, session and run number labels will be numbers with zero padding up to 3 values (e.g subject 1 will become `sub-001`).
Subjects, session and run number labels will be numbers with zero padding up to
3 values (e.g subject 1 will become `sub-001`).

A session folder will ALWAYS be created even if not requested (default will be `ses-001`).
A session folder will ALWAYS be created even if not requested (default will be
`ses-001`).

Task labels will be printed in camelCase in the filenames.

Time stamps are added directly in the filename by adding a suffix `_date-YYYYMMDDHHMM` which makes the file name non-BIDS compliant. This was added to prevent overwriting files in case a certain run needs to be done a second time because of a crash (Some of us are paranoid about keeping even cancelled runs during my experiments). This suffix should be removed to make the data set BIDS compliant. See `convertSourceToRaw.m` for more details.
Time stamps are added directly in the filename by adding a suffix
`_date-YYYYMMDDHHMM` which makes the file name non-BIDS compliant. This was
added to prevent overwriting files in case a certain run needs to be done a
second time because of a crash (Some of us are paranoid about keeping even
cancelled runs during my experiments). This suffix should be removed to make the
data set BIDS compliant. See `convertSourceToRaw.m` for more details.

For example:

```
```bash
sub-090/ses-003/sub-090_ses-003_task-auditoryTask_run-023_events_date-202007291536.tsv
```

## 2. <a name='Documentation'></a>Documentation
## Documentation

- [Installation](./docs/installation.md)
- [How to use it: jupyter notebooks](./notebooks)
- [Functions description](./docs/functions_description.md)
- [Installation](./docs/installation.md)
- [How to use it: jupyter notebooks](./notebooks)
- [Functions description](./docs/functions-description.md)

## 3. <a name='Contributing'></a>Contributing
## Contributing

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

### 3.1. <a name='Guidestyle'></a>Guidestyle
### Guidestyle

- We use camelCase.
- We keep the McCabe complexity as reported by the [check_my_code function](https://github.com/Remi-Gau/check_my_code) below 15.
- We use the [MISS_HIT linter](https://florianschanda.github.io/miss_hit/style_checker.html) to automatically fix some linting issues.

### 3.2. <a name='BIDSnamingconvention'></a>BIDS naming convention
- We keep the McCabe complexity as reported by the
[check_my_code function](https://github.com/Remi-Gau/check_my_code)
below 15.

- We use the
[MISS_HIT linter](https://florianschanda.github.io/miss_hit/style_checker.html)
to automatically fix some linting issues.

### BIDS naming convention

Here are the naming templates used.

Expand Down Expand Up @@ -104,16 +123,13 @@ The format used by the MATLAB toolbox EEGLAB (Each recording consisting of a .se

Biosemi data format (Each recording consisting of a .bdf file) -->



- MEG

???

- Eyetracker

current format
`<matches>_recording-eyetracking_physio.tsv.gz`
current format `<matches>_recording-eyetracking_physio.tsv.gz`

future BEP format in a dedicated eyetracker folder
`sub-<participant_label>[_ses-<label>][_acq-<label>]_task-<task_label>_eyetrack.<manufacturer_specific_extension>`
Expand All @@ -125,17 +141,21 @@ future BEP format in a dedicated eyetracker folder
`<matches>[_recording-<label>]_stim.tsv.gz`
`<matches>[_recording-<label>]_stim.json`

### change log
### Change log

<!-- 93b4c584bf22883a3c4f8b9031b70e381deef272 -->

### 3.3. <a name='Contributors'></a>Contributors ✨
### Contributors ✨

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

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->

<!-- prettier-ignore-start -->

<!-- markdownlint-disable -->

<table>
<tr>
<td align="center"><a href="https://github.com/CerenB"><img src="https://avatars1.githubusercontent.com/u/10451654?v=4" width="100px;" alt=""/><br /><sub><b>CerenB</b></sub></a><br /><a href="https://github.com/cpp-lln-lab/CPP_BIDS/commits?author=CerenB" title="Code">💻</a> <a href="#design-CerenB" title="Design">🎨</a> <a href="https://github.com/cpp-lln-lab/CPP_BIDS/commits?author=CerenB" title="Documentation">📖</a> <a href="#userTesting-CerenB" title="User Testing">📓</a> <a href="#ideas-CerenB" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/cpp-lln-lab/CPP_BIDS/issues?q=author%3ACerenB" title="Bug reports">🐛</a></td>
Expand All @@ -145,7 +165,11 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
</table>

<!-- markdownlint-enable -->

<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
This project follows the
[all-contributors](https://github.com/all-contributors/all-contributors)
specification. Contributions of any kind welcome!
Loading