mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-13 14:24:08 +00:00
Compare commits
5 Commits
b2f868d2fc
...
cd2f6e458b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cd2f6e458b | ||
|
|
fc49a77e70 | ||
|
|
28baa34bdc | ||
|
|
151a5b64a8 | ||
|
|
3db7c6d804 |
@@ -42,6 +42,15 @@ description or in documentation need to
|
|||||||
sufficient. You need to show that the code actually solves the problem
|
sufficient. You need to show that the code actually solves the problem
|
||||||
the PR claims to solve.
|
the PR claims to solve.
|
||||||
|
|
||||||
|
## Getting Started with Development
|
||||||
|
|
||||||
|
Please see the development section of the Nominatim documentation for
|
||||||
|
|
||||||
|
* [an architecture overview](https://nominatim.org/release-docs/develop/develop/overview/)
|
||||||
|
and backgrounds on some of the algorithms
|
||||||
|
* [how to set up a development environment](https://nominatim.org/release-docs/develop/develop/Development-Environment/)
|
||||||
|
* and background on [how tests are organised](https://nominatim.org/release-docs/develop/develop/Testing/)
|
||||||
|
|
||||||
|
|
||||||
## Coding style
|
## Coding style
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ The easiest way, to handle these Python dependencies is to run your
|
|||||||
development from within a virtual environment.
|
development from within a virtual environment.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo apt install libsqlite3-mod-spatialite osm2pgsql \
|
sudo apt install build-essential libsqlite3-mod-spatialite osm2pgsql \
|
||||||
postgresql-postgis postgresql-postgis-scripts \
|
postgresql-postgis postgresql-postgis-scripts \
|
||||||
pkg-config libicu-dev virtualenv
|
pkg-config libicu-dev virtualenv
|
||||||
```
|
```
|
||||||
@@ -68,11 +68,11 @@ virtualenv ~/nominatim-dev-venv
|
|||||||
~/nominatim-dev-venv/bin/pip install\
|
~/nominatim-dev-venv/bin/pip install\
|
||||||
psutil 'psycopg[binary]' PyICU SQLAlchemy \
|
psutil 'psycopg[binary]' PyICU SQLAlchemy \
|
||||||
python-dotenv jinja2 pyYAML \
|
python-dotenv jinja2 pyYAML \
|
||||||
mkdocs 'mkdocstrings[python]' mkdocs-gen-files \
|
mkdocs 'mkdocstrings[python]' mkdocs-gen-files mkdocs-material \
|
||||||
pytest pytest-asyncio pytest-bdd flake8 \
|
pytest pytest-asyncio pytest-bdd flake8 \
|
||||||
types-jinja2 types-markupsafe types-psutil types-psycopg2 \
|
types-jinja2 types-markupsafe types-psutil types-psycopg2 \
|
||||||
types-pygments types-pyyaml types-requests types-ujson \
|
types-pygments types-pyyaml types-requests types-ujson \
|
||||||
types-urllib3 typing-extensions unicorn falcon starlette \
|
types-urllib3 typing-extensions gunicorn falcon starlette \
|
||||||
uvicorn mypy osmium aiosqlite mwparserfromhell
|
uvicorn mypy osmium aiosqlite mwparserfromhell
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -91,8 +91,9 @@ class TestCliWithDb:
|
|||||||
postcode_mock = async_mock_func_factory(nominatim_db.indexer.indexer.Indexer,
|
postcode_mock = async_mock_func_factory(nominatim_db.indexer.indexer.Indexer,
|
||||||
'index_postcodes')
|
'index_postcodes')
|
||||||
|
|
||||||
|
has_pending_retvals = [True, False]
|
||||||
monkeypatch.setattr(nominatim_db.indexer.indexer.Indexer, 'has_pending',
|
monkeypatch.setattr(nominatim_db.indexer.indexer.Indexer, 'has_pending',
|
||||||
[False, True].pop)
|
lambda *args, **kwargs: has_pending_retvals.pop(0))
|
||||||
|
|
||||||
assert self.call_nominatim('index', *params) == 0
|
assert self.call_nominatim('index', *params) == 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user