Skip to content

Commit 84f74c0

Browse files
committed
Merge remote-tracking branch 'upstream/wms_new_layer_factories_clean'
Conflicts: eoxserver/__init__.py eoxserver/instance_template/project_name/templates/404.html eoxserver/instance_template/project_name/templates/500.html eoxserver/services/mapserver/wms/layers/coverage_outlines_layer_factory.py
2 parents ac62f85 + d3c35bb commit 84f74c0

File tree

170 files changed

+7287
-12186
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

170 files changed

+7287
-12186
lines changed

.travis.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
language: python
22
env:
3-
- DJANGO=1.4 GDAL=1.10 DB=spatialite
4-
- DJANGO=1.5 GDAL=1.10 DB=spatialite
3+
- 'DJANGO="1.4.13" GDAL=1.10 DB=spatialite'
4+
- 'DJANGO="1.5.8" GDAL=1.10 DB=spatialite'
55
#- DJANGO=1.6 GDAL=1.10 DB=spatialite
66
python:
77
- "2.7"
88
virtualenv:
99
system_site_packages: true
1010
before_install:
1111
# adding required repo for dependencies
12-
#- sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
13-
- sudo apt-get update -qq
12+
- sudo add-apt-repository -y ppa:ubuntugis/ubuntugis-unstable
13+
- sudo apt-get update
14+
- sudo apt-get install aptitude
1415
# install a lot of deps from the apt-repos
15-
- sudo apt-get install -qq -y gdal-bin libgdal1-dev libxml2 python-lxml python-libxml2 libproj0 libproj-dev libgeos-dev libgeos++-dev cgi-mapserver python-mapscript python-psycopg2 postgis python-gdal
16+
- sudo aptitude install -y gdal-bin libgdal1-dev libxml2 python-lxml python-libxml2 libproj0 libproj-dev libgeos-dev libgeos++-dev cgi-mapserver python-mapscript python-psycopg2 postgis python-gdal
1617
# allowing sqlite to load extensions
1718
- 'if [ "$DB" == "spatialite" ]; then wget https://pypi.python.org/packages/source/p/pysqlite/pysqlite-2.6.3.tar.gz; fi'
1819
- 'if [ "$DB" == "spatialite" ]; then tar xzf pysqlite-2.6.3.tar.gz; fi'
@@ -25,18 +26,21 @@ before_install:
2526
- 'if [ "$DB" == "postgis" ]; then sudo -u postgres psql eoxserver_testing -c ''create extension postgis;''; fi'
2627
install:
2728
# test with various Django versions
28-
- pip install -q Django==$DJANGO
29+
- pip install Django==$DJANGO
30+
- django-admin.py --version
31+
# patch Django 1.4 libgeos
32+
- 'if [ $DJANGO == "1.4.13" ]; then find /home/travis/virtualenv/ -name libgeos.py -exec patch {} jenkins/geos-dev.patch \; ; fi'
2933
# actually install EOxServer
3034
- pip install --install-option="--disable-extended-reftools" .
3135
- export XML_CATALOG_FILES="`pwd`/schemas/catalog.xml"
3236
- cd autotest
3337
- "sed -e 's/#binary_raster_comparison_enabled=false/binary_raster_comparison_enabled=false/' -i autotest/conf/eoxserver.conf"
34-
- 'echo "disabled_tests=WCS20GetCoverageReferenceableDatasetGeogCRSSubsetTestCase,WCS20GetCoverageReferenceableDatasetGeogCRSSubsetExceedsExtentTestCase,WCS20GetCoverageOutputCRSotherUoMDatasetTestCase,WCS20GetCoverageJPEG2000TestCase,WCS20DescribeEOCoverageSetIncorrectSpatialSubsetFaultTestCase,WCS10DescribeCoverageMosaicTestCase,WCS10DescribeCoverageDatasetTestCase" >> autotest/conf/eoxserver.conf'
38+
- 'echo "disabled_tests=WCS20GetCoverageSubsetEPSG4326ResolutionInvalidAxisDatasetFaultTestCase,WCS20GetCoverageReferenceableDatasetGeogCRSSubsetTestCase,WCS20GetCoverageReferenceableDatasetGeogCRSSubsetExceedsExtentTestCase,WCS20GetCoverageOutputCRSotherUoMDatasetTestCase,WCS20GetCoverageJPEG2000TestCase,WCS20DescribeEOCoverageSetIncorrectSpatialSubsetFaultTestCase,WCS10DescribeCoverageMosaicTestCase,WCS10DescribeCoverageDatasetTestCase,WPS10ExecuteComplexDataTIFBase64InMemTestCase" >> autotest/conf/eoxserver.conf'
3539
script:
36-
- python manage.py test core
37-
- python manage.py test backends
38-
- python manage.py test coverages
39-
- python manage.py test autotest_services
40+
- python manage.py test core -v2
41+
- python manage.py test backends -v2
42+
- python manage.py test coverages -v2
43+
- python manage.py test autotest_services -v2
4044
notifications:
4145
irc:
4246
channels:

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
EOxServer
22
=========
33

