Skip to content

Commit

Permalink
Merge pull request #109 from Remi-Gau/dev
Browse files Browse the repository at this point in the history
getting ready for a version bump: v1.1.0
  • Loading branch information
Remi-Gau authored Oct 13, 2020
2 parents 6a3c9bf + caec75b commit 1cab369
Show file tree
Hide file tree
Showing 56 changed files with 810 additions and 365 deletions.
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

0 comments on commit 1cab369

Please sign in to comment.