Summary
AetherInstallCommand (255 lines) mixes six distinct responsibilities in one class: publishing config, checking the Python interpreter, checking Python dependencies, creating a venv and installing into it, suggesting a .gitignore entry, and running a smoke-test circuit. It constructs 4 separate Symfony\Component\Process\Process instances by hand across these responsibilities (checkPython(), checkDependencies(), and two inside createVenv()), and hardcodes the path to bin/python/requirements.txt twice via __DIR__.'/../../bin/python/requirements.txt' — once in createVenv(), once in showManualInstructions().
Where
src/Commands/AetherInstallCommand.php:1-255 (whole file — 6 responsibilities: publishConfig(), checkPython(), checkDependencies()/handleMissingDependencies(), createVenv(), suggestGitignore(), runTestCircuit())
new Process(...) at lines 86, 110, 202, 209 (4 instances, not the "6" an earlier pass at this review estimated)
$requirementsPath = __DIR__.'/../../bin/python/requirements.txt'; duplicated at lines 199 and 232
Refactor proposal
Extract a PythonEnvironmentInspector (or similar) collaborator owning checkPython(), checkDependencies(), and createVenv() — the pieces that actually shell out to a Python interpreter — leaving AetherInstallCommand to orchestrate calling it plus the unrelated config-publishing/gitignore/smoke-test steps. Move the requirements.txt path resolution into one constant or method on that inspector so it is computed once.
Severity: low
Summary
AetherInstallCommand(255 lines) mixes six distinct responsibilities in one class: publishing config, checking the Python interpreter, checking Python dependencies, creating a venv and installing into it, suggesting a.gitignoreentry, and running a smoke-test circuit. It constructs 4 separateSymfony\Component\Process\Processinstances by hand across these responsibilities (checkPython(),checkDependencies(), and two insidecreateVenv()), and hardcodes the path tobin/python/requirements.txttwice via__DIR__.'/../../bin/python/requirements.txt'— once increateVenv(), once inshowManualInstructions().Where
src/Commands/AetherInstallCommand.php:1-255(whole file — 6 responsibilities:publishConfig(),checkPython(),checkDependencies()/handleMissingDependencies(),createVenv(),suggestGitignore(),runTestCircuit())new Process(...)at lines 86, 110, 202, 209 (4 instances, not the "6" an earlier pass at this review estimated)$requirementsPath = __DIR__.'/../../bin/python/requirements.txt';duplicated at lines 199 and 232Refactor proposal
Extract a
PythonEnvironmentInspector(or similar) collaborator owningcheckPython(),checkDependencies(), andcreateVenv()— the pieces that actually shell out to a Python interpreter — leavingAetherInstallCommandto orchestrate calling it plus the unrelated config-publishing/gitignore/smoke-test steps. Move therequirements.txtpath resolution into one constant or method on that inspector so it is computed once.Severity: low