Skip to content

For Developers

Local development environment for InfDB for developers

# on linux and macos by installation script
curl -LsSf https://astral.sh/uv/install.sh | sh
# or by pip
pip install uv

Create environment (only once)

# linux and macos
uv sync

Activate environment

# linux and macos
source .venv/bin/activate
# windows
venv\Scripts\activate

Clean repo

git fetch origin
git reset --hard
git clean -fdx

Stop and remove all docker containers and volumes

# 1. Stop all containers
docker stop $(docker ps -a -q)

# 2. Remove all containers (breaks the link to the volumes)
docker rm $(docker ps -a -q)

# 3. Delete all volumes
docker volume rm $(docker volume ls -q)

Clean docker

docker system prune -a --volume

Tree with permission

tree -pug
# -p permissions
# -u user
# -g group

PyPi package build and upload

uv build
uv publish --token YOUR_PYPI_TOKEN

PSQL Connection to infDB

# on linux and macos
PGPASSWORD='citydb_password' psql -h localhost -p 5432 -U citydb_user -d citydb

Configurations (only in addition for QGIS Desktop)

.pg_service.conf for QGIS to connect to InfDB via service

[infdb_postgres]
host=localhost
port=5432
dbname=citydb
user=citydb_user
password=citydb_password
sslmode=disable