[Thuban-commits] r2793 - in trunk/thuban: . Extensions/wms Extensions/wms/test

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sun Dec 9 00:55:24 CET 2007


Author: bernhard
Date: 2007-12-09 00:55:23 +0100 (Sun, 09 Dec 2007)
New Revision: 2793

Modified:
   trunk/thuban/ChangeLog
   trunk/thuban/Extensions/wms/capabilities.py
   trunk/thuban/Extensions/wms/test/test_domutils.py
   trunk/thuban/README
Log:
WMS Extention improvements: Better logging for problem analysis. 
Requirements: "logging" module is needed, included with Python 2.3.

* Extentions/wms/test/test_domutils.py: Used same trick as in 
test_ogclib.py to support.initthuban() so the test now runs.

* Extensions/wms/capabilities.py: Added logging module and now
starts logging the capabilities downloaded. As the wms extention
is still experimental I have added the configuration so that
DEBUG is written to stderr.

* README: Requirements bumbed Python min to 2.3.5. because
of the use of the logging module.


Modified: trunk/thuban/ChangeLog
===================================================================
--- trunk/thuban/ChangeLog	2007-12-08 14:37:23 UTC (rev 2792)
+++ trunk/thuban/ChangeLog	2007-12-08 23:55:23 UTC (rev 2793)
@@ -1,3 +1,19 @@
+2007-12-09   Bernhard Reiter <bernhard at intevation.de>
+
+	WMS Extention improvements: Better logging for problem analysis. 
+	Requirements: "logging" module is needed, included with Python 2.3.
+
+	* Extentions/wms/test/test_domutils.py: Used same trick as in 
+	test_ogclib.py to support.initthuban() so the test now runs.
+
+	* Extensions/wms/capabilities.py: Added logging module and now
+	starts logging the capabilities downloaded. As the wms extention
+	is still experimental I have added the configuration so that
+	DEBUG is written to stderr.
+
+	* README: Requirements bumbed Python min to 2.3.5. because
+	of the use of the logging module.
+
 2007-12-08   Bernhard Reiter <bernhard at intevation.de>
 
 	* po/es.po: Translation update by Daniel Calvelo.

Modified: trunk/thuban/Extensions/wms/capabilities.py
===================================================================
--- trunk/thuban/Extensions/wms/capabilities.py	2007-12-08 14:37:23 UTC (rev 2792)
+++ trunk/thuban/Extensions/wms/capabilities.py	2007-12-08 23:55:23 UTC (rev 2793)
@@ -1,6 +1,7 @@
-# Copyright (c) 2004 by Intevation GmbH
+# Copyright (c) 2004, 2007 by Intevation GmbH
 # Authors:
 # Martin Schulze <joey at infodrom.org>
+# Bernhard Reiter <bernhard at intevation.de>
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -51,6 +52,11 @@
 
 import os
 
+import logging
+# The default levels provided are DEBUG, INFO, WARNING, ERROR and CRITICAL.
+logging.basicConfig(level=logging.DEBUG,
+                    format='%(asctime)s %(levelname)s %(message)s')
+
 # ----------------------------------------------------------------------
 # FIXME: Temporary code until PyOGCLib is a standard requirement
 
@@ -139,6 +145,7 @@
                         % resource
 
         if self.capabilities:
+            logging.info("got capabilities: " + repr(self.capabilities))
             self.grok(self.capabilities)
 
 

Modified: trunk/thuban/Extensions/wms/test/test_domutils.py
===================================================================
--- trunk/thuban/Extensions/wms/test/test_domutils.py	2007-12-08 14:37:23 UTC (rev 2792)
+++ trunk/thuban/Extensions/wms/test/test_domutils.py	2007-12-08 23:55:23 UTC (rev 2793)
@@ -25,11 +25,17 @@
 # $Source$
 # $Id$
 
+from sys import path
 import unittest
 import xml.dom.minidom
 
-import adjustpath
+from adjustpath import thubandir
+path.insert(0, thubandir + "/test")
 
+import support
+support.initthuban()
+
+
 from Extensions.wms.domutils import getElementByName, getElementsByName
 
 

Modified: trunk/thuban/README
===================================================================
--- trunk/thuban/README	2007-12-08 14:37:23 UTC (rev 2792)
+++ trunk/thuban/README	2007-12-08 23:55:23 UTC (rev 2793)
@@ -26,7 +26,7 @@
 
 Thuban requires the following software to be installed:
 
-  Python     2.2.1    http://www.python.org
+  Python     2.3.5    http://www.python.org
   wxWidgets  2.6.3.2  http://www.wxwidgets.org (formerly known as wxWindows)
   wxPython   2.6.3.2  http://www.wxpython.org
   proj       4.4.5    http://www.remotesensing.org/proj/



More information about the Thuban-commits mailing list