feat(Q3): add temperature, conditions, bbox columns to wildlife_sightings
This commit is contained in:
parent
4097ee9dd3
commit
38ff219364
13
tests/unit/test_wildlife_schema.py
Normal file
13
tests/unit/test_wildlife_schema.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
from vigilar.storage.schema import wildlife_sightings
|
||||||
|
|
||||||
|
|
||||||
|
def test_wildlife_sightings_has_temperature():
|
||||||
|
assert "temperature_c" in [c.name for c in wildlife_sightings.columns]
|
||||||
|
|
||||||
|
|
||||||
|
def test_wildlife_sightings_has_conditions():
|
||||||
|
assert "conditions" in [c.name for c in wildlife_sightings.columns]
|
||||||
|
|
||||||
|
|
||||||
|
def test_wildlife_sightings_has_bbox():
|
||||||
|
assert "bbox" in [c.name for c in wildlife_sightings.columns]
|
||||||
@ -165,6 +165,9 @@ wildlife_sightings = Table(
|
|||||||
Column("confidence", Float),
|
Column("confidence", Float),
|
||||||
Column("crop_path", String),
|
Column("crop_path", String),
|
||||||
Column("event_id", Integer),
|
Column("event_id", Integer),
|
||||||
|
Column("temperature_c", Float),
|
||||||
|
Column("conditions", String),
|
||||||
|
Column("bbox", String), # JSON [x, y, w, h] normalized
|
||||||
)
|
)
|
||||||
Index("idx_wildlife_ts", wildlife_sightings.c.ts.desc())
|
Index("idx_wildlife_ts", wildlife_sightings.c.ts.desc())
|
||||||
Index("idx_wildlife_threat", wildlife_sightings.c.threat_level, wildlife_sightings.c.ts.desc())
|
Index("idx_wildlife_threat", wildlife_sightings.c.threat_level, wildlife_sightings.c.ts.desc())
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user