feat(export): DOCX export of §22 forecast report — slice #959 #1110
No reviewers
Labels
No labels
admin
analytics
auth
automation
bug
business
chore
ci
compliance
data
data-moat
docs
duplicate
dx
enhancement
Fable 5 ревью
feedback/max
generative
GG-форсайт
needs-discussion
needs-human
observability
pause-bots
performance
priority/p0
priority/p1
priority/p2
priority/p3
scope/backend
scope/db
scope/devops
scope/frontend
scope/qa
scrapers
security
site-finder
stage/1
stage/2
status/blocked
status/done
status/needs-analysis
status/needs-fix
status/qa
status/ready
status/review
status/wip
tech-debt
tradein
ux
week ревью 1
wontfix
вторичка
ИРД
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lekss361/gendesign#1110
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/forecast-export-docx-959"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Что
DOCX-формат экспорта §22-отчёта — завершает форматы EPIC #959 (PDF/XLSX/MD/JSON/TG ✓ → +DOCX). Формальный Word-отчёт для ГГ/клиентов.
Относится к #959.
Содержимое
exporters/report_docx.py—render_report_docx(report) -> bytes(python-docx). DRY: переиспользует pure-хелперы изreport_pdf. Зеркалит порядок/контентreport_md(8 секций + advisory). Graceful на тонком/пустом (валидный минимальный .docx). Локальныйimport docx(как WeasyPrint).GET /{cad}/forecast/export?format=docx→ Word-attachment (…wordprocessingml.document). md/json/tg без изменений; нет рана → 404; невалидный format → 422.python-docx>=1.1.0в pyproject +uv.lockрегенерирован.uv sync --frozenпроходит (deploy-abort guard). lxml — manylinux-wheel, Dockerfile не трогаем.Качество
code-reviewer: ✅ APPROVE — lock-gate проверен ревьюером лично (uv sync --frozenEXIT 0, минимальный scope python-docx+lxml), renderer graceful+DRY, endpoint без регрессии, ruff clean. 17 docx-тестов (998 passed). #1032 CI-гейт дополнительно проверит lock.Тест-план (post-deploy)
GET /api/v1/parcels/66:41:0702048:27/forecast/export?format=docx→ 200 Word-документ (PK-сигнатура), открывается в Word/LibreOffice.