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
Git update with submodules¶
Create environment (only once)¶
Activate environment¶
Clean repo¶
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¶
Tree with permission¶
PyPi package build and upload¶
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
Git¶
# Check for uncommitted changes
git config --global pull.rebase true
git config --global rebase.autostash true
pg_dump¶
Install pg_dump on Ubuntu:
# Install the common package
sudo apt-get update
sudo apt-get install -y postgresql-common
# Run the repository setup script (press Enter when prompted)
sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
sudo apt-get update
sudo apt-get install -y postgresql-client-17
pg_dump --version
Run backup for schemas "basedata" and "linear_heat_density" in the "infdb" database, connecting to localhost on port 54328 with user "infdb_user", and output the backup in custom format to "infdb-nrw_backup.sql":