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: Added support of alternative S3 storage #220

Closed frgfm closed 2 years ago

frgfm commented 2 years ago

This PR adds support for alternative S3 storage interfaces, and refactors QarnotBucket as an S3Bucket. Additionally, this PR improves the media upload route:

Any feedback is welcome!

codecov[bot] commented 2 years ago

Codecov Report

Merging #220 (fb06278) into master (e4edd58) will increase coverage by 0.55%. The diff coverage is 60.93%.

@@            Coverage Diff             @@
##           master     #220      +/-   ##
==========================================
+ Coverage   93.52%   94.07%   +0.55%     
==========================================
  Files          46       47       +1     
  Lines        1281     1282       +1     
==========================================
+ Hits         1198     1206       +8     
+ Misses         83       76       -7     
Flag Coverage Δ
unittests 94.07% <60.93%> (+0.55%) :arrow_up:

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

Impacted Files Coverage Δ
src/app/services/bucket/s3.py 45.65% <45.65%> (ø)
src/app/api/routes/media.py 86.84% <100.00%> (+3.29%) :arrow_up:
src/app/api/security.py 100.00% <100.00%> (ø)
src/app/config.py 94.28% <100.00%> (+0.73%) :arrow_up:
src/app/services/bucket/__init__.py 100.00% <100.00%> (ø)
src/app/services/bucket/qarnot.py 100.00% <100.00%> (+49.15%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.