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
b320f1c7e3
Merge pull request #2978 from lonvia/add-debug-view
...
Add debug view to Python API
2023-02-14 14:08:42 +01:00
Sarah Hoffmann
6c6b1c0606
add typing information for pygments to requirements
2023-02-14 11:58:08 +01:00
Sarah Hoffmann
a5f5add630
actions: use token to avoid rate limiting
2023-02-14 11:57:37 +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
24e7ffb289
add HTML-formatted debug output to lookup
2023-02-14 11:57:37 +01:00
Sarah Hoffmann
0b9bcfe01d
Merge pull request #2974 from bloom256/main-tag-in-reverse-lookup
...
Main tag information added to geocodejson in reverse geocoding
2023-02-11 11:01:11 +01:00
Sarah Hoffmann
1a0e8f810b
Merge pull request #2975 from bloom256/typo-fix
...
typo fixed
2023-02-11 11:00:15 +01:00
danil
7698f0672d
typo fixed
2023-02-08 00:21:58 +04:00
danil
da064ea702
Main tag information added to geocodejson in reverse geocoding
2023-02-08 00:19:49 +04:00
Sarah Hoffmann
0c65289a80
Merge pull request #2970 from lonvia/add-details-endpoint
...
Python implementation of details endpoint
2023-02-06 16:32:35 +01:00
Sarah Hoffmann
95c90a785f
actions: force PHPUnit 9
...
PHPUnit 10 is incompatible with our tests. Not worth adapting anymore.
2023-02-04 21:22:22 +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
e1fc1566f3
fix new linting issues from pylint 2.16
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
df65c10360
add lookup() call to the library API
...
Currently only looks places up in placex.
2023-02-04 21:22:22 +01:00
Sarah Hoffmann
4573389da7
docs: fix internal links
...
Fixes #2968 .
2023-02-04 21:21:23 +01:00
Sarah Hoffmann
5c55c1d8a1
Merge pull request #2963 from lonvia/add-sqlalchemy-schema
...
Add table definitions for SQLAlchemy
2023-01-30 11:17:22 +01:00
Sarah Hoffmann
a1d4e53eb8
add pytest-asyncio as a requirement for testing
2023-01-30 09:36:17 +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
2156fd4909
adapt annotations for SQLAlchemy 2.x
...
It is not possible to produce type annotations that work with both
versions 1.4 and 2.0. So keep to the principle of only supporting
newest versions when it comes to mypy. This means that some types
may have to be string quoted to not cause issues when running with
SQLAlchemy 1.4.
2023-01-28 11:51:26 +01:00
Sarah Hoffmann
7f5fbe1dc7
add new geoalchemy requirement
2023-01-28 11:51:26 +01:00
Sarah Hoffmann
2e9090d121
adapt status to use SQLAlchemy tables
2023-01-28 11:51:26 +01:00
Sarah Hoffmann
23f2690c54
convert StatusResult to a dataclass
...
This gives us nice str() functions.
2023-01-28 11:51:26 +01:00
Sarah Hoffmann
5226cd2a0b
add SQLAlchemy table schema for Nominatim tables
...
Also defines an extended connection object that includes access to
the table definitions. Makes it easier to access the tables from
code that has been split off into separate modules.
2023-01-28 11:51:26 +01:00
Sarah Hoffmann
c7e8a82d68
Merge pull request #2958 from lonvia/streaming-json-writer
...
Introduce streaming json writer for JSON output
2023-01-25 17:36:23 +01:00
Sarah Hoffmann
77bec1261e
add streaming json writer for JSON output
2023-01-25 15:05:33 +01:00
Sarah Hoffmann
dfcb24061e
Merge pull request #2957 from lonvia/reorganise-api-module
...
Assorted improvements to the new api library module
2023-01-25 09:29:31 +01:00
Sarah Hoffmann
f85b0c6208
allow to add php-compatible endpoints
...
If the new setting NOMINATIM_SERVE_LEGACY_URLS is set, the servers
expose the endpoints also with the .php suffix to ensure backwards
compatibility.
2023-01-24 21:39:19 +01:00
Sarah Hoffmann
e490a30a4a
add support for CORS headers
...
Adds the additional dependency to sanic-cors for the Sanic server.
2023-01-24 21:39:19 +01:00
Sarah Hoffmann
654b652530
factor out common server implementation code
...
Most of the server implementation of V1 API now resides in
api.v1.server_glue. The webframeworks only supply some glue code
which is independent to changes in the API code.
2023-01-24 21:39:19 +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
e56957f047
api: delay setup of initial database connection
...
Defer database setup until the first call to a function. Needs an
additional lock because the setup still needs to be done sequentially.
2023-01-24 10:56:22 +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
388faa2c54
Merge pull request #2954 from lonvia/remove-comma-as-separator
...
Remove comma as name separator
2023-01-23 09:06:23 +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
56f0d678e3
exclude names ending in :wikipedia from indexing
...
The wikipedia prefix is used for referencing a wikipedia article
for the given tag, not the object, so not useful to search.
2023-01-21 11:16:08 +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
5f4e98e0d9
update Makefile in test directory
2023-01-09 20:49:33 +01:00
Sarah Hoffmann
e9e14834bc
Merge pull request #2940 from lonvia/remove-ubuntu-18-from-actions
...
Actions: use Ubuntu 20 image for testing old versions of dependent software
2023-01-05 20:16:19 +01:00
Sarah Hoffmann
5a57d6308e
increase minimum required version of PHP to 7.3
...
Other versions are not tested anymore.
2023-01-05 16:58:46 +01:00