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).
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
andblack
- test tools: switched from
unittests
topytest
- 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:
Table modifications
The following tables were modified:
- alerts: removed
type
(#142),is_acknowledged
(#170), madedevice_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 🐛
- fix: Fixed end-to-end script by @frgfm in #135
- chore: Upgraded Python to 3.7 by @florianriche in #159
- fix: Revert "Refactor: Use SQLAlchemy models instead of Table Declaration" by @florianriche in #160
- fix: Fixed Heroku runtime and SQLAlchemy specs by @frgfm in #161
- feat: add default group_id by @florianriche in #164
- [Sites] Fix noAlertSite route creation with default group_id by @florianriche in #165
- [groups] Add group logic to fetching routes by @florianriche in #166
- docs: Fixed client docstring examples by @frgfm in #173
- fix: Fixed client header refresh by @frgfm in #181
- fix: Fixed media registration inconsistency by @frgfm in #187
- fix: Fixed client package name by @frgfm in #196
- docs: Fixed author entry in pyproject by @frgfm in #197
- docs: Fixed URL of client documentation by @frgfm in #210
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