feat(demo): rich-UX rewrite + asciicast recording + README embed#64
Merged
Conversation
The 0.7.1 demo runner used plain `print()` — banner/spinner/MessageGroup output that ships in `examples/quickstart.py` was entirely missing. This change rewrites the runner around the high-level `application.create()` + `app.evaluate()` API and wires in `print_banner`, `spinner`, `MessageGroup`, `info`, and `success` from `aicertify.utils.logging_config` so the demo looks identical to the canonical SDK experience. Three supporting fixes keep the rich UX legible: - **CLI default verbosity → WARNING.** `cli.main()` was calling `logging.basicConfig(level=logging.INFO)` which made every aicertify command flood the terminal with INFO chatter from langfair, deepeval, the OPA policy loader, transformers, etc. The default is now WARNING; `--verbose` opts back in (raises root to INFO and the `aicertify` namespace to DEBUG). - **`policy_loader` no longer warns on `helper_functions/`.** Those `.rego` files are shared library code (reporting helpers, validation helpers), not policies, and were always meant to be skipped silently. Same for dot-prefixed config directories. - **Stderr capture wrap inside the demo runner.** Heavy downstream evaluators still emit ERRORs for missing OPENAI_API_KEY — expected in the no-key demo path, since the OPA verdict is the substance of the report regardless. The runner redirects fd 2 to a tempfile during the demo and only replays it on non-zero exit, so debug info isn't lost on failure but doesn't pollute the success path. The demo runs through the same code path as `aicertify evaluate` and as `examples/quickstart.py` — what the user sees in the demo IS what the canonical pipeline produces.
Adds a real recording of `aicertify demo` running end-to-end: - `docs/demo.cast` — asciinema v2 cast (60 KB, 135 frames). Replayable with `asciinema play docs/demo.cast` for byte-exact byte-stream reproduction. Recorded against the rich-UX runner from the preceding commit, with OPENAI_API_KEY unset, so it shows what a fresh-install user actually experiences. - `docs/demo.gif` — agg-rendered GIF (316 KB, 68 frames at 2× speed, monokai theme). Embedded in README right after the Quick Start so README visitors see the rich UX before they install anything: ASCII banner, spinners with emojis, MessageGroup panel, success markers, and the final report path. Renders inline in any markdown viewer including GitHub mobile. CHANGELOG records both this artifact set and the rich-UX rewrite from the preceding commit under [Unreleased].
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
Two commits, one bundled PR. PyPI re-release deferred — this is README-visible polish + the underlying canonical-path improvements that benefit every CLI user.
1. `feat(demo): rewrite for canonical rich-UX flow`
The v0.7.1 demo runner shipped with plain `print()` calls — the banner, spinners, MessageGroup, and success markers that ship in `examples/quickstart.py` were entirely missing. This rewrites the runner around the high-level `application.create()` + `app.evaluate()` API and wires in `print_banner`, `spinner`, `MessageGroup`, `info`, and `success` from `aicertify.utils.logging_config`. The demo now looks identical to what `examples/quickstart.py` produces.
Three supporting fixes keep the rich UX legible:
2. `docs(demo): add asciicast recording + GIF + README embed`
Real recording of `aicertify demo` running end-to-end:
Recorded against the rich-UX runner from the preceding commit, with `OPENAI_API_KEY` unset — so it shows what a fresh-install user actually experiences.
Test plan
Not in this PR