Skip to content

Commit 2bd4402

Browse files
josephmjeoesteban
authored andcommitted
add fake metadata for docs
1 parent 11670a6 commit 2bd4402

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

dmriprep/workflows/dwi/base.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,14 @@ def init_dwi_preproc_wf(
127127
workflow.__postdesc__ = """\
128128
"""
129129

130-
metadata = layout.get_metadata(dwi_file)
130+
# For doc building purposes
131+
if not hasattr(layout, 'parse_file_entities'):
132+
LOGGER.log(25, 'No valid layout: building empty workflow.')
133+
metadata = {
134+
'PhaseEncodingDirection': 'j',
135+
}
136+
else:
137+
metadata = layout.get_metadata(dwi_file)
131138

132139
inputnode = pe.Node(niu.IdentityInterface(
133140
fields=['dwi_file']),

0 commit comments

Comments
 (0)