[loggi-1uq] Extract export endpoints from routes.py into app/export.py #116

Closed
opened 2026-02-21 19:43:48 +01:00 by matthias · 0 comments
Owner

Bead ID: loggi-1uq
Type: task
Priority: P2
Status: closed
Close reason: Extracted export_entry() and _export_record() into new app/export.py with export_bp blueprint. Registered in create_app(). routes.py reduced from 730 to 602 lines. All 171 tests pass including all export tests.


Why

routes.py is 730 lines, exceeding the ~500-line guideline. The export section (~110 lines: export_entry + _export_record + related imports) is self-contained and only depends on stats.py helpers.

What

  • Create app/export.py with an export_bp blueprint
  • Move export_entry(), _export_record() and their CSV/JSON logic
  • Register the new blueprint in create_app()
  • routes.py drops to ~620 lines

Acceptance criteria

  • Export tests still pass (test_export.py)
  • routes.py no longer contains export code
  • No functional changes — pure extract refactor

Dependencies:

  • blocks: loggi-2ze
**Bead ID:** `loggi-1uq` **Type:** task **Priority:** P2 **Status:** closed **Close reason:** Extracted export_entry() and _export_record() into new app/export.py with export_bp blueprint. Registered in create_app(). routes.py reduced from 730 to 602 lines. All 171 tests pass including all export tests. --- ## Why routes.py is 730 lines, exceeding the ~500-line guideline. The export section (~110 lines: export_entry + _export_record + related imports) is self-contained and only depends on stats.py helpers. ## What - Create app/export.py with an export_bp blueprint - Move export_entry(), _export_record() and their CSV/JSON logic - Register the new blueprint in create_app() - routes.py drops to ~620 lines ## Acceptance criteria - Export tests still pass (test_export.py) - routes.py no longer contains export code - No functional changes — pure extract refactor **Dependencies:** - blocks: `loggi-2ze`
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
matthias/loggi#116
No description provided.