From f7a43c539f44fc851f41b411eb59bcdba025eed3 Mon Sep 17 00:00:00 2001
From: Mateusz Konieczny <matkoniecz@gmail.com>
Date: Wed, 15 Jan 2025 16:53:30 +0100
Subject: [PATCH] better handle atpisms

---
 0_config.py    | 24 +++++++++++++++---------
 test_config.py |  4 ++++
 2 files changed, 19 insertions(+), 9 deletions(-)

diff --git a/0_config.py b/0_config.py
index 92e24f9..17d7404 100644
--- a/0_config.py
+++ b/0_config.py
@@ -612,13 +612,18 @@ def link_status_requests_missing_from_cache():
 def opening_hours_key():
     return "opening_hours_in_atp_format"
 
+def atpism_links():
+    returned = [
+        'website_may_be_broken', # marked by my qa
 
-def keys_with_value_link():
-    returned = ["website", 'website_may_be_broken', "operator:website", 'website:en', 'website:fr', 'website:de', 'website:kr', 'website:cn', 'website:menu', 'website:orders', 'website:orders:en', 'website:orders:ar', 'reservation:website',
-                'contact:webcam',  # should not be contact...
-                'contact:tripadvisor', 'contact:yelp',
-                'source:website', 'brand:website',  # probably should be eliminated - TODO
-                ]
+        # these may have some use in OSM but I would not advocate really increasing their use
+        "operator:website", 'website:en', 'website:fr', 'website:de', 'website:kr', 'website:cn',
+        'website:menu', 'website:orders', 'website:orders:en', 'website:orders:ar', 'reservation:website',
+        'contact:tripadvisor', 'contact:yelp',
+        'contact:webcam',  # should not be contact...
+
+        'source:website', 'brand:website',  # probably should be eliminated - TODO
+    ]
     for code in language_tag_knowledge.all_iso_639_1_language_codes():
         if "website:" + code not in returned:
             returned.append("website:" + code)
@@ -627,9 +632,9 @@ def keys_with_value_link():
         if "website:menu:" + code not in returned:
             returned.append("website:menu:" + code)
     return returned
-    # TODO: should website:en be even kept at all?
-    # TODO what about website:orders
-    # TODO website:fr
+
+def keys_with_value_link():
+    return ["website"] + atpism_links()
 
 
 def keys_with_possible_link():
@@ -734,6 +739,7 @@ def atp_tags_very_likely_not_usable_for_osm_import(tags):
         'brand:hi', 'brand:pa', 'brand:pnb', 'brand:ko', 'brand:sr-Latn',
         'brand:hy', 'brand:tr', 'brand:uk'
     ]
+    returned += atpism_links()
     if tags.get("addr:country") not in ['US']:
         returned.append("addr:state")
     return returned
diff --git a/test_config.py b/test_config.py
index 4817307..4fa46ea 100644
--- a/test_config.py
+++ b/test_config.py
@@ -10,3 +10,7 @@ class ConfigTests(unittest.TestCase):
         # it was missing as it was using country code list, not language code list
         # so jp was present and ja missing
         self.assertTrue("website:ja" in config.keys_with_value_link())
+        self.assertTrue("website:ja" in config.atp_tags_very_likely_not_usable_for_osm_import({}))
+
+    def test_charge_as_not_reccommeded_for_import(self):
+        self.assertTrue("charge" in config.atp_tags_very_likely_not_usable_for_osm_import({}))