Skip to content

Commit

Permalink
fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi-Gau committed Feb 7, 2024
1 parent 3821bb5 commit 79a1ad6
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions bids/ext/reports/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,16 @@ def parse_files(
mri_scanner_info_done = False
for group in data_files:

if not mri_scanner_info_done and group[0].entities["datatype"] in mri_datatypes:
if group[0].entities["datatype"] not in mri_datatypes:
continue

Check warning on line 319 in bids/ext/reports/parsing.py

View check run for this annotation

Codecov / codecov/patch

bids/ext/reports/parsing.py#L319

Added line #L319 was not covered by tests

# assume all MRI data was acquires on the same scanner
if not mri_scanner_info_done:
description_list.append(mri_scanner_info(group))
mri_scanner_info_done = True

group_description = ""

if group[0].entities["datatype"] == "func":
group_description = func_info(group, config, layout)

Expand Down Expand Up @@ -351,6 +357,8 @@ def parse_files(
if group[0].entities["datatype"] in mri_datatypes:
continue

group_description = ""

Check warning on line 360 in bids/ext/reports/parsing.py

View check run for this annotation

Codecov / codecov/patch

bids/ext/reports/parsing.py#L360

Added line #L360 was not covered by tests

if group[0].entities["datatype"] in [

Check warning on line 362 in bids/ext/reports/parsing.py

View check run for this annotation

Codecov / codecov/patch

bids/ext/reports/parsing.py#L362

Added line #L362 was not covered by tests
"eeg",
"meg",
Expand All @@ -362,11 +370,9 @@ def parse_files(
"microscopy",
]:
LOGGER.warning(f" '{group[0].entities['datatype']}' not yet supported.")
group_description = ""

else:
LOGGER.warning(f" '{group[0].filename}' not yet supported.")
group_description = ""

description_list.append(group_description)

Expand Down

0 comments on commit 79a1ad6

Please sign in to comment.