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
@@ -7,8 +7,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
@@ -64,13 +64,13 @@ class HEMA(HTTPSpotProvider):
comment=spotter_comment_match.group(2),
sig="HEMA",
sig_refs=[
SIGRef(
ActivityRef(
id=spot_items[3].upper(),
sig="HEMA",
name=spot_items[4],
latitude=float(spot_items[7]),
longitude=float(spot_items[8]),
ref_type=SIGRefType.SUMMIT,
ref_type=ActivityRefType.SUMMIT,
)
],
time=datetime.strptime(spot_items[0], "%d/%m/%Y %H:%M")
@@ -89,8 +89,8 @@ class HEMA(HTTPSpotProvider):
logger.warning("Connection error when accessing HEMA spots API.")
return new_spots
def can_submit_spot(self, sig):
return sig == "HEMA"
def can_submit_spot(self, activity):
return activity == "HEMA"
def submit_spot(self, spot, credentials):
# TODO: Implement. Currently blocked awaiting their API team to make a change to allow us to spot with a