* Set up for http tests
* Setup basics for testing and first test
* Add testing consts
* Cleanup db creation
* Add one more check to test
* Get event that does not exist
* Get events working with cleaner db
* Test retain / un-retain
* Test setting and deleting sub label
* Test getting list of sub labels
* Fix bug caught in tests
* Test deleting event
* Test geting list of events
* Expand test
* Test more event filters
* Write version module so tests don't fail on version import
* Test config
* Test recordings endpoint
* Formatting
* Remove unused imports
* Test stats
* Add cleanup files in const
* Add name to match other checks
* Add camera level processing for birdseye
* Add camera level birdseye configruation
* Propogate birdseye from global
* Update docs to show that birdseye is overridable
* Fix incorrect default factory
* Update note to indicate values that can be overridden
* Cleanup config accessing
* Add tests for birdseye config behavior
* Fix mistake on test format
* Update tests
* Add object ratio config parameters
Issue: #2948
* Add config test for object filter ratios
Issue: #2948
* Address review comments
- Accept `ratio` default
- Rename `bounds` to `box` for consistency
- Add migration for new field
Issue: #2948
* Fix logical errors
- field migrations require default values
- `clipped` referenced the wrong index for region, since it shifted
- missed an inclusion of `ratio` for detections in `process_frames`
- revert naming `o[2]` as `box` since it is out of scope!
This has now been test-run against a video, so I believe the kinks are
worked out.
Issue: #2948
* Update contributing notes for `make`
Issue: #2948
* Fix migration
- Ensure that defaults match between Event and migration script
- Deconflict migration script number (from rebase)
Issue: #2948
* Filter objects out of ratio bounds
Issue: #2948
* Update migration file to 009
Issue: #2948
* 📝✅🔧 - Make RTMP config global
Fixes#1671
* 📝✅🔧 - Make timestamp style config global
Fixes#1656
* fix test function names
* formatter
Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
Use config data classes to eliminate some of the boilerplate associated
with setting up the configuration. In particular, using dataclasses
removes a lot of the boilerplate around assigning properties to the
object and allows these to be easily immutable by freezing them. In the
case of simple, non-nested dataclasses, this also provides more
convenient `asdict` helpers.
To set this up, where previously the objects would be parsed from the
config via the `__init__` method, create a `build` classmethod that does
this and calls the dataclass initializer.
Some of the objects are mutated at runtime, in particular some of the
zones are mutated to set the color (this might be able to be refactored
out) and some of the camera functionality can be enabled/disabled. Some
of the configs with `enabled` properties don't seem to have mqtt hooks
to be able to toggle this, in particular, the clips, snapshots, and
detect can be toggled but rtmp and record configs do not, but all of
these configs are still not frozen in case there is some other
functionality I am missing.
There are a couple other minor fixes here, one that was introduced
by me recently where `max_seconds` was not defined, the other to
properly `get()` the message payload when handling publishing mqtt
messages sent via websocket.