pyro-api icon indicating copy to clipboard operation
pyro-api copied to clipboard

Refactor Detections : Add acknowledged endpoint and localization parameter

Open RonanMorgan opened this issue 1 year ago • 4 comments

Add the acknowledged boolean in the table Detection and a new endpoint. It will allow the plateform to know if a Detection has been acknowledged by a User.

RonanMorgan avatar Jul 04 '24 19:07 RonanMorgan

hello @frgfm ,

We only display alerts for the current day (i.e. less than 24 hours).

Then, after discussion with the firefighters, I've come up with the idea of an archive tab for viewing past alerts

All alerts from yesterday or before and all acknowledge alerts will be present in the archive.

MateoLostanlen avatar Jul 15 '24 04:07 MateoLostanlen

Would you mind resolving the conflicts please? The review tab mixes several PR and things already merged on main :sweat_smile:

frgfm avatar Jul 15 '24 12:07 frgfm

done :)

RonanMorgan avatar Jul 15 '24 13:07 RonanMorgan

Codecov Report

Attention: Patch coverage is 83.09859% with 12 lines in your changes missing coverage. Please review.

Project coverage is 87.01%. Comparing base (88d3dd9) to head (1a9491f). Report is 1 commits behind head on main.

Files Patch % Lines
src/app/crud/base.py 58.82% 7 Missing :warning:
src/app/api/api_v1/endpoints/detections.py 86.36% 3 Missing :warning:
client/pyroclient/client.py 86.66% 2 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #340      +/-   ##
==========================================
- Coverage   87.71%   87.01%   -0.71%     
==========================================
  Files          31       31              
  Lines         741      801      +60     
==========================================
+ Hits          650      697      +47     
- Misses         91      104      +13     
Flag Coverage Δ
backend 86.62% <81.81%> (-0.72%) :arrow_down:
client 91.80% <87.50%> (-1.68%) :arrow_down:

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.

codecov[bot] avatar Jul 15 '24 13:07 codecov[bot]

Here is a recap, after modifications, of what the PR introduces:

  • add a "bboxes" string column in the detections table, regex verified to avoid troubles
  • add a route to fetch unlabeled detections
  • update the client accordingly, and add a fetch_unlabeled_detections method
  • update client, backend & e2e tests accordingly
  • for migrations, only a minor fix, we'll create a clean one once we have enough to release & deploy (better to have 1 migration per production deploy)

frgfm avatar Aug 23 '24 18:08 frgfm

cf. #304

frgfm avatar Aug 24 '24 09:08 frgfm