Data Browser UI — visually inspect & spot-check the catalog#11
Merged
Conversation
New Streamlit "Data" page to browse the catalog and manually check the data: - Filters: source, split, primary defect, provenance, quality (good/not-good), and label-trust bucket. - Thumbnail gallery (paginated) with class + ext_id captions; not-good beans flagged⚠️ . - Per-bean detail: all views, every defect (class/primary/label_source/trust), and the lot provenance (species, variety, process, farm, altitude, dates…). Read queries live in `almendra.db.queries` (Streamlit-free, unit-tested). The page degrades gracefully if the `catalog` extra or the DB file is absent. Also: CI now installs `--extra catalog` so the catalog/curation/browse tests actually run (they were importorskip-skipped before). Tests: tests/test_browse_queries.py (filters, pagination, detail) + browse added to the UI smoke set. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The E2E sandbox now builds its catalog from the fixture manifest (harness
`build_catalog` runs `almendra db migrate`), and the flow navigates to the new
Data page after Predict, asserting the browser renders with beans ("Data
browser" + "Showing N of M"). Exercises `db migrate` end-to-end too.
Passes in ~34s; recording covers the added step.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
What
A new Streamlit Data page to browse the catalog and manually check the data — the visual tool requested before/alongside Step 3's labeling work.
class+ext_idcaptions; not-good beans flaggedclass/primary/label_source/trust), and the lot provenance (species, variety, process, farm, altitude, dates…).Read queries live in
almendra.db.queries(Streamlit-free → unit-tested). The page degrades gracefully if thecatalogextra ordata/catalog.dbis missing.Also fixes CI: installs
--extra catalogso the catalog/curation/browse tests run (they wereimportorskip-skipped before).Screenshot
Gallery on the real 1507-bean catalog (filters across the top,⚠️ on duplicate beans, per-bean detail below):
(captured locally via the UI on the real catalog)
Verification
uv run pytest -m "not e2e"→ 82 passed;ruff+ format clean.tests/test_browse_queries.py: filters, pagination, bean detail.Next
Step 3 proper — new dataset adapters (coffee-adik ⭐, arabica-washed) + the multi-label model migration — comes in a follow-up branch stacked on this.
🤖 Generated with Claude Code