Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Codespell: adding config, workflow and fixing some typos #336

Merged
merged 9 commits into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -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
19 changes: 19 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion _datalad_buildsupport/formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion datalad_metalad/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions datalad_metalad/aggregate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion datalad_metalad/extractors/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion datalad_metalad/extractors/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)))


Expand Down
2 changes: 1 addition & 1 deletion datalad_metalad/filters/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/source/user_guide/writing-extractors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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/