Skip to content

Commit 1cab369

Browse files
authored
Merge pull request #109 from Remi-Gau/dev
getting ready for a version bump: v1.1.0
2 parents 6a3c9bf + caec75b commit 1cab369

Some content is hidden

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

56 files changed

+810
-365
lines changed

.github/workflows/check_md_links.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Check Markdown links
2+
3+
# checking for any dead links in markdown files
4+
5+
on:
6+
push:
7+
branches:
8+
- master
9+
- dev
10+
pull_request:
11+
branches: '*'
12+
13+
jobs:
14+
markdown-link-check:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@master
18+
- uses: gaurav-nelson/github-action-markdown-link-check@v1

.github/workflows/miss_hit.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: miss_hit
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- dev
8+
pull_request:
9+
branches: '*'
10+
11+
jobs:
12+
build:
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
18+
- uses: actions/checkout@v2
19+
with:
20+
submodules: true
21+
fetch-depth: 1
22+
23+
- name: Set up Python 3.6
24+
uses: actions/setup-python@v2
25+
with:
26+
python-version: 3.6
27+
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip setuptools
31+
pip3 install install miss_hit
32+
33+
- name: Miss_hit code quality
34+
run: |
35+
mh_metric . --ci
36+
37+
- name: Miss_hit code style
38+
run: |
39+
mh_style .

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@
77

88
# exclude content of logfiles folders
99
*output*
10-
*.tsv
1110
*.mat
1211

1312
# exclude temp files from tests and coverage
1413
*test_code_report.txt
1514
*coverage*
1615

