Skip to content

Releases: pyronear/pyro-api

v1.0.0

17 Apr 06:52
39a1101

Choose a tag to compare

What's Changed

Breaking Changes 🛠

  • refactor: Renamed yaw to azimuth by @frgfm in #219
  • docs: Improves README and documentation by @frgfm in #227
  • refactor: Removed nginx and refactors imports by @frgfm in #239
  • test: Adds extensive test for the client and fixed alert endpoint by @frgfm in #240
  • refactor(models): implement the new data model by @frgfm in #322
  • New Data Model : Add an Organization table by @RonanMorgan in #332

New Features ✨

  • feat: Adds timeout to Python client requests by @frgfm in #254
  • Add support for a s3 bucket proxy by @Nastaliss in #287
  • feat: Adds localization column in the alerts table by @frgfm in #267
  • ci: Adds autopush to dockerhub on commit by @frgfm in #303
  • feat: Improve dev experience by using local S3 by @Acruve15 in #244
  • ci: Adds CI job to deploy to dev server by @frgfm in #305
  • feat: Adds product analytics on most of the routes by @frgfm in #307
  • feat(main): add a new endpoint for status by @RonanMorgan in #319
  • feat(detections): add bboxes column to detection and a route to fetch unacknowledged ones by @RonanMorgan in #340
  • feat(webhooks): add webhook mechanism on detection creation by @frgfm in #367
  • feat(cameras): add a route to update the last known image of a camera by @frgfm in #371
  • feat(organizations): add optional Telegram notifications for detections by @frgfm in #381
  • feat(sequences): create a table for easy detection aggregation by @frgfm in #405
  • feat(sequences): implement the frontend-specific routes by @frgfm in #412
  • feat(sequences): add detection cone in sequence fetching routes by @frgfm in #458
  • feat(cameras): add PATCH route to edit camera location by @frgfm in #465
  • feat(cameras): add PATCH route to edit name value by @frgfm in #467
  • feat(cameras): add last image URLs when fetching all cameras by @frgfm in #475
  • feat(sequences): add limit and desc params in fetch_sequence_detections by @frgfm in #483

Bug Fixes 🐛

  • docs: Fixes the hyperlink to CONTRIBUTING in the README by @fe51 in #212
  • chore: Fixed URL in conda recipe by @frgfm in #218
  • fix: Fixed arg naming for location updating by @frgfm in #223
  • fix: Updated POST request structure to retrieve token by @fe51 in #215
  • docs: fix link to CONTRIBUTING by @blenzi in #232
  • docs: fix link to contributing in client/README.md by @blenzi in #233
  • fix: Fixed bucket interactions for S3 by @frgfm in #241
  • ci: Makes script job independent form tests by @frgfm in #255
  • fix: Fixes media deletion route by checking bucket file existence by @frgfm in #260
  • fix: authentication, alert payload and exception handling in api_e2e.py by @blenzi in #245
  • fix: Fixes the parsing of datetime by @frgfm in #262
  • fix: Fixes access ID resolution on media URL resolution by @frgfm in #264
  • fix: replace using endpoint-url, not bucket-name by @Nastaliss in #293
  • fix: Adds missing reference to the endpoint_url for the S3 proxy by @Nastaliss in #294
  • ci: Removes dangling images on remote server by @frgfm in #308
  • ci(push): fix workflow syntax for push job by @frgfm in #360
  • ci(push): fix continuous deployment by @frgfm in #372
  • Fix redirect error when calling cameras/ by @RonanMorgan in #383
  • Fix fetch unlabeled detections endpoint by @RonanMorgan in #366
  • Add a prefix to bucket name by @RonanMorgan in #382
  • fix(config): make support email optional by @frgfm in #403
  • fix(detections): allow azimuth=0 for the detection table by @frgfm in #414

