pyronear / pyro-api

Alert Management API for wildfire prevention, detection & monitoring. Built with FastAPI & PostgreSQL
Apache License 2.0
21 stars 9 forks source link

feat: add fields to store when an event was acknowledged and by whom #278

Open blenzi opened 1 year ago

blenzi commented 1 year ago

To address #274 , this PR adds acknowledged_ts and acknowledged_by to events table

ghost commented 1 year ago

Nice of you to open a PR :pray: When you're ready and want to get it reviewed, post a comment in this Pull Request with this message: /quack review

codecov[bot] commented 1 year ago

Codecov Report

Merging #278 (6d67f43) into main (fa2624d) will increase coverage by 0.26%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #278      +/-   ##
==========================================
+ Coverage   95.12%   95.38%   +0.26%     
==========================================
  Files          63       66       +3     
  Lines        1497     1582      +85     
==========================================
+ Hits         1424     1509      +85     
  Misses         73       73              
Flag Coverage Δ
client 100.00% <ø> (?)
unittests 95.15% <100.00%> (+0.03%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
src/app/api/endpoints/events.py 100.00% <100.00%> (ø)
src/app/models/event.py 95.83% <100.00%> (+0.59%) :arrow_up:
src/app/models/user.py 93.75% <100.00%> (+0.41%) :arrow_up:
src/app/schemas/events.py 100.00% <100.00%> (ø)

... and 3 files with indirect coverage changes

blenzi commented 1 year ago

Thanks @fe51 ! There was a problem that caused the client tests to fail: I was recording the access_id instead of the user_id in events/acknowledge_by. This is fixed now.

fe51 commented 1 year ago

Thanks a lot @blenzi