@@ -79,22 +79,23 @@ def generate_reports(
79
79
80
80
errors = []
81
81
for subject_label in subject_list :
82
-
83
- # The number of sessions is intentionally not based on session_list but on the total number of sessions, because
84
- # I want the final derivatives folder to be the same whether sessions were ran one at a time or all-together.
82
+ # The number of sessions is intentionally not based on session_list but
83
+ # on the total number of sessions, because I want the final derivatives
84
+ # folder to be the same whether sessions were run one at a time or all-together.
85
85
n_ses = len (config .execution .layout .get_sessions (subject = subject_label ))
86
86
87
87
if bootstrap_file is not None :
88
88
# If a config file is precised, we do not override it
89
89
html_report = 'report.html'
90
90
elif n_ses <= config .execution .aggr_ses_reports :
91
- # If there is only a few session for this subject, we aggregate them in a single visual report.
91
+ # If there are only a few session for this subject,
92
+ # we aggregate them in a single visual report.
92
93
bootstrap_file = data .load ('reports-spec.yml' )
93
94
html_report = 'report.html'
94
95
else :
95
96
# Beyond a threshold, we separate the anatomical report from the functional.
96
97
bootstrap_file = data .load ('reports-spec-anat.yml' )
97
- html_report = '' . join ([ f" sub-{ subject_label .lstrip (' sub-' ) } " , ' _anat.html'])
98
+ html_report = f' sub-{ subject_label .lstrip (" sub-" ) } _anat.html'
98
99
99
100
report_error = run_reports (
100
101
output_dir ,
@@ -111,7 +112,8 @@ def generate_reports(
111
112
errors .append (report_error )
112
113
113
114
if n_ses > config .execution .aggr_ses_reports :
114
- # Beyond a certain number of sessions per subject, we separate the functional reports per session
115
+ # Beyond a certain number of sessions per subject,
116
+ # we separate the functional reports per session
115
117
if session_list is None :
116
118
all_filters = config .execution .bids_filters or {}
117
119
filters = all_filters .get ('bold' , {})
@@ -124,9 +126,7 @@ def generate_reports(
124
126
125
127
for session_label in session_list :
126
128
bootstrap_file = data .load ('reports-spec-func.yml' )
127
- html_report = '' .join (
128
- [f"sub-{ subject_label .lstrip ('sub-' )} " , f'_ses-{ session_label } ' , '_func.html' ]
129
- )
129
+ html_report = f'sub-{ subject_label .lstrip ("sub-" )} _ses-{ session_label } _func.html'
130
130
131
131
report_error = run_reports (
132
132
output_dir ,
0 commit comments