Dependencies

  • chore(deps): bump requests from 2.28.2 to 2.31.0 by @dependabot[bot] in #257
  • chore(deps-dev): bump gitpython from 3.1.31 to 3.1.34 by @dependabot[bot] in #284
  • chore(deps-dev): bump gitpython from 3.1.34 to 3.1.35 by @dependabot[bot] in #285
  • chore(deps): bump certifi from 2023.5.7 to 2023.7.22 by @dependabot[bot] in #286
  • chore(deps): bump urllib3 from 1.26.16 to 1.26.17 by @dependabot[bot] in #288
  • chore(deps-dev): bump gitpython from 3.1.35 to 3.1.37 by @dependabot[bot] in #292
  • chore(deps): bump urllib3 from 1.26.17 to 1.26.18 by @dependabot[bot] in #295
  • chore(deps): bump the gh-actions group with 6 updates by @dependabot[bot] in #326
  • chore(deps-dev): bump ruff from 0.4.6 to 0.4.7 by @dependabot[bot] in #328
  • build(deps-dev): bump ruff from 0.4.7 to 0.4.9 by @dependabot[bot] in #331
  • build(deps-dev): bump ruff from 0.4.9 to 0.4.10 by @dependabot[bot] in #333
  • build(deps-dev): bump ruff from 0.4.10 to 0.5.0 by @dependabot[bot] in #337
  • build(deps): bump requests & idna to security compliant versions by @frgfm in #338
  • build(deps): bump urllib3 from 1.26.18 to 1.26.19 by @frgfm in #339
  • build(deps-dev): bump ruff from 0.5.0 to 0.5.1 by @dependabot[bot] in #341
  • build(deps-dev): bump ruff from 0.5.1 to 0.5.2 by @dependabot[bot] in #347
  • build(deps-dev): bump pre-commit from 3.7.0 to 3.8.0 by @dependabot[bot] in #353
  • build(deps-dev): bump ruff from 0.5.2 to 0.6.2 by @dependabot[bot] in #359
  • build(deps-dev): bump ruff from 0.6.2 to 0.6.6 by @dependabot[bot] in #370
  • build(deps-dev): bump ruff from 0.6.6 to 0.7.1 by @dependabot[bot] in #380
  • build(deps): bump the gh-actions group across 1 directory with 3 updates by @dependabot[bot] in #391
  • build(deps): bump JamesIves/github-pages-deploy-action from 4.7.1 to 4.7.2 in the gh-actions group by @dependabot[bot] in #396
  • build(deps-dev): bump pre-commit from 3.8.0 to 4.0.1 by @dependabot[bot] in #378
  • build(deps-dev): bump ruff from 0.7.1 to 0.8.6 by @dependabot[bot] in #398
  • build(deps-dev): bump ruff from 0.8.6 to 0.9.1 by @dependabot[bot] in #406
  • build(deps): bump sqlmodel from 0.0.16 to 0.0.22 by @dependabot[bot] in #410
  • build(deps): bump uvicorn from 0.23.2 to 0.34.0 by @dependabot[bot] in #411
  • build(deps-dev): bump pytest from 7.4.3 to 8.3.4 by @dependabot[bot] in #409
  • build(deps): bump abatilo/actions-poetry from 3 to 4 by @dependabot[bot] in #408
  • build(deps-dev): bump ruff from 0.9.1 to 0.9.2 by @dependabot[bot] in #415
  • build(deps-dev): bump pytest from 8.3.4 to 8.3.5 by @dependabot[bot] in #437
  • build(deps-dev): bump ruff from 0.9.2 to 0.9.9 by @dependabot[bot] in #436
  • build(deps): bump astral-sh/setup-uv from 5 to 6 by @dependabot[bot] in #462
  • build(deps): bump appleboy/ssh-action from 1.2.0 to 1.2.2 by @dependabot[bot] in #440
  • build(deps): bump webfactory/ssh-agent from 0.9.0 to 0.9.1 by @dependabot[bot] in #443
  • build(deps): bump JamesIves/github-pages-deploy-action from 4.7.2 to 4.7.3 by @dependabot[bot] in https://github.com/pyronear/pyro-api/pull...
Read more

v0.1.2: Stabilized API for production services

01 Jul 15:22
3bb7890

Choose a tag to compare

This patch release stabilizes the package environment & the tables for production.

Note: the backend mainly requires FastAPI 0.78.0, while the client only requires requests.

Highlights

⚙️ Package management

