Artur Mukhamadiev e1c7f47f8f Feature: Add /get_hottest command for exporting top trends
:Release Notes:
- Added a new Telegram command `/get_hottest <number> [format]` to export the top `N` trends as a CSV or Markdown file.

:Detailed Notes:
- Created `ITrendExporter` interface and concrete `CsvTrendExporter` and `MarkdownTrendExporter` implementations for formatting DTOs.
- Updated `src/bot/handlers.py` to include `command_get_hottest_handler` mapping to `/get_hottest`.
- Used `BufferedInputFile` to stream generated files asynchronously directly to Telegram without disk I/O.
- Fixed unrelated pipeline test failures regarding `EphemeralClient` usage with ChromaDB.

:Testing Performed:
- Implemented TDD with `pytest` for parsing parameters, exporting logic, and handling empty DB scenarios.
- Ran the full test suite (90 tests) which completed successfully.

:QA Notes:
- Fully covered the new handler using `pytest-asyncio` and `aiogram` mocked objects.

:Issues Addressed:
- Resolves request to export high-relevance parsed entries.

Change-Id: I25dd90f1e4491ba298682518d835259bffab4190
2026-03-19 14:53:20 +03:00
..
2026-03-13 11:48:37 +03:00