From 4161598ad097ef8862f2638dc4b8d6ac7ec07c24 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 26 Jun 2023 18:02:41 -0400 Subject: [PATCH 1/4] Add github action to codespell master on push and PRs --- .github/workflows/codespell.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 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 00000000..7373affc --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,22 @@ +--- +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@v3 + - name: Codespell + uses: codespell-project/actions-codespell@v2 From 52e412ee0c3069f85454d149bb70efea0eeb8467 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 26 Jun 2023 18:02:41 -0400 Subject: [PATCH 2/4] Add rudimentary codespell config --- .codespellrc | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .codespellrc diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 00000000..da3c0571 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,4 @@ +[codespell] +skip = .git,*.pdf,*.svg +# +# ignore-words-list = From f2ec7ee18a6f83f9a63dd9fa1dadb5169fdccc2b Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 26 Jun 2023 18:03:22 -0400 Subject: [PATCH 3/4] Some domain specific ignores --- .codespellrc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.codespellrc b/.codespellrc index da3c0571..1bc2e667 100644 --- a/.codespellrc +++ b/.codespellrc @@ -1,4 +1,3 @@ [codespell] skip = .git,*.pdf,*.svg -# -# ignore-words-list = +ignore-words-list = crate,dne From 319fd6ac34106b3de18e06a7a1424e1c8000fd2b Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Mon, 26 Jun 2023 18:03:24 -0400 Subject: [PATCH 4/4] [DATALAD RUNCMD] run codespell throughout === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- src/cmd/split.rs | 2 +- src/cmd/stats.rs | 2 +- src/util.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cmd/split.rs b/src/cmd/split.rs index 0e597ee5..02d457d3 100644 --- a/src/cmd/split.rs +++ b/src/cmd/split.rs @@ -24,7 +24,7 @@ Usage: split options: -s, --size The number of records to write into each chunk. [default: 500] - -j, --jobs The number of spliting jobs to run in parallel. + -j, --jobs The number of splitting jobs to run in parallel. This only works when the given CSV data has an index already created. Note that a file handle is opened for each job. diff --git a/src/cmd/stats.rs b/src/cmd/stats.rs index 64572a7b..0f95cfe3 100644 --- a/src/cmd/stats.rs +++ b/src/cmd/stats.rs @@ -423,7 +423,7 @@ impl Commute for FieldType { (TNull, any) | (any, TNull) => any, // There's no way to get around an unknown. (TUnknown, _) | (_, TUnknown) => TUnknown, - // Integers can degrate to floats. + // Integers can degrade to floats. (TFloat, TInteger) | (TInteger, TFloat) => TFloat, // Numbers can degrade to Unicode strings. (TUnicode, TFloat) | (TFloat, TUnicode) => TUnicode, diff --git a/src/util.rs b/src/util.rs index c5086ff7..c4b810e3 100644 --- a/src/util.rs +++ b/src/util.rs @@ -146,7 +146,7 @@ pub fn range(start: Idx, end: Idx, len: Idx, index: Idx) } } -/// Create a directory recursively, avoiding the race conditons fixed by +/// Create a directory recursively, avoiding the race conditions fixed by /// https://github.com/rust-lang/rust/pull/39799. fn create_dir_all_threadsafe(path: &Path) -> io::Result<()> { // Try 20 times. This shouldn't theoretically need to be any larger