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
@@ -4,8 +4,8 @@ import pytz
import requests
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
@@ -35,13 +35,13 @@ class POTA(HTTPSpotProvider):
comment=source_spot["comments"],
sig="POTA",
sig_refs=[
SIGRef(
ActivityRef(
id=source_spot["reference"],
sig="POTA",
name=source_spot["name"],
latitude=source_spot["latitude"],
longitude=source_spot["longitude"],
ref_type=SIGRefType.PARK
ref_type=ActivityRefType.PARK
)
],
time=datetime.strptime(source_spot["spotTime"], "%Y-%m-%dT%H:%M:%S")
@@ -57,8 +57,8 @@ class POTA(HTTPSpotProvider):
new_spots.append(spot)
return new_spots
def can_submit_spot(self, sig):
return sig == "POTA"
def can_submit_spot(self, activity):
return activity == "POTA"
def submit_spot(self, spot, credentials):
sig_ref = spot.sig_refs[0].id if spot.sig_refs else None