1
0
Fork 0

more special rules for matcher

This commit is contained in:
Mateusz Konieczny 2025-01-22 13:56:30 +01:00
parent 74a9b161c6
commit 915625a6cd
2 changed files with 44 additions and 0 deletions

View file

@ -5025,6 +5025,10 @@ def clear_type_conflicts():
def matching_rather_than_type_conflict():
return [
'shop=clothes vs shop=fashion_accessories',
'shop=deli vs shop=health_food',
'amenity=bar vs amenity=pub',
'shop=baby_goods vs toy_shop',

View file

@ -431,6 +431,46 @@ website = http://www.dunkindonuts.sa"""
}
self.assertEqual(self.this_tag_lists_match(atp_tags, osm_tags), True)
def test_matching_differently_tagged_supposed_healthy_food_shop(self):
atp_tags = {
'@source_uri': 'https://api.woosmap.com/stores?key=woos-7dcebde8-9cf4-37a7-bac3-1dce1c0942ee&stores_by_page=300&page=3',
'@spider': 'holland_and_barrett',
'shop': 'health_food',
'addr:street_address': '21 Clifton Down, Shopping Centre, Whiteladies Road',
'addr:city': 'Bristol',
'addr:postcode': 'BS8 2NN',
'addr:country': 'GB',
'website': 'https://www.hollandandbarrett.com/stores/clifton-4523/',
'brand': 'Holland & Barrett',
'brand:wikidata': 'Q5880870',
'atp_ref': '4523',
'opening_hours_in_atp_format': 'Mo-Sa 09:00-17:30; Su 11:00-17:00',
'atp_listing_name': 'BRISTOL CLIF/DOWN',
'name': 'Holland & Barrett'
}
osm_tags = {
'addr:city': 'Bristol',
'addr:housename': 'Clifton Down Shopping Centre',
'addr:postcode': 'BS8 2NN',
'addr:street': 'Whiteladies Road',
'addr:suburb': 'Clifton',
'addr:unit': '21',
'brand': 'Holland & Barrett',
'brand:wikidata': 'Q5880870',
'brand:wikipedia': 'en:Holland & Barrett',
'fhrs:id': '312032',
'indoor': 'room',
'layer': '1',
'level': '0',
'name': 'Holland & Barrett',
'opening_hours': 'Mo-Sa 09:00-17:30; Su 11:00-17:00',
'room': 'shop',
'shop': 'deli',
'source:addr': 'FHRS Open Data',
'website': 'https://www.hollandandbarrett.com/stores/clifton-4523/'
}
self.assertEqual(self.this_tag_lists_match(atp_tags, osm_tags), True)
class CanonicalValueTests(unittest.TestCase):
def test_simple_canonical_value(self):