Sarah Hoffmann
372874e89a
accept any OSM type in street member of associatedStreet
...
This is needed for pedestrian areas mapped as multipolygons
and consequently as relations. The lookup in placex guarantees
that the referenced OSM object is indeed a street.
Fixes #2669 .
2022-05-02 09:48:51 +02:00
Sarah Hoffmann
3c68b12176
keep inherited address parts after indexing
...
The inherited housenumber is needed for display output. We can't
take the one from the housenumber field because it is already
normalized. Remove the inherited address only when reindexing.
Fixes #2683 .
2022-04-28 21:38:00 +02:00
Sarah Hoffmann
4f59644cc2
add tests for new data invalidation functions
2022-04-14 14:52:13 +02:00
Artem Ziablytskyi
d1479072ae
fix bdd tests and docs
2022-04-07 16:37:51 +02:00
Artem Ziablytskyi
9a56e53d50
use ISO3166-2-lvl<admin_level> instead of typeLabel prefix
2022-04-07 16:37:51 +02:00
Artem Ziablytskyi
6bee188f24
Change the key to <addresspart_type>-ISO3166-2
to support xml response correctly
2022-04-07 16:37:51 +02:00
Artem Ziablytskyi
82dbcbb12a
add <addresspart_type>:ISO3166-2
field to response address details
2022-04-07 16:37:51 +02:00
Artem Ziablytskyi
76c146f326
add state_code
field to response address details
2022-04-07 16:37:51 +02:00
Sarah Hoffmann
fd4ab3f262
Merge pull request #2629 from tareqpi/country-names-yaml-configuration
...
Move default country names into yaml configuration
2022-04-04 09:04:25 +02:00
Tareq Al-Ahdal
e9f979b67b
'read_config' is no longer a fixture
...
add 'read_config' to test cases that need it
2022-04-01 22:52:17 +08:00
Tareq Al-Ahdal
a323b8f63a
test for loading special characters from country_settings.yaml
2022-04-01 21:58:57 +08:00
Tareq Al-Ahdal
9411c14fd2
fix reset country info before loading custom data
2022-04-01 21:55:34 +08:00
Tareq Al-Ahdal
8525e7542f
custom country config loads correctly
2022-04-01 21:46:56 +08:00
Sarah Hoffmann
de18cd1523
add test for new table_has_column function
2022-03-31 15:55:20 +02:00
Sarah Hoffmann
36a1560117
add migration to mark internal country names
2022-03-31 15:55:20 +02:00
Tareq Al-Ahdal
b5f311d6bc
separate unit test function into three functions
2022-03-30 22:06:59 +08:00
Tareq Al-Ahdal
9db13aac72
Added unit tests for loading country info from yaml file
2022-03-25 22:22:44 +08:00
Sarah Hoffmann
a0ed80d821
restore the tokenizer directory when missing
...
Automatically repopulate the tokenizer/ directory with the PHP stub
and the postgresql module, when the directory is missing. This allows
to switch working directories and in particular run the service
from a different maschine then where it was installed.
Users still need to make sure that .env files are set up correctly
or they will shoot themselves in the foot.
See #2515 .
2022-03-20 11:31:42 +01:00
Tareq Al-Ahdal
943e5fe699
Revert the removal of new line at the end of the file
2022-03-18 06:07:48 +08:00
Tareq Al-Ahdal
83b4b8d9c1
reattach 'name:' prefix to keys
2022-03-18 05:46:23 +08:00
Tareq Al-Ahdal
d0c1b73fb3
remove duplicate values
2022-03-18 02:43:42 +08:00
Tareq Al-Ahdal
6be2077d92
Merge branch 'master' into country-names-yaml-configuration
2022-03-18 02:36:12 +08:00
Tareq Al-Ahdal
456d439e97
Reformatting of country keys
2022-03-18 02:23:11 +08:00
Sarah Hoffmann
23de4c7aca
adapt ParameterParser tests to new key list
2022-03-17 11:45:05 +01:00
Sarah Hoffmann
e133476c35
merge linked names correctly into namedetails
...
Convert the '_place_*' entries back to normal entries before
returning them in the 'namedetails' section. If the name field is
duplicated, kept the '_place_*' notation. This preserves the previous
behaviour before _place_ names were introduces but adds the additional
names from the linked place for reference.
2022-03-17 11:02:02 +01:00
Sarah Hoffmann
524dc64ab7
make sure outputs take into account linked place names
2022-03-16 21:44:52 +01:00
Sarah Hoffmann
42cd021d04
save differing linked polace names in extra fields
...
This keeps the names tracable and ensures that all names are searchable
when they differ. Do not keep names when they are exactly the same
to save some space. Linked names are cleaned out before relinking.
2022-03-16 16:38:52 +01:00
Sarah Hoffmann
ef98a85b05
correctly handle single-point interpolations in reverse
...
Lookup in location_property_osmline needs to be special cased
for startnumber = endnumber. Also adds tests for the case.
Fixes #2680 .
2022-03-16 11:19:09 +01:00
Sarah Hoffmann
0a9f971e44
add tests for new analyzed housenumbers
2022-03-01 09:34:32 +01:00
Sarah Hoffmann
89e1446131
bdd: disable some housenumber tests for legacy
...
Optional spaces in housenumbers are not supported by legacy tokenizer,
so disable those tests.
2022-03-01 09:34:32 +01:00
Sarah Hoffmann
f03a05f6bb
add new analyser for houenumbers
...
This analyser makes spaces optional.
2022-03-01 09:34:32 +01:00
Sarah Hoffmann
837d44391c
move generation of normalized token form to analyzer
...
This gives the analyzer more flexibility in choosing the normalized
form. In particular, an analyzer creating different variants can choose
the variant that will be used as the canonical form.
2022-03-01 09:34:32 +01:00
Sarah Hoffmann
1d82569f6d
add tests for country updates
2022-02-24 16:18:49 +01:00
Sarah Hoffmann
f74228830d
bdd: run full import on tests
...
This uncovered a couple of outdated/wrong tests which have been
fixed, too.
2022-02-24 14:27:51 +01:00
Sarah Hoffmann
0e11ca9b76
add test that interpolations are found by odd/even
2022-02-10 11:23:51 +01:00
Sarah Hoffmann
a6b4e8ff67
add tests for housenumber-as-name feature
2022-02-07 11:45:12 +01:00
Sarah Hoffmann
38c3ef3da0
add tests for get_string_list()
...
Renaming test file for sanitizer config because pytest requires
unique names for test files.
2022-02-07 11:22:24 +01:00
Sarah Hoffmann
610f2cc254
sanitizer: move helpers into a configuration class
2022-02-07 10:48:00 +01:00
Sarah Hoffmann
a79a3210e6
implement is-a-name option for housenumbers
2022-02-07 09:27:11 +01:00
Sarah Hoffmann
b6fa121f53
remove tests for closest housenumber function
2022-01-27 16:21:45 +01:00
Sarah Hoffmann
64abc90d30
use new tiger step column for queries
2022-01-27 14:08:08 +01:00
Sarah Hoffmann
6b89624f33
adapt frontend to new interpolation table layout
2022-01-27 11:14:55 +01:00
Sarah Hoffmann
4b28b4fed4
adapt BDD tests for new interpolation style
2022-01-27 11:14:55 +01:00
Sarah Hoffmann
c170d323d9
add tests for cleaning housenumbers
2022-01-20 23:47:20 +01:00
Sarah Hoffmann
d09db09849
adapt ICU tets to new housenumber sanitizer
...
Restrict tests to making sure that handing in multiple housenumbers
works.
2022-01-20 16:05:49 +01:00
Sarah Hoffmann
3741afa6dc
generalize filter-kind parameter for sanatizers
...
Now behaves the same for tag_analyzer_by_language and
clean_housenumbers. Adds tests.
2022-01-20 15:42:42 +01:00
Sarah Hoffmann
560a006892
add pytest config
...
We are using custom marks now which need to be registered to avoid
warnings.
2022-01-20 15:38:02 +01:00
Sarah Hoffmann
4774e45218
clean_housenumbers: make kinds and delimiters configurable
...
Also adds unit tests for various options.
2022-01-20 12:07:12 +01:00
Sarah Hoffmann
206ee87188
factor out housenumber splitting into sanitizer
2022-01-19 17:27:50 +01:00
Sarah Hoffmann
b453b0ea95
introduce mutation variants to generic token analyser
...
Mutations are regular-expression-based replacements that are applied
after variants have been computed. They are meant to be used for
variations on character level.
Add spelling variations for German umlauts.
2022-01-18 11:09:21 +01:00