Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #548 +/- ##
==========================================
+ Coverage 88.14% 88.89% +0.75%
==========================================
Files 50 52 +2
Lines 1990 2197 +207
==========================================
+ Hits 1754 1953 +199
- Misses 236 244 +8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@MateoLostanlen can you review and test it ? |
MateoLostanlen
left a comment
There was a problem hiding this comment.
Hello Felix,
Thanks for the PR. I tested it and everything works great except for run_focus_finder, because of the times out (see my coment)
However, I’m not a huge fan of duplicating the client code. In my opinion it would be cleaner to install it directly from pyro-engine. Did you do it this way for a specific reason?
| return await _request("GET", device_ip, "/focus/status", params={"camera_ip": camera_ip}) | ||
|
|
||
|
|
||
| async def run_focus_finder(device_ip: str, camera_ip: str, save_images: bool = False) -> Any: |
There was a problem hiding this comment.
you need bigger timeout here as it is done here https://github.com/pyronear/pyro-engine/blob/c1fdf2aeee319b8a9e87635496d58d0ce0f8bb67/pyro_camera_api/client/pyro_camera_api_client/client.py#L235
the process is quite long
Summary
This PR introduces camera device proxy endpoints.
It secures api camera interaction, by using same right as in the API, and forwwarding request to devices via the VPN.
Changes
New files
Modified files
pyproject.toml — suppressed ANN401 for camera_client.py and camera_proxy.py; these functions return opaque third-party JSON, so Any is correct by design, not a laziness
Tests
Design decisions
Happy to discuss it