feat: pip-install quickstart with bundled --example + 3-path getting-started - #231
feat: pip-install quickstart with bundled --example + 3-path getting-started#231changliu2 wants to merge 3 commits into
Conversation
jakepresent
left a comment
There was a problem hiding this comment.
Requesting changes. The direction is good, but I found two issues that hit the new public quickstart surface directly.
assert-ai run --examplewithout a value does not work with the supported Click dependency range. The PR body, help text, and test say that--examplewith no value should list the catalog, but with Click 8.3.1 I get:
Error: Option '--example' requires an argument.
I reproduced it by running python -m pytest tests/test_cli.py -q; CliTest.test_example_without_value_lists_catalog fails. Since pyproject.toml allows click>=8.0, a fresh pip install assert-ai can resolve to this version, so the advertised no-value form is not safe. Either make that form actually work across the allowed Click versions, or change the CLI/docs to use an explicit catalog command/form instead.
- The pip-only docs still tell users to copy
.env.example, but zero-clone users will not have that file.docs/getting-started.mdand the website quickstart tabs showcp .env.example .env/Copy-Item .env.example .envimmediately afterpip install assert-ai. In a clean pip-only directory there is no.env.example, so the first-run path fails before ASSERT runs. For the zero-clone path, use direct environment-variable instructions or a command that creates a minimal.envwith placeholders.
I stopped there because both are user-facing onboarding blockers for the exact surface this PR is changing.
…eview) 1. assert-ai run --example no longer relies on Click flag_value (broke on Click 8.3.1 with 'Option --example requires an argument'). --example is now a plain value option; the catalog is discoverable via a new 'assert-ai examples' command that works across the supported Click range. Unknown name and the no-config/no-example paths still print the catalog. 2. Pip-only quickstart no longer tells zero-clone users to 'cp .env.example .env' (that file doesn't exist after a bare pip install). The three pip-only paths now instruct setting AZURE_API_KEY/AZURE_API_BASE as env vars or creating a .env — which the runner already auto-loads via find_dotenv(usecwd=True). The clone-based 'develop from source' path keeps cp .env.example .env. Updates: cli.py, tests/test_cli.py (examples-command + bare-flag-errors tests), docs/getting-started.md, website QuickstartTabs.tsx. pytest test_cli.py green; website tsc+eslint clean. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Thanks @jakepresent — both were real onboarding blockers on the exact surface this PR changes. Fixed in 1. 2. Re-requesting review. Thanks for catching both before they hit users. 🙏 |
tangym
left a comment
There was a problem hiding this comment.
Agree pip-first is the right call. One concern: PyPI is published from GitHub releases, so the wheel will lag main between releases, and we don't have a release cadence yet, so a doc on main referencing a not-yet-released feature will make pip look broken. Could we either agree on a cadence (even loose, e.g. tag on user-visible features) or keep a short "want the latest from main?" pointer to the source install next to the pip command until cadence is settled? Also please rebase, currently conflicting with main.
…started
Make `pip install assert-ai` the canonical install and give every onboarding
shape a pip-only, zero-clone runnable path. The previous docs only showed an
editable `git clone` + `pip install -e ".[otel,langgraph]"`, which is heavy
boilerplate, invisible to PyPI download telemetry, and doesn't match the
published `assert-ai` package.
Bundled examples:
- New `assert_ai/_examples/` subpackage ships two runnable configs in the wheel
(configs + agent code only; no result artifacts):
- health-assistant — Prompt Agent (system_prompt); runs on base install
- travel-planner-langgraph — LangGraph + OTel trace capture; needs [langgraph,otel]
- `assert-ai run --example <name>` resolves bundled configs; no value / unknown
name lists the catalog with per-example install hints; `--config` and
`--example` are mutually exclusive.
- Wheel stays 0.31 MB; verified clean-venv install resolves --example from
site-packages.
3-path quickstart (README + docs/getting-started.md + website):
- Hero install is now `pip install assert-ai`.
- Three paths: "I have an agent" (connect via auto_trace + target.callable,
[otel]), "I have the agent spec" (--example health-assistant), "Help me
start" (assert-ai init).
- Website: real <QuickstartTabs> client component (3 tabs + macOS/Linux <-> Windows
toggle) injected by MarkdownContent via a <!--quickstart-tabs--> sentinel;
GitHub renders the same paths as Markdown fallback.
- Extras are always quoted ("assert-ai[otel]") to survive zsh/PowerShell globbing.
- AGENTS.md setup commands updated to the published-package path with explicit
per-scenario extras.
- Fixed a stale microsoft/ASSERT docs blob URL -> responsibleai/ASSERT.
Tests: 7 new CLI/registry tests; wheel build verified (configs ship, artifacts
excluded); website tsc + eslint + next build pass.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…eview) 1. assert-ai run --example no longer relies on Click flag_value (broke on Click 8.3.1 with 'Option --example requires an argument'). --example is now a plain value option; the catalog is discoverable via a new 'assert-ai examples' command that works across the supported Click range. Unknown name and the no-config/no-example paths still print the catalog. 2. Pip-only quickstart no longer tells zero-clone users to 'cp .env.example .env' (that file doesn't exist after a bare pip install). The three pip-only paths now instruct setting AZURE_API_KEY/AZURE_API_BASE as env vars or creating a .env — which the runner already auto-loads via find_dotenv(usecwd=True). The clone-based 'develop from source' path keeps cp .env.example .env. Updates: cli.py, tests/test_cli.py (examples-command + bare-flag-errors tests), docs/getting-started.md, website QuickstartTabs.tsx. pytest test_cli.py green; website tsc+eslint clean. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ca67d8c to
893b350
Compare
|
Rebased onto On the cadence question — added a one-line pointer in "Develop from source" calling it out explicitly as the path for "just landed on |
|
@jakepresent pushed fixes for both issues -- bare |
|
@changliu2 closing for hygiene. Please reopen if needed. |
What
Make
pip install assert-aithe canonical install and give every onboarding shape a pip-only, zero-clone runnable path. Replaces the editablegit clone+pip install -e ".[otel,langgraph]"quickstart, which was heavy boilerplate, invisible to PyPI download telemetry, and didn't match the publishedassert-aipackage.Three quickstart paths
The README,
docs/getting-started.md, and the website now lead withpip install assert-aiand branch into three paths that map to how the user arrives:pip install "assert-ai[otel]"— connect via theauto_trace2-liner +target.callablepip install assert-ai→assert-ai run --example health-assistantpip install assert-ai→assert-ai initBundled examples (
--example)assert_ai/_examples/subpackage ships two runnable configs in the wheel (configs + agent code only — no result artifacts):health-assistant— Prompt Agent (system_prompt); runs on a base installtravel-planner-langgraph— LangGraph + OpenTelemetry trace capture; needs[langgraph,otel]assert-ai run --example <name>resolves the bundled config. No value (or an unknown name) lists the catalog with per-example install hints.--configand--exampleare mutually exclusive.--examplefromsite-packages.Website
<QuickstartTabs>client component (3 tabs + macOS/Linux ↔ Windows sub-toggle), injected byMarkdownContentvia a<!--quickstart-tabs-->sentinel indocs/getting-started.md. GitHub renders the same three paths as a Markdown fallback (sentinels are invisible there).microsoft/ASSERTdocs blob URL →responsibleai/ASSERT.Notes
"assert-ai[otel]") so zsh / PowerShell don't glob the brackets.AGENTS.mdsetup commands updated to the published-package path with explicit per-scenario extras.examples/incident_triage_agent/artifacts/*.jsonland gitignores result artifacts (kept separate to keep this diff reviewable).Test plan
tests/test_cli.py) passpython -m build→ wheel ships both configs, zero artifacts leakedpip install <wheel>→assert-ai run --exampleresolves from site-packagestsc --noEmit+eslint+next buildall pass (/docs/getting-startedprerenders)test_viewer_*failures confirmed present onmain(Node/TS env, unrelated)