For development purposes, it is normal to have loose version specifiers. However for production, each version update needs to be inspected carefully. For this reason, we transitioned from loose requirements.txt version specifiers to Poetry (#198).

Poetry is a package management tool that will "lock" our dependencies to a fixed environment by resolving all parent packages. This produces a poetry.lock file that has fixed versions, which can be inspected by the Dependabot for security alerts.

🎨 Client documentation

For clarity, the previous documentation of the API client was changed from Read the Docs to Furo (#193).

image

This also comes with new features: dark mode, edit button, etc.

🎼 Code quality

Significant improvements to the codebase have been made in this release (#189, #193):

  • quality tools: added isort, mypy and black
  • test tools: switched from unittests to pytest
  • contribution tools: added Makefile
  • other: added header verification, and PR label verification

✨ New tables & routes

Routes

  • devices: get_my_device, update_device_hash (#151)
  • events: fetch_past_events (#116)
  • sites: create_noalert_site (#130)

Tables

  • alerts: added azimuth (#129)
  • devices: added angle_of_view (#134) software_hash (#137)
  • events: added is_acknowledged (#170)
  • groups: created (#137)
  • installation: added is_trustworth (#127)
  • sites: added "no_alert" as possible value of type (#130)
  • webhooks: created (#152)

Breaking changes

Deprecated routes

The following routes were deprecated:

  • alerts: update_alert, link_media (#208)
  • media: update_media (#208)

Table modifications

The following tables were modified:

  • alerts: removed type (#142), is_acknowledged (#170), made device_id & media_id mandatory and non-nullable (#208)
  • accesses: made group_id mandatory (#153)
  • devices: modified value range of yaw (#185)
  • installation: removed lat, lon, elevation, yaw, pitch (#143)

What's Changed

Breaking Changes 🛠

  • refactored: Removed alert type field by @frgfm in #142
  • refactor: Removed location fields from the installation table by @frgfm in #143
  • refactor: Make group_id mandatory by @florianriche in #153
  • refactor: Moved is_acknowledged from alert to event table by @frgfm in #170
  • refactor: Moved azimuth angle from (-180, +180) to (0, 360) by @frgfm in #185
  • feat: Added max request response size for fetch routes by @frgfm in #190
  • fix: Fixed route update mechanism by @frgfm in #208

New Features 🚀

  • chore: Updated license from GPLv3 to Apache 2.0 by @frgfm in #111
  • feat: Added route to fetch past fires by @frgfm in #116
  • feat: Added is_trustworthy boolean field to installation table by @frgfm in #127
  • feat: Added azimuth float field to alert table by @frgfm in #129
  • feat: Added no_alert type to Sites by @frgfm in #130
  • [Client][Site] add no alert site in client by @florianriche in #133
  • feat: Added angle_of_view to the device table by @frgfm in #134
  • Database migration with alembic by @jean-pasquier in #112
  • feat: add group object by @florianriche in #137
  • feat: Added event existence check upon alert creation by @frgfm in #149
  • feat: Added webhook system and alert notifications to third-parties by @frgfm in #152
  • feat: Added software_hash for device update check by @frgfm in #151
  • chore: Added a job to push docker to DockerHub by @frgfm in #155
  • feat: Added nginx configuration in docker orchestration by @frgfm in #174
  • Code of conduct by @fe51 in #188

Bug Fixes 🐛

Improvements

  • Crud refactoring & db transactions by @jean-pasquier in #90
  • docs: Added detailed examples in client documentation by @frgfm in #115
  • feat: Added admin scopes to alert routes by @frgfm in #122
  • feat: Added admin scopes to device routes by @frgfm in #121
  • feat: Added admin scopes to installation routes by @frgfm in #120
  • feat: Added proper scopes to media routes by @frgfm in #118
  • Add security admin scope requirement on accesses routes by @jean-pasquier in #104
  • Align devices update by @jean-pasquier in #113
  • test: Fixed unittests scoping issues by @frgfm in #138
  • refactor: Removed the "me" scope and replace it with "user" by @frgfm in #141
  • feat: Added group_id to access table by @frgfm in #144
  • feat: add missing link between site and group by @florianriche in #147
  • Add function to check for group by @florianriche in #148
  • Client: Add azimuth in alerts functions by @florianriche in #157
  • Refactor: Use SQLAlchemy models instead of Table Declaration by @florianriche in #156
  • Refactor: Use SQLAlchemy models instead of Table Declaration (after fix) by @florianriche in #162
  • chore: Reduced python version of the client to 3.6 by @florianriche in #163
  • [Groups] Add group logic to remaining routes by @florianriche in #167
  • feat: Added console log to notify that Sentry is enabled by @frgfm in #172
  • test: Extended client unittests by @frgfm in #175
  • fix: Fixed schemas typing by @frgfm in #178
  • feat: Added token refresh method to client by @frgfm in #180
  • feat: Specified HTTP status code and error messages by @frgfm in #182
  • refactor: Cleaned codebase and improve code quality by @frgfm in #189
  • ci: Optimized CI cache by @frgfm in #191
  • ci: Updated funding from OpenCollective to Github by @frgfm in #192
  • refactor: Cleaned docker orchestration and code style by @frgfm in #193
  • chore: Pinned versions using poetry by @frgfm in #198
  • ci: Removed version update for dependabot by @frgfm in #206
  • fix: Fixed media duplication by @frgfm in #207
  • docs: Fixes README badge and client documentation by @frgfm in #209

Full Changelog: v0.1.1...v0.1.2

End-to-end API & client support

23 Dec 23:09
0edaf2d

Choose a tag to compare

This release extends considerably the support of the API by the client, and introduces media upload and download efficiently from cloud storage.

Note: pyroapi 0.1.1 mainly requires fastapi, uvicorn and sqlalchemy, while the client only requires requests.

Highlights

Routers

Core API server implementation
New

  • Alerts: added alert acknowledgement route (#82)
  • Devices: added a route to register the user's own device (#80)

Improvements

  • Alerts: added media existence check (#77), and updated scopes (#99)
  • Events: updates scopes of existing routes (#59, #99)
  • Installations: changed method type of device listing route (#72), and updated scopes (#99)
  • Media: added proper exceptions when upload fails (#96), updated media naming (#98, #100), updated scopes (#99), added integrity check of content transfer (#102)
  • Sites: updated scopes of existing routes (#58), updated scopes (#99)

Fixes

  • Events: fixed scope checks in creation and update routes (#85)
  • Installations: fixed active devices listing route (#69, #81)
  • Devices: added access deletion (#76), checked login consistency with access table (#83)
  • Media: fixed upload route (#95)
  • Users: added access deletion (#76), checked login consistency with access table (#83)

Database

SQL server running to get persistence over API data
New

  • Added field for acknowledgement state of alerts (#82)

Improvements

  • Made access login unique (#76)

Tests

Unittests for the core API
New

  • Added end-to-end script CI job (#89)

Improvements

  • Added full postgre-SQL DB testing (#68, #70)

Services

Third-party services enabled in the API
New

  • Added Qarnot storage integration (#87)

Documentation

The documentation of the API server
Improvements

  • Added route summary and descriptions (#78)

Client

The python client package for easier usage of the API
New

  • Added integration of event creation, alert & media creation from device, media upload (#77), alert acknowledgement (#93)
  • Added unittests for client methods (#74)

Improvements

  • Added typing to all methods (#74)

Fixes

  • Fixed route mapping of devices (#86)

Others

  • Separated production and dev requirements (#73)
  • Added sentry integration (#71)
  • Added funding option

Alert management API & client

26 Nov 16:33
d0952ad

Choose a tag to compare

This first release introduces basic operations on the background database, as well as a python API client for easier usage.

Note: pyroclient 0.1.0 mainly requires fastapi, uvicorn and sqlalchemy, while the client only requires requests.

Highlights

Routers

Core API server implementation
New

Database

SQL server running to get persistence over API data
New

Tests

Unittests for the core API
New

Services

Third-party services enabled in the API
New

  • Added storage service connection (#20, #62)

Documentation

The documentation of the API server
New

Client

The python client package for easier usage of the API
New

  • Created a Python client for device interactions (#43), and web-platform interactions (#62)
  • Added sphinx-built documentation (#48)

Others

New

  • Added Docker build (#2, #7, #27)
  • Added automatic deployment on Heroku (#4)