-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(sequences): implement the frontend-specific routes #412
Conversation
Thanks for the PR @frgfm As discussed together I'm ok with the strategy The code logic looks good to me, I don't know SQL so it's hard to say more without testing :) You're missing the route for acknowledge, aren't you? Good point about teegram, can you open an issue maybe? I'll let you see about the test that fails PS: You should remove the test required in 3.9 |
The point was that this would be
done |
Ok my bad I missed that, event better I will make the change on the platform ! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #412 +/- ##
==========================================
- Coverage 85.56% 85.23% -0.34%
==========================================
Files 38 38
Lines 1053 1097 +44
==========================================
+ Hits 901 935 +34
- Misses 152 162 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This PR follows up on #405, and implements the final steps for the interactions with detections and sequences. I haven't implemented / updated the unit tests for now but used the end-to-end script to ensure this works well.
Data model
A few changes:
Here is the updated version: https://dbdiagram.io/d/Pyronear-Alert-Schema-671e1b9897a66db9a3673d76
Route updates
GET detections/unlabeled/fromdate
andPATCH detections/DET_ID/label
PATCH sequences/SEQ_ID/label
,GET sequences/unlabeled/latest
(last 15 unlabeled sequences from last 24 hours),GET sequences/all/fromdate
(all sequences from a specific date), andGET sequences/SEQ_ID/detections
(fetch the last 10 detections from that sequence with their URL)Creation/update logic
GET sequences/SEQ_ID/detections
, the sequences route returns Sequences. So you'll have to use that route to fetch the detections, but it's fastReview suggestion
models.py
in the first commitOther considerations
I haven't put the camera name in the sequences yet, I'll do it when finalizing the PR if that's alright.