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 limit and offset parameters to routes that fetch lists from db #277

Open blenzi opened 1 year ago

blenzi commented 1 year ago

This PR adds limit and offset parameters with descriptions, to all routes that fetch lists from db (fix #243, fix #250). Also:

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 #277 (a94ceb9) into main (fa2624d) will increase coverage by 0.16%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #277      +/-   ##
==========================================
+ Coverage   95.12%   95.28%   +0.16%     
==========================================
  Files          63       66       +3     
  Lines        1497     1549      +52     
==========================================
+ Hits         1424     1476      +52     
  Misses         73       73              
Flag Coverage Δ
client 100.00% <ø> (?)
unittests 95.05% <100.00%> (-0.08%) :arrow_down:

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

Files Changed Coverage Δ
src/app/api/crud/base.py 100.00% <100.00%> (ø)
src/app/api/endpoints/accesses.py 100.00% <100.00%> (ø)
src/app/api/endpoints/alerts.py 98.50% <100.00%> (-0.13%) :arrow_down:
src/app/api/endpoints/devices.py 98.70% <100.00%> (-0.05%) :arrow_down:
src/app/api/endpoints/events.py 100.00% <100.00%> (ø)
src/app/api/endpoints/groups.py 100.00% <100.00%> (ø)
src/app/api/endpoints/installations.py 100.00% <100.00%> (ø)
src/app/api/endpoints/media.py 85.33% <100.00%> (-0.57%) :arrow_down:
src/app/api/endpoints/notifications.py 96.42% <100.00%> (+0.13%) :arrow_up:
src/app/api/endpoints/recipients.py 100.00% <100.00%> (ø)
... and 3 more

... and 3 files with indirect coverage changes

blenzi commented 1 year ago

/quack review