Update dev contrib docs with Python checks (#22419)

This commit is contained in:
leccelecce 2026-03-13 14:16:10 +00:00 committed by GitHub
parent 614a6b39d4
commit d2b2faa2d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -89,6 +89,14 @@ After closing VS Code, you may still have containers running. To close everythin
### Testing ### Testing
#### Unit Tests
GitHub will execute unit tests on new PRs. You must ensure that all tests pass.
```shell
python3 -u -m unittest
```
#### FFMPEG Hardware Acceleration #### FFMPEG Hardware Acceleration
The following commands are used inside the container to ensure hardware acceleration is working properly. The following commands are used inside the container to ensure hardware acceleration is working properly.
@ -125,6 +133,28 @@ ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format
ffmpeg -c:v h264_qsv -re -stream_loop -1 -i https://streams.videolan.org/ffmpeg/incoming/720p60.mp4 -f rawvideo -pix_fmt yuv420p pipe: > /dev/null ffmpeg -c:v h264_qsv -re -stream_loop -1 -i https://streams.videolan.org/ffmpeg/incoming/720p60.mp4 -f rawvideo -pix_fmt yuv420p pipe: > /dev/null
``` ```
### Submitting a pull request
Code must be formatted, linted and type-tested. GitHub will run these checks on pull requests, so it is advised to run them yourself prior to opening.
**Formatting**
```shell
ruff format frigate migrations docker *.py
```
**Linting**
```shell
ruff check frigate migrations docker *.py
```
**MyPy Static Typing**
```shell
python3 -u -m mypy --config-file frigate/mypy.ini frigate
```
## Web Interface ## Web Interface
### Prerequisites ### Prerequisites