From a43b795de03a4ca36ac0da4ce1929676ee69d3f8 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 27 Jul 2023 11:43:44 -0400 Subject: [PATCH 1/5] Add github action to codespell master on push and PRs --- .github/workflows/codespell.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/codespell.yml diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000..7373aff --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,22 @@ +--- +name: Codespell + +on: + push: + branches: [master] + pull_request: + branches: [master] + +permissions: + contents: read + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Codespell + uses: codespell-project/actions-codespell@v2 From 229f0d5b5857fbb5403b529a862de583e69b31c7 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 27 Jul 2023 11:43:44 -0400 Subject: [PATCH 2/5] Add rudimentary codespell config --- .codespellrc | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .codespellrc diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000..da3c057 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,4 @@ +[codespell] +skip = .git,*.pdf,*.svg +# +# ignore-words-list = From 9fa4123adda89bff6e136a1123eca41293023e7a Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 27 Jul 2023 11:44:50 -0400 Subject: [PATCH 3/5] ignores --- .codespellrc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.codespellrc b/.codespellrc index da3c057..d7bff93 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,4 +1,6 @@ [codespell] skip = .git,*.pdf,*.svg -# -# ignore-words-list = +# all images embedded in .ipynb jsons +ignore-regex = "image/png": ".* +# nd - people just like it +ignore-words-list = nd From de09d63c63450c9451164948b2e689c050ea1a93 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 27 Jul 2023 11:45:07 -0400 Subject: [PATCH 4/5] [DATALAD RUNCMD] run codespell throughout but ignore fail === Do not change lines below === { "chain": [], "cmd": "codespell -w || :", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- 000004/RutishauserLab/000004_demo_analysis.ipynb | 4 ++-- 000055/BruntonLab/peterson21/plot_utils.py | 2 +- 000055/BruntonLab/peterson21/spec_utils.py | 6 +++--- 000402/MICrONS/demo/000402_microns_demo.ipynb | 2 +- dandi/DANDI User Guide, Part I.ipynb | 2 +- dandi/DANDI User Guide, Part II.ipynb | 4 ++-- tutorials/cosyne_2020/NWB_tutorial_2019.ipynb | 2 +- tutorials/cosyne_2020/NWB_tutorial_2019.m | 2 +- tutorials/cosyne_2023/advanced_asset_search.ipynb | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/000004/RutishauserLab/000004_demo_analysis.ipynb b/000004/RutishauserLab/000004_demo_analysis.ipynb index 15a9cd1..13448d2 100644 --- a/000004/RutishauserLab/000004_demo_analysis.ipynb +++ b/000004/RutishauserLab/000004_demo_analysis.ipynb @@ -86,7 +86,7 @@ "## Read Data and Meta-data\n", "Here, we read the data and meta-data from the specified NWB file using the NWB read utility. \n", "\n", - "The NWB file is composed of various Groups, Datasets, and Attributes. The data and cooresponding meta-data are encapsulated within these Groups. The data are thus organized according to these Groups. We can also read the data and meta-data within these Groups, and visualize the components within NWB file via the *nwb2widget* utility -- the following illustrates this process:" + "The NWB file is composed of various Groups, Datasets, and Attributes. The data and corresponding meta-data are encapsulated within these Groups. The data are thus organized according to these Groups. We can also read the data and meta-data within these Groups, and visualize the components within NWB file via the *nwb2widget* utility -- the following illustrates this process:" ] }, { @@ -140,7 +140,7 @@ "source": [ "## Extracting and Plotting the Mean Waveform(s)\n", "\n", - "To extract the mean waveform, we simply call waveform_mean_encoding from the \\units table -- *nwb.units['waveform_mean_encoding']*. The brain area of each of the electrodes is located within the \\electrodes table -- *nwb.electrodes['location']*. To see the relationship bewteen the \\units and \\electrodes table, see **Figure 2b** in our data descriptor. " + "To extract the mean waveform, we simply call waveform_mean_encoding from the \\units table -- *nwb.units['waveform_mean_encoding']*. The brain area of each of the electrodes is located within the \\electrodes table -- *nwb.electrodes['location']*. To see the relationship between the \\units and \\electrodes table, see **Figure 2b** in our data descriptor. " ] }, { diff --git a/000055/BruntonLab/peterson21/plot_utils.py b/000055/BruntonLab/peterson21/plot_utils.py index 9f819d3..48116fd 100644 --- a/000055/BruntonLab/peterson21/plot_utils.py +++ b/000055/BruntonLab/peterson21/plot_utils.py @@ -543,7 +543,7 @@ def _plot_electrodes( 5, 6, 5, - ] # different sized subplot to make saggital view similar size to other two slices + ] # different sized subplot to make sagittal view similar size to other two slices current_col = 0 total_colspans = int(np.sum(np.asarray(colspans))) for ind, colspan in enumerate(colspans): diff --git a/000055/BruntonLab/peterson21/spec_utils.py b/000055/BruntonLab/peterson21/spec_utils.py index 59055f9..b0afe3e 100644 --- a/000055/BruntonLab/peterson21/spec_utils.py +++ b/000055/BruntonLab/peterson21/spec_utils.py @@ -11,7 +11,7 @@ def _calc_dens_norm_factor(elec_locs, headGrid, projectionParameter): """Calculate the factors (scalar values, each for a electrode) that normalize the elecrode projected density inside brain volume (makes its sum to be equal to one).""" - # create a parameter set but withough normalization + # create a parameter set but without normalization newProjectionParemeter = projectionParameter.copy() newProjectionParemeter["normalizeInBrainDipoleDenisty"] = False @@ -99,7 +99,7 @@ def _getProjectionMatrix( -dist_elec_gridlocs[dipoleNumber, :] ** 2 / (2 * sd_est_err_pow2) ) - # truncate the dipole denisty Gaussian at ~3 standard deviation + # truncate the dipole density Gaussian at ~3 standard deviation gaussianWeightMatrix[ dipoleNumber, dist_elec_gridlocs[dipoleNumber, :] @@ -109,7 +109,7 @@ def _getProjectionMatrix( ), ] = 0 - # normalize the dipole in-brain denisty (make it sum up to one) + # normalize the dipole in-brain density (make it sum up to one) if projectionParameter["normalizeInBrainDipoleDenisty"]: gaussianWeightMatrix[dipoleNumber, :] = ( gaussianWeightMatrix[dipoleNumber, :] diff --git a/000402/MICrONS/demo/000402_microns_demo.ipynb b/000402/MICrONS/demo/000402_microns_demo.ipynb index 5c5b4b7..a630dd2 100644 --- a/000402/MICrONS/demo/000402_microns_demo.ipynb +++ b/000402/MICrONS/demo/000402_microns_demo.ipynb @@ -2097,7 +2097,7 @@ "source": [ "# Access the treadmill velocity\n", "treadmill_velocity = nwbfile.acquisition[\"treadmill_velocity\"]\n", - "# Acess the timestamps for the treadmill velocity\n", + "# Access the timestamps for the treadmill velocity\n", "treadmill_timestamps = treadmill_velocity.timestamps[:]\n", " \n", "treadmill_velocity" diff --git a/dandi/DANDI User Guide, Part I.ipynb b/dandi/DANDI User Guide, Part I.ipynb index ce3aa64..31c0728 100644 --- a/dandi/DANDI User Guide, Part I.ipynb +++ b/dandi/DANDI User Guide, Part I.ipynb @@ -173,7 +173,7 @@ "source": [ "# Uploading to DANDI\n", "\n", - "When you register a dandiset, it creates a permenant ID. For instructional purposes, we will be using a staging version of DANDI, so that we do not create real IDs for pretend datasets.\n", + "When you register a dandiset, it creates a permanent ID. For instructional purposes, we will be using a staging version of DANDI, so that we do not create real IDs for pretend datasets.\n", "\n", "We are going to use a staging version of DANDI. \n", "\n", diff --git a/dandi/DANDI User Guide, Part II.ipynb b/dandi/DANDI User Guide, Part II.ipynb index 079267a..a3a9a98 100644 --- a/dandi/DANDI User Guide, Part II.ipynb +++ b/dandi/DANDI User Guide, Part II.ipynb @@ -313,7 +313,7 @@ "\n", "3. (\"optional\"- bonus point) What is different between draft and published (0.210831.2033) version of the dandiset?\n", "\n", - " *Hint:* `diff -Naur folder1/ folder2/` could be used in the Terminal to find an anwser.\n", + " *Hint:* `diff -Naur folder1/ folder2/` could be used in the Terminal to find an answer.\n", "\n", "\n", "4. Download the `sub-anm369962/` folder from `000006` dandiset. " @@ -386,7 +386,7 @@ "source": [ "## dandi Python library\n", "\n", - "The `dandi` command line interface we have practiced with above is a part ofthe `dandi` Python package, which also provides Python interfaces to interact with any instance of the DANDI archive (*hint*: the `dandi instances` command will list known instances of the archive).\n", + "The `dandi` command line interface we have practiced with above is a part of the `dandi` Python package, which also provides Python interfaces to interact with any instance of the DANDI archive (*hint*: the `dandi instances` command will list known instances of the archive).\n", "\n", "In the previous section you already used the library in the following Python code snippet:\n", "\n", diff --git a/tutorials/cosyne_2020/NWB_tutorial_2019.ipynb b/tutorials/cosyne_2020/NWB_tutorial_2019.ipynb index 44157df..54b3a42 100755 --- a/tutorials/cosyne_2020/NWB_tutorial_2019.ipynb +++ b/tutorials/cosyne_2020/NWB_tutorial_2019.ipynb @@ -141,7 +141,7 @@ "metadata": {}, "source": [ "## Electrodes table\n", - "Extracellular electrodes are stored in a `electrodes`, which is a `DynamicTable`. `electrodes` has several required fields: x, y, z, impedence, location, filtering, and electrode_group. Here, we also demonstate how to add optional columns to a table by adding the `'label'` column." + "Extracellular electrodes are stored in a `electrodes`, which is a `DynamicTable`. `electrodes` has several required fields: x, y, z, impedance, location, filtering, and electrode_group. Here, we also demonstate how to add optional columns to a table by adding the `'label'` column." ] }, { diff --git a/tutorials/cosyne_2020/NWB_tutorial_2019.m b/tutorials/cosyne_2020/NWB_tutorial_2019.m index f18fbad..8ad35ad 100755 --- a/tutorials/cosyne_2020/NWB_tutorial_2019.m +++ b/tutorials/cosyne_2020/NWB_tutorial_2019.m @@ -68,7 +68,7 @@ %% Electrode table % Extracellular |electrodes| are stored in a electrodes, which is a % |DynamicTable|. |electrodes| has several required fields: x, y, z, -% impedence, location, filtering, and electrode_group. Here, we also +% impedance, location, filtering, and electrode_group. Here, we also % demonstate how to add optional columns to a table by adding the |'label'| % column. diff --git a/tutorials/cosyne_2023/advanced_asset_search.ipynb b/tutorials/cosyne_2023/advanced_asset_search.ipynb index 5c118d1..2266813 100644 --- a/tutorials/cosyne_2023/advanced_asset_search.ipynb +++ b/tutorials/cosyne_2023/advanced_asset_search.ipynb @@ -209,7 +209,7 @@ "outputs": [], "source": [ "from warnings import simplefilter\n", - "simplefilter(\"ignore\") # Supress namespace warnings from reading older NWB files\n", + "simplefilter(\"ignore\") # Suppress namespace warnings from reading older NWB files\n", "\n", "from nwbinspector.tools import get_s3_urls_and_dandi_paths\n", "from pynwb import NWBHDF5IO" From 673df9fd886be0c0d18aac01f4e97aaa34ac7c1d Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Thu, 27 Jul 2023 11:45:16 -0400 Subject: [PATCH 5/5] [DATALAD RUNCMD] Do interactive fixing of leftover typos === Do not change lines below === { "chain": [], "cmd": "codespell -w -i 3 -C 2", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- 000402/MICrONS/demo/000402_microns_demo.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/000402/MICrONS/demo/000402_microns_demo.ipynb b/000402/MICrONS/demo/000402_microns_demo.ipynb index a630dd2..148ce35 100644 --- a/000402/MICrONS/demo/000402_microns_demo.ipynb +++ b/000402/MICrONS/demo/000402_microns_demo.ipynb @@ -923,7 +923,7 @@ "\n", "The movie data is stored in an `ImageSeries` object.\n", "\n", - "The frames are stored in a 4D array where the first dimension is time (frame), the second and third dimenion represents the size of the image and the last dimension are the RGB channels." + "The frames are stored in a 4D array where the first dimension is time (frame), the second and third dimension represents the size of the image and the last dimension are the RGB channels." ] }, { @@ -1207,7 +1207,7 @@ } }, "source": [ - "The traces are stored in a 2D array where the first dimension is time, the second dimenion is the number of ROIs for this field." + "The traces are stored in a 2D array where the first dimension is time, the second dimension is the number of ROIs for this field." ] }, {