better logs
Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Successful in 2m20s
Run linting on the backend code / Build (pull_request) Failing after 26s
Run testing on the backend code / Build (pull_request) Failing after 2m40s
Build and deploy the backend to staging / Deploy to staging (pull_request) Successful in 17s
Some checks failed
Build and deploy the backend to staging / Build and push image (pull_request) Successful in 2m20s
Run linting on the backend code / Build (pull_request) Failing after 26s
Run testing on the backend code / Build (pull_request) Failing after 2m40s
Build and deploy the backend to staging / Deploy to staging (pull_request) Successful in 17s
This commit is contained in:
@@ -212,9 +212,6 @@ class LandmarkManager:
|
||||
for sel in dict_to_selector_list(amenity_selector):
|
||||
self.logger.debug(f"Current selector: {sel}")
|
||||
|
||||
# query_conditions = ['count_tags()>5']
|
||||
# if landmarktype == 'shopping' : # use this later for shopping clusters
|
||||
# element_types = ['node']
|
||||
element_types = ['way', 'relation']
|
||||
|
||||
if 'viewpoint' in sel :
|
||||
@@ -269,7 +266,7 @@ class LandmarkManager:
|
||||
tag_values = set(elem.tags().values()) # Store tag values
|
||||
|
||||
|
||||
# Use simple tags :
|
||||
# Retrieve image, name and website :
|
||||
image_url = elem.tag('image')
|
||||
website_url = elem.tag('website')
|
||||
if website_url is None :
|
||||
@@ -278,6 +275,9 @@ class LandmarkManager:
|
||||
|
||||
if elem_type != "nature" and elem.tag('leisure') == "park":
|
||||
elem_type = "nature"
|
||||
|
||||
if elem.tag('wikipedia') is not None :
|
||||
score += self.wikipedia_bonus
|
||||
|
||||
# Skip element if it is an administrative boundary or a disused thing or it is an appartement and useless amenities
|
||||
if elem.tag('boundary') is not None or elem.tag('disused') is not None:
|
||||
@@ -297,20 +297,16 @@ class LandmarkManager:
|
||||
# do not count the building description as being particularly useful
|
||||
n_tags -= 1
|
||||
|
||||
if "wiki" in tag_key:
|
||||
# wikipedia entries count more
|
||||
score += self.wikipedia_bonus
|
||||
|
||||
if landmarktype != "shopping":
|
||||
if "shop" in tag_key:
|
||||
skip = True
|
||||
break
|
||||
# if landmarktype != "shopping":
|
||||
# if "shop" in tag_key:
|
||||
# skip = True
|
||||
# break
|
||||
# if tag_key == "building" and elem.tag('building') in ['retail', 'supermarket', 'parking']:
|
||||
# skip = True
|
||||
# break
|
||||
|
||||
if skip:
|
||||
continue
|
||||
# if skip:
|
||||
# continue
|
||||
|
||||
score = score_function(score)
|
||||
|
||||
|
Reference in New Issue
Block a user