Seeds the backend with example collections:
- covid-resistance-mutations — resistance mutation data for 3CLpro, RdRp, and Spike mAb
- covid-pango-lineages — one collection per pango lineage, with nucleotide substitutions as variants
- covid-pango-lineages-sample — same as above but limited to 10 lineages, for quick testing
The script is idempotent — re-running it will create new collections or update existing ones (matched by name). If a collection's name changes in the source, the old entry is orphaned and a new one is created.
Use --repeat-interval-hours N (or $REPEAT_INTERVAL_HOURS) to run on a loop — re-seeds every N hours. Without it, the script runs once and exits.
The seeder runs automatically as part of Docker Compose:
BACKEND_TAG=latest WEBSITE_TAG=latest SEEDER_TAG=latest docker compose upRequires pixi. Install dependencies once:
pixi installThen use the provided tasks:
pixi run seed # all sources
pixi run seed-resistance # resistance mutations only
pixi run seed-lineages # pango lineages only
pixi run seed-lineages-sample # first 10 pango lineages (quick test)To target a different backend:
pixi run seed --url http://localhost:4321Run pixi run seed --help for all options, including --source, --list, --repeat-interval-hours, and --url.
- Create
sources/your_source.pyand implement theSourceABC:from sources import Source from models import Collection class YourSource(Source): name = "your-source-name" # used with --source flag def get_collections(self) -> list[Collection]: ...
- Register it in
sources/registry.pyby adding it toALL_SOURCES.