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

Run codespell on some obvious typos #563

Merged
merged 1 commit into from
May 10, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion heudiconv/cli/monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def process(paths2process, db, wait=WAIT_TIME, logdir='log'):

def monitor(topdir='/tmp/new_dir', check_ptrn='/20../../..',
db=None, wait=WAIT_TIME, logdir='log'):
# make logdir if not existant
# make logdir if not existent
try:
os.makedirs(logdir)
except OSError:
Expand Down
4 changes: 2 additions & 2 deletions heudiconv/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def conversion_info(subject, outdir, info, filegroup, ses):
continue
template, outtype = key[0], key[1]
# So no annotation_classes of any kind! so if not used -- what was the
# intension???? XXX
# intention???? XXX
outpath = outdir
for idx, itemgroup in enumerate(items):
if not isinstance(itemgroup, list):
Expand Down Expand Up @@ -131,7 +131,7 @@ def prep_conversion(sid, dicoms, outdir, heuristic, converter, anon_sid,
# ref: https://github.com/nipy/heudiconv/issues/84#issuecomment-330048609
# for more automagical wishes
target_heuristic_filename = op.join(idir, 'heuristic.py')
# faciliates change - TODO: remove in 1.0
# facilitates change - TODO: remove in 1.0
old_heuristic_filename = op.join(idir, op.basename(heuristic.filename))
if op.exists(old_heuristic_filename):
assure_no_file_exists(target_heuristic_filename)
Expand Down
2 changes: 1 addition & 1 deletion heudiconv/heuristics/reproin.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ def infotodict(seqinfo):
if isinstance(current_run, int)
else current_run)
else:
# if there is no _run -- no run label addded
# if there is no _run -- no run label added
run_label = None

# yoh: had a wrong assumption
Expand Down
2 changes: 1 addition & 1 deletion heudiconv/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def get_extracted_dicoms(fl):
# raise ValueError("some but not all input files are tar files")

# tarfiles already know what they contain, and often the filenames
# are unique, or at least in a unqiue subdir per session
# are unique, or at least in a unique subdir per session
# strategy: extract everything in a temp dir and assemble a list
# of all files in all tarballs

Expand Down
8 changes: 4 additions & 4 deletions heudiconv/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def clean_args(hargs, iterarg, iteridx):
is_iterarg = False
itercount = 0

indicies = []
indices = []
cmdargs = hargs[:]

for i, arg in enumerate(hargs):
Expand All @@ -100,13 +100,13 @@ def clean_args(hargs, iterarg, iteridx):
is_iterarg = False
if is_iterarg:
if iteridx != itercount:
indicies.append(i)
indices.append(i)
itercount += 1
if arg in iterarg:
is_iterarg = True
if arg in queue_args:
indicies.extend([i, i+1])
indices.extend([i, i+1])

for j in sorted(indicies, reverse=True):
for j in sorted(indices, reverse=True):
del cmdargs[j]
return cmdargs
4 changes: 2 additions & 2 deletions heudiconv/tests/test_heuristics.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def test_reproin_largely_smoke(tmpdir, heuristic, invocation):
runner(args + ['--subjects', 'sub1', 'sub2'])

if heuristic != 'reproin':
# if subject is not overriden, raise error
# if subject is not overridden, raise error
with pytest.raises(NotImplementedError):
runner(args)
return
Expand Down Expand Up @@ -158,7 +158,7 @@ def test_scout_conversion(tmpdir):
# Let's do some basic checks on produced files
j = load_json(sespath / 'fmap/sub-phantom1sid1_ses-localizer_acq-3mm_phasediff.json')
# We store HeuDiConv version in each produced .json file
# TODO: test that we are not somehow overwritting that version in existing
# TODO: test that we are not somehow overwriting that version in existing
# files which we have not produced in a particular run.
assert j[HEUDICONV_VERSION_JSON_KEY] == __version__

Expand Down