diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 00000000..24bd3aa0 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,6 @@ +[codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +skip = .git*,*.css,.codespellrc +check-hidden = true +ignore-regex = ^\s*"image/\S+": ".* +ignore-words-list = idel,dum,sav,alph diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 00000000..b026c855 --- /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 diff --git a/analyses/RunLength_2017_04_08/InstallMex.m b/analyses/RunLength_2017_04_08/InstallMex.m index 5d3228b5..7b268179 100644 --- a/analyses/RunLength_2017_04_08/InstallMex.m +++ b/analyses/RunLength_2017_04_08/InstallMex.m @@ -193,7 +193,7 @@ Flags = cat(2, Flags, {'-compatibleArrayDims'}); end -% Define endianess directive: +% Define endianness directive: if isLittleEndian Flags = cat(2, Flags, {'-D_LITTLE_ENDIAN'}); else % Does Matlab run on a big endian machine currently?! diff --git a/analyses/RunLength_2017_04_08/RunLength.c b/analyses/RunLength_2017_04_08/RunLength.c index be0a7690..1f177043 100644 --- a/analyses/RunLength_2017_04_08/RunLength.c +++ b/analyses/RunLength_2017_04_08/RunLength.c @@ -310,7 +310,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) // Create 3rd output as post-processing: ---------------------------------- // Collecting the indices on the fly might be faster, but doing this - // afterwards allowes to allocate the correct number of elements directly: + // afterwards allows to allocate the correct number of elements directly: if (nlhs == 3) { if (isColumn) { plhs[2] = mxCreateDoubleMatrix(nb, 1, mxREAL); diff --git a/analyses/RunLength_2017_04_08/RunLength_M.m b/analyses/RunLength_2017_04_08/RunLength_M.m index 2639a8d1..de70625f 100644 --- a/analyses/RunLength_2017_04_08/RunLength_M.m +++ b/analyses/RunLength_2017_04_08/RunLength_M.m @@ -137,11 +137,11 @@ if vectorized % Vectorized: -------------------------------- len = length(n); % Number of bins - d = cumsum(n); % Cummulated run lengths + d = cumsum(n); % Cumulated run lengths index = zeros(1, d(len)); % Pre-allocate index(d(1:len-1)+1) = 1; % Get the indices where the value changes index(1) = 1; % First element is treated as "changed" also - index = cumsum(index); % Cummulated indices + index = cumsum(index); % Cumulated indices x = b(index); else % Loop: -------------------------------------- diff --git a/analyses/RunLength_2017_04_08/uTest_RunLength.m b/analyses/RunLength_2017_04_08/uTest_RunLength.m index 6a1c0481..f1233ec5 100644 --- a/analyses/RunLength_2017_04_08/uTest_RunLength.m +++ b/analyses/RunLength_2017_04_08/uTest_RunLength.m @@ -140,7 +140,7 @@ function uTest_RunLength(doSpeed) end end - % Test coding with limitting counter to 255: + % Test coding with limiting counter to 255: for k = [1,2,3, 250:260, 500:520, 750:800] % Around multiples of 255 x0 = myCast(ones(1, k), aType); [b, n] = RunLength(x0, 'byte'); diff --git a/analyses/getkin.m b/analyses/getkin.m index 1bb84f1f..afde9dde 100644 --- a/analyses/getkin.m +++ b/analyses/getkin.m @@ -7,7 +7,7 @@ % BOUT_LENRH,BOUT_SPEEDRH,BOUT_LENLH,BOUT_SPEEDLH] = GETKIN(MSRAWDATA,LABELS,GROUP_NUM,FPS) % % INPUTS: -% MSRAWDATA Matrix of the positons of the 6-body parts outlining the rodent over time videotaped from the bottom looking up. +% MSRAWDATA Matrix of the positions of the 6-body parts outlining the rodent over time videotaped from the bottom looking up. % Rows represents time. % Columns 1 & 2 tracks snout; columns 3 to 6 tracks the two front paws; Columns 7 to 10 tracks the two hind paws; % Columns 11 & 12 tracks the base of the tail. Tested on tracking data generated by DeepLabCut 2.0. diff --git a/bsoid/action_gif2.m b/bsoid/action_gif2.m index cb0c615e..0c16f8b0 100644 --- a/bsoid/action_gif2.m +++ b/bsoid/action_gif2.m @@ -4,7 +4,7 @@ % % [T,B,B_EX] = ACTION_GIF2(PNGPATH,GRP,N,N_LEN,FILEPATHOUTRESULTS) outputs classified behaviors based on DeepLabCut analysis % PNGPATH The path to frame-by-frame video from FFmpeg. -% GRP Statistically different gropus based on unsupervised GMM model fitting of action space data. This is the output from BSOID. +% GRP Statistically different groups based on unsupervised GMM model fitting of action space data. This is the output from BSOID. % N Number of sampled video you desire. Default 3. % N_LEN Lower bound for consecutive frames (10fps, 50ms each) for which the video will be generated from. Default 6 (300ms). % X X times speed. Default 0.5. diff --git a/bsoid/bsoid_assign.m b/bsoid/bsoid_assign.m index e3b5d7d6..63d02974 100644 --- a/bsoid/bsoid_assign.m +++ b/bsoid/bsoid_assign.m @@ -14,7 +14,7 @@ % Otherwise, set it to 0 for individual segmentation/.csv file. Default is 1. % SMTH_HSTRY BOXCAR smoothing using number of frames from before. Default ~40ms before. % SMTH_FUTR BOXCAR smoothing using number of frames from after. Default ~40ms after. -% KCLASS Maximum number of assigment classes that the Gaussian Mixture Model will try to parse out. Default 50. +% KCLASS Maximum number of assignment classes that the Gaussian Mixture Model will try to parse out. Default 50. % % OUTPUTS: % F_10FPS Compiled features that were used to cluster, 10fps temporal resolution. diff --git a/bsoid/bsoid_fsml.m b/bsoid/bsoid_fsml.m index cc0f4dd9..0e8ca86d 100644 --- a/bsoid/bsoid_fsml.m +++ b/bsoid/bsoid_fsml.m @@ -4,7 +4,7 @@ % [LABELS_FSALL,F_10FPS_FS] = BSOID_FSML(DATA,BEHV_MDL,FPS,SMTH_HSTRY,SMTH_FUTR) outputs classified behaviors matching your camera's frame-rate % % INPUTS: -% DATA_TEST Matrix of the positons of the 6-body parts outlining the rodent over time videotaped from the bottom looking up. +% DATA_TEST Matrix of the positions of the 6-body parts outlining the rodent over time videotaped from the bottom looking up. % Rows represents time. % Columns 1 & 2 tracks snout; columns 3 to 6 tracks the two front paws; Columns 7 to 10 tracks the two hind paws; % Columns 11 & 12 tracks the base of the tail. Tested on tracking data generated by DeepLabCut 2.0. diff --git a/bsoid/bsoid_mdl2.m b/bsoid/bsoid_mdl2.m index 3265c2f0..acb2dccf 100644 --- a/bsoid/bsoid_mdl2.m +++ b/bsoid/bsoid_mdl2.m @@ -10,7 +10,7 @@ % CV_IT Number of times to run cross-validation on. Default is 30. % % OUTPUTS: -% BEHV_MDL Trained Multi-Class Support Vector Machine (SVM) classifier, based on Guassian kernels. +% BEHV_MDL Trained Multi-Class Support Vector Machine (SVM) classifier, based on Gaussian kernels. % CV_AMEAN Cross-validated accuracy mean. % CV_ASEM Cross-validated accuracy standard error of the mean. % ACC_FIG Accuracy box plot figure showing all the cross validated data points. diff --git a/bsoid/bsoid_svm.m b/bsoid/bsoid_svm.m index 08ffafbd..05841512 100644 --- a/bsoid/bsoid_svm.m +++ b/bsoid/bsoid_svm.m @@ -4,7 +4,7 @@ % [LABELS,F_10FPS_TEST] = BSOID_SVM(DATA_TEST,FPS,MDL) outputs classified behaviors using the output from bsoid_mdl. % % INPUTS: -% DATA_TEST Matrix of the positons of the 6-body parts outlining the rodent over time videotaped from the bottom looking up. +% DATA_TEST Matrix of the positions of the 6-body parts outlining the rodent over time videotaped from the bottom looking up. % Rows represents time. % Columns 1 & 2 tracks snout; columns 3 to 6 tracks the two front paws; Columns 7 to 10 tracks the two hind paws; % Columns 11 & 12 tracks the base of the tail. Tested on tracking data generated by DeepLabCut 2.0. diff --git a/bsoid_app/bsoid_analysis.py b/bsoid_app/bsoid_analysis.py index fbaa2f78..0854a4c2 100644 --- a/bsoid_app/bsoid_analysis.py +++ b/bsoid_app/bsoid_analysis.py @@ -15,7 +15,7 @@ def streamlit_run(pyfile): layout='wide', initial_sidebar_state='auto') local_css("./bsoid_app/bsoid_utilities/style.css") title = "