Skip to content

Conversation

@dannon
Copy link
Member

@dannon dannon commented Oct 6, 2025

Extends the backend to do something actually useful -- providing an API for external consumers

Summary

  • API endpoints providing linkout data for NCBI cross-referencing
  • Organism links endpoint mapping taxonomy IDs to BRC Analytics pages
  • Assembly links endpoint mapping accessions to BRC Analytics pages
  • Cached responses with 24-hour TTL

Depends on: #892

dannon added 7 commits October 4, 2025 16:00
Creates the base infrastructure layer for BRC Analytics backend:
- FastAPI application with health and cache endpoints
- Redis caching service with TTL management
- Docker Compose setup (backend + redis + nginx)
- nginx reverse proxy configuration
- uv for dependency management
- Ruff formatting for Python code
- E2E health check tests

This branch serves as the foundation for feature branches to build upon.
Adds GET /api/v1/version endpoint that returns:
- API version (from APP_VERSION env var)
- Environment (development/production)
- Service name

This provides a simple way for the frontend to display version info
and demonstrates the backend infrastructure is working.
Use APP_VERSION build arg to inject version from package.json into
backend container. Adds docker-build.sh script to automate this.
All endpoints now use settings.APP_VERSION instead of hardcoded values.
Implements GitHub issue galaxyproject#783 - provides JSON endpoints for NCBI to link
back to BRC Analytics organism and assembly pages.

New endpoints:
- GET /api/links/organism-links.json - Returns 1409 organism links
- GET /api/links/assembly-links.json - Returns 1967 assembly links

Features:
- Reads from catalog JSON files mounted as Docker volume
- 24-hour Redis caching for performance
- Includes taxonomy IDs, scientific names, and BRC Analytics URLs
- Auto-documented in OpenAPI/Swagger

Changes:
- Add NCBILinksService to generate links from catalog data
- Add FastAPI endpoints with Redis caching
- Mount catalog directory to backend container
- Update poetry.lock with regenerated dependencies
@github-actions github-actions bot added the feat label Oct 6, 2025
@dannon dannon marked this pull request as draft October 6, 2025 15:43
- Add CATALOG_PATH setting to config
- Update NCBILinksService to use catalog path from settings
- Allows catalog path override via environment variable
@d-callan d-callan mentioned this pull request Oct 24, 2025
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant