Skip to content

Commit dab2d5c

Browse files
cailmdaleyclaude
andcommitted
fix(run): review nits — module_dep self-append, surface test stderr
The else-branch of the mpi4py dependency line appended the whole list to itself (harmless only because DependencyHandler dedups); with the launcher gate this became the common path. And the regression test now surfaces the subprocess stderr on failure instead of swallowing it in a bare CalledProcessError. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 519a786 commit dab2d5c

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/shapepipe/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def _check_dependencies(self):
194194
module_dep = self._get_module_depends("depends") + __installs__
195195
module_exe = self._get_module_depends("executes")
196196

197-
module_dep += ["mpi4py"] if import_mpi else module_dep
197+
module_dep += ["mpi4py"] if import_mpi else []
198198

199199
exe_to_module = {
200200
exe: module

src/shapepipe/tests/test_run.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ def _import_mpi_flag(extra_env):
3636
env=env,
3737
capture_output=True,
3838
text=True,
39-
check=True,
39+
)
40+
assert result.returncode == 0, (
41+
f"subprocess failed (exit {result.returncode}): {result.stderr}"
4042
)
4143
return result.stdout.strip()
4244

0 commit comments

Comments
 (0)