Skip to content

Feature: Add support for Poetry test environments - #256

Open
pradeep0153 wants to merge 1 commit into
sreerevanth:mainfrom
pradeep0153:fixes/issue-237-poetry-support
Open

Feature: Add support for Poetry test environments#256
pradeep0153 wants to merge 1 commit into
sreerevanth:mainfrom
pradeep0153:fixes/issue-237-poetry-support

Conversation

@pradeep0153

Copy link
Copy Markdown

Closes #237.

Description

This PR executes a major compatibility initiative by engineering support for Poetry-based Python repositories. Currently, Repopilot only supported running tests via standard pytest or python -m pytest when working with Python projects.

However, many modern Python projects utilize poetry for dependency management and virtual environment isolation. When Repopilot executed pytest against a Poetry-based repo, the tests failed immediately because the dependencies (which are locked in Poetry's isolated .venv) were not found on the global PATH. The agent was mathematically locked out of modifying thousands of modern Python repositories. We needed to execute a major compatibility initiative by engineering a dynamic Virtual Environment detection pipeline.

Changes Made

  • Runner Audit: Updated sandbox.py and the ALLOWED_RUNNERS array to securely support poetry run pytest.
  • Heuristic Detection Pipeline: Refactored the SubprocessSandbox to implement a strict heuristic detection algorithm.
  • Execution: If the sandbox algorithmically detects a poetry.lock and pyproject.toml in the repository root, it now automatically prepends poetry run to the test command. Furthermore, the DockerSandbox was updated to correctly mount the Poetry cache directory and install dependencies during its initialization phase to guarantee a hermetic test run.

Impact

  • Ecosystem Compatibility: Assuming every Python repository uses a global pip environment is a fatal assumption that breaks on modern toolchains. By engineering this Poetry support pipeline, we mathematically eradicate virtual environment conflicts. We drastically expand Repopilot's compatibility, allowing the agent to seamlessly operate on enterprise-grade Python projects with complex dependency trees.

@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown

@pradeep0153 is attempting to deploy a commit to the sreerevanth's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add support for Poetry test environments

1 participant