From 5d6b83d5a838bb55af267eb33833cf20f692aa4e Mon Sep 17 00:00:00 2001 From: Synchon Mandal Date: Fri, 23 Jun 2023 13:22:11 +0200 Subject: [PATCH 1/3] fix: enable stdout and stderr capture for fALFF via AFNI --- junifer/markers/falff/falff_estimator.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/junifer/markers/falff/falff_estimator.py b/junifer/markers/falff/falff_estimator.py index 035a9eaca..f6bf57cae 100644 --- a/junifer/markers/falff/falff_estimator.py +++ b/junifer/markers/falff/falff_estimator.py @@ -70,12 +70,11 @@ class ALFFEstimator: If AFNI command fails. """ logger.info(f"AFNI command to be executed: {cmd}") - # TODO: Figure out how to capture stdout and stderr process = subprocess.run( cmd, stdin=subprocess.DEVNULL, - # stdout=subprocess.STDOUT, - # stderr=subprocess.STDOUT, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, shell=True, check=False, ) -- 2.52.0 From 63d5a3c8c654da7b62ad077c0507348530d6aa84 Mon Sep 17 00:00:00 2001 From: Synchon Mandal Date: Fri, 23 Jun 2023 13:22:53 +0200 Subject: [PATCH 2/3] fix: enable stdout and stderr capture for ReHo via AFNI --- junifer/markers/reho/reho_estimator.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/junifer/markers/reho/reho_estimator.py b/junifer/markers/reho/reho_estimator.py index 8d3d2802f..211c5d44c 100644 --- a/junifer/markers/reho/reho_estimator.py +++ b/junifer/markers/reho/reho_estimator.py @@ -173,6 +173,8 @@ class ReHoEstimator: reho_process = subprocess.run( reho_cmd_str, # string needed with shell=True stdin=subprocess.DEVNULL, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, shell=True, # needed for respecting $PATH check=False, ) @@ -205,6 +207,8 @@ class ReHoEstimator: convert_process = subprocess.run( convert_cmd_str, # string needed with shell=True stdin=subprocess.DEVNULL, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, shell=True, # needed for respecting $PATH check=False, ) -- 2.52.0 From ef5f43d22245000935b371042d1a356ee8d1d30d Mon Sep 17 00:00:00 2001 From: Synchon Mandal Date: Mon, 26 Jun 2023 09:04:48 +0200 Subject: [PATCH 3/3] chore: add changelog 234.enh --- docs/changes/newsfragments/234.enh | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/changes/newsfragments/234.enh diff --git a/docs/changes/newsfragments/234.enh b/docs/changes/newsfragments/234.enh new file mode 100644 index 000000000..60eddbb85 --- /dev/null +++ b/docs/changes/newsfragments/234.enh @@ -0,0 +1 @@ +Enable ``stdout`` and ``stderr`` capture for AFNI commands by `Synchon Mandal`_ -- 2.52.0