Skip to content

Commit

Permalink
Initial pydra workflow integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
maestroque committed Aug 25, 2024
1 parent aef61d2 commit 1d27cae
Show file tree
Hide file tree
Showing 6 changed files with 44,683 additions and 15 deletions.
4 changes: 3 additions & 1 deletion phys2denoise/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def compute_metrics(phys: Physio, metrics: Union[list, str], args: dict) -> Phys
@pydra.mark.task
def export_metrics(
phys: Physio, metrics: Union[list, str], outdir: str, tr: Union[int, float]
) -> None:
) -> int:
if metrics == "all":
LGR.info("Exporting all computed metrics")
for metric in phys.computed_metrics.keys():
Expand All @@ -124,6 +124,7 @@ def export_metrics(
phys.computed_metrics[metric], phys.fs, tr, prefix, has_lags=has_lags
)
LGR.info(f"Exported {metric}")
return 0
elif isinstance(metrics, list):
for metric in metrics:
if metric not in phys.computed_metrics.keys():
Expand All @@ -141,5 +142,6 @@ def export_metrics(
has_lags=has_lags,
)
LGR.info(f"Exported {metric}")
return 0
else:
raise ValueError("metrics must be a list of strings or 'all'")
Loading

0 comments on commit 1d27cae

Please sign in to comment.