gendesign/tradein-mvp/backend/app
lekss361 23f89d1935 feat(tradein): yandex_helpers.py — shared parsing utilities + tests
Foundation helpers for YandexRealtyScraper v1 Stages 3-6:
- JSON-LD extraction (extract_json_ld, find_ld_by_type) — Product/Offer/BreadcrumbList
- Regex constants (RE_OFFER_ID, RE_JK_ID, RE_TITLE_AREA, RE_TITLE_ROOMS, RE_FLOOR,
  RE_PRICE, RE_PPM2, RE_VIEWS, RE_METRO_WALK, RE_YEAR, RE_AGENCY_*)
- Russian date parsers (parse_ru_date "9 мая 2026" + parse_dmy "17.02.2026")
- NLP helpers (parse_house_type → panel/monolith/brick/block/wood;
  parse_house_class → elite/premium/business/comfort_plus/comfort/economy)
- Money parser (parse_rub: "4 399 000 ₽" / "4,4 млн ₽" / "117500" / None)

Spec fixes: RE_TITLE_ROOMS split into two alternations to handle standalone
"Студия" (group 2) vs "N-комнатная" (group 1); parse_house_class premium
pattern extended to cover reversed word order "премиум-класса".

Test coverage: 36 unit tests across all helpers (uv run pytest passes,
ruff check clean).
2026-05-23 16:07:02 +03:00
..
api fix(tradein): восстановленная оценка показывает этаж/площадь, не 0/0 2026-05-22 15:50:19 +05:00
core fix(tradein): security hotfix — C-3 config default + C-4 empty estimate persist + C-6 PDF URL allowlist (#435) 2026-05-23 09:38:23 +00:00
schemas fix(tradein): восстановленная оценка показывает этаж/площадь, не 0/0 2026-05-22 15:50:19 +05:00
services feat(tradein): yandex_helpers.py — shared parsing utilities + tests 2026-05-23 16:07:02 +03:00
__init__.py feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in) 2026-05-21 00:25:39 +03:00
main.py feat(tradein): мониторинг ошибок через GlitchTip (#396) 2026-05-22 11:18:26 +05:00