Skip to content

run-tests.sh fails on a fresh clone: uv venv is created without the test/lint extras #89

Description

@andreasschliep

What happens

On a fresh clone (or after deleting .venv), bash claude-skill/run-tests.sh fails:

=== Lint (ruff) ===
error: Failed to spawn: `ruff`
  Caused by: No such file or directory (os error 2)

=== Running Test Suite ===
.venv/bin/python3: No module named pytest

✗ Checks failed (ruff=2 tests=1).

Why

run-tests.sh calls uv run ruff check . and uv run python -m pytest (lines 29 and 36). When no .venv exists, uv run auto-creates one — but only with the project package itself. ruff and pytest live in the lint and test optional-dependency groups of pyproject.toml, which uv run does not install by default.

CI doesn't hit this because .github/workflows/test.yml runs uv sync --extra test --extra lint before invoking the script.

Suggested fix

Either sync the extras at the top of run-tests.sh:

(cd "$SCRIPT_DIR" && uv sync --extra test --extra lint)

or pass the extras per invocation:

uv run --extra lint ruff check .
uv run --extra test python -m pytest tests/ -v

Either keeps the script self-contained for first-time contributors and matches what CI already installs.

Found while working with the framework in a fork (andreasschliep/pdsa). Happy to send a PR if useful.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions