Skip to content

Commit

Permalink
Merge pull request #31 from yarikoptic/enh-codespell
Browse files Browse the repository at this point in the history
Add codespell support and make it fix few typos
  • Loading branch information
will-moore committed Jan 31, 2024
2 parents bda290d + a48cfa1 commit a3ea751
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 3 deletions.
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,package-lock.json,.codespellrc
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
2 changes: 1 addition & 1 deletion src/JsonBrowser/JsonKeyLink.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
export let name;
export let version;
// mapping from Spec key-words -> #achors on ngff page
// mapping from Spec key-words -> #anchors on ngff page
const urls_01 = {
"multiscales": "multiscale-md",
"omero": "omero-md",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
// e.g. chunkIndices is (0, 1, 0, 0) and chunk is (1, 125, 125, 125)
// we want to get [0, 125:250, 0:125, 0:125]
let ch = store.meta.chunks;
const indecies = get(chunkIndices).map((index, dim) => {
const indices = get(chunkIndices).map((index, dim) => {
if (ch[dim] > 1) {
return slice(index * ch[dim], (index + 1) * ch[dim]);
} else {
return index * ch[dim];
}
});
chunk = await store.get(indecies);
chunk = await store.get(indices);
}
chunkIndices.subscribe(function () {
Expand Down

0 comments on commit a3ea751

Please sign in to comment.