]> git.openstreetmap.org Git - nominatim.git/commitdiff
move PlaceInfo into data submodule
authorSarah Hoffmann <lonvia@denofr.de>
Wed, 6 Jul 2022 08:54:47 +0000 (10:54 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Wed, 6 Jul 2022 08:54:47 +0000 (10:54 +0200)
This data structure is shared between indexer and tokenizer.

14 files changed:
nominatim/data/place_info.py [moved from nominatim/indexer/place_info.py with 100% similarity]
nominatim/indexer/runners.py
nominatim/tokenizer/base.py
nominatim/tokenizer/icu_tokenizer.py
nominatim/tools/tiger_data.py
test/python/dummy_tokenizer.py
test/python/tokenizer/sanitizers/test_clean_housenumbers.py
test/python/tokenizer/sanitizers/test_clean_postcodes.py
test/python/tokenizer/sanitizers/test_split_name_list.py
test/python/tokenizer/sanitizers/test_strip_brace_terms.py
test/python/tokenizer/sanitizers/test_tag_analyzer_by_language.py
test/python/tokenizer/test_icu.py
test/python/tokenizer/test_legacy.py
test/python/tokenizer/test_place_sanitizer.py

index 9a30ffe6b10c0c441efe6e1c61e892d996dfccaf..21b6a44d35eff8a9b0d6d06c9dc885081dfe97d7 100644 (file)
@@ -12,7 +12,7 @@ import functools
 
 from psycopg2 import sql as pysql
 
-from nominatim.indexer.place_info import PlaceInfo
+from nominatim.data.place_info import PlaceInfo
 
 # pylint: disable=C0111
 
index f81b3bc262ed9f690b0eb6bc794e2cab076de822..70a54bfdc28141e62e0e5e63e5e52342044b5a14 100644 (file)
@@ -12,7 +12,7 @@ from abc import ABC, abstractmethod
 from typing import List, Tuple, Dict, Any
 
 from nominatim.config import Configuration
-from nominatim.indexer.place_info import PlaceInfo
+from nominatim.data.place_info import PlaceInfo
 
 # pylint: disable=unnecessary-pass
 
index a6ff08a40774736c363965bada9a23101f2ccd86..171d43926cc42be9695ef11522acd7ecf1ed07c8 100644 (file)
@@ -16,7 +16,7 @@ from textwrap import dedent
 from nominatim.db.connection import connect
 from nominatim.db.utils import CopyBuffer
 from nominatim.db.sql_preprocessor import SQLPreprocessor
-from nominatim.indexer.place_info import PlaceInfo
+from nominatim.data.place_info import PlaceInfo
 from nominatim.tokenizer.icu_rule_loader import ICURuleLoader
 from nominatim.tokenizer.base import AbstractAnalyzer, AbstractTokenizer
 
index 6e37df5e9df7d2b6b3228c4ba79b8a5350865386..9903ea2bb8e68c43ff25533dfcc9d1d0905c74da 100644 (file)
@@ -17,7 +17,7 @@ from nominatim.db.connection import connect
 from nominatim.db.async_connection import WorkerPool
 from nominatim.db.sql_preprocessor import SQLPreprocessor
 from nominatim.errors import UsageError
-from nominatim.indexer.place_info import PlaceInfo
+from nominatim.data.place_info import PlaceInfo
 
 LOG = logging.getLogger()
 
index 57bf2f2f44de8750189dd802a76c8cbfdb9b5f19..ed32c650dab3d873ae8dbddbf5fead64ea1e94ac 100644 (file)
@@ -7,7 +7,7 @@
 """
 Tokenizer for testing.
 """
-from nominatim.indexer.place_info import PlaceInfo
+from nominatim.data.place_info import PlaceInfo
 from nominatim.config import Configuration
 
 def create(dsn, data_dir):
index 34cc7413b49c32300d34e112028a52e873b5810b..128e1201ed1c4b3cdfa9714375e632ba75e0c374 100644 (file)
@@ -10,7 +10,7 @@ Tests for the sanitizer that normalizes housenumbers.
 import pytest
 
 from nominatim.tokenizer.place_sanitizer import PlaceSanitizer
-from nominatim.indexer.place_info import PlaceInfo
+from nominatim.data.place_info import PlaceInfo
 
 @pytest.fixture
 def sanitize(request):
index 443761962566cc694b4bf7c2765598f72ead5e09..2446999adf60977d2283386279aff785fcf13179 100644 (file)
@@ -10,7 +10,7 @@ Tests for the sanitizer that normalizes postcodes.
 import pytest
 
 from nominatim.tokenizer.place_sanitizer import PlaceSanitizer
-from nominatim.indexer.place_info import PlaceInfo
+from nominatim.data.place_info import PlaceInfo
 from nominatim.tools import country_info
 
 @pytest.fixture
index 47bd1e44cb0806ac6c331bced65e7219d90660d5..67157fba2148a9e806dce756c68e797e82719cdb 100644 (file)
@@ -10,7 +10,7 @@ Tests for the sanitizer that splits multivalue lists.
 import pytest
 
 from nominatim.tokenizer.place_sanitizer import PlaceSanitizer
-from nominatim.indexer.place_info import PlaceInfo
+from nominatim.data.place_info import PlaceInfo
 
 from nominatim.errors import UsageError
 
index c37562dd3a2517b6d8f0367ea08845ca13ef4f44..eb5543646595a96aa7183e7c813f54ef61813b6e 100644 (file)
@@ -10,7 +10,7 @@ Tests for the sanitizer that handles braced suffixes.
 import pytest
 
 from nominatim.tokenizer.place_sanitizer import PlaceSanitizer
-from nominatim.indexer.place_info import PlaceInfo
+from nominatim.data.place_info import PlaceInfo
 
 def run_sanitizer_on(**kwargs):
     place = PlaceInfo({'name': kwargs})
index dfd2511343bf5a1936b867c7bf201e24f5bd196f..fd4be01f4c118945b6b6e100253e7f3882ea1878 100644 (file)
@@ -9,7 +9,7 @@ Tests for the sanitizer that enables language-dependent analyzers.
 """
 import pytest
 
-from nominatim.indexer.place_info import PlaceInfo
+from nominatim.data.place_info import PlaceInfo
 from nominatim.tokenizer.place_sanitizer import PlaceSanitizer
 from nominatim.tools.country_info import setup_country_config
 
index b9de97bcc2b11f7ff94ef4d6dd00ce6b6c54b7a7..7f0ffce16b5a3aa8c90e228aa9abd9f57cd6097a 100644 (file)
@@ -17,7 +17,7 @@ from nominatim.tokenizer import icu_tokenizer
 import nominatim.tokenizer.icu_rule_loader
 from nominatim.db import properties
 from nominatim.db.sql_preprocessor import SQLPreprocessor
-from nominatim.indexer.place_info import PlaceInfo
+from nominatim.data.place_info import PlaceInfo
 
 from mock_icu_word_table import MockIcuWordTable
 
index 8f79e2422b74c46f7634462e797092dd40a1bfac..57a82b8a0f4aa5af2f1dc6c2377db0fca8d83959 100644 (file)
@@ -12,7 +12,7 @@ import re
 
 import pytest
 
-from nominatim.indexer.place_info import PlaceInfo
+from nominatim.data.place_info import PlaceInfo
 from nominatim.tokenizer import legacy_tokenizer
 from nominatim.db import properties
 from nominatim.errors import UsageError
index 2dd4e58a7ef731090cbd96a5f14bc3613581b91f..31401bd19aa0eb73c161823023e537aef31d1726 100644 (file)
@@ -11,7 +11,7 @@ import pytest
 
 from nominatim.errors import UsageError
 import nominatim.tokenizer.place_sanitizer as sanitizer
-from nominatim.indexer.place_info import PlaceInfo
+from nominatim.data.place_info import PlaceInfo
 
 
 def test_placeinfo_clone_new_name():