Sarah Hoffmann
2b7eb4906a
bdd: add tests for valid debug output
2023-03-09 20:10:51 +01:00
Sarah Hoffmann
db1aa4d02e
bdd: replace old formatting strings
2023-03-09 19:49:55 +01:00
Sarah Hoffmann
ad88d7a3e0
bdd: more format checks for reverse XML
2023-03-09 19:40:24 +01:00
Sarah Hoffmann
e42c1c9c7a
bdd: new step variant 'result contains in field'
...
This replaces the + notation for recursing into result dictionaries.
2023-03-09 19:31:21 +01:00
Sarah Hoffmann
556bb2386d
bdd: factor out computation of result to-check lists
2023-03-09 18:01:45 +01:00
Sarah Hoffmann
1e58cef174
bdd: replace property_list construct with standard check functions
2023-03-09 17:56:28 +01:00
Sarah Hoffmann
01010e443f
bdd: remove special case for osm_type field
...
The fuzzy field check hide cover formatting errors. Use 'osm' when
only caring about the conent.
2023-03-09 17:44:34 +01:00
Sarah Hoffmann
da0a7a765e
bdd: reorganise field comparisons
...
Move comparision on Field values from assert_field() into a
comparator class. Replace BadRowValueAssert with a simpler
check_row() function.
2023-03-09 17:05:05 +01:00
Sarah Hoffmann
9769a0dcdb
bdd: use new check_for_attributes() function also in steps
2023-03-09 16:44:07 +01:00
Sarah Hoffmann
fbff4fa218
bdd: fully check correctness of geojson and geocodejson
...
Parse code now checks presence of all required fields and exports
all fields for inspection.
2023-03-09 16:36:46 +01:00
Sarah Hoffmann
d17ec56e54
bdd: remove OrderedDict
...
dicts are guaranteed to keep insertion order by since Python 3.7, making
use of ORderedDict mute.
2023-03-09 16:08:39 +01:00
Sarah Hoffmann
b742200442
expand details BDD tests
...
There are now minor differences in the output between PHP and
Python versions, so introduce specific tests.
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
3ac70f7cc2
implement details endpoint in Python servers
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
a72e2ecb3f
update dependencies for Actions
2023-01-03 10:03:00 +01:00
Sarah Hoffmann
7219ee6532
extend BDD API tests to query via Python frameworks
...
A new config option ENGINE allows to choose between php and any of the
supported Python engines.
2023-01-03 10:03:00 +01:00
Sarah Hoffmann
018ef5bd53
bdd: recreate project directory for every run
2022-12-23 18:36:41 +01:00
Sarah Hoffmann
200eae3bc0
add tests for examples in lua style documentation
...
And fix all the errors the tests have found.
2022-12-23 17:35:28 +01:00
Sarah Hoffmann
2231401483
clean up uses of cli.nominatim()
...
They should not hand in data paths anymore.
2022-11-27 15:27:04 +01:00
Sarah Hoffmann
2abe9e6fd9
use data paths from new nominatim.paths
2022-11-27 12:15:41 +01:00
Sarah Hoffmann
0ed60d29cb
remove NOMINATIM_NOMINATIM_TOOL variable
...
This was used by the old PHP scripts to call the Python tool.
With the scripts now gone, the variable can be removed.
2022-11-26 16:40:20 +01:00
Sarah Hoffmann
d8e3ba3b54
bdd: add osm2pgsql tests for updating interpolations
2022-11-14 16:57:31 +01:00
Sarah Hoffmann
a46348da38
bdd: test placex content when updating with osm2pgsql
2022-11-14 14:48:44 +01:00
Sarah Hoffmann
2fac507453
change updates to handle delete/insert workflow
...
This makes Nominatim compatible with osm2pgsql's default update
modus operandi of deleting and reinserting data. Deletes are diverted
into a TODO table instead of executing them. When data is reinserted,
the corresponding entry in the TODO table is deleted. After updates are
finished, the remaining entries in the TODO table are executed, doing
the same work as the delete trigger did before.
The new behaviour also works against the gazetteer output with its
insert-only mechanism.
2022-11-10 09:38:23 +01:00
Sarah Hoffmann
51ed55cc32
initial flex import scripts
...
Only implements the extratags style for the moment. Tests pass
for the same behaviour as the gazetteer output. Updates still need
to be done.
2022-11-10 09:37:38 +01:00
Sarah Hoffmann
de2a3bd5f8
bdd tests: make import style configurable
...
The switch is for development. Tests are not guaranteed to still
work when run with anything but the 'extratags' style.
2022-11-10 09:37:38 +01:00
Sarah Hoffmann
981e9700be
add osm2pgsql gazetteer tests
...
This ports the gazetteer tests from osm2pgsql to BDD tests.
2022-11-10 09:37:38 +01:00
Sarah Hoffmann
0a73ed7d64
add secondary importance to API BDD tests
...
Also fixes a path issue during API test DB creation that could
never possibly have worked.
2022-10-01 11:01:49 +02:00
Sarah Hoffmann
dddfa3a075
ignore irrelevant extra tags on address interpolations
...
When deciding if an address interpolation has address information, only
look for addr:street and addr:place. If they are not there go looking
for the address on the address nodes. Ignores irrelevant tags like
addr:inclusion.
Fixes #2797 .
2022-08-13 14:07:06 +02:00
Sarah Hoffmann
fc254fc744
adapt use of Connection in bdd tests to name change
2022-07-18 09:47:57 +02:00
Sarah Hoffmann
93d5be097a
bdd: do not expect legacy word table to be without empty tokens
...
It can happen for bogus names and this will not get fixed anymore.
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
612d34930b
handle postcodes properly on word table updates
...
update_postcodes_from_db() needs to do the full postcode treatment
in order to derive the correct word table entries.
2022-06-23 23:42:31 +02:00
Sarah Hoffmann
d8623d6818
bdd: remove support for scenes
...
Only keep support for the special point geometry 'country:xx'.
2022-06-17 11:54:18 +02:00
Sarah Hoffmann
19f67e167c
bdd: remove step for scene setup
2022-06-17 11:54:18 +02:00
Sarah Hoffmann
00d8df6fc3
bdd: move update tests from scenes to grid descriptions
2022-06-17 11:54:18 +02:00
Sarah Hoffmann
02068aec7f
bdd: move import tests from scenes to grid descriptions
2022-06-17 11:54:18 +02:00
Sarah Hoffmann
3493d317e4
bdd: clear lof buffer after a successful import run
2022-06-17 11:54:18 +02:00
Sarah Hoffmann
a2b486a5b0
bdd: allow to set an origin of the grid
2022-06-17 11:54:18 +02:00
Sarah Hoffmann
f314abcfe1
bdd: restrict imports to four languages
...
This mainly restricts the number of country names that are loaded.
2022-05-11 16:40:53 +02:00
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
adeebec32a
switch tests to ICU tokenizer as default
2022-05-10 14:54:50 +02: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
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
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
c3788d765e
add consistent SPDX copyright headers
2022-01-03 16:23:58 +01:00
Sarah Hoffmann
04857d32cd
enable PHPUnit 9 for coverage
...
A couple of functions have been renamed.
2021-12-07 12:07:17 +01:00
Sarah Hoffmann
118858a55e
rename legacy_icu tokenizer to icu tokenizer
...
The new icu tokenizer is now no longer compatible with the old
legacy tokenizer in terms of data structures. Therefore there
is also no longer a need to refer to the legacy tokenizer in the
name.
2021-08-17 23:11:47 +02:00