diff --git a/.codespellrc b/.codespellrc new file mode 100644 index 00000000..52cf10a3 --- /dev/null +++ b/.codespellrc @@ -0,0 +1,4 @@ +[codespell] +skip = .git,*.pdf,*.svg,venvs,versioneer.py,_version.py,.tox +# mke -- is a variable name which makes sense, let's ignore for now until inline skips are supported +ignore-words-list = mke diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 00000000..5768d7c6 --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,19 @@ +--- +name: Codespell + +on: + push: + branches: [master] + pull_request: + branches: [master] + +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@v1 diff --git a/Makefile b/Makefile index ea947964..06d99d81 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -# simple makefile to simplify repetetive build env management tasks under posix +# simple makefile to simplify repetitive build env management tasks under posix # Ideas borrowed from scikit-learn's and PyMVPA Makefiles -- thanks! PYTHON ?= python diff --git a/_datalad_buildsupport/formatters.py b/_datalad_buildsupport/formatters.py index 5ac01de8..a88a99bd 100644 --- a/_datalad_buildsupport/formatters.py +++ b/_datalad_buildsupport/formatters.py @@ -75,7 +75,7 @@ def _mk_title(self, prog): def _mk_name(self, prog, desc): """ - this method is in consitent with others ... it relies on + this method is in consistent with others ... it relies on distribution """ desc = desc.splitlines()[0] if desc else 'it is in the name' diff --git a/datalad_metalad/__init__.py b/datalad_metalad/__init__.py index b4fd00e0..9fc8a929 100644 --- a/datalad_metalad/__init__.py +++ b/datalad_metalad/__init__.py @@ -78,7 +78,7 @@ def get_file_id(rec): Any ID string is prefixed with 'datalad:' to identify it as a DataLad-recognized ID. This prefix is defined in the main JSON-LD - context defintion. + context definition. """ from datalad.support.digests import Digester diff --git a/datalad_metalad/aggregate.py b/datalad_metalad/aggregate.py index 6262fcba..ee1f5539 100644 --- a/datalad_metalad/aggregate.py +++ b/datalad_metalad/aggregate.py @@ -397,7 +397,7 @@ def copy_to_existing(destination_metadata_store: str, # object, we have to read in the object after copying it # only, to write it out again. This is wasteful. We should # instead specify that the top-level object, here: the - # DatasetTree, is not writen out. + # DatasetTree, is not written out. copied_dataset_tree.read_in() root_dataset_tree.add_subtree( @@ -498,7 +498,7 @@ def copy_tree_version_list(destination_metadata_store: str, # object, we have to read in the object after copying it # only, to write it out again. This is wasteful. We should # instead specify that the top-level object, here: the - # DatasetTree, is not writen out. + # DatasetTree, is not written out. copied_dataset_tree.read_in() destination_tree_version_list.set_dataset_tree( diff --git a/datalad_metalad/extractors/core.py b/datalad_metalad/extractors/core.py index 41375b8e..5f598241 100644 --- a/datalad_metalad/extractors/core.py +++ b/datalad_metalad/extractors/core.py @@ -355,7 +355,7 @@ def _get_commit_info(ds, refcommit, status): ) ] # version, always anchored on the first commit (tags could move and - # make the integer commit count ambigous, and subtantially complicate + # make the integer commit count ambiguous, and subtantially complicate # version comparisons version = '0-{}-g{}'.format( len(commits), diff --git a/datalad_metalad/extractors/tests/test_base.py b/datalad_metalad/extractors/tests/test_base.py index 242e8b26..78584de4 100644 --- a/datalad_metalad/extractors/tests/test_base.py +++ b/datalad_metalad/extractors/tests/test_base.py @@ -103,7 +103,7 @@ def test_api(path=None, *, annex): "Should have managed to find at least the core extractor extractor" if skipped_extractors: pytest.skip( - "Not fully tested/succeded since some extractors failed" + "Not fully tested/succeeded since some extractors failed" " to load:\n%s" % ("\n".join(skipped_extractors))) diff --git a/datalad_metalad/filters/base.py b/datalad_metalad/filters/base.py index b8a67de9..1b9d268b 100644 --- a/datalad_metalad/filters/base.py +++ b/datalad_metalad/filters/base.py @@ -38,7 +38,7 @@ def filter(self, This method is called by the 'meta-filter' driver. It should iterate through the metadata instances that are provided by the metadata - coordinates, perform the filter operation ond yield the resulting + coordinates, perform the filter operation and yield the resulting metadata objects as instances of "datalad_metalad.metadatatypes.Metadata". Returned metadata is emitted as datalad invocation result, e.g. as diff --git a/docs/source/user_guide/writing-extractors.rst b/docs/source/user_guide/writing-extractors.rst index ac345a0e..da1a26c5 100644 --- a/docs/source/user_guide/writing-extractors.rst +++ b/docs/source/user_guide/writing-extractors.rst @@ -171,7 +171,7 @@ extractor instance:: Please not, if dataset level extraction should be performed and you want to provide extractor -parameter, you have to provide thw ``--force-dataset-level`` parameter to ensure +parameter, you have to provide the ``--force-dataset-level`` parameter to ensure dataset-level extraction. i.e. to prevent ``meta-extract`` from interpreting the key of the first extractor argument as file name for a file-level extraction. diff --git a/tox.ini b/tox.ini index 031d57af..c17616e4 100644 --- a/tox.ini +++ b/tox.ini @@ -21,9 +21,10 @@ skip_install = true deps = codespell~=2.0 commands = - codespell -x .codespell-ignorelines -D- -I .codespell-ignorewords --skip "_version.py,*.pem" datalad setup.py + codespell [testenv:flake8] +deps = flake8 commands = flake8 {posargs} [testenv:venv] @@ -81,5 +82,5 @@ python_files = test_*.py *_test.py utils_pytest.py # W293 = Blank line contains whitespace #ignore = E265,W293,E266,E731 max-line-length = 120 -include = datalad +include = datalad_metalad exclude = .tox,.venv,venv-debug,build,dist,doc,git/ext/