16+
*filteredBy*
17+
1718
tests/*.nii*
1819
tests/*.json*
1920
tests/*.tsv*

.prettierrc

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"parser": "markdown",
3+
"proseWrap": "always",
4+
"tabWidth": 2,
5+
"overrides": [
6+
{
7+
"files": "*.md",
8+
"options": {
9+
"tabWidth": 4
10+
}
11+
}
12+
]
13+
}

.remarkrc

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"plugins": [
3+
"preset-lint-consistent",
4+
"preset-lint-markdown-style-guide",
5+
"preset-lint-recommended",
6+
["lint-no-duplicate-headings", false],
7+
["lint-list-item-indent", "tab-size"],
8+
["lint-maximum-line-length", true],
9+
["lint-maximum-heading-length", false]
10+
]
11+
}

.travis.yml

+21-10
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,19 @@
66
dist: bionic
77

88
# Language and version
9-
language: python
10-
python:
11-
- "3.6" # current default Python on Travis CI
9+
language: node_js
10+
node_js:
11+
- "10"
1212

1313
cache:
1414
apt: true # only works with Pro version
15+
directories:
16+
- node_modules # NPM packages for the remark markdown linter
17+
18+
branches:
19+
only: # only run the CI for those branches
20+
- master
21+
- dev
1522

1623
env:
1724
global: # Define environment variables for bash
@@ -26,9 +33,7 @@ before_install:
2633
- travis_retry sudo apt-get -y install nodejs
2734
- travis_retry sudo apt-get -y install npm
2835
# Install BIDS-Validator
29-
- sudo npm install -g bids-validator
30-
# Install miss_hit linter
31-
- pip3 install miss_hit
36+
- sudo npm install -g [email protected]
3237

3338
install:
3439
# make octave file the JSONio submodule
@@ -43,9 +48,15 @@ before_script:
4348

4449
jobs:
4550
include:
51+
4652
- name: "BIDS validator: create and check dataset"
4753
script: octave $OCTFLAGS --eval "test_makeRawDataset" && bids-validator `pwd`/output/raw/ --ignoreNiftiHeaders
48-
- name: "miss_hit: checking code quality"
49-
script: mh_metric . --ci
50-
- name: "miss_hit: checking code style"
51-
script: mh_style .
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

README.md

+65-41
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
<!-- lint disable -->
2+
13
**Try it**
24

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

57
**Unit tests and coverage**
68

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

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

@@ -15,64 +17,81 @@
1517

1618
**Contributors**
1719

18-
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)
20+
[![All Contributors](https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square)](#contributors-)
21+
22+
* * *
1923

20-
---
21-
2224
# CPP_BIDS
2325

24-
<!-- vscode-markdown-toc -->
25-
* 1. [Output format](#Outputformat)
26-
* 1.1. [Modality agnostic aspect](#Modalityagnosticaspect)
27-
* 2. [Documentation](#Documentation)
28-
* 3. [Contributing](#Contributing)
29-
* 3.1. [Guidestyle](#Guidestyle)
30-
* 3.2. [BIDS naming convention](#BIDSnamingconvention)
31-
* 3.3. [Contributors ✨](#Contributors)
26+
<!-- TOC -->
27+
28+
- [CPP_BIDS](#cpp_bids)
29+
- [Output format](#output-format)
30+
- [Modality agnostic aspect](#modality-agnostic-aspect)
31+
- [Documentation](#documentation)
32+
- [Contributing](#contributing)
33+
- [Guidestyle](#guidestyle)
34+
- [BIDS naming convention](#bids-naming-convention)
35+
- [Change log](#change-log)
36+
- [Contributors ✨](#contributors-)
37+
38+
<!-- /TOC -->
3239

33-
<!-- vscode-markdown-toc-config
34-
numbering=true
35-
autoSave=true
36-
/vscode-markdown-toc-config -->
37-
<!-- /vscode-markdown-toc -->
40+
<!-- lint enable -->
3841

39-
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.
42+
A set of function for matlab and octave to create
43+
[BIDS-compatible](https://bids-specification.readthedocs.io/en/stable/) folder
44+
structure and filenames for the output of behavioral, EEG, fMRI, eyetracking
45+
studies.
4046

41-
## 1. <a name='Outputformat'></a>Output format
47+
## Output format
4248

43-
### 1.1. <a name='Modalityagnosticaspect'></a>Modality agnostic aspect
49+
### Modality agnostic aspect
4450

45-
Subjects, session and run number labels will be numbers with zero padding up to 3 values (e.g subject 1 will become `sub-001`).
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`).
4653

47-
A session folder will ALWAYS be created even if not requested (default will be `ses-001`).
54+
A session folder will ALWAYS be created even if not requested (default will be
55+
`ses-001`).
4856

4957
Task labels will be printed in camelCase in the filenames.
5058

51-
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.
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.
5265

5366
For example:
5467

55-
```
68+
```bash
5669
sub-090/ses-003/sub-090_ses-003_task-auditoryTask_run-023_events_date-202007291536.tsv
5770
```
5871

59-
## 2. <a name='Documentation'></a>Documentation
72+
## Documentation
6073

61-
- [Installation](./docs/installation.md)
62-
- [How to use it: jupyter notebooks](./notebooks)
63-
- [Functions description](./docs/functions_description.md)
74+
- [Installation](./docs/installation.md)
75+
- [How to use it: jupyter notebooks](./notebooks)
76+
- [Functions description](./docs/functions-description.md)
6477

65-
## 3. <a name='Contributing'></a>Contributing
78+
## Contributing
6679

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

69-
### 3.1. <a name='Guidestyle'></a>Guidestyle
82+
### Guidestyle
7083

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

75-
### 3.2. <a name='BIDSnamingconvention'></a>BIDS naming convention
86+
- We keep the McCabe complexity as reported by the
87+
[check_my_code function](https://github.com/Remi-Gau/check_my_code)
88+
below 15.
89+
90+
- We use the
91+
[MISS_HIT linter](https://florianschanda.github.io/miss_hit/style_checker.html)
92+
to automatically fix some linting issues.
93+
94+
### BIDS naming convention
7695

7796
Here are the naming templates used.
7897

@@ -104,16 +123,13 @@ The format used by the MATLAB toolbox EEGLAB (Each recording consisting of a .se
104123
105124
Biosemi data format (Each recording consisting of a .bdf file) -->
106125

107-
108-
109126
- MEG
110127

111128
???
112129

113130
- Eyetracker
114131

115-
current format
116-
`<matches>_recording-eyetracking_physio.tsv.gz`
132+
current format `<matches>_recording-eyetracking_physio.tsv.gz`
117133

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

128-
### change log
144+
### Change log
129145

130146
<!-- 93b4c584bf22883a3c4f8b9031b70e381deef272 -->
131147

132-
### 3.3. <a name='Contributors'></a>Contributors ✨
148+
### Contributors ✨
133149

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

136153
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
154+
137155
<!-- prettier-ignore-start -->
156+
138157
<!-- markdownlint-disable -->
158+
139159
<table>
140160
<tr>
141161
<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>
@@ -145,7 +165,11 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
145165
</table>
146166

147167
<!-- markdownlint-enable -->
168+
148169
<!-- prettier-ignore-end -->
170+
149171
<!-- ALL-CONTRIBUTORS-LIST:END -->
150172

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

0 commit comments

Comments
 (0)