From edd3d8ef45c106f8e4b5ae8d5c7e0375af3b5fbb Mon Sep 17 00:00:00 2001
From: celprov <77437752+celprov@users.noreply.github.com>
Date: Tue, 30 Jan 2024 15:11:12 +0100
Subject: [PATCH] Apply suggestions from code review
Co-authored-by: Oscar Esteban We kindly ask to report results preprocessed with this tool using the following boilerplate.
---
fmriprep/cli/parser.py | 3 ++-
fmriprep/cli/run.py | 6 +-----
fmriprep/data/reports-spec-anat.yml | 4 ++--
fmriprep/data/reports-spec.yml | 4 ++--
4 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/fmriprep/cli/parser.py b/fmriprep/cli/parser.py
index 147e00b22..aa4167e48 100644
--- a/fmriprep/cli/parser.py
+++ b/fmriprep/cli/parser.py
@@ -403,11 +403,12 @@ def _slice_time_ref(value, parser):
)
g_outputs.add_argument(
"--aggregate-session-reports",
+ dest="aggr_ses_reports",
action="store",
type=PositiveInt,
default=4,
help="Maximum number of sessions aggregated in one subject's visual report. "
- "If exceeded, visual reports are separated per session.",
+ "If exceeded, visual reports are split by session.",
)
g_outputs.add_argument(
"--medial-surface-nan",
diff --git a/fmriprep/cli/run.py b/fmriprep/cli/run.py
index 206e63db9..cf1f242cf 100644
--- a/fmriprep/cli/run.py
+++ b/fmriprep/cli/run.py
@@ -212,11 +212,7 @@ def main():
from fmriprep.reports.core import generate_reports
# Generate reports phase
- session_list = (
- config.execution.bids_filters["bold"]["session"]
- if config.execution.bids_filters
- else None
- )
+ session_list = config.execution.bids_filters.get("bold", {}).get("session", None)
failed_reports = generate_reports(
config.execution.participant_label,
diff --git a/fmriprep/data/reports-spec-anat.yml b/fmriprep/data/reports-spec-anat.yml
index 118a06ee1..a65601b34 100644
--- a/fmriprep/data/reports-spec-anat.yml
+++ b/fmriprep/data/reports-spec-anat.yml
@@ -29,7 +29,7 @@ sections:
reportlets:
- bids: {datatype: figures, desc: about, suffix: T1w}
- custom: boilerplate
- path: '{reportlets_dir}/logs'
+ path: '{output_dir}/logs'
bibfile: ['fmriprep', 'data/boilerplate.bib']
caption: |
We kindly ask to report results preprocessed with this tool using the following boilerplate.
@@ -193,6 +193,6 @@ sections: title: Methods - custom: errors - path: '{reportlets_dir}/sub-{subject}/log/{run_uuid}' + path: '{output_dir}/sub-{subject}/log/{run_uuid}' captions: NiReports may have recorded failure conditions. title: Errors