From 5f06eba2eb76d5c81aad31a36375dc4a7f871e7c Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 14 Oct 2024 10:36:21 -0400 Subject: [PATCH 1/3] Add github action to codespell master on push and PRs --- .github/workflows/codespell.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 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..b026c85 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,25 @@ +# Codespell configuration is within .codespellrc +--- +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@v4 + - name: Annotate locations with typos + uses: codespell-project/codespell-problem-matcher@v1 + - name: Codespell + uses: codespell-project/actions-codespell@v2 From 45348c9766343ee8a0bb0e9b5366572a8ce7302c Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 14 Oct 2024 10:36:21 -0400 Subject: [PATCH 2/3] Add rudimentary codespell config --- .codespellrc | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .codespellrc diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 0000000..f3c585b --- /dev/null +++ b/.codespellrc @@ -0,0 +1,6 @@ +[codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +skip = .git*,.codespellrc,*.csv +check-hidden = true +# ignore-regex = +ignore-words-list = ans,nd,assignin,onl From 06b2717cab157977a2d261d24af7f4922436c376 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 14 Oct 2024 10:38:13 -0400 Subject: [PATCH 3/3] [DATALAD RUNCMD] run codespell throughout fixing typos automagically === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- Browsing Functions/allen_ccf_npx_4shank.m | 2 +- Browsing Functions/allen_ccf_npx_4shank_spherical.m | 2 +- Browsing Functions/distinguishable_colors.m | 2 +- Browsing Functions/plotAsProbe.m | 2 +- Browsing Functions/plotDistToNearestToTip.m | 2 +- Browsing Functions/selectStructure.m | 2 +- SHARP-Track/Analyze_ROIs.m | 2 +- SHARP-Track/Process_Histology.m | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Browsing Functions/allen_ccf_npx_4shank.m b/Browsing Functions/allen_ccf_npx_4shank.m index fa101d3..1548a45 100644 --- a/Browsing Functions/allen_ccf_npx_4shank.m +++ b/Browsing Functions/allen_ccf_npx_4shank.m @@ -540,7 +540,7 @@ function update_slice(probe_atlas_gui,varargin) end - % Get the coordiates on the plane + % Get the coordinates on the plane x_idx = round(plane_x); y_idx = round(plane_y); z_idx = round(plane_z); diff --git a/Browsing Functions/allen_ccf_npx_4shank_spherical.m b/Browsing Functions/allen_ccf_npx_4shank_spherical.m index 47f23e9..a1fdffc 100644 --- a/Browsing Functions/allen_ccf_npx_4shank_spherical.m +++ b/Browsing Functions/allen_ccf_npx_4shank_spherical.m @@ -529,7 +529,7 @@ function update_slice(probe_atlas_gui,varargin) end - % Get the coordiates on the plane + % Get the coordinates on the plane x_idx = round(plane_x); y_idx = round(plane_y); z_idx = round(plane_z); diff --git a/Browsing Functions/distinguishable_colors.m b/Browsing Functions/distinguishable_colors.m index f9e9e25..512cd03 100644 --- a/Browsing Functions/distinguishable_colors.m +++ b/Browsing Functions/distinguishable_colors.m @@ -61,7 +61,7 @@ bg = [1 1 1]; % default white background else if iscell(bg) - % User specified a list of colors as a cell aray + % User specified a list of colors as a cell array bgc = bg; for i = 1:length(bgc) bgc{i} = parsecolor(bgc{i}); diff --git a/Browsing Functions/plotAsProbe.m b/Browsing Functions/plotAsProbe.m index 8d40342..eebd89a 100644 --- a/Browsing Functions/plotAsProbe.m +++ b/Browsing Functions/plotAsProbe.m @@ -1,7 +1,7 @@ function plotAsProbe(data, ann_percents, yc, cm, cm2, sqSizeY, active_site_start, rpl) -% data is vector, same lenght as xc and yc +% data is vector, same length as xc and yc % cm is colormap, size [n x 3] % % other usage: if data is empty and cm's first dimension is the same length diff --git a/Browsing Functions/plotDistToNearestToTip.m b/Browsing Functions/plotDistToNearestToTip.m index fa754c5..a46ba93 100644 --- a/Browsing Functions/plotDistToNearestToTip.m +++ b/Browsing Functions/plotDistToNearestToTip.m @@ -102,7 +102,7 @@ cur_annotation_square = squeeze(annotation_square(ind,:,:)); currSqVec = cur_annotation_square(:); - % find where the annotation isn't equal to that at the curent point + % find where the annotation isn't equal to that at the current point otherInd = find(currSqVec(distOrder)~=currSqVec(distOrder(1)),1); if isempty(otherInd) otherDist(ind) = dists(end); diff --git a/Browsing Functions/selectStructure.m b/Browsing Functions/selectStructure.m index 2d6605d..73a58b0 100644 --- a/Browsing Functions/selectStructure.m +++ b/Browsing Functions/selectStructure.m @@ -249,7 +249,7 @@ function doSelectAll(selectall_btn, evd, listbox) %#ok %% Listbox callback function doListboxClick(listbox, evd, selectall_btn) %#ok -% if this is a doubleclick, doOK +% if this is a double-click, doOK if strcmp(get(gcbf,'SelectionType'),'open') doOK([],[],listbox); elseif nargin == 3 diff --git a/SHARP-Track/Analyze_ROIs.m b/SHARP-Track/Analyze_ROIs.m index 993d542..005adf2 100644 --- a/SHARP-Track/Analyze_ROIs.m +++ b/SHARP-Track/Analyze_ROIs.m @@ -94,7 +94,7 @@ % initialize array of locations (AP, DV, ML relative to bregma) in reference space -% and the correponding region annotations +% and the corresponding region annotations roi_location = zeros(sum(rois(:)>0),3); roi_annotation = cell(sum(rois(:)>0),3); diff --git a/SHARP-Track/Process_Histology.m b/SHARP-Track/Process_Histology.m index d67ff82..a8e114c 100644 --- a/SHARP-Track/Process_Histology.m +++ b/SHARP-Track/Process_Histology.m @@ -125,7 +125,7 @@ % it also pads images smaller than the reference_size and requests that you % crop images larger than this size % -% note -- presssing left or right arrow saves the modified image, so be +% note -- pressing left or right arrow saves the modified image, so be % sure to do this even after modifying the last slice in the folder slice_figure = figure('Name','Slice Viewer'); SliceFlipper(slice_figure, folder_processed_images, atlas_reference_size)