Merged
Conversation
Implements a FastAPI-based REST API exposing biomapper2 mapping functionality: - POST /api/v1/map/entity - single entity mapping - POST /api/v1/map/batch - batch entity mapping - POST /api/v1/map/dataset - file upload mapping - POST /api/v1/map/dataset/stream - NDJSON streaming - GET /api/v1/health - health check - GET /api/v1/entity-types - list supported types - GET /api/v1/annotators - list available annotators - GET /api/v1/vocabularies - list supported vocabularies Includes optional API key authentication, Mapper singleton via lifespan, systemd service unit, and GitHub Actions deployment workflow. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Support multiple API keys via comma-separated BIOMAPPER2_API_KEYS env var, with fallback to single BIOMAPPER_API_KEY for backward compatibility. Co-Authored-By: Claude Opus 4.5 <[email protected]>
The Kestrel API's disease name mapping precision varies between runs. Lower threshold matches current behavior; TODO remains for future improvement. Co-Authored-By: Claude Opus 4.5 <[email protected]>
Member
|
thanks @trentleslie, this is awesome! I scanned the PR and it looks good to me, but wondering if @UncertainSpin wants to take a look? I'm guessing there may be some overlap with pydantic models he's been working on(?) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Endpoints
Mapping
POST/api/v1/map/entityPOST/api/v1/map/batchPOST/api/v1/map/datasetPOST/api/v1/map/dataset/streamDiscovery
GET/api/v1/healthGET/api/v1/entity-typesGET/api/v1/annotatorsGET/api/v1/vocabulariesFiles Changed
src/biomapper2/api/- New API package (routes, models, auth)deploy/- Systemd service and deployment docs.github/workflows/deploy-api.yml- Auto-deploy workflowtests/test_api.py- 16 API tests (all passing)Test plan
🤖 Generated with Claude Code