feat: fields and methods to set event type (wildfire or something else)
This PR adds the possibility to set an event type, different than wildfire. This event assessment is currently done via pyro-platform but this information is only stored locally (in the machine running it).
- add options to EventType enum: domestic fire, chimney, cloud, other, undefined (default)
- add type_set_by and type_set_ts to events table
- add PUT /events/{event_id}/type endpoint and
set_event_typemethod to client
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 95.43%. Comparing base (
5f735c3) to head (3abe13c). Report is 57 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #291 +/- ##
==========================================
+ Coverage 95.35% 95.43% +0.07%
==========================================
Files 66 66
Lines 1571 1598 +27
==========================================
+ Hits 1498 1525 +27
Misses 73 73
| Flag | Coverage Δ | |
|---|---|---|
| client | 100.00% <100.00%> (ø) |
|
| unittests | 95.20% <100.00%> (+0.08%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks for the PR! I'm aligned with everything apart from the "set_by" and "set_ts". I think we're mixing the role of APM (being able to access logs / interactions) vs. what needs to be recorded in the DB. My suggestion:
- simply removing the set columns
- I can come up with a PR to add a cool APM I've been using (posthog) where we can explore events like those
Here is a screenshot once it's set:
Closing as this was for the legacy data model, feel free to reopen if I missed something!