Skip to content

Commit

Permalink
Merge pull request #106 from opengisch/fix-non-ili
Browse files Browse the repository at this point in the history
check table existance for source that is non-INTERLIS
  • Loading branch information
signedav authored Oct 7, 2024
2 parents 1b0934f + 453fac3 commit e99347b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ jobs:
run: |
sudo ./scripts/package_pip_packages.sh
- name: Test on QGIS with PG 13
run: docker-compose -f .docker/docker-compose.gh.yml run -e "PGHOST=postgres13" qgis /usr/src/.docker/run-docker-tests.sh
run: docker compose -f .docker/docker-compose.gh.yml run -e "PGHOST=postgres13" qgis /usr/src/.docker/run-docker-tests.sh
- name: Test on QGIS with PG 15
run: docker-compose -f .docker/docker-compose.gh.yml run -e "PGHOST=postgres15" qgis /usr/src/.docker/run-docker-tests.sh
run: docker compose -f .docker/docker-compose.gh.yml run -e "PGHOST=postgres15" qgis /usr/src/.docker/run-docker-tests.sh

release:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
Expand Down
3 changes: 3 additions & 0 deletions modelbaker/dbconnector/gpkg_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,9 @@ def get_attrili_attrdb_mapping_by_owner(self, owners):
return cursor

def get_models(self):
if not self._table_exists("t_ili2db_trafo"):
return {}

# Get MODELS
cursor = self.conn.cursor()

Expand Down
3 changes: 3 additions & 0 deletions modelbaker/dbconnector/mssql_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,9 @@ def get_iliname_dbname_mapping(self, sqlnames=list()):
return result

def get_models(self):
if not self._table_exists("t_ili2db_trafo"):
return {}

# Get MODELS
if self.schema:
cur = self.conn.cursor()
Expand Down
3 changes: 3 additions & 0 deletions modelbaker/dbconnector/pg_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,9 @@ def get_attrili_attrdb_mapping_by_owner(self, owners):
return {}

def get_models(self):
if not self._table_exists("t_ili2db_trafo"):
return {}

# Get MODELS
if self.schema:
cursor = self.conn.cursor(cursor_factory=psycopg2.extras.DictCursor)
Expand Down
4 changes: 2 additions & 2 deletions scripts/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@ fi
cd $(dirname $0)/..
export GITHUB_WORKSPACE=$PWD # only for local execution

docker-compose -f .docker/docker-compose.gh.yml run qgis /usr/src/.docker/run-docker-tests.sh $@
docker-compose -f .docker/docker-compose.gh.yml rm -s -f
docker compose -f .docker/docker-compose.gh.yml run qgis /usr/src/.docker/run-docker-tests.sh $@
docker compose -f .docker/docker-compose.gh.yml rm -s -f

0 comments on commit e99347b

Please sign in to comment.