From 8a64d134bb3be653f6cc4bd40112541e25354db7 Mon Sep 17 00:00:00 2001 From: Itz-Agasta Date: Tue, 24 Mar 2026 23:12:17 +0530 Subject: [PATCH] Document uv as alternative dev env setup --- .gitignore | 3 +++ CONTRIBUTING.md | 1 + docs/develop/Development-Environment.md | 21 +++++++++++++++++++++ 3 files changed, 25 insertions(+) diff --git a/.gitignore b/.gitignore index 23bcdb1c..f64f9e5a 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,6 @@ dist .vagrant data/country_osm_grid.sql.gz + +# Not committed per project policy +uv.lock diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bc88d64f..2132922c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -64,6 +64,7 @@ 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/) + using virtualenv or [uv](https://docs.astral.sh/uv/) * and background on [how tests are organised](https://nominatim.org/release-docs/develop/develop/Testing/) diff --git a/docs/develop/Development-Environment.md b/docs/develop/Development-Environment.md index af359804..a1de121a 100644 --- a/docs/develop/Development-Environment.md +++ b/docs/develop/Development-Environment.md @@ -82,6 +82,27 @@ Now enter the virtual environment whenever you want to develop: . ~/nominatim-dev-venv/bin/activate ``` +### Alternative: Using uv + +If you prefer, you can use [uv](https://docs.astral.sh/uv/) for a faster +development setup. Install uv following the +[official instructions](https://docs.astral.sh/uv/getting-started/installation/), +then from the Nominatim source directory: + +```sh +uv sync +``` + +This creates a virtual environment and installs all Python dependencies +automatically. To run commands in the environment: + +```sh +uv run nominatim --version +uv run pytest test/python +uv run make lint +``` + + ### Running Nominatim during development The source code for Nominatim can be found in the `src` directory and can -- 2.47.3