Skip to content

Commit

Permalink
Docker updates for dev-31, pygeoapi 0.19.0 and Ubuntu:jammy
Browse files Browse the repository at this point in the history
- Point deploy-nightly-docker.sh to jammy branch
- Use pygeoapi 0.19.0
- Add project-name docker-compose command for nightly deploy
- Update collection.html template; removed Output formats and added Parameters table
- Add edr/query.html, edr/instance.html, edr/instances.html and map/metadata.html templates
- Update french translations
- Other minor updates using collections_path and dataset_path for ease of pathing in templates
- Update README with i18n instructions
  • Loading branch information
tomkralidis authored and Kevin Ngai committed Jan 10, 2025
1 parent 976aeb8 commit bc8c4aa
Show file tree
Hide file tree
Showing 17 changed files with 794 additions and 505 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ dist
node_modules
schemas.opengis.net
.pot
theme/static/themes-gcweb
theme/static/themes-gcweb
locale/messages.pot
10 changes: 9 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@
#
###################################################################

FROM ubuntu:jammy
FROM ubuntu:jammy

ARG PYGEOAPI_GITREPO=https://github.com/geopython/pygeoapi.git

ENV BASEDIR=/data/web/msc-pygeoapi-nightly
ENV DEBIAN_FRONTEND=noninteractive
ENV DEBIAN_FRONTEND=noninteractive

WORKDIR $BASEDIR

Expand All @@ -43,13 +45,18 @@ RUN apt-get update && \
add-apt-repository ppa:gcpp-kalxas/wmo-staging && \
add-apt-repository ppa:ubuntugis/ppa && apt update
RUN apt-get install -y python3 python3-setuptools python3-pip git curl unzip python3-click python3-fiona python3-gdal python3-lxml python3-parse python3-pyproj python3-rasterio python3-requests python3-slugify python3-sqlalchemy python3-unicodecsv python3-xarray python3-yaml
apt-get install -y software-properties-common && \
add-apt-repository ppa:gcpp-kalxas/wmo-staging && \
add-apt-repository ppa:ubuntugis/ppa && apt update
RUN apt-get install -y python3 python3-setuptools python3-pip git curl unzip python3-click python3-fiona python3-gdal python3-lxml python3-parse python3-pyproj python3-rasterio python3-requests python3-slugify python3-sqlalchemy python3-unicodecsv python3-xarray python3-yaml

# install pygeoapi
RUN git clone $PYGEOAPI_GITREPO -b 0.18.0 && \
RUN git clone $PYGEOAPI_GITREPO -b 0.19.0 && \
cd pygeoapi && \
pip3 install -r requirements.txt && \
pip3 install flask_cors gunicorn gevent greenlet && \
pip3 install . && \
pip3 install . && \
cd ..

# requirement of GEOMET_CLIMATE_CONFIG file
Expand All @@ -76,6 +83,7 @@ RUN cd msc-pygeoapi && \
rm -f ./themes-gcweb.zip && \
# install msc-pygeoapi
pip3 install . && \
pip3 install . && \
# show version
MSC_PYGEOAPI_VERSION=$(dpkg-parsechangelog -SVersion) && \
sed -i "s/MSC_PYGEOAPI_VERSION/$MSC_PYGEOAPI_VERSION/" theme/templates/_base.html && \
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,22 @@ pytest test/test_hydat.py --url https://example.org/dev
pytest -k 'not api'
```

### Multilingual Updates

```bash
# Extract from latest code the keys to be translated
pybabel extract -F babel-mapping.ini -o locale/messages.pot ./

# Update the existing .po language file with new/updated keys:
pybabel update -d locale -l fr -i locale/messages.pot

# Open the relevant .po file and contribute your translations
vi locale/fr/LC_MESSAGES/messages.po

# Then compile a .mo file to be used by the application
pybabel compile -d locale -l fr
```

## Releasing

```bash
Expand Down
66 changes: 0 additions & 66 deletions deploy/default/msc-pygeoapi-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4302,72 +4302,6 @@ resources:
data: ${MSC_PYGEOAPI_ES_URL}/coastal_flood_risk_index
id_field: id

wis2-discovery-metadata:
type: collection
title: WMO WIS2 discovery metadata (experimental)
description: WMO WIS2 discovery metadata (experimental)
keywords:
en: [wmo, wis2, discovery, metadata]
fr: [wmo, wis2, discovery, metadata]
crs:
- CRS84
links:
- type: text/html
rel: canonical
title:
en: WMO Information System
fr: WMO Information System
href:
en: https://community.wmo.int/activity-areas/wis
fr: https://community.wmo.int/activity-areas/wis
hreflang:
en: en-US
fr: en-US
extents:
spatial:
bbox: [-180, -90, 180, 90]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
providers:
- type: record
name: msc_pygeoapi.provider.elasticsearch.ElasticsearchCatalogueWMOWIS2GDCProvider
data: ${MSC_PYGEOAPI_ES_URL}/wis2-discovery-metadata
id_field: id

wis2-notification-messages:
type: collection
title:
en: WMO WIS2 notification messages (experimental)
fr: WMO WIS2 notification messages (experimental)
description:
en: WMO WIS2 notification messages (experimental)
fr: WMO WIS2 notification messages (experimental)
keywords:
en: [wmo, wis2, notification, messages]
fr: [wmo, wis2, notification, messages]
crs:
- CRS84
links:
- type: text/html
rel: canonical
title:
en: WMO Information System
fr: WMO Information System
href:
en: https://community.wmo.int/activity-areas/wis
fr: https://community.wmo.int/activity-areas/wis
hreflang:
en: en-US
fr: en-US
extents:
spatial:
bbox: [-180, -90, 180, 90]
crs: http://www.opengis.net/def/crs/OGC/1.3/CRS84
providers:
- type: feature
name: msc_pygeoapi.provider.elasticsearch.ElasticsearchWMOWIS2BrokerMessagesProvider
data: ${MSC_PYGEOAPI_ES_URL}/wis2-notification-messages*
id_field: id

raster-drill:
type: process
processor:
Expand Down
Loading

0 comments on commit bc8c4aa

Please sign in to comment.