Skip to content

Commit cae3276

Browse files
authored
Merge pull request #67 from CerenB/typo_README_ceren
submodule example modification
2 parents 516b3e7 + 41cc9ee commit cae3276

File tree

1 file changed

+32
-13
lines changed

1 file changed

+32
-13
lines changed

README.md

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Subjects, session and run number labels will be numbers with zero padding up to
3636

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

39-
Task labels will be printed in camelCase in the filenames.
39+
Task labels will be printed in camelCase in the filenames.
4040

4141
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.
4242

@@ -56,14 +56,14 @@ sub-090/ses-003/sub-090_ses-003_task-auditoryTask_run-023_events_date-2020072915
5656
cfg.outputDir = fullfile(pwd, '..', 'output');
5757
5858
% define the name of the task
59-
cfg.task = 'test task';
59+
cfg.task.name = 'test task';
6060
6161
% can use the userInputs function to collect subject info
6262
% cfg = userInputs;
6363
6464
% or declare it directly
65-
cfg.subjectNb = 1;
66-
cfg.runNb = 1;
65+
cfg.subject.subjectNb = 1;
66+
cfg.subject.runNb = 1;
6767
6868
% by default we assume you are running things on a behavioral PC with no eyetracker
6969
% cfg.eyeTracker = false;
@@ -109,9 +109,9 @@ saveEventsFile('close', cfg, logFile);
109109
If you want to save more complex events.tsv file you can save several columns at once.
110110

111111
```matlab
112-
cfg.subjectNb = 1;
113-
cfg.runNb = 1;
114-
cfg.task = 'testtask';
112+
cfg.subject.subjectNb = 1;
113+
cfg.subject.runNb = 1;
114+
cfg.task.name = 'testtask';
115115
cfg.outputDir = outputDir;
116116
117117
cfg.testingDevice = 'mri';
@@ -206,7 +206,7 @@ For the moment the date of acquisition is appended to the filename
206206

207207
Function to save output files for events that will be BIDS compliant.
208208

209-
If the user DOES NOT provide `onset`, `trial_type`, this events will be skipped. `duration` will be set to "NaN" if
209+
If the user DOES NOT provide `onset`, `trial_type`, this events will be skipped. `duration` will be set to "NaN" if
210210
no value is provided.
211211

212212
### checkCFG
@@ -216,7 +216,7 @@ Check that we have all the fields that we need in the experiment parameters.
216216
## CFG content
217217

218218
```matlab
219-
%% Can be modified by users
219+
%% Can be modified by users
220220
% but their effect might only be effective after running
221221
% checkCFG
222222
@@ -290,7 +290,7 @@ cd fullpath_to_directory_where_to_install
290290
# use git to download the code
291291
git clone https://github.com/cpp-lln-lab/CPP_BIDS.git
292292
# move into the folder you have just created
293-
cd CPP_PTB
293+
cd CPP_BIDS
294294
# add the src folder to the matlab path and save the path
295295
matlab -nojvm -nosplash -r "addpath(fullfile(pwd, 'src')); savepath ();"
296296
```
@@ -316,18 +316,37 @@ cd fullpath_to_directory_where_to_install
316316
# use git to download the code
317317
git submodule add https://github.com/cpp-lln-lab/CPP_BIDS.git
318318
# move into the folder you have just created
319-
cd CPP_PTB
319+
cd CPP_BIDS
320320
# add the src folder to the matlab path and save the path
321321
matlab -nojvm -nosplash -r "addpath(fullfile(pwd, 'src'))"
322322
```
323323

324-
To get the latest commit you then need to update the submodule with the information
324+
To get the latest commit you then need to update the submodule with the information
325325
on its remote repository and then merge those locally.
326326
```bash
327327
git submodule update --remote --merge
328328
```
329329

330-
Remember that updates to submodules need to be commited as well.
330+
Remember that updates to submodules need to be committed as well.
331+
332+
#### Example for submodule usage
333+
334+
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 assumption that you want to clone my experiment repo):
335+
```bash
336+
# clone the repo
337+
git clone https://github.com/user_name/myExperiment.git
338+
339+
# go into the directory
340+
cd myExperiment
341+
342+
# initialize and get the content of the first level of submodules (e.g. CPP_PTB and CPP_BIDS)
343+
git submodule init
344+
git submodule update
345+
346+
# get the nested submodules JSONio and BIDS-matlab for CPP_BIDS
347+
git submodule foreach --recursive 'git submodule init'
348+
git submodule foreach --recursive 'git submodule update'
349+
```
331350

332351
**TO DO**
333352
<!-- Submodules

0 commit comments

Comments
 (0)