Compare commits

...

5 Commits

Author SHA1 Message Date
Sarah Hoffmann
cd2f6e458b Merge pull request #3970 from lonvia/improve-dev-docs
Some minor improvement to developer docs
2026-02-05 21:57:54 +01:00
Sarah Hoffmann
fc49a77e70 Merge pull request #3960 from jayaddison/tests/has-pending-monkeypatch-robustness
Tests: parameter-agnostic 'Indexer.has_pending' monkeypatching
2026-02-05 21:05:57 +01:00
Sarah Hoffmann
28baa34bdc point to developer docs from CONTRIBUTING.md 2026-02-05 20:51:41 +01:00
Sarah Hoffmann
151a5b64a8 docs: fix list of packages for development install 2026-02-05 20:45:18 +01:00
James Addison
3db7c6d804 Tests: parameter-agnostic has_pending monkeypatching
Instead of relying on runtime parameter compatibility between
the patched `has_pending` method and `list.pop`, use a proxy
lambda function that accepts arbitrary keyword params.
2026-02-05 15:09:09 +00:00
3 changed files with 14 additions and 4 deletions

View File

@@ -42,6 +42,15 @@ description or in documentation need to
sufficient. You need to show that the code actually solves the problem
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

View File

@@ -56,7 +56,7 @@ The easiest way, to handle these Python dependencies is to run your
development from within a virtual environment.
```sh
sudo apt install libsqlite3-mod-spatialite osm2pgsql \
sudo apt install build-essential libsqlite3-mod-spatialite osm2pgsql \
postgresql-postgis postgresql-postgis-scripts \
pkg-config libicu-dev virtualenv
```
@@ -68,11 +68,11 @@ virtualenv ~/nominatim-dev-venv
~/nominatim-dev-venv/bin/pip install\
psutil 'psycopg[binary]' PyICU SQLAlchemy \
python-dotenv jinja2 pyYAML \
mkdocs 'mkdocstrings[python]' mkdocs-gen-files \
mkdocs 'mkdocstrings[python]' mkdocs-gen-files mkdocs-material \
pytest pytest-asyncio pytest-bdd flake8 \
types-jinja2 types-markupsafe types-psutil types-psycopg2 \
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
```

View File

@@ -91,8 +91,9 @@ class TestCliWithDb:
postcode_mock = async_mock_func_factory(nominatim_db.indexer.indexer.Indexer,
'index_postcodes')
has_pending_retvals = [True, False]
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