5
5
from argparse import ArgumentParser
6
6
import sys
7
7
8
- from heudiconv import __version__ , __packagename__
9
- from heudiconv .parser import get_study_sessions
10
- from heudiconv .utils import load_heuristic , anonymize_sid , treat_infofile , SeqInfo
11
- from heudiconv .convert import prep_conversion
12
- from heudiconv .bids import populate_bids_templates , tuneup_bids_json_files
13
- from heudiconv .queue import queue_conversion
8
+ from .. import __version__ , __packagename__
9
+ from . .parser import get_study_sessions
10
+ from . .utils import load_heuristic , anonymize_sid , treat_infofile , SeqInfo
11
+ from . .convert import prep_conversion
12
+ from . .bids import populate_bids_templates , tuneup_bids_json_files
13
+ from . .queue import queue_conversion
14
14
15
15
import inspect
16
16
import logging
@@ -84,11 +84,11 @@ def process_extra_commands(outdir, args):
84
84
elif args .command == 'sanitize-jsons' :
85
85
tuneup_bids_json_files (args .files )
86
86
elif args .command == 'heuristics' :
87
- from heudiconv .utils import get_known_heuristics_with_descriptions
87
+ from .utils import get_known_heuristics_with_descriptions
88
88
for name_desc in get_known_heuristics_with_descriptions ().items ():
89
89
print ("- %s: %s" % name_desc )
90
90
elif args .command == 'heuristic-info' :
91
- from heudiconv .utils import get_heuristic_description , get_known_heuristic_names
91
+ from .utils import get_heuristic_description , get_known_heuristic_names
92
92
if not args .heuristic :
93
93
raise ValueError ("Specify heuristic using -f. Known are: %s"
94
94
% ', ' .join (get_known_heuristic_names ()))
@@ -284,15 +284,6 @@ def process_args(args):
284
284
continue
285
285
286
286
if args .queue :
287
- # if seqinfo and not dicoms:
288
- # # flatten them all and provide into batching, which again
289
- # # would group them... heh
290
- # dicoms = sum(seqinfo.values(), [])
291
- # raise NotImplementedError(
292
- # "we already grouped them so need to add a switch to avoid "
293
- # "any grouping, so no outdir prefix doubled etc")
294
-
295
- pyscript = op .abspath (inspect .getfile (inspect .currentframe ()))
296
287
297
288
studyid = sid
298
289
if session :
@@ -302,8 +293,7 @@ def process_args(args):
302
293
# remove any separators
303
294
studyid = studyid .replace (op .sep , '_' )
304
295
305
- queue_conversion (pyscript ,
306
- args .queue ,
296
+ queue_conversion (args .queue ,
307
297
studyid ,
308
298
args .queue_args )
309
299
continue
0 commit comments