Skip to content

Commit

Permalink
Rm LAT / LONG from env var
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronan committed Sep 16, 2024
1 parent 5c38997 commit 410e9e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
7 changes: 2 additions & 5 deletions pyroengine/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ def __init__(
conf_thresh: float = 0.25,
api_host: Optional[str] = None,
cam_creds: Optional[Dict[str, Dict[str, str]]] = None,
latitude: Optional[float] = None,
longitude: Optional[float] = None,
nb_consecutive_frames: int = 4,
frame_size: Optional[Tuple[int, int]] = None,
cache_backup_period: int = 60,
Expand All @@ -88,9 +86,8 @@ def __init__(

# API Setup
if isinstance(api_host, str):
assert isinstance(latitude, float) and isinstance(longitude, float) and isinstance(cam_creds, dict)
self.latitude = latitude
self.longitude = longitude
assert isinstance(cam_creds, dict)

self.api_client = {}
if isinstance(api_host, str) and isinstance(cam_creds, dict):
# Instantiate clients for each camera
Expand Down
6 changes: 1 addition & 5 deletions src/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ def main(args):
# .env loading
load_dotenv(".env")
API_URL = os.environ.get("API_URL")
LAT = float(os.environ.get("LAT"))
LON = float(os.environ.get("LON"))
assert isinstance(API_URL, str) and isinstance(LAT, float) and isinstance(LON, float)
assert isinstance(API_URL, str)
CAM_USER = os.environ.get("CAM_USER")
CAM_PWD = os.environ.get("CAM_PWD")
assert isinstance(CAM_USER, str) and isinstance(CAM_PWD, str)
Expand Down Expand Up @@ -60,8 +58,6 @@ def main(args):
args.thresh,
API_URL,
splitted_cam_creds,
LAT,
LON,
cache_folder=args.cache,
backup_size=args.backup_size,
nb_consecutive_frames=args.nb_consecutive_frames,
Expand Down

0 comments on commit 410e9e6

Please sign in to comment.