Skip to content

Commit

Permalink
Merge pull request #214 from yarikoptic/enh-codespell
Browse files Browse the repository at this point in the history
codespell: config, workflow + fixes
  • Loading branch information
adswa committed Oct 5, 2023
2 parents 8c934ad + 486b4de commit ffc3908
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[codespell]
skip = .git,*.pdf,*.svg,versioneer.py
# ignore-words-list =
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: [main]
pull_request:
branches: [main]

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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 🐛 Bug Fixes

- Wrong argument specification broke the commmand line interface of
- Wrong argument specification broke the command line interface of
`add-sibling-dataverse`. Fixes
https://github.com/datalad/datalad-dataverse/issues/289 via
https://github.com/datalad/datalad-dataverse/pull/290 (by
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_dataverse/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
# TAG-NUM-gHEX
mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe)
if not mo:
# unparseable. Maybe git-describe is misbehaving?
# unparsable. Maybe git-describe is misbehaving?
pieces["error"] = ("unable to parse git-describe output: '%s'"
% describe_out)
return pieces
Expand Down
4 changes: 2 additions & 2 deletions datalad_dataverse/add_sibling_dataverse.py
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ def _add_git_sibling(
name: str
credential_name: str
originally given credential reference - needed to decide whether or not
to incude in datalad-annex URL
to include in datalad-annex URL
export: bool
existing: {skip, error, reconfigure}
known: bool
Expand Down Expand Up @@ -404,7 +404,7 @@ def _add_storage_sibling(
(Presently unused)
known: bool
Flag whether the sibling is a known remote (no implied
necessary existance of content on the remote).
necessary existence of content on the remote).
"""
if known and existing == 'skip':
yield _get_skip_sibling_result(name, ds, 'storage')
Expand Down
8 changes: 4 additions & 4 deletions datalad_dataverse/baseremote.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class DataverseRemote(SpecialRemote):
special remote records the IDs of annex keys and tries to rely on them if
possible.
Dataverse imposes strict nameing limitations for directories and files.
Dataverse imposes strict naming limitations for directories and files.
See https://github.com/IQSS/dataverse/issues/8807#issuecomment-1164434278
Therefore, remote paths are mangles to match these limitations.
"""
Expand Down Expand Up @@ -257,7 +257,7 @@ def _remove_annex_fileid_record(self, key: str, fileid: int) -> None:
self._set_annex_fileid_record(key, r)

def _get_remotepath_for_key(self, key: str) -> PurePosixPath:
"""Return the cannonical remote path for a given key
"""Return the canonical remote path for a given key
Parameters
----------
Expand Down Expand Up @@ -332,7 +332,7 @@ def _upload_file(self, remote_path, key, local_file, replace_id):
# git-annex-testremote ("store when already present").
# Generally it's kinda fine, but we'd better figure this out more
# reliably. Note, that we have to deal with annex keys, which are
# not hash based (for example the special keys fo datalad-annex
# not hash based (for example the special keys of datalad-annex
# git-remote-helper).
# Hence, having the key on the remote end, doesn't mean it's
# identical. So, we can't catch it beforehand this way.
Expand Down Expand Up @@ -399,7 +399,7 @@ def _remove_file(self, key: str, rm_id: int | None):
# file, if it has a persistent URL (should be findable in
# self.old_dataset_versions) or even via api/access/datafile/811.
# However, that depends on permissions, etc., so not clear it's
# useful or desireable to always do that.
# useful or desirable to always do that.
# Otherwise not seeing a solution ATM. See https://github.com/datalad/datalad-dataverse/issues/146#issuecomment-1214409351
pass

Expand Down
4 changes: 2 additions & 2 deletions datalad_dataverse/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class OnlineDataverseDataset:
scopes.
On initialization only a record of what is in the latest version (draft or
not) of the dataverse dataset is retrived, including an annotation of
not) of the dataverse dataset is retrieved, including an annotation of
content on whether it is released. This annotation is crucial, since it has
implications on what to record should changes be uploaded. For
example: It is not possible to actually remove content from a released
Expand Down Expand Up @@ -442,7 +442,7 @@ def _file_records_by_fileid(self):
retrieval of keys that are not present in the latest version anymore.
Note, that whie initially we may not be in a draft, we are as soon as we
change things (upload/repace/remove/rename). We keep track of those
change things (upload/replace/remove/rename). We keep track of those
changes herein w/o rerequesting the new state.
"""

Expand Down
2 changes: 1 addition & 1 deletion datalad_dataverse/tests/test_dataset.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Tests OnlineDataverseDataset
These tests (should) somewhat close mirror the ones fpr pydataverse.
These tests (should) somewhat close mirror the ones for pydataverse.
At least as long as we are using that API layer.
"""

Expand Down

0 comments on commit ffc3908

Please sign in to comment.