feat(gui): sidebar sections + non-technical tool labels
Sidebar nav now groups tools under Data Review / Data Cleaners / Transformations / Automations via st.navigation, replacing the flat auto-discovered list. Tool display names switch to action-first phrasing (Find Duplicates, Fix Missing Values, Find Unusual Values, Standardize Formats, Clean Text, Quality Check, Map Columns, Combine Files, Automated Workflows) in EN + ES packs and on each page's H1. The Data Cleaners section follows the requested order: Missing Values → Outliers → Text Cleaner → Format Standardizer → Deduplicator → Quality Check. (Text Cleaner kept inside cleaners since the request didn't list it but the tool still ships.) Registry now carries a section field; helpers added: tools_in_section(), section_label(). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -113,13 +113,13 @@ class TestGrouping:
|
||||
labels = [e.label for e in app.expander]
|
||||
# Two unique tools → two expanders. Each label carries the
|
||||
# tool's display name + finding count.
|
||||
text_cleaner_expanders = [lbl for lbl in labels if "Text Cleaner" in lbl]
|
||||
format_expanders = [lbl for lbl in labels if "Format Standardizer" in lbl]
|
||||
text_cleaner_expanders = [lbl for lbl in labels if "Clean Text" in lbl]
|
||||
format_expanders = [lbl for lbl in labels if "Standardize Formats" in lbl]
|
||||
assert len(text_cleaner_expanders) == 1, (
|
||||
f"expected one Text Cleaner expander; got: {labels}"
|
||||
f"expected one Clean Text expander; got: {labels}"
|
||||
)
|
||||
assert len(format_expanders) == 1, (
|
||||
f"expected one Format Standardizer expander; got: {labels}"
|
||||
f"expected one Standardize Formats expander; got: {labels}"
|
||||
)
|
||||
|
||||
def test_tool_names_localize_in_spanish(self):
|
||||
@@ -127,7 +127,7 @@ class TestGrouping:
|
||||
app = _harness(findings, lang="es")
|
||||
app.run()
|
||||
labels = [e.label for e in app.expander]
|
||||
assert any("Limpiador de texto" in lbl for lbl in labels), (
|
||||
assert any("Limpiar texto" in lbl for lbl in labels), (
|
||||
f"Spanish tool name missing; expanders: {labels}"
|
||||
)
|
||||
|
||||
@@ -140,7 +140,7 @@ class TestGrouping:
|
||||
app.run()
|
||||
labels = [e.label for e in app.expander]
|
||||
# Pack template: "{tool} — {n} finding(s)"
|
||||
text_cleaner_label = next(l for l in labels if "Text Cleaner" in l)
|
||||
text_cleaner_label = next(l for l in labels if "Clean Text" in l)
|
||||
assert "3" in text_cleaner_label, (
|
||||
f"expected count '3' in expander label; got {text_cleaner_label!r}"
|
||||
)
|
||||
@@ -163,7 +163,7 @@ class TestOpenToolButton:
|
||||
# raw markdown. We probe both.
|
||||
text = collected_text(app)
|
||||
# Pack template: "Open {tool} →"
|
||||
assert "Open Text Cleaner" in text
|
||||
assert "Open Clean Text" in text
|
||||
|
||||
def test_open_tool_label_spanish(self):
|
||||
findings = [_make_finding(tool="02_text_cleaner")]
|
||||
@@ -171,7 +171,7 @@ class TestOpenToolButton:
|
||||
app.run()
|
||||
text = collected_text(app)
|
||||
# Pack template: "Abrir {tool} →"
|
||||
assert "Abrir Limpiador de texto" in text
|
||||
assert "Abrir Limpiar texto" in text
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user