Skip to content

Commit f9cf569

Browse files
committed
Add docstrings.
Also kind of hoping that the test failures were random and that they’ll pass now.
1 parent 4950336 commit f9cf569

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

heudiconv/main.py

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,27 @@ def process_extra_commands(outdir, command, files, dicom_dir_template,
5050
5151
Parameters
5252
----------
53-
outdir : String
53+
outdir : str
5454
Output directory
55-
args : Namespace
56-
arguments
55+
command : {'treat-json', 'ls', 'populate-templates'}
56+
Heudiconv command to run
57+
files : list of str
58+
List of files
59+
dicom_dir_template : str
60+
Location of dicomdir that can be indexed with subject id
61+
{subject} and session {session}. Tarballs (can be compressed)
62+
are supported in addition to directory. All matching tarballs
63+
for a subject are extracted and their content processed in a
64+
single pass. If multiple tarballs are found, each is assumed to
65+
be a separate session and the 'session' argument is ignored.
66+
heuristic : str
67+
Path to heuristic file or name of builtin heuristic.
68+
session : str
69+
Session identifier
70+
subjs : list of str
71+
List of subject identifiers
72+
grouping : {'studyUID', 'accession_number', 'all', 'custom'}
73+
How to group dicoms.
5774
"""
5875
if command == 'treat-jsons':
5976
for f in files:
@@ -96,6 +113,9 @@ def process_extra_commands(outdir, command, files, dicom_dir_template,
96113

97114

98115
def ensure_heuristic_arg(heuristic=None):
116+
"""
117+
Check that the heuristic argument was provided.
118+
"""
99119
from .utils import get_known_heuristic_names
100120
if not heuristic:
101121
raise ValueError("Specify heuristic using -f. Known are: %s"

0 commit comments

Comments
 (0)