Giant refactor to rebrand "SIG" as "Activity" anywhere that doesn't touch API or config file (which is to be addressed in a future breaking change). #147

This commit is contained in:
Ian Renton
2026-09-18 14:54:11 +01:00
parent 556ea56378
commit 81cd686a00
96 changed files with 1208 additions and 1170 deletions
+6 -6
View File
@@ -5,8 +5,8 @@ import requests
from requests.exceptions import ConnectionError, ConnectTimeout, ReadTimeout
from core.constants import HTTP_HEADERS
from core.enums import Mode, SIGRefType
from data.sig_ref import SIGRef
from core.enums import ActivityRefType, Mode
from data.activity_ref import ActivityRef
from data.spot import Spot
from providers.spot.http_spot_provider import HTTPSpotProvider
@@ -58,14 +58,14 @@ class SOTA(HTTPSpotProvider):
comment=source_spot["comments"],
sig="SOTA",
sig_refs=[
SIGRef(
ActivityRef(
id=source_spot["summitCode"],
sig="SOTA",
name=source_spot["summitName"],
latitude=source_spot["latitude"],
longitude=source_spot["longitude"],
activation_score=source_spot["points"],
ref_type=SIGRefType.SUMMIT,
ref_type=ActivityRefType.SUMMIT,
)
],
dx_latitude=source_spot["latitude"],
@@ -82,8 +82,8 @@ class SOTA(HTTPSpotProvider):
logger.warning("Timeout when accessing SOTA spots API.")
return new_spots
def can_submit_spot(self, sig):
return sig == "SOTA"
def can_submit_spot(self, activity):
return activity == "SOTA"
def submit_spot(self, spot, credentials):
# TODO test this method works