Spaces:
Sleeping
Sleeping
Commit History
24 days ago
-
Tidy viewer code so the current lint gate passes (#16)
Unverified signatureCI installs the newest ruff, whose default rules now flag lines that passed in June. Fix them rather than pin an old checker. No behaviour change (generated HTML byte-identical); skipped thumbnails/logos are now logged instead of silently swallowed.0f7df0e -
Viewer: subgroup comparison users can read, cards that favour results (#14)
Unverified signatureUsers want to compare an asset's BPS and brand attribution between any subgroups, including across questions (e.g. trivago Aware vs trivago ad aware). The table-of-deltas format was hard to process and could not compare across breakout questions, so: - Sidebar multi-select (max 4) of subgroups from any question; cards show BPS per subgroup and paired brand-attribution bars (correct brand in its colour shades, other brands grey so focus stays on the correct brand). Side panel lists the exact values. Total is not selectable - it is already shown on every card. - Parser reads per-subgroup brand %, correct brand and uniqueness. - All delta displays removed (table, Max delta, card range): they were misread and the subgroup values themselves are what users compare. - Card: picture about 1/3, results 2/3; one tile fewer per row so brand names are readable; values on top of their bars; unit stated once.01dab85
-
fix(parser): detect glued-number block headers + keep A/B sub-blocks distinct (#13)
Unverified signatureBlock-header rows ending in 'mean' come in three shapes. The parser handled '#03 Symbole ... mean' (old) and '05 Colours mean' / '16A Key Visuals mean' (new spaced/letter-suffixed), but NOT the glued form '05Colours mean' where the number is stuck to the name. Files exported that way (e.g. PH Laundry) detected 0 blocks, so the viewer's BLOCK filter showed only "All". parse_excel.py: - Broaden _BLOCK_HEADER_RE to a strict superset: keep the original spaced/suffixed pattern, add an alternative for the glued form. - Split the block number from the name for the glued form ('05Colours' -> '05' + 'Colours') while still handling spaced and letter-suffixed numbers ('12a Foo' -> '12a' + 'Foo'). build_viewer.py: - Key the BLOCK filter on the unique block NUMBER instead of the name. Two blocks can share a name (16A and 16B are both 'Key Visuals'), so name-keying merged them into one button and one filter. Now 16A/16B and 17A/17B render and filter as distinct sub-blocks; labels prepe…ee190b5
-
feat(parser): fill abbreviated-brand assets via validated positional code (#12)
Unverified signatureSome asset codes abbreviate the brand (e.g. 'ps' = Philips, 'hs' = HiSmile) so the brand-name match leaves them unattributed. Add a second pass that resolves them WITHOUT hard-coding any abbreviation: - Learn the leading 2-digit code -> brand relation from assets that matched by name. - Only if that relation is a clean positional index (code N -> the N-th brand in column order) for EVERY name-matched asset, and at least two distinct codes agree, use the leading code to attribute the unmatched (abbreviated) assets. A study where the leading number is a stimulus counter rather than a brand index fails the check, so its assets are left unattributed instead of guessed wrong. Verified: AU OralCare now attributes all Philips/HiSmile assets; IN FemCare correctly does nothing and keeps name-matched results.03fe9da -
fix(parser): attribute assets by brand-name match, not positional index (#11)
Unverified signatureBrand attribution used the leading 2-digit asset code as a 1-based index into the brand list (01 -> brands[0]). That number is a stimulus sequence number, not a brand-column index, so assets were attributed to the wrong brand (e.g. a Stayfree asset coloured as Comfy). Match the asset code against the authoritative brand list (from the Excel column headers) instead: strip the leading <NN>B<NN> prefix, then find the known brand the remainder begins with, on an alphanumeric-only key so 'Oral B' / 'Oral-B' / 'oralb' compare equal. Tolerate up to two leading block-suffix letters by retrying with them dropped; longest brand wins and skip=0 is tried first, so a brand that genuinely starts with such a letter (e.g. 'Always') is matched whole. Fixes the '01B16aoralb...' miss too.a588094 -
Harden brand fallback and generalise breakout brand matching (#10)
Unverified signature- Brand-attribution fallback (used only when the leading 2-digit code is out of range, e.g. brand codes with gaps): match the letter-run after the block number, trying it as-is and with a single leading block-suffix letter dropped, so both '05oralb' and '05aoralb' (and b/c/d) resolve to the brand. - Breakout _cluster_segments: compare brands by alphanumeric form only (ignoring spaces, dashes, case) and across multiple leading label tokens, so a brand listed as 'OralB' matches an overview label 'Oral B …'. Clears the spurious 'empty_token_set' warning and activates brand-aware type matching.8397b99 -
Fix brand attribution, output filename, and iBAT labelling (#9)
Unverified signature- parse_excel: attribute assets by the leading 2-digit brand code (column index) instead of a name regex that mis-parsed block-suffix letters (16a/16b) and brand abbreviations (ps=Philips, hs=HiSmile). Restores full per-brand asset counts (e.g. Oral B 16 -> 28); name-token match kept as a fallback when the code is out of range. - build_viewer: prefer the user-entered name over the Excel A1 title for the output filename and HTML title; fall back to the Excel name only when blank. - build_viewer: normalise the product label to 'IcAT', and to 'iBAT' for P&G clients (bounded P&G/P_G/PG token match), across title, subtitle, filename. - app: pass client_name through to the viewer.9678e1f -
feat: surface parser feedback & pre-flight image/asset checks (Phase 2 UI) (#8)
FloWeinertUnverified signature* feat(app): surface parser warnings and text-rendered counts in the UI The parser already emits structured warnings (data['warnings']) but the Streamlit app never showed them. After a successful parse, warning-severity items now render in a prominent st.warning block and info-severity items (e.g. the per-run match_census line) collapse into a 'Parser details' expander. Also split the asset counts: stats['with_images'] now counts real image/video matches only — it previously counted generated text cards too, including in the HTML sidebar footer. New text_rendered / text_from_name / text_from_sidecar counts surface how many assets fell back to a text card; the 'from asset name' figure flags likely missing images. The 'from sidecar' bucket is 0 until the .txt-sidecar feature merges. - app.py: _format_warning(), post-parse warnings panel, text-rendered caption - build_viewer.py: count image vs text cards in the prop loop; split stats * feat(app): plain-language, color-coded parser fee…d7331d8
-
feat(parser): robust breakout clustering + block detection for old and new IcAT formats (#6)
FloWeinert +1: drchrisscheierUnverified signature* feat(parser): robust breakout clustering + block detection for old and new IcAT formats Explicit old/new format branching by breakout header tier: - Old (two-tier header): in-table grouping is authoritative; the destructive overview-sheet merge that corrupted level names (off-by-one 'Merkmal' leak) is removed. Improved Q-prefix strip ('Q1 7 1 Markenbekanntheit' residue). - New (one-tier header): segments are clustered via the breakout-overview sheet ('Uebersicht Breakouts' / 'Definition Breakouts' / 'BO Overview') through a layered matcher: exact -> word-boundary substring with residue check -> brand-aware type-suffix (handles 'Brand X' template expansion, incl. untested competitor brands) -> gated positional fallback -> 'Ungrouped' catch-all. Unicode-aware normalization (NBSP, en/em dashes). Block detection accepts '#NN name mean' and number-led 'NN name mean' (new format dropped the '#'), guarded against digit-leading brand names. Data-row loop start derived from he…d4125e4
-
feat(claude-code): add DECODE hardening
56f9a19
-
Fix brand/header row detection for files with extra header rows (e.g. Jim Beam)
- _detect_brand_row: now scans cols 0-2 for 'Number of cases' label; brand names are one row above — robust across all tested layouts - parse_icat_results: find n_brands by scanning all rows above brand_row for 'correct brand' column header, instead of assuming sub_header_row is always brand_row-1 (which broke for files with an extra section label row) - app.py: show full traceback on Excel parse error for easier debugging - _unmerge_header_rows: max_row raised from 2 to 4 to cover extra header rows Tested on REWE (DE), ChocShow (US), SOS (DE), Jim Beam (US) — all parse correctly. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>663ba91
-
Fix file locking on Windows, preserve PNG transparency in thumbnails
- app.py: Use unique temp file names instead of PID-based (fixes WinError 32 on re-upload) - parse_excel.py: Close pd.ExcelFile handles to release file locks on Windows - build_viewer.py: Detect palette-mode PNG transparency and save as PNG instead of JPEG - .gitignore: Add material/ and output/ working directories Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>e503bf6
-
feat(viewer): round 2 UX improvements + breakout support
- Brand multi-select filter with brand-colored active states - Block averages moved to sidebar (always visible, click to filter) - Block benchmark reference line on brand attribution bars in profile - Scatter view (X=uniqueness, Y=correct brand %) as third view mode - Bigger spectrum items (52px thumbnails, 11px labels) - "Brand (within block)" sort option - BPS badge tooltip: "Branding Power Score" - Brands ordered by asset count (client brand first) - Breakout subgroup parsing and BPS-by-subgroup in profile panel - Dynamic stimulus support (GIF/video first-frame thumbnails) - ffmpeg added to Dockerfile for video frame extractiondcfba60
-
fix: JS escaping, dynamic column detection, text stimulus cards
- Replace inline onclick handlers with event delegation to fix JS syntax errors from f-string quote escaping - Detect brand column start dynamically (was hardcoded to col 1) - Generate styled text cards for stimuli without images (slogans, jingles) using Pillow with word-split descriptionsf249fbd -
feat: IcAT results viewer — core modules
Parse IcAT Excel results and generate interactive standalone HTML with card grid, filters, and profile panel for brand asset analysis.73c4ec1