Add backend/app/services/exporters/report_pdf.py: export_report_pdf(report)->bytes, the additive PDF counterpart to excel.export_report_xlsx (#991). Renders a SiteFinderReport (#987) to PDF via WeasyPrint across the 6 §13 content sections (Сводка/Рынок сейчас/Будущий рынок/Продукт ТЗ/Сценарии/Скоринг). Mirrors house style: _normalize (instance or as_dict), named-const titles/CSS/ microcopy, RU labels, None→"—", graceful-never-raise, ADVISORY marker, local weasyprint import. All dynamic fields html.escape'd. STRICTLY ADDITIVE — zero edits to the 3 live PDF exporters (tradein/layout/snapshot) per tech-analyst blast-radius analysis; "unify pdf.py" deferred (would rewrite 3 working features for no gain). Endpoint wiring is #959. 16 tests (render proven via Rosetta x86_64; 6 native-render cases need Docker/CI matched-arch libgobject — pure-logic green). |
||
|---|---|---|
| .. | ||
| api | ||
| integration | ||
| scrapers | ||
| services | ||
| smoke | ||
| sql | ||
| workers | ||
| __init__.py | ||
| test_admin_weight_profiles.py | ||
| test_concepts_stub.py | ||
| test_gate_verdict.py | ||
| test_health.py | ||
| test_layout_signature.py | ||
| test_layout_tz_pdf.py | ||
| test_nspd_client.py | ||
| test_nspd_sync.py | ||
| test_ping.py | ||
| test_poi_score.py | ||
| test_quarter_dump_lookup.py | ||
| test_rbac.py | ||
| test_sentry_init.py | ||
| test_velocity.py | ||
| test_weight_profiles.py | ||