Commit graph

6 commits

Author SHA1 Message Date
b16935e679 fix(tradein): реализовать writers listings_snapshots/offer_price_history (#567)
listings_snapshots не имел ни одного writer'а — таблица оставалась пустой.
offer_price_history уже писался в save_detail_enrichment, но ON CONFLICT DO NOTHING
не указывал имя constraint'а (добавлено в 047_cian_history_sanitize.sql), что делало
де-дупликацию неэффективной.

Добавлено:
- snapshot_writer.py: upsert_listing_snapshot() — атомарный INSERT ... ON CONFLICT
  DO UPDATE на (listing_id, snapshot_date), без commit (commit у caller'а).
- base.py save_listings(): вызывает upsert_listing_snapshot после каждого INSERT/UPDATE
  listings; принимает опциональный run_id; ошибка snapshot не прерывает батч.
- cian_detail.py save_detail_enrichment(): SELECT price_rub/price_per_m2 из listings,
  затем upsert_listing_snapshot; ON CONFLICT для offer_price_history теперь ссылается
  на offer_price_history_listing_change_uq (именованный constraint из мигр. 047).
- test_snapshot_writer.py: 17 unit-тестов покрывают SQL-форму, params, идемпотентность,
  интеграцию с save_listings и save_detail_enrichment, fault-tolerance.
2026-05-28 18:26:52 +05:00
7e24ccbf2c feat(tradein): hook matching в save_listings — fill listing_sources (PR I) (#595)
All checks were successful
Deploy Trade-In / build-frontend (push) Has been skipped
Deploy Trade-In / build-backend (push) Successful in 52s
Deploy Trade-In / changes (push) Successful in 5s
Deploy Trade-In / deploy (push) Successful in 40s
2026-05-27 10:02:37 +00:00
1b3edff6a9 feat(tradein): extend base.py save_listings to persist Cian-specific columns (PR #450 follow-up) (#455)
All checks were successful
Deploy Trade-In / changes (push) Successful in 4s
Deploy Trade-In / build-frontend (push) Has been skipped
Deploy Trade-In / deploy (push) Successful in 20s
Deploy Trade-In / build-backend (push) Successful in 39s
2026-05-23 13:05:20 +00:00
9ba776f2ca feat(tradein): cian_state_parser shared utility + ScrapedLot Cian fields (#447)
Some checks failed
Deploy Trade-In / build-backend (push) Blocked by required conditions
Deploy Trade-In / build-frontend (push) Blocked by required conditions
Deploy Trade-In / deploy (push) Blocked by required conditions
Deploy Trade-In / changes (push) Has been cancelled
2026-05-23 12:35:01 +00:00
47f4cc7d58 refactor(tradein): avito search — remove jitter (C-5) + mobile API dead code + parse houseLinks (#441)
All checks were successful
Deploy Trade-In / changes (push) Successful in 5s
Deploy Trade-In / build-frontend (push) Has been skipped
Deploy Trade-In / build-backend (push) Successful in 39s
Deploy Trade-In / deploy (push) Successful in 18s
2026-05-23 11:55:18 +00:00
lekss361
02267d0306 feat: add tradein-mvp subproject (Trade-In Estimator под /trade-in)
- FastAPI backend: PostGIS estimator + 3 scrapers (Avito/Cian/Yandex)
- Next.js 15 frontend: tradein.html mockup design, basePath=/trade-in
- WeasyPrint PDF (Брусника-style 4-page report)
- Address autocomplete с typo-tolerance + 6 EKB presets
- Изолированный docker stack gendesign-tradein (отдельная postgres БД)
- Caddy inline routes: gendsgn.ru/trade-in/* и /trade-in/api/v1/*
- Forgejo Actions: .forgejo/workflows/deploy-tradein.yml (shell-based GHCR login)
- Триггер только по paths: tradein-mvp/** (не пересекается с deploy.yml)
- Образы: ghcr.io/lekss361/gendesign-tradein-{backend,frontend}:latest

Первый запуск на сервере (вручную, один раз):
  - создать /opt/gendesign/tradein-mvp/.env.runtime (postgres pwd, contact email)
  - docker network create gendesign_shared (если нет)
  - docker compose -p gendesign-tradein up -d
  - docker compose -p gendesign exec caddy caddy reload
2026-05-21 00:25:39 +03:00