From ec9a9427a0d0e8edde791beca4cc0bbbf82c422d Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 31 Oct 2023 18:29:49 -0400 Subject: [PATCH 1/5] Add github action to codespell main 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 0000000..3ebbf55 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,22 @@ +--- +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@v3 + - name: Codespell + uses: codespell-project/actions-codespell@v2 From 0f8cabf412b663a65a0c29c19dc2e7c56e00d610 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 31 Oct 2023 18:29:49 -0400 Subject: [PATCH 2/5] Add rudimentary codespell config --- pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index b5cdd8d..637b6f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,3 +12,8 @@ profile = "black" multi_line_output = 3 include_trailing_comma = true reverse_relative = true + +[tool.codespell] +skip = '.git,*.pdf,*.svg' +# +# ignore-words-list = '' From a968574f185d39927749a7e4d09108c00e94f9e8 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 31 Oct 2023 18:29:54 -0400 Subject: [PATCH 3/5] [DATALAD RUNCMD] run codespell throughout fixing typo automagically === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- src/pystow/cache.py | 2 +- src/pystow/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pystow/cache.py b/src/pystow/cache.py index 04bff89..29ee7eb 100644 --- a/src/pystow/cache.py +++ b/src/pystow/cache.py @@ -31,7 +31,7 @@ import pandas as pd __all__ = [ - # Classses + # Classes "Cached", "CachedPickle", "CachedJSON", diff --git a/src/pystow/utils.py b/src/pystow/utils.py index dff1809..66e1c93 100644 --- a/src/pystow/utils.py +++ b/src/pystow/utils.py @@ -369,7 +369,7 @@ def download( url, path, ) - # Solution for progres bar from https://stackoverflow.com/a/63831344/5775947 + # Solution for progress bar from https://stackoverflow.com/a/63831344/5775947 total_size = int(response.headers.get("Content-Length", 0)) # Decompress if needed response.raw.read = partial(response.raw.read, decode_content=True) From 85991f2c1287d04723cc87a3fa98502cb339793e Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Fri, 15 Nov 2024 14:02:19 +0100 Subject: [PATCH 4/5] Update tox.ini --- tox.ini | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tox.ini b/tox.ini index 0ff69bd..a120fde 100644 --- a/tox.ini +++ b/tox.ini @@ -167,6 +167,13 @@ allowlist_externals = /usr/bin/cat /usr/bin/mkdir +[testenv:codespell] +description = Check for typos +deps = + codespell[toml] +commands = + codespell + [testenv:coverage-report] deps = coverage skip_install = true From 19bd8040dbe9fd6940518d07ae1d128fe6cc3d62 Mon Sep 17 00:00:00 2001 From: Charles Tapley Hoyt Date: Fri, 15 Nov 2024 14:03:37 +0100 Subject: [PATCH 5/5] Switch to using tox as runner --- .github/workflows/codespell.yml | 22 ---------------------- .github/workflows/tests.yml | 2 ++ 2 files changed, 2 insertions(+), 22 deletions(-) delete mode 100644 .github/workflows/codespell.yml diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml deleted file mode 100644 index 3ebbf55..0000000 --- a/.github/workflows/codespell.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -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@v3 - - name: Codespell - uses: codespell-project/actions-codespell@v2 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e3009a2..10ac84d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,6 +29,8 @@ jobs: run: tox -e pyroma - name: Check static typing with MyPy run: tox -e mypy + - name: Check for typos with codespell + run: tox -e codespell docs: name: Documentation runs-on: ubuntu-latest