From a1eefea08a5b33e949fb430d16d653f3e5ac76cf Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 30 Jul 2025 11:02:21 -0400 Subject: [PATCH 1/4] Add github action to codespell main 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..b231667 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,25 @@ +# Codespell configuration is within pyproject.toml +--- +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: Annotate locations with typos + uses: codespell-project/codespell-problem-matcher@v1 + - name: Codespell + uses: codespell-project/actions-codespell@v2 From 06d2f7d38690beba862e978b3813a99a9ebab22f Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 30 Jul 2025 11:02:21 -0400 Subject: [PATCH 2/4] Add rudimentary codespell config --- pyproject.toml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f5b211d..bb21685 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,9 @@ [build-system] requires = ["setuptools>=61.0", "wheel"] -build-backend = "setuptools.build_meta" \ No newline at end of file +build-backend = "setuptools.build_meta" +[tool.codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +skip = '.git*' +check-hidden = true +ignore-regex = '^\s*"image/\S+": ".*' +# ignore-words-list = '' From e6f48a1a8d09263c80494f26ee7916d6841f64bd Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 30 Jul 2025 11:03:31 -0400 Subject: [PATCH 3/4] Fix Loging as Login --- brainstem_api_tutorial_new.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brainstem_api_tutorial_new.ipynb b/brainstem_api_tutorial_new.ipynb index 7f7ee04..ed9feb3 100644 --- a/brainstem_api_tutorial_new.ipynb +++ b/brainstem_api_tutorial_new.ipynb @@ -49,7 +49,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# 2. Loging in with token\n", + "# 2. Login with token\n", "For convenience, you can save your authentication token to a configuration file. This allows you to quickly initialize the client in future sessions without entering login details. Simply load the token from your saved file and pass it to the client constructor." ] }, From b2213aa380fb9415ab7e0d0280fa21fb5f5e4303 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 30 Jul 2025 11:03:33 -0400 Subject: [PATCH 4/4] [DATALAD RUNCMD] chore: run codespell throughout fixing a few new typos automagically === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- brainstem_api_tutorial.ipynb | 4 ++-- brainstem_api_tutorial.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/brainstem_api_tutorial.ipynb b/brainstem_api_tutorial.ipynb index d62b05f..00d7ddd 100644 --- a/brainstem_api_tutorial.ipynb +++ b/brainstem_api_tutorial.ipynb @@ -76,7 +76,7 @@ "source": [ "## Loaded models can be sorted by different criteria applying to\n", "## their fields. In this example, sessions will be sorted in \n", - "## descending ording according to their name.\n", + "## descending ordering according to their name.\n", "output1 = client.load_model('session', sort=['-name']).json()" ] }, @@ -103,7 +103,7 @@ }, "outputs": [], "source": [ - "### The list of related experiment data can be retrived from the\n", + "### The list of related experiment data can be retrieved from the\n", "### returned dictionary.\n", "dataacquisition = output1[\"sessions\"][0][\"dataacquisition\"]" ] diff --git a/brainstem_api_tutorial.py b/brainstem_api_tutorial.py index 2b94ce2..7634f00 100644 --- a/brainstem_api_tutorial.py +++ b/brainstem_api_tutorial.py @@ -20,7 +20,7 @@ ## Loaded models can be sorted by different criteria applying to ## their fields. In this example, sessions will be sorted in -## descending ording according to their name. +## descending ordering according to their name. output1 = client.load_model('session', sort=['-name']).json() ## In some cases models contain relations with other models, and @@ -29,7 +29,7 @@ ## manipulations related to each session will be included. output1 = client.load_model('session', include=['projects', 'dataacquisition', 'behaviors', 'manipulations']).json() -### The list of related experiment data can be retrived from the +### The list of related experiment data can be retrieved from the ### returned dictionary. dataacquisition = output1["sessions"][0]["dataacquisition"]