66[ ![ codecov] ( https://codecov.io/gh/cpp-lln-lab/CPP_PTB/branch/master/graph/badge.svg )] ( https://codecov.io/gh/cpp-lln-lab/CPP_PTB )
77
88<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
9+
910[ ![ All Contributors] ( https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square )] ( #contributors- )
11+
1012<!-- ALL-CONTRIBUTORS-BADGE:END -->
1113
1214# CPP_PTB
1315
16+ <!-- lint disable -->
17+
1418<!-- TOC -->
1519
16- - [ CPP_PTB] ( #cpp_ptb )
17- - [Requirements](#requirements)
18- - [Documentation](#documentation)
19- - [Content](#content)
20- - [How to install](#how-to-install)
21- - [Download with git](#download-with-git)
22- - [Add as a submodule](#add-as-a-submodule)
23- - [Example for submodule usage](#example-for-submodule-usage)
24- - [Direct download](#direct-download)
25- - [Add CPP_PTB globally to the matlab path](#add-cpp_ptb-globally-to-the-matlab-path)
26- - [Code style guide](#code-style-guide)
27- - [Unit tests](#unit-tests)
28- - [Contributors ✨](#contributors-)
20+ - [ CPP_PTB] ( #cpp_ptb )
21+ - [ Requirements] ( #requirements )
22+ - [ Documentation] ( #documentation )
23+ - [ Content] ( #content )
24+ - [ How to install] ( #how-to-install )
25+ - [ Download with git] ( #download-with-git )
26+ - [ Add as a submodule] ( #add-as-a-submodule )
27+ - [ Example for submodule usage] ( #example-for-submodule-usage )
28+ - [ Direct download] ( #direct-download )
29+ - [ Add CPP_PTB globally to the matlab path] ( #add-cpp_ptb-globally-to-the-matlab-path )
30+ - [ Code style guide] ( #code-style-guide )
31+ - [ Unit tests] ( #unit-tests )
32+ - [ Contributors ✨] ( #contributors- )
2933
3034<!-- /TOC -->
3135
36+ <!-- lint enable -->
3237
33- This is the Crossmodal Perception and Plasticity lab (CPP) PsychToolBox (PTB) toolbox.
38+ This is the Crossmodal Perception and Plasticity lab (CPP) PsychToolBox (PTB)
39+ toolbox.
3440
35- Those functions are mostly wrappers around some PTB functions to facilitate their use and their reuse (#DontRepeatYourself)
41+ Those functions are mostly wrappers around some PTB functions to facilitate
42+ their use and their reuse (#DontRepeatYourself)
3643
3744## Requirements
3845
39- Make sure that the following toolboxes are installed and added to the matlab / octave path.
46+ Make sure that the following toolboxes are installed and added to the matlab /
47+ octave path.
4048
4149For instructions see the following links:
4250
51+ <!-- lint disable -->
52+
4353| Requirements | Used version |
44- | ---------------------------------------------------------- | -------------- |
54+ | -------------------------------------------------------- | ------------ |
4555| [ PsychToolBox] ( http://psychtoolbox.org/ ) | >=3.0.14 |
4656| [ Matlab] ( https://www.mathworks.com/products/matlab.html ) | >=2015b |
4757| or [ Octave] ( https://www.gnu.org/software/octave/ ) | 4.? |
4858
59+ <!-- lint enable -->
60+
4961Tested:
62+
5063- matlab 2015b or octave 4.2.2 and PTB 3.0.14.
5164
5265## Documentation
5366
54- All the documentation is accessible [ here] ( ./docs/00_index .md ) .
67+ All the documentation is accessible [ here] ( ./docs/00-index .md ) .
5568
5669## Content
5770
@@ -75,7 +88,7 @@ All the documentation is accessible [here](./docs/00_index.md).
7588
7689### Download with git
7790
78- ``` bash
91+ ``` bash
7992cd fullpath_to_directory_where_to_install
8093# use git to download the code
8194git clone https://github.com/cpp-lln-lab/CPP_PTB.git
@@ -84,12 +97,15 @@ cd CPP_PTB
8497```
8598
8699Then get the latest commit to stay up to date:
100+
87101``` bash
88102# from the directory where you downloaded the code
89103git pull origin master
90104```
91105
92- To work with a specific version, create a branch at a specific version tag number
106+ To work with a specific version, create a branch at a specific version tag
107+ number
108+
93109``` bash
94110# creating and checking out a branch that will be called version1 at the version tag v1.0.0
95111git checkout -b version1 v1.0.0
@@ -99,14 +115,15 @@ git checkout -b version1 v1.0.0
99115
100116Add it as a submodule in the repo you are working on.
101117
102- ``` bash
118+ ``` bash
103119cd fullpath_to_directory_where_to_install
104120# use git to download the code
105121git submodule add https://github.com/cpp-lln-lab/CPP_PTB.git
106122```
107123
108- To get the latest commit you then need to update the submodule with the information
109- on its remote repository and then merge those locally.
124+ To get the latest commit you then need to update the submodule with the
125+ information on its remote repository and then merge those locally.
126+
110127``` bash
111128git submodule update --remote --merge
112129```
@@ -115,10 +132,14 @@ Remember that updates to submodules need to be committed as well.
115132
116133#### Example for submodule usage
117134
118- So say you want to clone a repo that has some nested submodules, then you would type this to get the content of all the submodules at once (here with my experiment repo):
119- ``` bash
135+ So say you want to clone a repo that has some nested submodules, then you would
136+ type this to get the content of all the submodules at once (here with my
137+ experiment repo):
138+
139+ ``` bash
120140git clone --recurse-submodules https://github.com/user_name/yourExperiment.git
121141```
142+
122143This would be the way to do it "by hand"
123144
124145``` bash
@@ -141,19 +162,20 @@ git submodule foreach --recursive 'git submodule update'
141162
142163Download the code. Unzip. And add to the matlab path.
143164
144- Pick a specific version:
145-
146- https://github.com/cpp-lln-lab/CPP_PTB/releases
165+ Pick a specific version from
166+ [ here] ( https://github.com/cpp-lln-lab/CPP_PTB/releases ) .
147167
148- Or take the latest commit (NOT RECOMMENDED):
149-
150- https://github.com/cpp-lln-lab/CPP_PTB/archive/master.zip
168+ Or take
169+ [ the latest commit ] ( https://github.com/cpp-lln-lab/CPP_PTB/archive/master.zip ) -
170+ NOT RECOMMENDED.
151171
152172### Add CPP_PTB globally to the matlab path
153173
154- This is NOT RECOMMENDED as this might create conflicts if you use different versions of CPP_PTB as sub-modules.
174+ This is NOT RECOMMENDED as this might create conflicts if you use different
175+ versions of CPP_PTB as sub-modules.
155176
156- Also note that this might not work at all if you have not set a command line alias to start Matlab from a terminal window by just typing ` matlab ` . :wink :
177+ Also note that this might not work at all if you have not set a command line
178+ alias to start Matlab from a terminal window by just typing ` matlab ` . :wink :
157179
158180``` bash
159181# from within the CPP_PTB folder
@@ -162,34 +184,49 @@ matlab -nojvm -nosplash -r "addpath(genpath(fullfile(pwd, 'src'))); savepath();
162184
163185## Code style guide
164186
165- We use the ` camelCase ` to more easily differentiates our functions from the ones from PTB that use a ` PascalCase ` .
187+ We use the ` camelCase ` to more easily differentiates our functions from the ones
188+ from PTB that use a ` PascalCase ` .
166189
167- In practice, we use the following regular expression for function names: ` [a-z]+(([A-Z]|[0-9]){1}[a-z]+)* ` .
190+ In practice, we use the following regular expression for function names:
191+ ` [a-z]+(([A-Z]|[0-9]){1}[a-z]+)* ` .
168192
169193> Regular expressions look scary but are SUPER useful to sort through filenames:
170- > - A quick [ intro to regular expression] ( https://www.rexegg.com/ )
171- > - And many websites allow you to "design and test" your regular expression:
172- > - [ regexr] ( https://regexr.com/ )
173- > - [ regexper] ( https://regexper.com/#%5Ba-z%5D%2B%28%28%5BA-Z%5D%7C%5B0-9%5D%29%7B1%7D%5Ba-z%5D%2B%29 )
174- > - ...
175-
176- We keep the McCabe complexity below 15 as reported by the [ check_my_code function] ( https://github.com/Remi-Gau/check_my_code ) or the [ MISS_HIT code checker] ( https://florianschanda.github.io/miss_hit ) . A couple of code quality metrics are also checked automatically by MISS_HIT (avoiding functions with too many nested ` if ` blocks).
177-
178- We use the [ MISS_HIT linter] ( https://florianschanda.github.io/miss_hit/style_checker.html ) to automatically fix some linting issues.
179-
180- The code style and quality is also checked during the [ continuous integration] ( ./.travis.yml ) .
194+ >
195+ > - A quick [ intro to regular expression] ( https://www.rexegg.com/ )
196+ >
197+ > - And many websites allow you to "design and test" your regular expression:
198+ > - [ regexper] ( https://regexper.com/#%5Ba-z%5D%2B%28%28%5BA-Z%5D%7C%5B0-9%5D%29%7B1%7D%5Ba-z%5D%2B%29 )
199+ > - ...
200+
201+ We keep the McCabe complexity below 15 as reported by the
202+ [ check_my_code function] ( https://github.com/Remi-Gau/check_my_code ) or the
203+ [ MISS_HIT code checker] ( https://florianschanda.github.io/miss_hit ) . A couple of
204+ code quality metrics are also checked automatically by MISS_HIT (avoiding
205+ functions with too many nested ` if ` blocks).
206+
207+ We use the
208+ [ MISS_HIT linter] ( https://florianschanda.github.io/miss_hit/style_checker.html )
209+ to automatically fix some linting issues.
210+
211+ The code style and quality is also checked during the
212+ [ continuous integration] ( ./.travis.yml ) .
181213
182214## Unit tests
183215
184- Unit tests are run with the mox unit toolbox and automated with github action on Octave.
216+ Unit tests are run with the mox unit toolbox and automated with github action on
217+ Octave.
185218
186219## Contributors ✨
187220
188- Thanks goes to these wonderful people ([ emoji key] ( https://allcontributors.org/docs/en/emoji-key ) ):
221+ Thanks goes to these wonderful people
222+ ([ emoji key] ( https://allcontributors.org/docs/en/emoji-key ) ):
189223
190224<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
225+
191226<!-- prettier-ignore-start -->
227+
192228<!-- markdownlint-disable -->
229+
193230<table >
194231 <tr >
195232 <td align="center"><a href="https://remi-gau.github.io/"><img src="https://avatars3.githubusercontent.com/u/6961185?v=4" width="100px;" alt=""/><br /><sub><b>Remi Gau</b></sub></a><br /><a href="https://github.com/cpp-lln-lab/CPP_PTB/commits?author=Remi-Gau" title="Code">💻</a> <a href="#design-Remi-Gau" title="Design">🎨</a> <a href="https://github.com/cpp-lln-lab/CPP_PTB/commits?author=Remi-Gau" title="Documentation">📖</a> <a href="https://github.com/cpp-lln-lab/CPP_PTB/issues?q=author%3ARemi-Gau" title="Bug reports">🐛</a> <a href="#userTesting-Remi-Gau" title="User Testing">📓</a> <a href="#ideas-Remi-Gau" title="Ideas, Planning, & Feedback">🤔</a> <a href="#infra-Remi-Gau" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#maintenance-Remi-Gau" title="Maintenance">🚧</a> <a href="https://github.com/cpp-lln-lab/CPP_PTB/commits?author=Remi-Gau" title="Tests">⚠️</a> <a href="#question-Remi-Gau" title="Answering Questions">💬</a></td>
@@ -199,7 +236,11 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
199236</table >
200237
201238<!-- markdownlint-enable -->
239+
202240<!-- prettier-ignore-end -->
241+
203242<!-- ALL-CONTRIBUTORS-LIST:END -->
204243
205- This project follows the [ all-contributors] ( https://github.com/all-contributors/all-contributors ) specification. Contributions of any kind welcome!
244+ This project follows the
245+ [ all-contributors] ( https://github.com/all-contributors/all-contributors )
246+ specification. Contributions of any kind welcome!
0 commit comments