Skip to content

Commit 1277374

Browse files
committed
fix: indentation problems and imports
1 parent c17ab4f commit 1277374

File tree

2 files changed

+18
-20
lines changed

2 files changed

+18
-20
lines changed

tests/test_regression.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
import heudiconv
1414
from heudiconv.cli.run import main as runner
15+
# testing utilities
1516
from .utils import fetch_data, gen_heudiconv_args
1617

1718

tests/utils.py

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,33 @@
11
import hashlib
22
import os.path as op
3+
import heudiconv
34

45
def md5sum(filename):
56
with open(filename, 'rb') as f:
67
return hashlib.md5(f.read()).hexdigest()
78

89

910
def gen_heudiconv_args(datadir, outdir, subject, heuristic_file, xargs=None):
10-
heuristic = op.realpath(op.join(
11-
op.dirname(heudiconv.__file__),
12-
'..',
13-
'heuristics',
14-
heuristic_file))
15-
args = ["-d", op.join(datadir, 'sourcedata/{subject}/*/*/*.tgz'),
16-
"-c", "dcm2niix",
17-
"-o", outdir,
18-
"-s", subject,
11+
heuristic = op.realpath(op.join(op.dirname(heudiconv.__file__),
12+
'..',
13+
'heuristics',
14+
heuristic_file))
15+
args = ["-d", op.join(datadir, 'sourcedata/{subject}/*/*/*.tgz'),
16+
"-c", "dcm2niix",
17+
"-o", outdir,
18+
"-s", subject,
1919
"-f", heuristic,
20-
"--bids",
21-
]
22-
if xargs:
23-
args += xargs
20+
"--bids",]
21+
if xargs:
22+
args += xargs
2423

25-
return args
24+
return args
2625

2726

2827
def fetch_data(tmpdir, subject):
29-
"""Fetches some test dicoms using datalad"""
28+
"""Fetches some test dicoms using datalad"""
3029
from datalad import api
31-
3230
targetdir = op.join(tmpdir, 'QA')
33-
api.install(path=targetdir,
34-
source='///dbic/QA')
35-
api.get('{}/sourcedata/{}'.format(targetdir, subject))
36-
return targetdir
31+
api.install(path=targetdir, source='///dbic/QA')
32+
api.get('{}/sourcedata/{}'.format(targetdir, subject))
33+
return targetdir

0 commit comments

Comments
 (0)