From 3b8958553d7e32be369d745a87764271779cdae8 Mon Sep 17 00:00:00 2001 From: marcobarilari Date: Mon, 16 Nov 2020 19:46:33 +0100 Subject: [PATCH 1/6] add doc to returnNbColumns --- src/utils/returnNbColumns.m | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/utils/returnNbColumns.m b/src/utils/returnNbColumns.m index 920890a6..09377cba 100644 --- a/src/utils/returnNbColumns.m +++ b/src/utils/returnNbColumns.m @@ -2,25 +2,19 @@ function nbCol = returnNbColumns(logFile, nameExtraColumn) % - % Short description of what the function does goes here. + % It returns the number of columns associated to one entry of the extra column list. % % USAGE:: % - % [argout1, argout2] = templateFunction(argin1, [argin2 == default,] [argin3]) + % [nbCol] = returnNbColumns(logFile, nameExtraColumn) % - % :param argin1: (dimension) obligatory argument. Lorem ipsum dolor sit amet, - % consectetur adipiscing elit. Ut congue nec est ac lacinia. - % :type argin1: type - % :param argin2: optional argument and its default value. And some of the - % options can be shown in litteral like ``this`` or ``that``. - % :type argin2: string - % :param argin3: (dimension) optional argument - % :type argin3: integer + % :param logFile: It contains every information related to the experiment output(s) + % :type logFile: structure + % :param nameExtraColumn: An entry of ``logFile.extraColumns`` + % :type nameExtraColumn: string % - % :returns: - :argout1: (type) (dimension) - % - :argout2: (type) (dimension) - % - % nbCol = returnNbColumns(logFile, nameExtraColumn) + % :returns: - :nbCol: (integer) The number of columns associated to one entry of the extra + % column list. % thisExtraColumn = logFile(1).extraColumns.(nameExtraColumn); From 38f4400f06487e5cb382e217cacd4785a024ab9c Mon Sep 17 00:00:00 2001 From: marcobarilari Date: Mon, 16 Nov 2020 19:47:00 +0100 Subject: [PATCH 2/6] minor update doc to initializeExtraColumns --- src/utils/initializeExtraColumns.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/initializeExtraColumns.m b/src/utils/initializeExtraColumns.m index 0d974ec9..40cc86cd 100644 --- a/src/utils/initializeExtraColumns.m +++ b/src/utils/initializeExtraColumns.m @@ -8,10 +8,10 @@ % % logFile = initializeExtraColumns(logFile) % - % :param logFile: + % :param logFile: It contains what to save in the experiment outputs. % :type logFile: structure % - % :returns: :logFile: (structure) (dimension) + % :returns: :logFile: (structure) ``logfile`` updated with extra columns. % % Example:: % From 0f1a16c65d1522414bb57a99f58a424a2e0d0fef Mon Sep 17 00:00:00 2001 From: marcobarilari Date: Mon, 16 Nov 2020 19:47:16 +0100 Subject: [PATCH 3/6] minor fix to createValidName --- src/utils/createValidName.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/createValidName.m b/src/utils/createValidName.m index 8aa0c7e0..e4e9c032 100644 --- a/src/utils/createValidName.m +++ b/src/utils/createValidName.m @@ -10,7 +10,7 @@ % % :param taskName: (dimension) obligatory argument. Lorem ipsum dolor sit amet, % consectetur adipiscing elit. Ut congue nec est ac lacinia. - % :type argin1: string + % :type taskName: string % % :returns: % :name: (string) returns the input with an upper case for first letter From 23ba82008ad9b360f32922e39ad58371c31be988 Mon Sep 17 00:00:00 2001 From: marcobarilari Date: Mon, 16 Nov 2020 19:47:33 +0100 Subject: [PATCH 4/6] minor fix to createJson --- src/createJson.m | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/createJson.m b/src/createJson.m index 277d243a..b5e219f5 100644 --- a/src/createJson.m +++ b/src/createJson.m @@ -26,6 +26,9 @@ function createJson(varargin) % a valid BIDS dataset. % :type extraInfo: structure % + % :output: - :``*.json``: (jsonfile) The file name corresponds to the run + suffix depending on + % the arguments passed in. + % % .. TODO: % % - use input parser for this one From 993740beb0bd712e90f4cd55a6f6d3a269cc7665 Mon Sep 17 00:00:00 2001 From: marcobarilari Date: Mon, 16 Nov 2020 19:47:46 +0100 Subject: [PATCH 5/6] add doc to createDatasetDescription --- src/createDatasetDescription.m | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/src/createDatasetDescription.m b/src/createDatasetDescription.m index 84007bea..da6a8f50 100644 --- a/src/createDatasetDescription.m +++ b/src/createDatasetDescription.m @@ -2,28 +2,18 @@ function createDatasetDescription(cfg) % - % Short description of what the function does goes here. + % It creates ``dataset_description.json`` and writes in every entry contained in + % ``cfg.bids.datasetDescription``. The file should goes in the root of a BIDS dataset. % % USAGE:: % - % [argout1, argout2] = templateFunction(argin1, [argin2 == default,] [argin3]) + % createDatasetDescription(cfg) % - % :param argin1: (dimension) obligatory argument. Lorem ipsum dolor sit amet, - % consectetur adipiscing elit. Ut congue nec est ac lacinia. - % :type argin1: type - % :param argin2: optional argument and its default value. And some of the - % options can be shown in litteral like ``this`` or ``that``. - % :type argin2: string - % :param argin3: (dimension) optional argument - % :type argin3: integer + % :param cfg: Configuration. See ``checkCFG()``. + % :type cfg: structure % - % :returns: - :argout1: (type) (dimension) - % - :argout2: (type) (dimension) + % :output: - :``dataset_description.json``: (jsonfile) % - % createDatasetDescription(cfg) - % - % creates the datasetDescription.json file that goes in the root of a BIDS - % dataset opts.Indent = ' '; From 2d76e8f7134f24ebe615acb471ef8f32c2b13a09 Mon Sep 17 00:00:00 2001 From: marcobarilari <38101692+marcobarilari@users.noreply.github.com> Date: Mon, 16 Nov 2020 20:09:40 +0100 Subject: [PATCH 6/6] Apply suggestions from code review Co-authored-by: Remi Gau --- src/createDatasetDescription.m | 2 +- src/utils/createValidName.m | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/createDatasetDescription.m b/src/createDatasetDescription.m index da6a8f50..2d16c694 100644 --- a/src/createDatasetDescription.m +++ b/src/createDatasetDescription.m @@ -3,7 +3,7 @@ function createDatasetDescription(cfg) % % It creates ``dataset_description.json`` and writes in every entry contained in - % ``cfg.bids.datasetDescription``. The file should goes in the root of a BIDS dataset. + % ``cfg.bids.datasetDescription``. The file should go in the root of a BIDS dataset. % % USAGE:: % diff --git a/src/utils/createValidName.m b/src/utils/createValidName.m index e4e9c032..2d7ea607 100644 --- a/src/utils/createValidName.m +++ b/src/utils/createValidName.m @@ -8,8 +8,7 @@ % % [taskName, taskNameValid] = createTaskName(taskName) % - % :param taskName: (dimension) obligatory argument. Lorem ipsum dolor sit amet, - % consectetur adipiscing elit. Ut congue nec est ac lacinia. + % :param taskName: Name given to the task. Can be any string including spaces and special characters. % :type taskName: string % % :returns: