pyronear / pyronear/pyro-engine
Harmonize `cam_id` vs `camera_ip` naming in pyro_camera_api
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 19
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
Several call sites in pyro_camera_api use cam_id as a loop variable when iterating dicts keyed by camera IP (CAMERA_REGISTRY, PATROL_FLAGS, STUCK_CHECK_FLAGS, stream_workers, stream_processes, RAW_CONFIG, ...). This is misleading: cam_id is used elsewhere in the project for the camera-pose identifier ("{ip}_{p}"), not for plain IPs.
The loop functions in camera/patrol.py and camera/stuck_detector.py already use camera_ip correctly — the call sites should match.
Files to update: pyro_camera_api/main.py, api/routes_stream.py, api/routes_cameras.py.
Pure rename, no behavior change. Spotted while reviewing #360.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the cam_id usages in pyro_camera_api/main.py, api/routes_stream.py, and api/routes_cameras.py. Compare them with the camera_ip loop variables in camera/patrol.py and camera/stuck_detector.py, then run the relevant tests or checks. Done means misleading loop-variable names are renamed without changing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend-api-design
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100