Skip to content

Commit 54076ce

Browse files
committed
Fix output directory tree in report
1 parent 0cc1ae7 commit 54076ce

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

phys2bids/phys2bids.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,7 @@ def phys2bids(
542542

543543
# Only generate report if specified by the user
544544
if make_report:
545-
generate_report(conversion_path, logname, phys_out[key])
546-
545+
generate_report(outdir, conversion_path, logname, phys_out[key])
547546

548547
def _main(argv=None):
549548
options = _get_parser().parse_args(argv)

phys2bids/reporting/html_report.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def _generate_bokeh_plots(phys_in, figsize=(250, 500)):
193193
return script, div
194194

195195

196-
def generate_report(out_dir, log_path, phys_in):
196+
def generate_report(out_dir, conversion_path, log_path, phys_in):
197197
"""
198198
Plot all the channels for visualizations as linked line plots for dynamic report.
199199
@@ -217,15 +217,15 @@ def generate_report(out_dir, log_path, phys_in):
217217
# Copy assets into output folder
218218
pkgdir = sys.modules["phys2bids"].__path__[0]
219219
assets_path = join(pkgdir, "reporting", "assets")
220-
copy_tree(assets_path, join(out_dir, "assets"))
220+
copy_tree(assets_path, join(conversion_path, "assets"))
221221

222222
# Read log
223223
with open(log_path, "r") as f:
224224
log_content = f.read()
225225

226226
log_content = log_content.replace("\n", "<br>")
227-
log_html_path = join(out_dir, "phys2bids_report_log.html")
228-
qc_html_path = join(out_dir, "phys2bids_report.html")
227+
log_html_path = join(conversion_path, "phys2bids_report_log.html")
228+
qc_html_path = join(conversion_path, "phys2bids_report.html")
229229

230230
html = _save_as_html(log_html_path, log_content, qc_html_path)
231231

0 commit comments

Comments
 (0)