gendesign/tradein-mvp/backend
Light1YT 47329a3adb test(tradein): unit-cover estimator pure helpers + fix None crash in _filter_outliers (#580)
_filter_outliers used lot.get("price_per_m2", 0), whose default only applies
when the key is absent; a present-but-None value (listings.price_per_m2 is
nullable) leaked into `low <= None <= high` → TypeError, crashing the estimate.
Make the bounds check None-safe: keep unpriced lots, still drop genuine priced
outliers. Behavior byte-identical for all real prices (incl. 0).

Add tests/test_estimator_pure_units.py (23 tests) covering _percentile,
_filter_outliers (incl. the None regression) and _compute_confidence
(thresholds, concentration downgrade, fallback notes).

Closes #580
2026-05-29 13:17:33 +05:00
..
app test(tradein): unit-cover estimator pure helpers + fix None crash in _filter_outliers (#580) 2026-05-29 13:17:33 +05:00
data/sql feat(tradein): аккаунт praktika + лимит 15 оценок/мес, чистка PRINZIP в UI (#635) 2026-05-28 22:04:58 +00:00
scripts feat(tradein): приоритизировать DaData house-backfill на дома с листингами (accuracy #2) 2026-05-28 15:17:01 +05:00
tests test(tradein): unit-cover estimator pure helpers + fix None crash in _filter_outliers (#580) 2026-05-29 13:17:33 +05:00
.dockerignore feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
Dockerfile feat(tradein): persistent infra для backfill scripts (PR F) (#592) 2026-05-27 06:59:54 +00:00
pyproject.toml feat(rbac): role-based access control via X-Authenticated-User middleware (#585) 2026-05-26 06:18:40 +00:00