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
biswajit-k
ca149fb796
Adds sanitizer for preventing certain tags to enter search index based on parameters
...
fix: pylint error
added docs for delete tags sanitizer
fixed typos in docs and code comments
fix: python typechecking error
fixed rank address type
Revert "fixed typos in docs and code comments"
This reverts commit 6839eea755a87f557895f30524fb5c03dd983d60.
added default parameters and refactored code
added test for all parameters
2023-03-09 14:18:39 +05:30
Sarah Hoffmann
412ead5f2d
adapt PHP tests for debug output
2023-02-20 16:23:28 +01:00
Sarah Hoffmann
d574ceb598
restrict place rank inheritance to address items
...
Place tags must have no influence on street- or POI-level
objects.
2023-02-17 16:25:26 +01:00
Sarah Hoffmann
ee0c5e24bb
add a WKB decoder for the Point class
...
This allows to return point geometries from the database and makes
the SQL a bit simpler.
2023-02-16 17:29:56 +01:00
Sarah Hoffmann
8557105c40
add debug output for unit tests
...
This uses the debug output facility meant for pretty HTML output
to give us debugging output for the unit tests.
2023-02-14 11:57:37 +01:00
Sarah Hoffmann
42c3754dcd
add tests for details result formatting and trim results
...
Values that are None are no longer included in the output to save
a bit of bandwidth.
2023-02-04 21:22:22 +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
104722a56a
switch details cli command to new Python implementation
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
1924beeb20
add lookup of postcdoe data
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
70f6f9a711
add lookup of tiger data
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
f1ceefe9a6
add lookup of address interpolations
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
189f74a40d
add unit tests for lookup function
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
370c9b38c0
improve scaffolding for API unit tests
...
Use the static table definition to create the test database.
Add helper function to simplify filling the tables.
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
16b6484c65
add property cache for API
...
This caches results from querying nominatim_properties.
2023-01-30 09:36:17 +01:00
Sarah Hoffmann
77bec1261e
add streaming json writer for JSON output
2023-01-25 15:05:33 +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
3cc357bffa
Merge pull request #2955 from lonvia/fix-importance-refresh
...
Fix importance recalculation
2023-01-23 09:07:43 +01:00
Sarah Hoffmann
ce9ed993c8
fix importance recalculation
...
The signature of the compute_importance() function has changed.
2023-01-22 22:32:16 +01:00
Sarah Hoffmann
929a13d4cd
remove comma as name separator
...
Commas are most of the time used as a part of a name, not to
separate multiple names.
See also #2950 .
2023-01-22 22:29:36 +01:00
Sarah Hoffmann
5f4e98e0d9
update Makefile in test directory
2023-01-09 20:49:33 +01:00
Sarah Hoffmann
a72e2ecb3f
update dependencies for Actions
2023-01-03 10:03:00 +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
93b9288c30
fix error message for non-existing database
2023-01-03 10:03:00 +01:00
Sarah Hoffmann
9d31a67116
add unit tests for new Python API
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
89a34e7508
adapt tests for new lua styles
2022-12-19 17:32:28 +01:00
Sarah Hoffmann
a915815e4d
explicit export for functions in flex-base
2022-12-18 10:10:58 +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
41e8bddaa9
remove BDD test for tiger:county
...
We no longer rely on the import to strip the tag.
2022-11-23 10:37:27 +01:00
Sarah Hoffmann
fd3dec8efe
add sanitizer for TIGER tags
...
Currently only takes over cleaning the tiger:county data. This was
done by the import until now.
2022-11-23 10:37:27 +01:00
Sarah Hoffmann
c9ff7d2130
drop illegal values for addr:interpolation on update
2022-11-18 17:26:56 +01:00
Sarah Hoffmann
52456230cc
Merge pull request #2887 from lonvia/lookup-linked-places
...
Add support for lookup of linked places
2022-11-17 13:35:53 +01:00
Sarah Hoffmann
c4b13f2b7f
add support for lookup of linked places
2022-11-16 21:34:45 +01:00
Sarah Hoffmann
4f05a03d13
handle associatedStreet relations with multiple streets
...
When a associatedStreet relation has multiple street members
always take the closest one. Avoid geometry operations for
the frequent case that there is only one street.
2022-11-16 17:25:51 +01:00
Sarah Hoffmann
93ada250f7
bdd: add tests for osm2pgsql update of postcode nodes
2022-11-14 17:27:04 +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
36cf0eb922
reorganize handling of place type changes
...
Always replace existing entries in place, never delete them because
a direct delete will cause conflicts.
2022-11-14 13:57:26 +01:00
Sarah Hoffmann
63a9bc94f7
fix country handling in flex style
...
If the country tag does not match a 2-letter code, it needs to
be dropped.
2022-11-10 15:52:13 +01:00
Sarah Hoffmann
2dafc4cf4f
remove tests that differ between lua and gazetteer versions
2022-11-10 15:51:55 +01:00