First attempt at converting "sig" to "activity" for v3

This commit is contained in:
Ian Renton
2026-09-24 07:09:37 +01:00
parent 1d0129f7bb
commit d91fa70655
90 changed files with 822 additions and 496 deletions
+12
View File
@@ -19,6 +19,18 @@ with open("config.yml") as f:
config = yaml.safe_load(f)
logger.info("Loaded config.")
# Warn about config keys that were renamed from "sig" to "activity" in Spothole v3, as these will otherwise be silently
# ignored.
if "sig_ref_data_providers" in config:
logger.warning(
'Your config file contains "sig_ref_data_providers", which was renamed to "activity_ref_data_providers" in Spothole v3. Please update your config.yml, otherwise no activity reference data will be loaded.'
)
for _entry in config.get("spot_providers", []):
if "sig" in _entry or "sig_ref_prefix" in _entry:
logger.warning(
f'Your config file contains "sig" or "sig_ref_prefix" for the {_entry.get("class")} spot provider. These were renamed to "activity" and "activity_ref_prefix" in Spothole v3. Please update your config.yml.'
)
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)