CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-tox-pyenv

tox plugin that makes tox use `pyenv which` to find python executables

Overall
score

98%

Overview
Eval results
Files

rubric.jsonevals/scenario-3/

{
  "context": "This criteria evaluates how well the engineer uses tox-pyenv's strict mode functionality to implement Python version validation. The focus is on properly utilizing pyenv subprocess calls, implementing fallback behavior, and enforcing strict mode with appropriate exception handling.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Pyenv subprocess execution",
      "description": "Uses subprocess module to execute 'pyenv which <version>' command with proper stdout/stderr capture and exit code checking. Should use subprocess.run() or subprocess.Popen() with appropriate parameters.",
      "max_score": 20
    },
    {
      "name": "Pyenv binary detection",
      "description": "Detects when pyenv binary is missing from the system by catching OSError or checking if pyenv is available before executing. Should raise PyenvMissing exception when pyenv is not found.",
      "max_score": 15
    },
    {
      "name": "Fallback mechanism implementation",
      "description": "Implements fallback to system PATH when pyenv fails in lenient mode. Should use shutil.which() or similar to find Python executable in system PATH after pyenv fails.",
      "max_score": 20
    },
    {
      "name": "Strict mode enforcement",
      "description": "Prevents fallback when strict parameter is True. Should check the strict flag before attempting system PATH lookup and skip fallback entirely in strict mode.",
      "max_score": 15
    },
    {
      "name": "PyenvWhichFailed exception",
      "description": "Raises PyenvWhichFailed exception when pyenv command exits with non-zero status in strict mode. Exception should be imported from tox-pyenv or defined with appropriate error context.",
      "max_score": 15
    },
    {
      "name": "Exit code handling",
      "description": "Correctly checks subprocess return code or exit status to distinguish between successful pyenv execution (exit code 0) and failure (non-zero exit code).",
      "max_score": 10
    },
    {
      "name": "Error output capture",
      "description": "Captures stderr output from failed pyenv commands to provide debugging context. Should include stderr in exception messages or logs when pyenv fails.",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/pypi-tox-pyenv

tile.json