6
6
[ ![ codecov] ( https://codecov.io/gh/cpp-lln-lab/CPP_PTB/branch/master/graph/badge.svg )] ( https://codecov.io/gh/cpp-lln-lab/CPP_PTB )
7
7
8
8
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
9
+
9
10
[ ![ All Contributors] ( https://img.shields.io/badge/all_contributors-3-orange.svg?style=flat-square )] ( #contributors- )
11
+
10
12
<!-- ALL-CONTRIBUTORS-BADGE:END -->
11
13
12
14
# CPP_PTB
13
15
16
+ <!-- lint disable -->
17
+
14
18
<!-- TOC -->
15
19
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- )
29
33
30
34
<!-- /TOC -->
31
35
36
+ <!-- lint enable -->
32
37
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.
34
40
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)
36
43
37
44
## Requirements
38
45
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.
40
48
41
49
For instructions see the following links:
42
50
51
+ <!-- lint disable -->
52
+
43
53
| Requirements | Used version |
44
- | ---------------------------------------------------------- | -------------- |
54
+ | -------------------------------------------------------- | ------------ |
45
55
| [ PsychToolBox] ( http://psychtoolbox.org/ ) | >=3.0.14 |
46
56
| [ Matlab] ( https://www.mathworks.com/products/matlab.html ) | >=2015b |
47
57
| or [ Octave] ( https://www.gnu.org/software/octave/ ) | 4.? |
48
58
59
+ <!-- lint enable -->
60
+
49
61
Tested:
62
+
50
63
- matlab 2015b or octave 4.2.2 and PTB 3.0.14.
51
64
52
65
## Documentation
53
66
54
- All the documentation is accessible [ here] ( ./docs/00_index .md ) .
67
+ All the documentation is accessible [ here] ( ./docs/00-index .md ) .
55
68
56
69
## Content
57
70
@@ -75,7 +88,7 @@ All the documentation is accessible [here](./docs/00_index.md).
75
88
76
89
### Download with git
77
90
78
- ``` bash
91
+ ``` bash
79
92
cd fullpath_to_directory_where_to_install
80
93
# use git to download the code
81
94
git clone https://github.com/cpp-lln-lab/CPP_PTB.git
@@ -84,12 +97,15 @@ cd CPP_PTB
84
97
```
85
98
86
99
Then get the latest commit to stay up to date:
100
+
87
101
``` bash
88
102
# from the directory where you downloaded the code
89
103
git pull origin master
90
104
```
91
105
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
+
93
109
``` bash
94
110
# creating and checking out a branch that will be called version1 at the version tag v1.0.0
95
111
git checkout -b version1 v1.0.0
@@ -99,14 +115,15 @@ git checkout -b version1 v1.0.0
99
115
100
116
Add it as a submodule in the repo you are working on.
101
117
102
- ``` bash
118
+ ``` bash
103
119
cd fullpath_to_directory_where_to_install
104
120
# use git to download the code
105
121
git submodule add https://github.com/cpp-lln-lab/CPP_PTB.git
106
122
```
107
123
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
+
110
127
``` bash
111
128
git submodule update --remote --merge
112
129
```
@@ -115,10 +132,14 @@ Remember that updates to submodules need to be committed as well.
115
132
116
133
#### Example for submodule usage
117
134
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
120
140
git clone --recurse-submodules https://github.com/user_name/yourExperiment.git
121
141
```
142
+
122
143
This would be the way to do it "by hand"
123
144
124
145
``` bash
@@ -141,19 +162,20 @@ git submodule foreach --recursive 'git submodule update'
141
162
142
163
Download the code. Unzip. And add to the matlab path.
143
164
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 ) .
147
167
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.
151
171
152
172
### Add CPP_PTB globally to the matlab path
153
173
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.
155
176
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 :
157
179
158
180
``` bash
159
181
# from within the CPP_PTB folder
@@ -162,34 +184,49 @@ matlab -nojvm -nosplash -r "addpath(genpath(fullfile(pwd, 'src'))); savepath();
162
184
163
185
## Code style guide
164
186
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 ` .
166
189
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]+)* ` .
168
192
169
193
> 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 ) .
181
213
182
214
## Unit tests
183
215
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.
185
218
186
219
## Contributors ✨
187
220
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 ) ):
189
223
190
224
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
225
+
191
226
<!-- prettier-ignore-start -->
227
+
192
228
<!-- markdownlint-disable -->
229
+
193
230
<table >
194
231
<tr >
195
232
<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
199
236
</table >
200
237
201
238
<!-- markdownlint-enable -->
239
+
202
240
<!-- prettier-ignore-end -->
241
+
203
242
<!-- ALL-CONTRIBUTORS-LIST:END -->
204
243
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