pyronear / pyronear/pyro-engine

Harmonize `cam_id` vs `camera_ip` naming in pyro_camera_api

Open Beginner friendly
#368 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.