From 12ca794c16ae680bc0de20a45e7a1cb84613655f Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 23 Sep 2025 16:36:21 -0400 Subject: [PATCH 1/4] Add github action to codespell master 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..12f226a --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,25 @@ +# Codespell configuration is within setup.cfg +--- +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@v4 + - name: Annotate locations with typos + uses: codespell-project/codespell-problem-matcher@v1 + - name: Codespell + uses: codespell-project/actions-codespell@v2 From 4a8602714b72c6ef609f68f3898a63f81748123b Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 23 Sep 2025 16:36:21 -0400 Subject: [PATCH 2/4] Add rudimentary codespell config --- setup.cfg | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup.cfg b/setup.cfg index 08aedd7..9362c80 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,2 +1,9 @@ [metadata] description_file = README.md + +[codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +skip = .git*,*.svg,*.css,*.min.* +check-hidden = true +# ignore-regex = +# ignore-words-list = From 18da286412d958b4443863911f077cac5febb181 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 23 Sep 2025 16:36:59 -0400 Subject: [PATCH 3/4] Ignore IntStruct --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 9362c80..e45c379 100644 --- a/setup.cfg +++ b/setup.cfg @@ -5,5 +5,5 @@ description_file = README.md # Ref: https://github.com/codespell-project/codespell#using-a-config-file skip = .git*,*.svg,*.css,*.min.* check-hidden = true -# ignore-regex = +ignore-regex = \bIntStruct\b # ignore-words-list = From 73f230c26a27a601317e81ef2faa3df6c2d6daf1 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Tue, 23 Sep 2025 16:37:00 -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 ^^^ --- docs/_docs/getting-started.md | 2 +- opencontainers/digest/digest.py | 2 +- opencontainers/distribution/reggie/client.py | 4 ++-- opencontainers/tests/test_descriptor.py | 4 ++-- opencontainers/tests/test_imagelayout.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/_docs/getting-started.md b/docs/_docs/getting-started.md index 899ebc2..7b0897b 100644 --- a/docs/_docs/getting-started.md +++ b/docs/_docs/getting-started.md @@ -361,7 +361,7 @@ req = (client.NewRequest("PATCH", response.GetRelativeLocation()). blobResponse = client.Do(req) ``` -Finally, valiate the uploaded blob content. +Finally, validate the uploaded blob content. ```python req = client.NewRequest("GET", "/v2//blobs/", diff --git a/opencontainers/digest/digest.py b/opencontainers/digest/digest.py index 41048c2..ac15394 100644 --- a/opencontainers/digest/digest.py +++ b/opencontainers/digest/digest.py @@ -56,7 +56,7 @@ def sepIndex(self): Return the index of the : separator. return the index of the : separator or the index - that separtes the extra content provided in the algorithm name. + that separates the extra content provided in the algorithm name. """ try: algorithm, encoded = (self).split(":") diff --git a/opencontainers/distribution/reggie/client.py b/opencontainers/distribution/reggie/client.py index b59791f..1aac358 100644 --- a/opencontainers/distribution/reggie/client.py +++ b/opencontainers/distribution/reggie/client.py @@ -175,7 +175,7 @@ def NewRequest(self, method, path, *opts): # Set default namespace, and fill in string replacements namespace = rc.Name or self.Config.DefaultName - # Substitute known path paramaters + # Substitute known path parameters replacements = { "": namespace, "": rc.Reference, @@ -199,7 +199,7 @@ def NewRequest(self, method, path, *opts): def Do(self, req): """ - Execut a request. + Execute a request. Given a request (an instance of the RequestClient, execute the request and return a response. diff --git a/opencontainers/tests/test_descriptor.py b/opencontainers/tests/test_descriptor.py index 07b3a1b..cccb5e7 100644 --- a/opencontainers/tests/test_descriptor.py +++ b/opencontainers/tests/test_descriptor.py @@ -215,7 +215,7 @@ def test_descriptor(tmp_path): with pytest.raises(ErrDigestInvalidFormat): desc.load(no_hash) - # expected failure: digest does not match pattern (invalid aglorithm characters) + # expected failure: digest does not match pattern (invalid algorithm characters) with pytest.raises(ErrDigestInvalidFormat): desc.load(invalid_algchars) @@ -226,7 +226,7 @@ def test_descriptor(tmp_path): # expected success: valid URL entry desc.load(valid_urls) - # expected failure: urls does not match format (invalide url characters) + # expected failure: urls does not match format (invalid url characters) with pytest.raises(SystemExit): desc.load(invalid_urls) diff --git a/opencontainers/tests/test_imagelayout.py b/opencontainers/tests/test_imagelayout.py index 7b31055..813ac21 100644 --- a/opencontainers/tests/test_imagelayout.py +++ b/opencontainers/tests/test_imagelayout.py @@ -15,7 +15,7 @@ def test_imagelayout(tmp_path): """test creation of an opencontainers ImageLayout""" layout = ImageLayout() - # expected faulure: imageLayoutVersion does not match pattern or type + # expected failure: imageLayoutVersion does not match pattern or type with pytest.raises(SystemExit): layout.load({"imageLayoutVersion": 1.0})