Skip to content

Commit

Permalink
Webmercator anti-meridian handling (#1083)
Browse files Browse the repository at this point in the history
* Hackathon WIP

* Fix Docker image for debugging.

* Additional docker fixes from #1080

* Tweak antimeridian hack and timezone handling.

* Misc cleanup.

* Fix tests - auto-publish 3832 if 3857 is published.

* Fix tests - pass boxed point instead of raw point.

* What layers are getting hidden?

* Layer reprs.

* Typo from a couple of commits ago.

* REALLY fix typo (sigh)

* Workaround core bug and cleanup

* print to echo fix

* Remove separate test db build script.
  • Loading branch information
SpacemanPaul authored Nov 14, 2024
1 parent ac96360 commit 919a987
Show file tree
Hide file tree
Showing 21 changed files with 108 additions and 237 deletions.
4 changes: 2 additions & 2 deletions .env_ows_root
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ DB_DATABASE=opendatacube
#################
# OWS CFG Config
#################
PYTHONPATH=/env/config
PYTHONPATH=/src/config
DATACUBE_OWS_CFG=ows_refactored.ows_root_cfg.ows_cfg

################
Expand All @@ -21,7 +21,7 @@ DATACUBE_OWS_CFG=ows_refactored.ows_root_cfg.ows_cfg
# OWS_CFG_DIR config enables mounting an external CFG folder
OWS_CFG_DIR=~/dea-config/dev/services/wms/ows_refactored
# OWS_CFG_MOUNT_DIR defines the mount inside docker container
OWS_CFG_MOUNT_DIR=/env/config/ows_refactored
OWS_CFG_MOUNT_DIR=/src/config/ows_refactored

################
# AWS S3 Config
Expand Down
4 changes: 2 additions & 2 deletions .env_simple
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ POSTGRES_DB="odc_postgres,odc_postgis"
# OWS CFG Config
#################
DATACUBE_OWS_CFG=config.ows_test_cfg.ows_cfg
PYTHONPATH=/env
PYTHONPATH=/src

################
# Docker Volume
################
# OWS_CFG_DIR config enables mounting an external CFG folder
OWS_CFG_DIR=./integration_tests/cfg
# OWS_CFG_MOUNT_DIR defines the mount inside docker container
OWS_CFG_MOUNT_DIR=/env/config
OWS_CFG_MOUNT_DIR=/src/config

################
# AWS S3 Config
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/complementary-config-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ jobs:
docker compose -f docker-compose.yaml -f docker-compose.cleandb.yaml up -d --wait
docker compose -f docker-compose.yaml -f docker-compose.cleandb.yaml exec -T ows /bin/sh -c "datacube system init; datacube system check"
docker compose -f docker-compose.yaml -f docker-compose.cleandb.yaml exec -T ows /bin/sh -c "curl https://raw.githubusercontent.com/GeoscienceAustralia/dea-config/master/dev/services/wms/inventory.json -o /tmp/inventory.json"
docker compose -f docker-compose.yaml -f docker-compose.db.yaml exec -T ows /bin/sh -c "cd /code && ./compare-cfg.sh"
docker compose -f docker-compose.yaml -f docker-compose.db.yaml exec -T ows /bin/sh -c "cd /src && ./compare-cfg.sh"
docker compose -f docker-compose.yaml -f docker-compose.cleandb.yaml down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Test and lint dev OWS image
run: |
mkdir artifacts
docker run -e LOCAL_UID=$(id -u $USER) -e LOCAL_GID=$(id -g $USER) -v ${PWD}/artifacts:/mnt/artifacts ${ORG}/${IMAGE}:_builder /bin/sh -c "cd /code && ./check-code.sh"
docker run -e LOCAL_UID=$(id -u $USER) -e LOCAL_GID=$(id -g $USER) -v ${PWD}/artifacts:/mnt/artifacts ${ORG}/${IMAGE}:_builder /bin/sh -c "cd /src && ./check-code.sh"
mv ./artifacts/coverage.xml ./artifacts/coverage-unit.xml
- name: Dockerized Integration Pytest
Expand All @@ -64,7 +64,7 @@ jobs:
export LOCAL_GID=$(id -g $USER)
export $(grep -v '^#' .env_simple | xargs)
docker compose -f docker-compose.yaml -f docker-compose.db.yaml up -d --wait --build
docker compose -f docker-compose.yaml -f docker-compose.db.yaml exec -T ows /bin/sh -c "cd /code && ./check-code-all.sh"
docker compose -f docker-compose.yaml -f docker-compose.db.yaml exec -T ows /bin/sh -c "cd /src && ./check-code-all.sh"
docker compose -f docker-compose.yaml -f docker-compose.db.yaml down
- name: Upload All coverage to Codecov
Expand Down
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Note that this is now pinned to a fixed version. Remember to check for new versions periodically.
FROM ghcr.io/osgeo/gdal:ubuntu-small-3.9.1 AS builder
FROM ghcr.io/osgeo/gdal:ubuntu-small-3.9.2 AS builder

# Environment is test or deployment.
ARG ENVIRONMENT=deployment
Expand All @@ -26,7 +26,7 @@ RUN python3 -m pip --disable-pip-version-check -q wheel --no-binary psycopg2 psy
python3 -m pip --disable-pip-version-check -q wheel --no-binary pyproj pyproj)

# Should match builder base.
FROM ghcr.io/osgeo/gdal:ubuntu-small-3.9.1
FROM ghcr.io/osgeo/gdal:ubuntu-small-3.9.2

# Environment is test or deployment.
ARG ENVIRONMENT=deployment
Expand All @@ -40,15 +40,16 @@ RUN export DEBIAN_FRONTEND=noninteractive \
&& ([ "$ENVIRONMENT" = "deployment" ] || \
apt-get install -y --no-install-recommends \
proj-bin) \
&& apt-get upgrade -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /var/dpkg/* /var/tmp/* /var/log/dpkg.log

# Add login-script for UID/GID-remapping.
COPY --chown=root:root --link docker/files/remap-user.sh /usr/local/bin/remap-user.sh

# Copy source code and install it
WORKDIR /code
COPY . /code
WORKDIR /src
COPY . /src

## Only install pydev requirements if arg PYDEV_DEBUG is set to 'yes'
ARG PYDEV_DEBUG="no"
Expand All @@ -62,7 +63,7 @@ RUN EXTRAS=$([ "$ENVIRONMENT" = "deployment" ] || echo ",test") && \
python3 -m pip --disable-pip-version-check install --no-cache-dir .[dev] --break-system-packages) && \
python3 -m pip freeze && \
([ "$ENVIRONMENT" != "deployment" ] || \
(rm -rf /code/* /code/.git* && \
(rm -rf /src/* /src/.git* && \
apt-get purge -y \
git \
git-man \
Expand Down
Loading

0 comments on commit 919a987

Please sign in to comment.