Sarah Hoffmann
e74e577029
bdd: recreate functions on template DB
...
Avoids calling function refresh on every scenario. The content won't
change between runs.
2022-05-11 15:50:22 +02:00
Sarah Hoffmann
aa0ae610c6
avoid calling OSM servers during bdd tests
2022-05-11 15:33:01 +02:00
Sarah Hoffmann
5ff35d9984
Merge pull request #2707 from lonvia/make-icu-tokenizer-the-default
...
Make ICU tokenizer the default
2022-05-11 08:52:49 +02:00
Marc Tobias
99fa23040a
PHPUnit 9 changed configuration schema slightly
2022-05-10 15:20:43 +02:00
Sarah Hoffmann
adeebec32a
switch tests to ICU tokenizer as default
2022-05-10 14:54:50 +02:00
Sarah Hoffmann
ed6fda6968
Merge pull request #2702 from lonvia/move-country-names-into-includes
...
Clean up country name settings
2022-05-10 09:21:16 +02:00
Marc Tobias
821dabb138
add git commit hash to --version output
2022-05-09 23:56:13 +02:00
Sarah Hoffmann
9d468f6da0
support arbitrary prefixes in country name list
...
This means we can now get rid of the last special cases for names.
2022-05-09 11:55:26 +02:00
Marc Tobias
0de83c4a51
fix typos of name Nominatim
2022-05-05 01:04:47 +02:00
Marc Tobias
a79ab41782
new nominatim --version CLI argument
2022-05-04 01:33:25 +02:00
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