Skip to content

Commit

Permalink
Merge pull request #4968 from camptocamp/merge23
Browse files Browse the repository at this point in the history
Merge remote-tracking branch 'origin/2.3' into 2.4
  • Loading branch information
sbrunner committed Jun 5, 2019
2 parents 5cb7d70 + 7cb1c29 commit ad01e04
Show file tree
Hide file tree
Showing 19 changed files with 40 additions and 25 deletions.
3 changes: 2 additions & 1 deletion Dockerfile.mako
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ COPY webpack.config.js /tmp

RUN \
extract-ngeo-dependencies > /tmp/deps.js && \
(cd /tmp; webpack --mode production --profile --json > stats.json) || webpack --mode production
cd /tmp && \
webpack --mode production --profile --json > stats.json || webpack --mode production

RUN \
mkdir --parents /opt/angular-locale && \
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ docker-build: docker-pull
.PHONY: build
build: \
docker-build-build \
docker-build-config \
docker-build-qgisserver \
prepare-tests

Expand Down Expand Up @@ -206,6 +207,10 @@ docker-build-build: $(shell docker-required --path . --replace-pattern='^test(.*
$(MO_FILES)
docker build --build-arg=VERSION=$(VERSION) --tag=$(DOCKER_BASE)-build:$(MAJOR_VERSION) .

.PHONY: docker-build-config
docker-build-config:
docker build --tag=$(DOCKER_BASE)-config:$(MAJOR_VERSION) docker/config

docker/qgisserver/commons: commons
rm --recursive --force $@
cp --recursive $< $@
Expand Down
1 change: 1 addition & 0 deletions admin/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
version=VERSION,
description='c2cgeoportal admin',
long_description=README,
long_description_content_type='text/markdown',
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 3',
Expand Down
1 change: 1 addition & 0 deletions commons/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
version=VERSION,
description='c2cgeoportal commons',
long_description=README,
long_description_content_type='text/markdown',
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 3',
Expand Down
8 changes: 8 additions & 0 deletions docker/config/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM debian:stretch
LABEL maintainer Camptocamp "info@camptocamp.com"

RUN \
apt-get update && \
apt-get install --assume-yes --no-install-recommends gettext-base python3 && \
apt-get clean && \
rm --recursive --force /var/lib/apt/lists/*
1 change: 1 addition & 0 deletions geoportal/c2cgeoportal_geoportal/lib/lingua_extractor.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,6 +460,7 @@ def _import_layer_wmts(self, layer, messages):
layers = [d.value for d in layer.metadatas if d.name == "wmsLayer"]
server = [d.value for d in layer.metadatas if d.name == "ogcServer"]
if len(server) >= 1 and len(layers) >= 1:
layers = [l for ls in layers for l in ls.split(',')]
for wms_layer in layers:
try:
db_server = DBSession.query(OGCServer).filter(OGCServer.name == server[0]).one()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*.pyo
__pycache__/
/project.yaml
/Dockerfile
/.env
/docker-compose.override.yaml
/mapcache/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
FROM debian:stretch
LABEL maintainer Camptocamp "info@camptocamp.com"

RUN \
apt-get update && \
apt-get install --assume-yes --no-install-recommends gettext-base python3 && \
apt-get clean && \
rm --recursive --force /var/lib/apt/lists/*
FROM camptocamp/geomapfish-build:${geomapfish_version}

COPY . /tmp/config/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ vars:
default:
constants:
defaultTheme: Demo
defaultLang: en
defaultLang: '{default_locale_name}'
ngeoWfsPermalinkOptions:
wfsTypes:
- featureType: fuel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
__pycache__/
/.build
/project.yaml
/Dockerfile
/docker-compose-dev.yaml
/docker-compose-front.yaml
/docker-compose-lib.yaml_tmpl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ ifeq ($(OPERATING_SYSTEM), WINDOWS)
$(PYTHON_BIN)/python -m pip install -r requirements.txt
$(PYTHON_BIN)/python -m pip install $(shell python ./get-pip-dependencies c2cgeoportal-commons c2cgeoportal-geoportal c2cgeoportal-admin linesman networkx pygraphviz pyproj Shapely Fiona rasterio GDAL flake8-mypy mypy)
else
$(PYTHON_BIN)/python -m pip install `./get-pip-dependencies c2cgeoportal-commons c2cgeoportal-geoportal c2cgeoportal-admin GDAL flake8-mypy mypy`
$(PYTHON_BIN)/python -m pip install `./get-pip-dependencies c2cgeoportal-commons c2cgeoportal-geoportal c2cgeoportal-admin GDAL flake8-mypy mypy graphviz`
$(PYTHON_BIN)/python -m pip install -r requirements.txt
endif
$(PYTHON_BIN)/python -m pip install --editable=c2cgeoportal_commons --editable=c2cgeoportal_geoportal --editable=c2cgeoportal_admin
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://repo1.maven.org/maven2/org/mapfish/print/print-servlet/3.10.7/print-servlet-3.10.7.war
https://repo1.maven.org/maven2/org/mapfish/print/print-servlet/3.10.8/print-servlet-3.10.8.war
Original file line number Diff line number Diff line change
Expand Up @@ -310,3 +310,6 @@ files_to_move:
- from: docker-compose-dev.yaml.mako
to: docker-compose-dev.yaml
version: 2.4
- from: Dockerfile
to: Dockerfile.mako
version: 2.3
Original file line number Diff line number Diff line change
Expand Up @@ -324,3 +324,6 @@ files_to_move:
- from: docker-compose-dev.yaml.mako
to: docker-compose-dev.yaml
version: 2.4
- from: Dockerfile
to: Dockerfile.mako
version: 2.3
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ docker-build-config: $(shell docker-required --path .) \
$(PRINT_CONFIG_FILE) \
$(MAPCACHE_FILE) \
qgisserver/geomapfish.yaml
docker build --tag=$(DOCKER_BASE)-config:$(DOCKER_TAG) .
docker build --tag=$(DOCKER_BASE)-config:$(DOCKER_TAG) --build-arg=VERSION=$(GEOMAPFISH_VERSION) .

.PHONY: docker-build-geoportal
docker-build-geoportal: $(shell docker-required --path geoportal) \
Expand Down
4 changes: 2 additions & 2 deletions geoportal/c2cgeoportal_geoportal/views/entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,10 @@ def _wms_getcap_cached(self, ogc_server, _):
return url, None, errors

# With wms 1.3 it returns text/xml also in case of error :-(
if response.headers["Content-Type"].split(";")[0].strip() not in \
if response.headers.get("Content-Type", '').split(";")[0].strip() not in \
["application/vnd.ogc.wms_xml", "text/xml"]:
error = "GetCapabilities from URL {} returns a wrong Content-Type: {}\n{}".format(
url, response.headers["Content-Type"], response.text
url, response.headers.get("Content-Type", ''), response.text
)
errors.add(error)
LOG.error(error)
Expand Down
10 changes: 2 additions & 8 deletions travis/publish
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ then
fi

# Publish the GeoMapFish images
for IMAGE in geomapfish-build-dev geomapfish-build
for IMAGE in geomapfish-build-dev geomapfish-build geomapfish-config
do
docker tag camptocamp/${IMAGE}:${MAJOR_VERSION} camptocamp/${IMAGE}:${VERSION}
docker push camptocamp/${IMAGE}:${VERSION}
Expand All @@ -67,13 +67,7 @@ then
for PKG in commons geoportal admin
do
export PKG
./docker-run \
--env=PYPI_USERNAME \
--env=PYPI_PASSWORD \
--env=VERSION \
--env=MAJOR_VERSION \
--env=PKG \
travis/publish-pypi
travis/publish-pypi
done
fi

Expand Down
5 changes: 3 additions & 2 deletions travis/publish-pypi
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ echo "password:${PYPI_PASSWORD}" >> ~/.pypirc
cd ${PKG}
if [ "${VERSION}" == "${MAJOR_VERSION}" ]
then
python3 setup.py egg_info --tag-date sdist bdist_wheel upload -r pypi || true
../.venv/bin/python3 setup.py egg_info --tag-date sdist bdist_wheel
else
python3 setup.py egg_info --no-date sdist bdist_wheel upload -r pypi
../.venv/bin/python3 setup.py egg_info --no-date sdist bdist_wheel
fi
../.venv/bin/python3 ../.venv/bin/twine upload dist/*

rm ~/.pypirc
2 changes: 2 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ module.exports = {
'quickselect': '/usr/lib/node_modules/ol/node_modules/quickselect',
'mgrs': '/usr/lib/node_modules/proj4/node_modules/mgrs',
'wkt-parser': '/usr/lib/node_modules/proj4/node_modules/wkt-parser',
'lie': '/usr/lib/node_modules/localforage/node_modules/lie',
'immediate': '/usr/lib/node_modules/localforage/node_modules/immediate',
}
},
optimization: {
Expand Down

0 comments on commit ad01e04

Please sign in to comment.