Skip to content

Add codespell: workflow + config and have it fix some typos #106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = .git,*.svg,*.css,.codespellrc,cspell.json
check-hidden = true
# ignore-regex =
# ignore-words-list =
23 changes: 23 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Codespell configuration is within .codespellrc
---
name: Codespell

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Codespell
uses: codespell-project/actions-codespell@v2
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,10 @@ repos:
# W605 - a backslash-character pair that is not a valid escape sequence now
# generates a DeprecationWarning. This will eventually become a SyntaxError.
# Needed because we use \d as an escape sequence

# codespell
- repo: https://github.com/codespell-project/codespell
# Configuration for codespell is in .codespellrc
rev: v2.2.6
hooks:
- id: codespell
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Observes [Semantic Versioning](https://semver.org/spec/v2.0.0.html) standard and

## [0.6.1] - 2023-08-02

+ Update DANDI upload funtionality to improve useability
+ Update DANDI upload functionality to improve usability


## [0.6.0] - 2023-07-26
Expand Down
2 changes: 1 addition & 1 deletion element_interface/caiman_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def __init__(self, caiman_dir: str):
else:
raise FileNotFoundError(
"No CaImAn analysis output file found at {}"
" containg all required fields ({})".format(
" containing all required fields ({})".format(
caiman_dir, _required_hdf5_fields
)
)
Expand Down
4 changes: 2 additions & 2 deletions element_interface/extract_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class EXTRACT_trigger:
data = load('{scanfile}');
M = data.M;

% Input Paramaters
% Input Parameters
config = struct();
{parameters_list_string}

Expand All @@ -31,7 +31,7 @@ def __init__(

Args:
scanfile (Union[str, Path]): Full path of the scan
parameters (dict): EXTRACT input paramaters.
parameters (dict): EXTRACT input parameters.
output_dir (Union[str, Path]): Directory to store the outputs of EXTRACT analysis.
"""
assert isinstance(parameters, dict)
Expand Down
2 changes: 1 addition & 1 deletion element_interface/suite2p_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def __init__(self, suite2p_dir: str):

self.creation_time = min(
[p.creation_time for p in self.planes.values()]
) # ealiest file creation time
) # earliest file creation time
self.curation_time = max(
[p.curation_time for p in self.planes.values()]
) # most recent curation time
Expand Down