From e5899ec276a6b6f934674029fa35d54f04cc4095 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Fri, 4 Nov 2022 16:11:39 +0100 Subject: [PATCH] fix spelling --- .codespellrc | 4 ++++ .github/workflows/codespell.yml | 19 +++++++++++++++++++ notebooks/basic_usage.ipynb | 4 ++-- notebooks/creating_BIDS_dataset.ipynb | 4 ++-- notebooks/saving_stim_files.ipynb | 2 +- src/checkCFG.m | 4 ++-- src/convertSourceToRaw.m | 2 +- src/createJson.m | 2 +- src/readAndFilterLogfile.m | 2 +- src/utils/getFullFilename.m | 2 +- templates_functions/templateFunction.m | 2 +- tests/test_saveEventsFileOpenMultiColumn.m | 2 +- tests/test_transferInfoToBids.m | 4 ++-- 13 files changed, 38 insertions(+), 15 deletions(-) create mode 100644 .codespellrc create mode 100644 .github/workflows/codespell.yml diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 00000000..df43523d --- /dev/null +++ b/.codespellrc @@ -0,0 +1,4 @@ +[codespell] +skip = .git,env,*build,lib +ignore-words-list = ans +builtin = clear,rare diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 00000000..b7ab6ff6 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,19 @@ +name: codespell + +on: + push: + branches: [master] + pull_request: + branches: [master] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + # Check for common misspellings + codespell: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: codespell-project/actions-codespell@master diff --git a/notebooks/basic_usage.ipynb b/notebooks/basic_usage.ipynb index 47aca2e9..518f6650 100644 --- a/notebooks/basic_usage.ipynb +++ b/notebooks/basic_usage.ipynb @@ -268,7 +268,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Preparing your data dictionnary\n", + "### Preparing your data dictionary\n", "\n", "We can then initialize our logfile." ] @@ -434,7 +434,7 @@ "\n", "- A `_date-YYYYMMDDHHMM` suffix is appended to the file name. This is NOT accepted by the BIDS filenaming convention. This was introduced to prevent overwriting files by mistake in case some things were re-run. When you convert the source data into raw data, this date suffix should be removed (the `removeDataSuffix` is there for that).\n", "\n", - "- A json file that stores your data dictionnary was created.\n", + "- A json file that stores your data dictionary was created.\n", "\n", "Let's inpsect its content." ] diff --git a/notebooks/creating_BIDS_dataset.ipynb b/notebooks/creating_BIDS_dataset.ipynb index 7cc44047..40f9ddd7 100644 --- a/notebooks/creating_BIDS_dataset.ipynb +++ b/notebooks/creating_BIDS_dataset.ipynb @@ -272,7 +272,7 @@ "source": [ "### Saving a `_bold.json` file\n", "\n", - "There is bare minimum functionality to create a `_bold.json` file for fMRI runs: the information in there wil be that required to pass a BIDS validation but no more. You should REALLY get most of the information for `bold.json` from your favorite DICOM to Nifti converter\n", + "There is bare minimum functionality to create a `_bold.json` file for fMRI runs: the information in there will be that required to pass a BIDS validation but no more. You should REALLY get most of the information for `bold.json` from your favorite DICOM to Nifti converter\n", "\n", "This function is there because it can help put in JSON format some of the information that would NOT be available to a converter (usually information about your task)." ] @@ -355,7 +355,7 @@ "source": [ "%% Timing info\n", "\n", - "% Time between blocs in secs\n", + "% Time between blocks in secs\n", "parameters.timing.IBI = 1.8 * 3; % 8;\n", "% Time between events in secs\n", "parameters.timing.ISI = 0.1;\n", diff --git a/notebooks/saving_stim_files.ipynb b/notebooks/saving_stim_files.ipynb index ab95868a..ab96ca8b 100644 --- a/notebooks/saving_stim_files.ipynb +++ b/notebooks/saving_stim_files.ipynb @@ -233,7 +233,7 @@ "source": [ "## Inspect the content of the stim.tsv file\n", " \n", - "The `onset`, `duration` and `trial_type` are ignored because they were note spcified in the `extraColumns` field.\n" + "The `onset`, `duration` and `trial_type` are ignored because they were note specified in the `extraColumns` field.\n" ] }, { diff --git a/src/checkCFG.m b/src/checkCFG.m index 3d9bb5a2..183392d0 100644 --- a/src/checkCFG.m +++ b/src/checkCFG.m @@ -51,12 +51,12 @@ % - ``cfg.fileName.task = ''`` % sets the name to be given to the task % - ``cfg.fileName.zeroPadding = 3`` - % sets tha amount of 0 padding the subject, session and run number. + % sets the amount of 0 padding the subject, session and run number. % - ``cfg.fileName.dateFormat = 'yyyymmddHHMM'`` % sets the format of the date and time stamp that will be appended to all files. % % The following fields can be used to specify certain of the labels that are used - % to specify certain of the acquisition conditions of certain experemental runs + % to specify certain of the acquisition conditions of certain experimental runs % in a BIDS data set. These are mostly for MRI and, if set, will be ignored % for most other modalities. See ``tests/test_createFilename()`` for details on how % to use these. diff --git a/src/convertSourceToRaw.m b/src/convertSourceToRaw.m index 76fee425..60d7b742 100644 --- a/src/convertSourceToRaw.m +++ b/src/convertSourceToRaw.m @@ -39,7 +39,7 @@ function convertSourceToRaw(varargin) rawDir = fullfile(cfg.dir.output, 'raw'); % back up description to not overwrite - % TODO bids malab should be smart enought to not do that + % TODO bids malab should be smart enough to not do that isFile = @(x) exist(x, 'file'); if isFile(fullfile(rawDir, 'dataset_description.json')) copyfile(fullfile(rawDir, 'dataset_description.json'), ... diff --git a/src/createJson.m b/src/createJson.m index 7a2ff99a..12d4ab1c 100644 --- a/src/createJson.m +++ b/src/createJson.m @@ -3,7 +3,7 @@ function createJson(varargin) % Creates the side car JSON file for a run. % % For JSON sidecars for bold files, this will only contain the minimum BIDS - % requirement and will likey be less complete than the info you could from + % requirement and will likely be less complete than the info you could from % a proper BIDS conversion. % % USAGE:: diff --git a/src/readAndFilterLogfile.m b/src/readAndFilterLogfile.m index 8bae345e..78dda41d 100644 --- a/src/readAndFilterLogfile.m +++ b/src/readAndFilterLogfile.m @@ -30,7 +30,7 @@ % :type tsvFile: string % % :param cfg: Configuration. See ``checkCFG()``. If ``cfg`` is given as input the name - % of the TSV file to read will be infered from there. + % of the TSV file to read will be inferred from there. % :type cfg: structure % % :returns: diff --git a/src/utils/getFullFilename.m b/src/utils/getFullFilename.m index 065cd1c9..9874e85e 100644 --- a/src/utils/getFullFilename.m +++ b/src/utils/getFullFilename.m @@ -1,6 +1,6 @@ function fullFilename = getFullFilename(fileName, cfg) % - % Returns the full path of a file (fo a given subject and modality in a run). + % Returns the full path of a file (for a given subject and modality in a run). % % USAGE:: % diff --git a/templates_functions/templateFunction.m b/templates_functions/templateFunction.m index 9a7d7114..ee4c750a 100644 --- a/templates_functions/templateFunction.m +++ b/templates_functions/templateFunction.m @@ -10,7 +10,7 @@ % 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``. + % options can be shown in literal like ``this`` or ``that``. % :type argin2: string % :param argin3: (dimension) optional argument % :type argin3: integer diff --git a/tests/test_saveEventsFileOpenMultiColumn.m b/tests/test_saveEventsFileOpenMultiColumn.m index 8b88cbc1..414c09cc 100644 --- a/tests/test_saveEventsFileOpenMultiColumn.m +++ b/tests/test_saveEventsFileOpenMultiColumn.m @@ -30,7 +30,7 @@ function test_saveEventsFileOpenMultiColumnCheckHeader() % define the extra columns names logFile.extraColumns = {'Speed', 'LHL24', 'is_Fixation'}; - % initalize logfile + % initialize logfile logFile = saveEventsFile('init', cfg, logFile); % extra columns: here we specify how many columns we want for each variable diff --git a/tests/test_transferInfoToBids.m b/tests/test_transferInfoToBids.m index e690b9dd..bbadbecd 100644 --- a/tests/test_transferInfoToBids.m +++ b/tests/test_transferInfoToBids.m @@ -22,7 +22,7 @@ function test_transferInfoToBidsBasic() end function test_transferInfoToBidsTaskname() - % make sure the file name gets trasnferred where it should + % make sure the file name gets transferred where it should cfg.task.name = 'foo bar'; cfg.task.instructions = 'do this'; @@ -47,7 +47,7 @@ function test_transferInfoToBidsTaskname() end function test_transferInfoToBidsMRI() - % make sure the file name gets trasnferred where it should + % make sure the file name gets transferred where it should cfg.mri.repetitionTime = 1.56;