Commit Graph

919 Commits

Author SHA1 Message Date
Sarah Hoffmann
bf683d434b adapt BDD tests to changed simplification 2024-11-18 13:02:35 +01:00
Sarah Hoffmann
5160a1d577 get bbox of postcode areas into results 2024-09-30 08:58:40 +02:00
Sarah Hoffmann
90e207a497 drop automatic migration from versions <4.3 2024-09-27 12:07:48 +02:00
Sarah Hoffmann
a690605a96 remove support for unindexed tokens
This was a special feature of the legacy tokenizer who would not
index very frequent tokens.
2024-09-22 10:39:10 +02:00
Sarah Hoffmann
b54ff7d766 remove all references to a module path
No longer used now that legacy tokenizer is gone.
2024-09-21 17:39:01 +02:00
Sarah Hoffmann
d4f3eda314 remove special casing for legacy tokenizer from BDD tests 2024-09-21 17:07:32 +02:00
Sarah Hoffmann
b87d6226fb remove legacy tokenizer and direct tests 2024-09-21 11:38:08 +02:00
Sarah Hoffmann
7717bbf59d remove remaining references to php code 2024-09-15 15:33:59 +02:00
Sarah Hoffmann
7ba5152493 remove PHP frontend support from BDD tests 2024-09-15 13:51:51 +02:00
Sarah Hoffmann
6bc044d9c7 remove website setup
The website directory was for PHP scripts only and is no longer
needed.
2024-09-15 11:58:55 +02:00
Sarah Hoffmann
06683edaae remove PHP tests 2024-09-15 11:26:49 +02:00
Sarah Hoffmann
882fb16881 restrict use of os.environ in Configuration
Only use the OS environment, when the environ parameter is set
to None. Currently it would use the OS env on an empty dict.
2024-09-01 16:17:30 +02:00
Sarah Hoffmann
7f11de0db9 allow None and str for project_dir in NominatimAPI init 2024-08-22 22:49:12 +02:00
Sarah Hoffmann
c2594aca40 make NominatimAPI[Async] a context manager
If close() isn't properly called, it can lead to odd error messages
about uncaught exceptions.
2024-08-19 11:31:38 +02:00
Sarah Hoffmann
8e8f7a641b use custom result formatters in CLI commands 2024-08-16 19:30:57 +02:00
Sarah Hoffmann
054efc8311 ensure consistent country assignments
When OSM data has areas with overlapping countries, use the country
assignments from the pre-defined country grid for tie-breaking.
If that fails, fall back to the country with the smaller partition
number.
2024-08-15 14:26:09 +02:00
Sarah Hoffmann
5a61d3d5f6 configurable error formatting and content type in result formatter 2024-08-14 12:00:08 +02:00
Sarah Hoffmann
0c25e80be0 make formatting module non-static 2024-08-13 22:39:43 +02:00
Sarah Hoffmann
d22ca186e4 remove v1-specific functions from ASGIAdaptor 2024-08-13 19:38:14 +02:00
Sarah Hoffmann
6527b7cdcd fail if osm2pgsql is not recent enough 2024-08-09 19:25:15 +02:00
marc tobias
f0390cfe85 add-data: warn and exit if database is frozen 2024-08-05 16:14:19 +02:00
Sarah Hoffmann
2914284a83 adapt BDD tests for legacy tokenizer + Python frontend
Mostly disables the tests, the cases are not worth fixing anymore.
Others just avoid using terms that trigger abbreviations.
2024-07-31 14:55:16 +02:00
Sarah Hoffmann
2048009600 disable ZIP5+ test for Python frontend
Currently not working.
2024-07-31 14:08:57 +02:00
Sarah Hoffmann
d47acbc18a add forgotten BDD test 2024-07-31 11:16:49 +02:00
Sarah Hoffmann
c8d45972bb remove support for PHP code coverage in BDD tests 2024-07-31 11:16:49 +02:00
Sarah Hoffmann
474aea61da bdd tests: get rid of dependency on build path
BDD tests will now use whatever osm2pgsql they find in the PATH.
For testing against legacy tokenizer, use -DSERVER_MODULE_PATH
to point to the module. This will no longer work out of the box.
2024-07-31 11:16:49 +02:00
Sarah Hoffmann
9659afbade port code to psycopg3 2024-07-29 08:50:19 +02:00
Sarah Hoffmann
3742fa2929 make DB helper functions free functions
Also changes the drop function so that it can drop multiple tables
at once.
2024-07-29 08:49:30 +02:00
Sarah Hoffmann
4da4cbfe27 reduce from 3 to 2 packages 2024-06-28 09:13:22 +02:00
Sarah Hoffmann
3a8c5df82d adapt bdd tests to new layout 2024-06-26 11:52:47 +02:00
Sarah Hoffmann
44d5148e5f fix merge issues 2024-06-26 11:52:47 +02:00
Sarah Hoffmann
2bab0ca060 port unit tests to new python package layout 2024-06-26 11:52:47 +02:00
Sarah Hoffmann
5b02cd22b9 add tests for new importance CSV import 2024-05-16 15:23:54 +02:00
Sarah Hoffmann
60b03d506f add CSV format for importance import 2024-05-16 15:23:54 +02:00
Sarah Hoffmann
01f0f453dd drop interpolations when no parent can be found
A housenumber without the place it refers to is of only limited use.
2024-05-14 11:35:14 +02:00
Sarah Hoffmann
77631f90fd reindex postcodes that loose their parents
When the parent place of a postcode is deleted, it needs to
be reindexed to get a new parent. Otherwise displaying of
results is broken.
2024-05-04 12:33:26 +02:00
Sarah Hoffmann
7fb3ef4633 add test for preference of full matches on unlisted places 2024-05-02 11:47:35 +02:00
Sarah Hoffmann
8f3845660f add full tokens to addresses
This is now needed to weigh results.
2024-05-02 11:47:35 +02:00
Sarah Hoffmann
f923304eea add slight preference for locating point POIs over POI areas 2024-04-11 10:21:31 +02:00
Sarah Hoffmann
38798bba13 increase search area when filtering by postcode 2024-04-02 19:36:16 +02:00
Sarah Hoffmann
fe873ad0e2 adapt tests for windowing SQL
Results with high penalty are now thrown out earlier.
2024-04-02 16:32:49 +02:00
Sarah Hoffmann
07b7fd1dbb add address counts to tokens 2024-03-18 11:25:48 +01:00
Sarah Hoffmann
50beac8305 remove BDD test for place_id details
It is not reliable.
2024-03-11 21:07:14 +01:00
Sarah Hoffmann
9de6bdd7dd exclude postcode test from legacy and php 2024-03-11 15:28:57 +01:00
Sarah Hoffmann
dc7cfd1708 look for postcode areas when finding something in the postcode table 2024-03-11 14:48:24 +01:00
Sarah Hoffmann
ae7c584e28 use import date from osm2pgsql property table if available 2024-03-05 11:33:32 +01:00
Sarah Hoffmann
247065ff6f
Merge pull request #3342 from mtmail/tyops
Correct some typos
2024-02-28 14:25:16 +01:00
Sarah Hoffmann
1879cf902c
Merge pull request #3346 from lonvia/reduce-artificial-importance
Reduce default importance
2024-02-28 14:21:46 +01:00
Sarah Hoffmann
36b1660121 add support for new middle table format of osm2pgsql
Functions are adapted according to the format detected from the
osm2pgsql property table.
2024-02-27 18:18:19 +01:00
Sarah Hoffmann
c6d40d4bf4 reduce importance when computed from search rank 2024-02-27 10:15:54 +01:00