Skip to content

Commit d0ee4df

Browse files
committed
rf: update reporting, add config hash parameter
1 parent cb47136 commit d0ee4df

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

nibabies/reports/core.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ def run_reports(
1010
subject,
1111
run_uuid,
1212
session=None,
13-
out_filename=None,
13+
bootstrap_file=None,
14+
out_filename='report.html',
1415
reportlets_dir=None,
15-
packagename=None,
1616
):
1717
"""
1818
Run the reports.
@@ -22,7 +22,7 @@ def run_reports(
2222
run_uuid,
2323
subject=subject,
2424
session=session,
25-
bootstrap_file=load_data.readable('reports-spec.yml'),
25+
bootstrap_file=load_data('reports-spec.yml'),
2626
reportlets_dir=reportlets_dir,
2727
out_filename=out_filename,
2828
).generate_report()
@@ -32,8 +32,9 @@ def generate_reports(
3232
sub_ses_list,
3333
output_dir,
3434
run_uuid,
35+
*,
3536
work_dir=None,
36-
packagename=None,
37+
bootstrap_file=None,
3738
config_hash=None,
3839
):
3940
"""Execute run_reports on a list of subjects."""
@@ -44,22 +45,22 @@ def generate_reports(
4445
report_errors = []
4546
for subject, session in sub_ses_list:
4647
# Determine the output filename
47-
out_filename = f'sub-{subject}'
48+
html_report = f'sub-{subject}'
4849
if session is not None:
49-
out_filename += f'_ses-{session}'
50+
html_report += f'_ses-{session}'
5051
if config_hash is not None:
51-
out_filename += f'_{config_hash}'
52-
out_filename += '.html'
52+
html_report += f'_{config_hash}'
53+
html_report += '.html'
5354

5455
report_errors.append(
5556
run_reports(
5657
output_dir,
5758
subject,
5859
run_uuid,
59-
session=session,
60-
packagename=packagename,
60+
bootstrap_file=bootstrap_file,
6161
reportlets_dir=reportlets_dir,
62-
out_filename=out_filename,
62+
out_filename=html_report,
63+
session=session,
6364
)
6465
)
6566

0 commit comments

Comments
 (0)