You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: enable config of node-specific fields in vlm response (Issue #27)
The schema classes defined in `src/anyvlm/schemas/vlm.py` have 4
variables that we will be hard-coding to GREGoR-specific values for our
MVP release. These can be divided into 2 groups:
1. Metadata about the source the CAF data is coming from:
- `HandoverType.id`
- `HandoverType.label`
- `BeaconHandover.url`
2. Metadata about the AnyVLM node:
- `Meta.beaconId`
Since our only data source for MVP will be GREGoR, hard-coding values
for the items under Point Number 1 works for the time being. However,
we'll ultimately need to pull these three values dynamically (since
we'll be adding support for nodes to contain data from multiple sources
post MVP - see Issue #37). I've therefore set these via environment
variables for now in `build_vlm_response_from_caf_data()` for
expediency, but have left #TODOs referencing the multi-cohort epic in
the places where I'm using them.
The item under Point Number 2 (i.e. `Meta.beaconId`) should always be
set once per node and should not change (even post-MVP). This one makes
sense to leave an environment variable long-term, so I handled this
differently by pulling the env var in at the class level and using
Pydantic validation to ensure it's set.
---
⚠️ See the `.env.example` file for the new env var names and the GREGoR
default values we'll use for our MVP release. You'll need to add these
to your own `.env` file in order for tests to pass.
---------
Co-authored-by: James Stevenson <[email protected]>
0 commit comments