From 1e42c69b786579728143fab002d202483e8d3b61 Mon Sep 17 00:00:00 2001 From: Ian Renton Date: Sat, 20 Jun 2026 08:33:00 +0100 Subject: [PATCH] Clear up one TODO and update comments on some more --- core/config.py | 15 +++++++-------- spotproviders/hema.py | 3 ++- spotproviders/wwff.py | 3 ++- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/core/config.py b/core/config.py index ac6469a..7aac959 100644 --- a/core/config.py +++ b/core/config.py @@ -14,15 +14,14 @@ with open("config.yml") as f: config = yaml.safe_load(f) logging.info("Loaded config.") -# TODO load other keys with config.get(key, default) instead of config[key] -BASE_URL = config["base-url"] -MAX_SPOT_AGE = config["max-spot-age-sec"] -MAX_ALERT_AGE = config["max-alert-age-sec"] -SERVER_OWNER_CALLSIGN = config["server-owner-callsign"] -WEB_SERVER_PORT = config["web-server-port"] -ALLOW_SPOTTING = config["allow-spotting"] +BASE_URL = config.get("base-url", "http://localhost:8080") +MAX_SPOT_AGE = config.get("max-spot-age-sec", 3600) +MAX_ALERT_AGE = config.get("max-alert-age-sec", 604800) +SERVER_OWNER_CALLSIGN = config.get("server-owner-callsign", "N0CALL") +WEB_SERVER_PORT = config.get("web-server-port", 8080) +ALLOW_SPOTTING = config.get("allow-spotting", True) ALLOW_UPSTREAM_SPOTTING = config.get("allow-upstream-spotting", True) -WEB_UI_OPTIONS = config["web-ui-options"] +WEB_UI_OPTIONS = config.get("web-ui-options", {}) API_ONLY_MODE = config.get("api-only-mode", False) RECAPTCHA_SECRET_KEY = config.get("recaptcha-secret-key", "") RECAPTCHA_SITE_KEY = config.get("recaptcha-site-key", "") diff --git a/spotproviders/hema.py b/spotproviders/hema.py index a59c269..8c795a4 100644 --- a/spotproviders/hema.py +++ b/spotproviders/hema.py @@ -71,5 +71,6 @@ class HEMA(HTTPSpotProvider): return sig == "HEMA" def submit_spot(self, spot, credentials): - # TODO: Implement. Spotting to HEMA is covered in the original email from the team. + # TODO: Implement. Currently blocked awaiting their API team to make a change to allow us to spot with a + # reference and not a reference *number*. raise NotImplementedError("HEMA upstream spot submission is not yet implemented") diff --git a/spotproviders/wwff.py b/spotproviders/wwff.py index e5d8412..1a5bba2 100644 --- a/spotproviders/wwff.py +++ b/spotproviders/wwff.py @@ -43,5 +43,6 @@ class WWFF(HTTPSpotProvider): return sig == "WWFF" def submit_spot(self, spot, credentials): - # TODO: Implement. Spotting to WWFF should be possible, need to look up the Spotline docs or copy approach from PoLo. Either way I think we need an API key for the app (but maybe not for the user?) + # TODO: Implement. Spotting to WWFF should be possible, need to look up the Spotline docs or copy approach from + # PoLo. Either way I think we need an API key for the app (but maybe not for the user?) raise NotImplementedError("WWFF upstream spot submission is not yet implemented")