Now that SIGs are rebranded as Activities, we can merge DXpedition and Contest into that without it being too weird, and get rid of AlertType #147

This commit is contained in:
Ian Renton
2026-09-18 16:50:00 +01:00
parent bf9b4ac68c
commit cea90695ba
21 changed files with 92 additions and 113 deletions
+8 -13
View File
@@ -13,6 +13,7 @@ from core.activity_lookup_helper import populate_missing_activity_ref_info
from core.activity_utils import (
ANY_ACTIVITY_REGEX,
get_activity_name_from_comment_name,
get_icon_for_activity,
get_ref_regex_for_activity,
)
from core.call_lookup_helper import get_call_info
@@ -378,16 +379,10 @@ class Spot:
logger.info(f"Seen a new propagation mode tag not yet in the system: {mode_tag}")
# Set activities based on propagation mode
if self.propagation_mode == "Satellite":
if not self.sig:
self.sig = "AMSAT"
if not any(activity_ref.sig == "AMSAT" for activity_ref in self.sig_refs):
self.sig_refs.append(ActivityRef(sig="AMSAT"))
if self.propagation_mode == "Earth-Moon-Earth":
if not self.sig:
self.sig = "EME"
if not any(activity_ref.sig == "EME" for activity_ref in self.sig_refs):
self.sig_refs.append(ActivityRef(sig="EME"))
if self.propagation_mode == "Satellite" and not self.sig:
self.sig = "Satellite"
if self.propagation_mode == "Earth-Moon-Earth" and not self.sig:
self.sig = "EME"
# Parse "de_grid -> dx_grid" structures from the comment
if self.comment:
@@ -499,10 +494,10 @@ class Spot:
self.de_longitude = de_call_info.longitude
self.de_grid = de_call_info.grid
# Icon for the spot should be the icon of the first activity ref if present, otherwise a radio tower
# Icon for the spot should be the icon of its activity if known, otherwise a radio tower
self.icon = "fa-tower-cell"
if self.sig_refs and self.sig_refs[0].icon:
self.icon = self.sig_refs[0].icon
if self.sig and (activity_icon := get_icon_for_activity(self.sig)):
self.icon = activity_icon
except Exception:
logger.exception("Exception while inferring missing data from spot")