Robbe Haesendonck
4f5f5ea8fc
Removed unnecessary check for --prepare-database flag
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
53d2050dc5
Fixed typechecking error
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
567c31ab6a
Fixed legacy import command
...
Check whether prepare-database is true, if so exit early
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
7d28fc35d1
Disabled pylint too-many-branches
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
c06f902398
Fixed setting tokenizer property
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
9c7d947fd1
Updated check to see if osm_file is set
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
db917cb0d4
Made sure legacy import command still works
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
ba6cdd875d
Removed unused variable, fixed connection
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
d231ff60ed
Removed _is_complete_import check
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
c74904d075
Improved logic.
...
Fixed small oversight in mutually exclusiveness of arguments
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
667197a47e
Changed naming of flags.
...
Made sure legacy import is also still ok
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
e7b8e1a2c2
Fixed ci-tests, osm-file flag
...
Preparing database should work without osm-file
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
279b4fd6d2
Renamed flags
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
b7c83d3580
Fixed pylint warnings
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
38369ca3cf
Fixed typo
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
cc0bdd34e9
Fixed linting errors
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
8e71ff329c
Added version check for PostGis and Postgres
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
992703b15e
Added --prepare-database flag
2023-12-07 09:04:33 +01:00
Robbe Haesendonck
ba5ec80611
Added --no-superuser flag
...
To allow import into already existing databases.
Refs: #2719
2023-12-07 09:04:33 +01:00
Sarah Hoffmann
837bdecde8
add skeleton code for convert function
2023-10-23 17:19:12 +02:00
Sarah Hoffmann
1255efba7f
remove unused code
2023-10-23 11:55:18 +02:00
lujoh
418f381b49
made age a required argument for the -clean-deleted command
2023-10-20 15:31:55 -04:00
lujoh
9ec26c60ff
adjusted tests for --clean-deleted-relations command
2023-10-17 23:03:37 -04:00
lujoh
e9efef9095
added subcommand to clean deleted relations for issue # 2444
2023-10-16 11:30:58 -04:00
Sarah Hoffmann
f1fbcd863d
switch back meaning of reverse and search in warm
...
Also do'n try to warm up searches on reverse-only databases.
Fixes #3213 .
2023-10-04 15:19:24 +02:00
Sarah Hoffmann
7fcbe13669
move get_addressdata() implementation to Python
...
The pgsql function get_addressdata() does a lookup of a lot of data
that is already available in Python.
2023-09-26 11:21:36 +02:00
Sarah Hoffmann
5762a5bc80
move localization into add_result_details
...
This means that the locale now needs to be handed in into the search
functions already. At least search needs them for reranking.
2023-09-19 11:17:04 +02:00
Sarah Hoffmann
9448c5e16f
add tests for new arm and export Python functions
2023-07-26 11:09:52 +02:00
Sarah Hoffmann
d545c6d73c
mostly remove php-cgi requirement
...
This is now only needed for BDD tests against the php API.
2023-07-26 00:10:11 +02:00
Sarah Hoffmann
f69fea4210
remove now unused run_api_script function
2023-07-25 22:45:29 +02:00
Sarah Hoffmann
0804cc0cff
port export function to Python
...
Some of the parameters have been renoved as they don't make sense
anymore.
2023-07-25 21:39:23 +02:00
Sarah Hoffmann
faeee7528f
move warm script to python code
2023-07-25 21:39:23 +02:00
Sarah Hoffmann
6f3339cc49
close DB connection when waiting for next update cycle
2023-06-19 12:02:51 +02:00
Sarah Hoffmann
0608cf1476
switch CLI search command to python implementation
2023-05-24 22:54:54 +02:00
Sarah Hoffmann
f335e78d1e
make localisation of results explicit
...
Localisation was previously done as part of the formatting but might
also be useful on its own when working with the results directly.
2023-05-24 18:12:34 +02:00
Sarah Hoffmann
39ccb15880
enable debug output on command line
2023-05-18 22:37:46 +02:00
Sarah Hoffmann
32dbf83747
move zoom_to_rank computation to extra file
2023-05-18 18:29:41 +02:00
Sarah Hoffmann
bef5cea48e
switch API parameters to keyword arguments
...
This switches the input parameters for API calls to a generic
keyword argument catch-all which is then loaded into a dataclass
where the parameters are checked and forwarded to internal
function.
The dataclass gives more flexibility with the parameters and makes
it easier to reuse common parameters for the different API calls.
2023-05-18 17:42:23 +02:00
Sarah Hoffmann
1dce2b98b4
switch CLI lookup command to Python implementation
2023-04-03 14:40:41 +02:00
Sarah Hoffmann
6e81596609
rename lookup() API to details and add lookup call
...
The initial plan to serve /details and /lookup endpoints from
the same API call turned out to be impractical, so the API now
also has deparate functions for both.
2023-04-03 14:40:41 +02:00
Sarah Hoffmann
683a3cb3ec
call osm2pgsql postprocessing flush_deleted_places() when adding data
2023-03-31 18:05:07 +02:00
Sarah Hoffmann
6c67a4b500
switch reverse CLI command to Python implementation
2023-03-26 18:09:33 +02:00
Sarah Hoffmann
00e3a752c9
split SearchResult type
...
Use adapted types for the different result types. This makes it
easier to have adapted output formatting and means there are only
result fields that are filled.
2023-03-23 10:16:50 +01:00
Sarah Hoffmann
104722a56a
switch details cli command to new Python implementation
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
8f4426fbc8
reorganize code around result formatting
...
Code is now organized by api version. So formatting has moved to
the api.v1 module. Instead of holding a separate ResultFormatter
object per result format, simply move the functions to the
formater collector and hand in the requested format as a parameter.
Thus reorganized, the api.v1 module can export three simple functions
for result formatting which in turn makes the code that uses
the formatters much simpler.
2023-01-24 17:20:51 +01:00
Sarah Hoffmann
32c1e59622
reorganize api submodule
...
Use a directory for the submodule where the __init__ file contains
the public API. This makes it easier to separate public interface
from the internal implementation.
2023-01-24 13:28:04 +01:00
Sarah Hoffmann
02645277c8
fix typo in argument to details CLI command
...
Fixes #2951 .
2023-01-21 10:44:10 +01:00
Sarah Hoffmann
0c47558729
convert version to named tuple
...
Also return the new NominatimVersion rather than a string in the
status result.
2023-01-03 10:03:00 +01:00
Sarah Hoffmann
23dabad0b0
add sanic development server implementation
2023-01-03 10:02:53 +01:00
Sarah Hoffmann
45c675bd78
implement command line status call in Python
2023-01-03 10:02:35 +01:00