Closed pgulley closed 1 month ago
1. I agree we need to choose whether to continue using `config.yml` or not. I like the idea of `config`/`settings` module that abstract pulling things from system env vars (or `.env` file) in a type-safe manner. This being a FastAPI app, my vote would be to switch to using [`pydantic settings`](https://fastapi.tiangolo.com/advanced/settings/#settings-in-another-module) instead of building one from scratch around `getnev`.
Quick glance at pydantic_settings and I'm impressed- I'll experiment weaving it in now. It should drop-in no problem to the way we're passing in environment variables now, and it would be a one-line change to go back to using a .env file if needed in the future for some reason.
Floating back through here to reiterate that pydantic_settings is wonderful- one of those tools that makes me wonder how I got by without it. Thanks for the tip @kilemensi
Creates queries.py, which contains a QueryBuilder and an EsClientWrapper, separating concerns more explicitly. Also removes unused significant/rare term query logic. (Addressing #71)
Questions: