Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Oscar Esteban <code@oscaresteban.es>
  • Loading branch information
celprov and oesteban committed Jan 30, 2024
1 parent 857011d commit edd3d8e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
3 changes: 2 additions & 1 deletion fmriprep/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 1 addition & 5 deletions fmriprep/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Check warning on line 215 in fmriprep/cli/run.py

View check run for this annotation

Codecov / codecov/patch

fmriprep/cli/run.py#L215

Added line #L215 was not covered by tests

failed_reports = generate_reports(
config.execution.participant_label,
Expand Down
4 changes: 2 additions & 2 deletions fmriprep/data/reports-spec-anat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
<p>We kindly ask to report results preprocessed with this tool using the following boilerplate.</p>
Expand All @@ -42,6 +42,6 @@ sections:
</p>
title: Methods
- custom: errors
path: '{reportlets_dir}/sub-{subject}/log/{run_uuid}'
path: '{output_dir}/sub-{subject}/log/{run_uuid}'
captions: <em>NiReports</em> may have recorded failure conditions.
title: Errors
4 changes: 2 additions & 2 deletions fmriprep/data/reports-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,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: |
<p>We kindly ask to report results preprocessed with this tool using the following boilerplate.</p>
Expand All @@ -193,6 +193,6 @@ sections:
</p>
title: Methods
- custom: errors
path: '{reportlets_dir}/sub-{subject}/log/{run_uuid}'
path: '{output_dir}/sub-{subject}/log/{run_uuid}'
captions: <em>NiReports</em> may have recorded failure conditions.
title: Errors

0 comments on commit edd3d8e

Please sign in to comment.