cleaned up folders and defined proper structs
Some checks failed
Build and push docker image / Build (pull_request) Failing after 2m14s
Build and release APK / Build APK (pull_request) Successful in 5m15s
Build web / Build Web (pull_request) Successful in 2m32s

This commit is contained in:
2024-05-29 22:57:11 +02:00
parent 7e4538a1bf
commit 03da8441f2
17 changed files with 103 additions and 38 deletions

View File

@@ -0,0 +1,24 @@
from pydantic import BaseModel
from .landmarktype import LandmarkType
from .preferences import Preferences
class LandmarkTest(BaseModel) :
name : str
attractiveness : int
loc : tuple
# Output to frontend
class Landmark(BaseModel) :
name : str
type: LandmarkType # De facto mapping depending on how the query was executed with overpass. Should still EXACTLY correspond to the preferences
location : tuple
def score(preferences: Preferences):
# loop through the preferences and assign a score
return 29

View File

@@ -0,0 +1,4 @@
from pydantic import BaseModel
class LandmarkType(BaseModel):
landmark_type: str

View File

@@ -0,0 +1,28 @@
from pydantic import BaseModel
from .landmarktype import LandmarkType
class Preference(BaseModel) :
name: str
type: LandmarkType
score: int
# Input for optimization
class Preferences(BaseModel) :
# Sightseeing / History & Culture (Musées, bâtiments historiques, opéras, églises)
sightseeing : Preference
# Nature (parcs, jardins, rivières, plages)
nature: Preference
# Shopping (diriger plutôt vers des zones / rues commerçantes)
shopping : Preference
# Food (price low or high. Combien on veut dépenser pour manger à midi/soir)
food_budget : Preference
# Tolérance au détour (ce qui détermine (+ ou -) le chemin emprunté)
detour_tol : Preference