BLAST route package SRP split¶
Motivation¶
api/routes/blast.py had grown into a multi-thousand-line router that mixed HTTP endpoints with result analytics helpers. The size made route ownership and future changes harder to review.
User-facing change¶
No intended API or UI behavior change. /api/blast/* keeps the same paths and blast_router import surface.
API / IaC diff summary¶
- Promoted
api.routes.blastfrom a single module to a package. - Kept
blast_routerexported fromapi/routes/blast/__init__.pysoapi/main.pyregistration remains stable. - Moved BLAST result file, analytics, download, and export routes to
api/routes/blast/results.py. - Moved pure result analytics helpers to
api/services/blast_result_analytics.py. - Updated route documentation and the agent codebase map.
- No IaC changes.
Validation evidence¶
uv run ruff check api/routes/blast api/services/blast_result_analytics.pyPYTHONPATH=$PWD uv run pytest -q api/tests— 702 passed.