Skip to content

Fix Getting Started snippets to work on a fresh clone#15

Merged
celiawaggoner merged 8 commits into
Generality-Labs:mainfrom
richardhuaaa:docs/fix-readme-linter-and-test-commands
May 27, 2026
Merged

Fix Getting Started snippets to work on a fresh clone#15
celiawaggoner merged 8 commits into
Generality-Labs:mainfrom
richardhuaaa:docs/fix-readme-linter-and-test-commands

Conversation

@richardhuaaa

@richardhuaaa richardhuaaa commented May 7, 2026

Copy link
Copy Markdown
Contributor

This PR contains

Description

Fixes so the Getting Started and Quickstart snippets work on a fresh clone.

Linter command. uv run mypy . fails on a duplicate-module error. tools/run_checks.sh and CI use uv run mypy src tests; align the README with that.

Test command. uv run pytest includes agentic example tests that need Docker. Switch to uv run pytest -k "not agentic".

Provider SDK. The quickstart uses --model openai/gpt-5-nano but the openai SDK isn't installed by uv sync. Add openai to the dev dependency group.

Quickstart task resolution. The <eval_name>/<task_name> CLI form requires inspect_ai to map the entry-point package to an installed distribution. This only works when [project] name in pyproject.toml matches the eval package name. Document this step and the post-copy rename. Use <eval_name>/<task_name> placeholders for clarity.

Verified locally

$ uv run ruff check && uv run ruff format --check && uv run mypy src tests
All checks passed!
40 files already formatted
Success: no issues found in 24 source files

$ uv run inspect eval my_eval/my_task --model openai/gpt-5-nano
my_task (5 samples): openai/gpt-5-nano
match accuracy 1.000

Checklist

  • Are you adding a new eval? No — template fixes only.
  • Does this change affect existing eval(s)? No.
  • Does this change affect how future contributors write or submit evaluations? No — corrects existing documentation and tooling.

🤖 Generated with Claude Code

richardhuaaa and others added 2 commits May 7, 2026 11:04
The README's "Run linters" snippet invoked `uv run mypy .`, which scans
`tools/` and trips on a duplicate-module error (`tools/run_autolint.py`
script vs `tools/run_autolint/` package both resolving as `run_autolint`).
`tools/run_checks.sh` and CI both run `uv run mypy src tests`, so align
the README with that.

Also swap the `pytest` snippet to `pytest -k "not agentic"` — the agentic
example tests require Docker, which isn't running in a fresh clone.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The README's "Run an evaluation" snippet uses --model openai/gpt-5-nano,
and CONTRIBUTING.md:290 recommends openai/gpt-5-nano as the dev model,
but the openai SDK isn't installed by `uv sync`. Fresh-clone users hit:

    ERROR: OpenAI API requires optional dependencies. Install with:
    pip install openai

Adding openai to the dev group keeps it out of the eval's runtime deps
(downstream eval consumers don't pull dev deps) while making the
documented dev workflow work first try.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@richardhuaaa richardhuaaa changed the title Fix README linter and test commands to match local tooling Fix Getting Started snippets to work on a fresh clone May 7, 2026
richardhuaaa and others added 2 commits May 7, 2026 11:56
The Quickstart jumped from `cp -r src/examples/simple_qa src/my_eval`
straight to `inspect eval my_eval/my_task`, but `my_task` doesn't exist
inside the freshly-copied directory — the @task function is still named
`simple_qa`, and `__init__.py` still imports from `examples.simple_qa`,
so even `my_eval/simple_qa` would dispatch back to the example package.

Add an explicit rename step covering the module file, the task function,
and the __init__.py import so step 5's command actually resolves.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The Quickstart used literal `my_eval`/`my_task` names which weren't
obviously placeholders. Switch to `<eval_name>`/`<task_name>` for
clarity (consistent with the Getting Started snippet above).

Also add the distribution name step: `[project] name` must match the
eval package name, otherwise inspect_ai's task resolver can't map the
entry-point package to an installed distribution and the
`<eval_name>/<task_name>` CLI form silently fails.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread README.md Outdated
Comment thread pyproject.toml Outdated
Comment thread README.md Outdated
celiawaggoner and others added 3 commits May 26, 2026 10:05
Co-authored-by: Tania <120768997+ItsTania@users.noreply.github.com>
Co-authored-by: Tania <120768997+ItsTania@users.noreply.github.com>
Co-authored-by: Tania <120768997+ItsTania@users.noreply.github.com>
@celiawaggoner
celiawaggoner requested a review from ItsTania May 26, 2026 17:06
Comment thread README.md Outdated
@celiawaggoner
celiawaggoner merged commit 783d2e4 into Generality-Labs:main May 27, 2026
14 of 15 checks passed
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.

3 participants