-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow passing bytesio object as json/yaml config (#13)
* fix: json parsing if index out of range * feat: allow parsing of bytesio json/yaml config * fix: allow parsing of bytesio json/yaml config * build: add docker compose setup for running pytest + db * feat: allow passing of BytesIO config to PostgresClient * fix: incorrect handling of dbshell.close() if not exists * fix: update underpass default url * fix: improve handling for queryExec + reduce poll to 2s * test: add test for PostgresClient queryRemote * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * test: force add extra test aoi, comment fgb test * feat: update queryRemote polling interval logic * refactor: add error log if max polling duration reached * test: add logger to remoteQuery tests --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
e76442f
commit 2f1ea40
Showing
8 changed files
with
311 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Copyright (c) 2022, 2023 Humanitarian OpenStreetMap Team | ||
# This file is part of osm-rawdata. | ||
# | ||
# osm-rawdata is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# osm-rawdata is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with osm-rawdata. If not, see <https:#www.gnu.org/licenses/>. | ||
# | ||
|
||
version: "3" | ||
|
||
networks: | ||
net: | ||
name: osm-rawdata | ||
|
||
services: | ||
rawdata: | ||
image: "ghcr.io/hotosm/osm-rawdata:ci" | ||
build: | ||
target: ci | ||
container_name: osm-rawdata | ||
volumes: | ||
# Mount local package | ||
- ./osm_rawdata:/root/.local/lib/python3.10/site-packages/osm_rawdata | ||
# Mount local tests | ||
- ./tests:/data/tests | ||
depends_on: | ||
db: | ||
condition: service_healthy | ||
networks: | ||
- net | ||
restart: "unless-stopped" | ||
command: "pytest" | ||
|
||
db: | ||
image: "postgis/postgis:14-3.4-alpine" | ||
environment: | ||
- POSTGRES_USER=fmtm | ||
- POSTGRES_PASSWORD=testpass | ||
- POSTGRES_DB=underpass | ||
networks: | ||
- net | ||
restart: "unless-stopped" | ||
healthcheck: | ||
test: pg_isready -U fmtm -d underpass | ||
start_period: 5s | ||
interval: 10s | ||
timeout: 5s | ||
retries: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.