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

Fix codespell setup: keep config in pyproject.toml and do not sub-select folders #262

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cubids/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ def cubids_group():


def cubids_apply():
''' Command Line Interface funciton for applying the tsv changes.'''
''' Command Line Interface function for applying the tsv changes.'''

parser = argparse.ArgumentParser(
description="cubids-apply: apply the changes specified in a tsv "
Expand Down Expand Up @@ -508,7 +508,7 @@ def cubids_apply():


def cubids_datalad_save():
''' Command Line Interfcae function for performing datalad save.'''
''' Command Line Interface function for performing datalad save.'''

parser = argparse.ArgumentParser(
description="cubids-datalad-save: perform a DataLad save on a BIDS "
Expand Down Expand Up @@ -614,7 +614,7 @@ def cubids_copy_exemplars():
type=Path,
action='store',
help='absolute path to the .tsv file that lists one '
'subject from each Acqusition Group '
'subject from each Acquisition Group '
'(*_AcqGrouping.tsv from the cubids-group output)')
parser.add_argument('--use-datalad',
action='store_true',
Expand Down
12 changes: 6 additions & 6 deletions cubids/cubids.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ def apply_tsv_changes(self, summary_tsv, files_tsv, new_prefix,
and generates the new tsv files.

This function looks at the RenameKeyGroup and MergeInto
columns and modifies the bids datset according to the
columns and modifies the bids dataset according to the
specified changs.

Parameters:
Expand Down Expand Up @@ -547,12 +547,12 @@ def copy_exemplars(self, exemplars_dir, exemplars_tsv, min_group_size,
-----------
exemplars_dir: str
path to the directory that will contain one subject
from each Acqusition Gorup (*_AcqGrouping.tsv)
from each Acquisition Group (*_AcqGrouping.tsv)
example path: /Users/Covitz/tsvs/CCNP_Acq_Groups/

exemplars_tsv: str
path to the .tsv file that lists one subject
from each Acqusition Group (*_AcqGrouping.tsv
from each Acquisition Group (*_AcqGrouping.tsv
from the cubids-group output)
example path: /Users/Covitz/tsvs/CCNP_Acq_Grouping.tsv
"""
Expand Down Expand Up @@ -602,7 +602,7 @@ def purge(self, scans_txt, raise_on_error=True):
scans_txt: str
path to the .txt file that lists the scans
you want to be deleted from the dataset, along
with thier associations.
with their associations.
example path: /Users/Covitz/CCNP/scans_to_delete.txt
"""

Expand Down Expand Up @@ -735,7 +735,7 @@ def _purge_associations(self, scans):
print("Not running any association removals")

def get_nifti_associations(self, nifti):
# get all assocation files of a nifti image
# get all association files of a nifti image
no_ext_file = str(nifti).split('/')[-1].split('.')[0]
associations = []
for path in Path(self.path).rglob("sub-*/**/*.*"):
Expand Down Expand Up @@ -836,7 +836,7 @@ def get_param_groups_from_key_group(self, key_group):
if ret == "erroneous sidecar found":
return "erroneous sidecar found"

# add modality to the retun tuple
# add modality to the return tuple
l_ret = list(ret)
l_ret.append(modality)
tup_ret = tuple(l_ret)
Expand Down
2 changes: 1 addition & 1 deletion cubids/metadata_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
def check_merging_operations(action_tsv, raise_on_error=False):
"""Checks that the merges in an action tsv are possible.

To be mergable the
To be mergeable the
"""
actions = pd.read_table(action_tsv)
ok_merges = []
Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
[build-system]
requires = ["setuptools >= 40.8.0", "wheel"]

[tool.codespell]
skip = '*.svg,_version.py,*.pem,*.json,testdata'
#
# ignore-words-list = ''

3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ envlist = codespell
skip_install = true
deps =
codespell~=2.0
tomli
commands =
codespell -D- --skip "_version.py,*.pem,*.json" {posargs} cubds docs notebooks tests
codespell {posargs}