feat: 3 new tools, format streaming, distribution-ready demo + landing pages
Tools shipped this batch (4 → 6 of 9 Ready):
04 Missing Value Handler src/core/missing.py + cli_missing.py + GUI
05 Column Mapper src/core/column_mapper.py + cli_column_map.py + GUI
09 Pipeline Runner src/core/pipeline.py + cli_pipeline.py + GUI
with soft tool-dependency graph (recommended,
not enforced) and JSON save/load for repeatable
weekly cleanups.
Format Standardizer reworked for 1 GB international files:
• Vectorised dispatch + LRU cache over phone/date/currency/boolean/email
• Per-row country / address columns drive parsing
• Audit cap (default 10 k rows, ~50 MB RAM)
• standardize_file(): chunked streaming entry point (~165 k rows/sec)
• currency_decimal="auto" for EU comma-decimal locales
• R$ / kr / zł multi-char currency prefixes
• cli_format.py with auto-stream above 100 MB inputs
Encoding detection arbiter + language-aware probe:
Closes the last 4 xfails (cp1250 / mac_iceland / shift_jis_2004 / lying-BOM)
via tied-confidence arbiter + Cyrillic / EE-Latin coverage probes.
Distribution-readiness assets:
• streamlit_app.py — Streamlit Community Cloud entry shim
• src/gui/app_demo.py — single-page demo, ?p=<persona> routing,
100-row cap + watermark, free-vs-paid boundary enforced at surface
• samples/demo/ — 3 niche datasets + pre-tuned pipeline JSONs
• landing/ — 4 static HTML pages (apex chooser + 3 niche),
shared CSS, deploy.py URL-substitution script,
auto-generated robots.txt + sitemap.xml + 404.html + favicon
• docs/PLAN.md, DEMO-PLAN.md, DEPLOYMENT.md, POST-LAUNCH.md, NEXT-STEPS.md
— full strategy + measurement + deployment + master checklist
Test counts:
before: 1,520 passed · 4 skipped · 17 xfailed
after: 1,729 passed · 0 skipped · 0 xfailed
Tier-1 corpora added:
• missing-corpus 3 use cases + 16 edge cases
• column-mapper-corpus 3 use cases + 5 edge cases
• format-cleaner intl 20-row 13-country stress fixture
Engine hardening flushed out by the corpora:
• interpolate guards against object-dtype columns
• mean/median skip all-NaN columns (silences numpy warning)
• fillna runs under future.no_silent_downcasting (silences pandas warning)
• mojibake test no longer skips when ftfy installed (monkeypatch path)
• drop-row threshold semantics: strict-greater (consistent across rows / cols)
• currency_decimal validator allow-set updated for "auto"
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -46,7 +46,7 @@ Numbered support matrix. Updated with every shipped capability.
|
||||
**Cell-level**:
|
||||
- `smart_punctuation_in_data`, `nbsp_or_unicode_whitespace`, `zero_width_or_invisible`, `dirty_column_headers`, `whitespace_padding`, `null_like_sentinels`, `suspected_mojibake`, `mixed_case_email_column`, `inconsistent_date_format`, `near_duplicate_rows`, `leading_zero_ids`.
|
||||
|
||||
**Encoding integrity**: `encoding_uncertain`, `encoding_decode_failed`, `empty_input`.
|
||||
**Encoding integrity**: `encoding_uncertain`, `encoding_decode_failed`, `encoding_lying_bom`, `empty_input`.
|
||||
|
||||
Sample size: 1,000 rows (configurable).
|
||||
|
||||
@@ -71,17 +71,37 @@ Sample size: 1,000 rows (configurable).
|
||||
- Full-DataFrame `auto_fix`: ~5 min (~30 µs/cell).
|
||||
- Output write: ~10 s.
|
||||
- Recommended RAM: 4× input size for full-Apply path.
|
||||
- Format standardizer (`standardize_file`): ~150k rows/sec on cache-warm
|
||||
international data; chunk-bounded RAM (~50 MB peak at default
|
||||
chunk_size=50,000). A 1 GB CSV with mixed phone+currency+address
|
||||
columns finishes in ~2.5–10 minutes depending on column count.
|
||||
|
||||
## 11. Tools
|
||||
1. Deduplicator — Ready
|
||||
2. Text Cleaner — Ready
|
||||
3. Format Standardizer — Ready
|
||||
4. Missing Value Handler — Coming Soon
|
||||
5. Column Mapper — Coming Soon
|
||||
4. Missing Value Handler — Ready
|
||||
5. Column Mapper — Ready
|
||||
6. Outlier Detector — Coming Soon
|
||||
7. Multi-File Merger — Coming Soon
|
||||
8. Validator & Reporter — Coming Soon
|
||||
9. Pipeline Runner — Coming Soon
|
||||
9. Pipeline Runner — Ready
|
||||
|
||||
### 11.a Recommended pipeline order (soft, not enforced)
|
||||
|
||||
The Pipeline Runner ships with a `SOFT_DEPENDENCIES` table; the
|
||||
following ordering is the default and the basis of the warning
|
||||
surface. Re-ordering is allowed; the runner emits a warning string
|
||||
and proceeds.
|
||||
|
||||
| # | Tool | Why this slot |
|
||||
|---|------|---------------|
|
||||
| 1 | column_map (optional, for header alignment) | Multi-vendor unification — rename early so downstream tools see canonical headers |
|
||||
| 2 | text_clean | NBSP / smart quotes / zero-width pollution silently breaks downstream parsers |
|
||||
| 3 | format_standardize | Phones / dates / currencies → canonical form before missing detection and dedup |
|
||||
| 4 | missing | Sentinel detection, imputation, drop strategies — needs canonical types |
|
||||
| 5 | column_map (optional, for schema enforcement) | Project to target schema, coerce, drop extras AFTER cleaning |
|
||||
| 6 | dedup | Fuzzy matching is most accurate on canonicalised, sentinel-laundered data |
|
||||
|
||||
## 12. Gate (Review & Normalize)
|
||||
- Gates every tool page.
|
||||
@@ -95,7 +115,7 @@ Sample size: 1,000 rows (configurable).
|
||||
|
||||
## 13. Interfaces
|
||||
- **GUI**: Streamlit, browser-based, local, no internet.
|
||||
- **CLI**: `python -m src.cli` (dedup) · `src.cli_text_clean` · `src.cli_analyze`.
|
||||
- **CLI**: `python -m src.cli` (dedup) · `src.cli_text_clean` · `src.cli_format` · `src.cli_missing` · `src.cli_column_map` · `src.cli_pipeline` · `src.cli_analyze`.
|
||||
- **Python API**: `from src.core import …` (analyze, repair_bytes, clean_dataframe, deduplicate, standardize_dataframe, …).
|
||||
- **JSON output**: `--json` on `cli_analyze`.
|
||||
|
||||
@@ -113,8 +133,8 @@ Sample size: 1,000 rows (configurable).
|
||||
- **Dev**: pytest, tox.
|
||||
|
||||
## 16. Test coverage
|
||||
- 1,230 tests passing, 4 skipped (ftfy not installed), 17 xfailed (documented).
|
||||
- Fixture corpora: text-cleaner (21), encodings (31), reference UTF-8 (9), format-cleaner (199 buyer cases).
|
||||
- 1,729 tests passing, 0 skipped, 0 xfailed.
|
||||
- Fixture corpora: text-cleaner (21), encodings (31), reference UTF-8 (9), format-cleaner (199 buyer cases + 20-row international stress fixture), missing-handler (3 use cases + 16 edge cases), column-mapper (3 use cases + 5 edge cases).
|
||||
- Run: `python run_tests.py [--tool …] [--fixtures] [--coverage]`.
|
||||
|
||||
## 17. Privacy / data handling
|
||||
|
||||
Reference in New Issue
Block a user