fix(tutorials): install dev extras when running tutorial pytest#380
Closed
declan-scale wants to merge 1 commit into
Closed
fix(tutorials): install dev extras when running tutorial pytest#380declan-scale wants to merge 1 commit into
declan-scale wants to merge 1 commit into
Conversation
After #367 dropped pytest from agentex-sdk's runtime deps, `uv run pytest` in tutorials no longer finds pytest — it lives in each tutorial's [project.optional-dependencies] dev. Pass --extra dev so uv installs it before spawning pytest. Fixes the "Failed to spawn: pytest" regression seen across every tutorial test job since 2026-05-29. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Closing since #379 fixed it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
error: Failed to spawn: pytest / No such file or directory.pytest/pytest-asynciofromagentex-sdk's runtime deps. Tutorials used to get pytest transitively viaagentex-sdk; now pytest lives only in each tutorial's[project.optional-dependencies] dev, andrun_agent_test.shinvokeduv run pytestwithout--extra dev, so uv never installed it.--extra devto bothuv runinvocations inexamples/tutorials/run_agent_test.shso the tutorial's dev extras get synced before pytest is spawned.Last green tutorial-test run on main:
26472427908(2026-05-26, immediately before #367). First red run:26617979690(2026-05-29).Test plan
Greptile Summary
Fixes broken tutorial CI by adding
--extra devto bothuv runinvocations inrun_agent_test.sh, ensuring the tutorial's dev dependencies (pytest, pytest-asyncio) are installed before pytest is spawned.uv run --extra dev pytest) and the wheel-override path (uv run --extra dev --with <wheel> pytest) are updated consistently, so neither branch is left without dev extras.Confidence Score: 5/5
Safe to merge — the change is a minimal, targeted fix to a CI script with no impact on production code.
Both
uv runinvocations are updated consistently. The fix directly maps to the stated root cause, and the standard and wheel-override paths are treated identically. No production code is touched.No files require special attention.
Important Files Changed
--extra devto bothuv runinvocations so tutorial dev-dependencies (pytest, pytest-asyncio) are installed before running tests; correctly applied to both the standard and wheel-override code paths.Sequence Diagram
sequenceDiagram participant CI as CI Runner participant Script as run_agent_test.sh participant uv as uv (package manager) participant pytest as pytest CI->>Script: run_test(tutorial_path) Script->>Script: build pytest_cmd with --extra dev Script->>uv: uv run --extra dev pytest tests/test_agent.py uv->>uv: sync [project.optional-dependencies] dev Note over uv: installs pytest, pytest-asyncio uv->>pytest: spawn pytest pytest-->>Script: exit_code Script-->>CI: pass / failReviews (1): Last reviewed commit: "fix(tutorials): install dev extras when ..." | Re-trigger Greptile