4-
.. image:: https://travis-ci.org/EOxServer/eoxserver.svg?branch=master
4+
.. image:: https://travis-ci.org/EOxServer/eoxserver.svg?branch=0.4
55
:target: https://travis-ci.org/EOxServer/eoxserver
66

7-
.. image:: https://jenkins.eox.at/buildStatus/icon?job=EOxServer_master
7+
.. image:: https://jenkins.eox.at/buildStatus/icon?job=EOxServer_0.4
88
:target: https://jenkins.eox.at/job/EOxServer_master/
99

1010
EOxServer is a Python application and framework for presenting Earth

autotest

Submodule autotest updated 97 files

eoxserver/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
# THE SOFTWARE.
2828
#-------------------------------------------------------------------------------
2929

30-
VERSION = (0, 4, None, 'dev', 2)
30+
VERSION = (0, 4, None, 'dev', 3)
3131
#VERSION = (0, 4, None, 'alpha', 1)
3232
#VERSION = (0, 4, None, 'beta', 1)
3333
#VERSION = (0, 4, None, 'rc', 1)

eoxserver/backends/interfaces.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ def validate(self, url):
3737
if errors occurred.
3838
"""
3939

40+
4041
class FileStorageInterface(AbstractStorageInterface):
4142
""" Interface for storages that provide access to files and allow the
4243
retrieval of those.
@@ -82,4 +83,3 @@ def list_contents(self, package_filename, location):
8283
""" Return a list of item locations under the specified location in the
8384
given package.
8485
"""
85-

eoxserver/backends/storages/local.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#-------------------------------------------------------------------------------
2828

2929

30-
from os import path
30+
import os.path
3131
from urlparse import urlparse
3232

3333
from eoxserver.core import Component, implements
@@ -41,4 +41,4 @@ class LocalStorage(Component):
4141
name = "local"
4242

4343
def retrieve(self, url, location, path):
44-
return path.join(url, location)
44+
return location

eoxserver/core/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@
3232

3333
from django.utils.importlib import import_module
3434

35-
from eoxserver.core.component import *
35+
from eoxserver.core.component import (
36+
ComponentManager, ComponentMeta, Component,
37+
ExtensionPoint, UniqueExtensionPoint, implements
38+
)
3639
from eoxserver.core.util.importtools import easy_import
3740

3841

@@ -42,6 +45,7 @@
4245
__init_lock = threading.RLock()
4346
__is_initialized = False
4447

48+
4549
def initialize():
4650
""" Initialize the EOxServer plugin system by trying to import all the
4751
plugins referenced by the `PLUGINS` configuration entry from the

eoxserver/core/decoders/__init__.py

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ def __get__(self, decoder, decoder_class=None):
136136

137137

138138
class Concatenate(object):
139+
""" Helper to concatenate the results of all sub-parameters to one.
140+
"""
139141
def __init__(self, *choices, **kwargs):
140142
self.choices = choices
141143
self.allow_errors = kwargs.get("allow_errors", True)
@@ -220,12 +222,45 @@ def __call__(self, value):
220222

221223

222224
def lower(value):
225+
""" Functor to return a lower-case string.
226+
"""
223227
return value.lower()
224228

225-
226229
def upper(value):
230+
""" Functor to return a upper-case string.
231+
"""
227232
return value.upper()
228233

229234

230235
def strip(value):
236+
""" Functor to return a whitespace stripped string.
237+
"""
231238
return value.strip()
239+
240+
241+
class value_range(object):
242+
""" Helper to assert that a given parameter is within a specified range.
243+
"""
244+
245+
def __init__(self, min, max, type=float):
246+
self._min = min
247+
self._max = max
248+
self._type = type
249+
250+
def __call__(self, raw):
251+
value = self._type(raw)
252+
if value < self._min or value > self._max:
253+
raise ValueError(
254+
"Given value '%s' exceeds expected bounds (%s, %s)"
255+
% (value, self._min, self._max)
256+
)
257+
return value
258+
259+
260+
def boolean(raw):
261+
""" Functor to convert "true"/"false" to a boolean.
262+
"""
263+
raw = raw.lower()
264+
if not raw in ("true", "false"):
265+
raise ValueError("Could not parse a boolean value from '%s'." % raw)
266+
return raw == "true"

eoxserver/core/decoders/base.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,23 @@ class BaseParameter(object):
3737
""" Abstract base class for XML, KVP or any other kind of parameter.
3838
"""
3939

40+
def __init__(self, type=None, num=1, default=None):
41+
self.type = type or str
42+
self.num = num
43+
self.default = default
44+
45+
4046
def select(self, decoder, decoder_class=None):
4147
""" Interface method.
4248
"""
4349
raise NotImplementedError
4450

51+
52+
@property
53+
def locator(self):
54+
return ""
55+
56+
4557
def __get__(self, decoder, decoder_class=None):
4658
""" Property getter function.
4759
"""

eoxserver/core/decoders/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def __init__(cls, name, bases, dct):
9393
if isinstance(value, Option) and value.key is None:
9494
value.key = key
9595

96-
return super(ReaderMetaclass, cls).__init__(name, bases, dct)
96+
super(ReaderMetaclass, cls).__init__(name, bases, dct)
9797

9898

9999
class Reader(object):

0 commit comments

Comments
 (0)