Skip to content

Repository files navigation

bedhost

Code style: black Github badge

bedhost is a Python FastAPI module for the API that powers BEDbase. It needs a path to the bedbase configuration file, which can be provided either via -c/--config argument or read from $BEDBASE_CONFIG environment variable.


Links of interest

Developer quick-start

source environment/production.env
BEDBASE_CONFIG=deployment/config/api.bedbase.org.yaml uvicorn bedhost.main:app --reload

UI development:

export VITE_API_HOST=http://localhost:8000

Testing

Black-box compliance tests (against any deployment):

pytest tests/api/ --api_root=https://api.bedbase.org

Integration tests (ephemeral Postgres + Qdrant + in-process TestClient, ~30s):

./tests/scripts/test-integration.sh

Manual service control:

./tests/scripts/services.sh start
RUN_INTEGRATION_TESTS=true pytest tests/integration/ tests/api/
./tests/scripts/services.sh stop

Integration tests require network access on first boot (bbconf downloads a licenses CSV from GitHub and may pull HuggingFace models unless BEDHOST_INIT_ML=false is set; test-integration.sh sets it).

Releases

Packages

Used by

Contributors

Languages