[Pywps-commits] r592 - in trunk: . pywps pywps/Parser pywps/Process pywps/Wps pywps/processes

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sat Sep 13 01:50:38 CEST 2008


Author: pana
Date: 2008-09-13 01:50:22 +0200 (Sat, 13 Sep 2008)
New Revision: 592

Modified:
   trunk/pywps/Exceptions.py
   trunk/pywps/Grass.py
   trunk/pywps/Parser/Execute.py
   trunk/pywps/Parser/GetCapabilities.py
   trunk/pywps/Parser/Post.py
   trunk/pywps/Process/InAndOutputs.py
   trunk/pywps/Process/Lang.py
   trunk/pywps/Process/Process.py
   trunk/pywps/Wps/DescribeProcess.py
   trunk/pywps/Wps/Execute.py
   trunk/pywps/Wps/GetCapabilities.py
   trunk/pywps/__init__.py
   trunk/pywps/processes/exampleXSLTProcess.py
   trunk/wps.py
Log:
Fixed some typos, mainly in comments


Modified: trunk/pywps/Exceptions.py
===================================================================
--- trunk/pywps/Exceptions.py	2008-09-12 14:01:07 UTC (rev 591)
+++ trunk/pywps/Exceptions.py	2008-09-12 23:50:22 UTC (rev 592)
@@ -29,7 +29,7 @@
 
 class WPSException(Exception):
     """
-    WPSException should be base class for all exeptions
+    WPSException should be base class for all exceptions
     """
     def make_xml(self):
         # formulate XML

Modified: trunk/pywps/Grass.py
===================================================================
--- trunk/pywps/Grass.py	2008-09-12 14:01:07 UTC (rev 591)
+++ trunk/pywps/Grass.py	2008-09-12 23:50:22 UTC (rev 592)
@@ -1,5 +1,5 @@
 """
-Module is here for work with GRASS GIS environment varibales and
+Module is here for work with GRASS GIS environmental variables and
 locations and mapsets
 """
 # Author:	Jachym Cepicky
@@ -37,7 +37,7 @@
     gisbase = ""
 
     def  __init__(self,executeRequest):
-        """ Initalization of GRASS environment variables (except GISRC).  """
+        """ Initialization of GRASS environmental variables (except GISRC).  """
 
         self.executeRequest = executeRequest
         self.wps = self.executeRequest.wps
@@ -63,14 +63,14 @@
     def mkMapset(self,location=None):
         """
         Create GRASS mapset in current directory. Mapsets name is 'mapset'.
-        At the end, GRASS will beleve, it was runned correctly.
+        At the end, GRASS will believe, it has run correctly.
 
         Returns name of new created mapset. location!=None, this mapset
         should be deleted!
 
-        Argumnets:
+        Arguments:
             location     -  Should the new mapset be created in the some old
-                            location, which is allread on this server?
+                            location, which is already on this server?
                             Default: only mapset within
                             /tmp/grasstmpSOMEHTIN/
                             will be created
@@ -153,7 +153,7 @@
         return
 
     def setEnv(self,key,value):
-        """Set GRASS environment variables """
+        """Set GRASS environmental variables """
 
         origValue = os.getenv(key)
         if origValue:

Modified: trunk/pywps/Parser/Execute.py
===================================================================
--- trunk/pywps/Parser/Execute.py	2008-09-12 14:01:07 UTC (rev 591)
+++ trunk/pywps/Parser/Execute.py	2008-09-12 23:50:22 UTC (rev 592)
@@ -201,7 +201,7 @@
         return form
 
     def parseDataInputs(self,inputsNode):
-        """ Parse intput data from given node """
+        """ Parse input data from given node """
 
         parsedDataInputs = []
         
@@ -213,7 +213,7 @@
                      self.owsNameSpace,"Identifier")[0].firstChild.nodeValue
             except IndexError:
                 raise self.wps.exceptions.NoApplicableCode(
-                                              "Identifer for input not set")
+                                              "Identifier for input not set")
 
             parsedDataInputs.append({"identifier":identifier,"value":None,
                 "attributes":{}})
@@ -248,7 +248,7 @@
         attributes = {}
 
         #
-        # mandatrory attributes
+        # mandatory attributes
         #
         attributes["value"] =\
                     dataTypeNode.getAttributeNS(self.xlinkNameSpace,"href")
@@ -305,7 +305,7 @@
         return attributes
 
     def parseHeaderDataInput(self,headerNode):
-        """ Parse hearder node """
+        """ Parse header node """
 
         header = {}
 
@@ -314,7 +314,7 @@
                         headerNode.getAttributeNS(self.nameSpace,"value")
 
             if len(header.keys()) == 0:
-                raise self.wps.exeptions.MissingParameterValue("Header")
+                raise self.wps.exceptions.MissingParameterValue("Header")
 
         return header
 
@@ -432,11 +432,11 @@
         # Mandatory options
         #
 
-        # service (is allready controled)
+        # service (is already controlled)
         if self.unparsedInputs["service"].lower() == "wps":
             self.wps.inputs["service"] = self.unparsedInputs["service"].lower()
 
-        # Request (is allready controled)
+        # Request (is already controlled)
         if self.unparsedInputs["request"].lower() == "execute":
             self.wps.inputs["request"] = self.unparsedInputs["request"].lower()
 
@@ -545,7 +545,7 @@
             # initial value
             parsedDataInputs.append({"identifier":key, "value":None})
             
-            # aditional input attributes are separated by "@"
+            # additional input attributes are separated by "@"
             attributes = []
             if value.find("@") > 0:
                 parsedDataInputs[-1]["value"]=value.split("@")[0]
@@ -557,7 +557,7 @@
                 parsedDataInputs[-1]["value"]=value
                 attributes = []
 
-            # aditional attribute key is separated by "=" from it's value
+            # additional attribute key is separated by "=" from it's value
             for attribute in attributes:
                 attributeKey, attributeValue = attribute.split("=")
                 parsedDataInputs[-1][attributeKey.lower()] =\

Modified: trunk/pywps/Parser/GetCapabilities.py
===================================================================
--- trunk/pywps/Parser/GetCapabilities.py	2008-09-12 14:01:07 UTC (rev 591)
+++ trunk/pywps/Parser/GetCapabilities.py	2008-09-12 23:50:22 UTC (rev 592)
@@ -45,7 +45,7 @@
         self.wps = wps
 
     def parse(self,document):
-        """ Parse the requesed XML document"""
+        """ Parse the requested XML document"""
         self.document = document  # input DOM
 
         versions = []   # accepted versions

Modified: trunk/pywps/Parser/Post.py
===================================================================
--- trunk/pywps/Parser/Post.py	2008-09-12 14:01:07 UTC (rev 591)
+++ trunk/pywps/Parser/Post.py	2008-09-12 23:50:22 UTC (rev 592)
@@ -33,7 +33,7 @@
     EXECUTE = "Execute"
 
     def __init__(self,wps):
-        """Contructor"""
+        """Constructor"""
         Parser.__init__(self,wps)
 
     def parse(self,file):

Modified: trunk/pywps/Process/InAndOutputs.py
===================================================================
--- trunk/pywps/Process/InAndOutputs.py	2008-09-12 14:01:07 UTC (rev 591)
+++ trunk/pywps/Process/InAndOutputs.py	2008-09-12 23:50:22 UTC (rev 592)
@@ -45,9 +45,9 @@
                 default: None
         metadata List of {Dict} {key:value} pairs. 
                 default: None
-        minOccurs {Integer} minimum number of occurencies. 
+        minOccurs {Integer} minimum number of occurrences. 
                 default: 1
-        maxOccurs {Integer} maximum number of occurencies. 
+        maxOccurs {Integer} maximum number of occurrences. 
                 default: 1
         type {String} one of "LiteralValue", "ComplexValue"  or
                 "BoundingBoxValue"
@@ -79,7 +79,7 @@
         return
 
     def _setValueWithOccurence(self,oldValues, newValue):
-        """Check min and max occurence and set this.value"""
+        """Check min and max occurrence and set this.value"""
 
         if self.maxOccurs > 1:
             if not oldValues:
@@ -88,7 +88,7 @@
                 if self.maxOccurs > len(oldValues):
                     oldValues.append(newValue)
                 else:
-                    return "Too many occurances of input [%s]: %s" % (self.identifier,newValue)
+                    return "Too many occurrences of input [%s]: %s" % (self.identifier,newValue)
         else:
             oldValues = newValue
 
@@ -126,9 +126,9 @@
                     default: None
         uoms List of {String} value units
                     default: ()
-        minOccurs {Integer} minimum number of occurencies. 
+        minOccurs {Integer} minimum number of occurrences. 
                     default: 1
-        maxOccurs {Integer} maximum number of occurencies. 
+        maxOccurs {Integer} maximum number of occurrences. 
                     default: 1
         allowedValues  List of {String} or {List} list of allowed values,
                     which can be used with this input. You can set interval
@@ -421,9 +421,9 @@
                 default: None
         metadata List of {Dict} {key:value} pairs. 
                 default: None
-        minOccurs {Integer} minimum number of occurencies. 
+        minOccurs {Integer} minimum number of occurrences. 
                 default: 1
-        maxOccurs {Integer} maximum number of occurencies. 
+        maxOccurs {Integer} maximum number of occurrences. 
                 default: 1
         crss List of {String} supported coordinate systems.
                 default: ["EPSG:4326"]
@@ -499,7 +499,7 @@
         type {String} one of "LiteralValue", "ComplexValue"  or
                 "BoundingBoxValue"
                 default: None
-        asReference {Boolean} wheather this output will be given back as
+        asReference {Boolean} whether this output will be given back as
                 reference or as file
                 default: False
         """
@@ -540,7 +540,7 @@
                     default: types.StringType
         default {Any} default value.
                     default: None
-        asReference {Boolean} wheather this output will be given back as
+        asReference {Boolean} whether this output will be given back as
                 reference or as file
                 default: False
         """
@@ -583,7 +583,7 @@
                         }
                     ]
                 default: [{"mimeType":"text/xml"}]
-        asReference {Boolean} wheather this output will be given back as
+        asReference {Boolean} whether this output will be given back as
                 reference or as file
                 default: False
         """
@@ -629,7 +629,7 @@
                 default: ["EPSG:4326"]
         dimensions {Integer} number of dimensions
                 default: 2
-        asReference {Boolean} wheather this output will be given back as
+        asReference {Boolean} whether this output will be given back as
                 reference or as file
                 default: False
         """

Modified: trunk/pywps/Process/Lang.py
===================================================================
--- trunk/pywps/Process/Lang.py	2008-09-12 14:01:07 UTC (rev 591)
+++ trunk/pywps/Process/Lang.py	2008-09-12 23:50:22 UTC (rev 592)
@@ -72,7 +72,7 @@
         return self.defaultCode
 
     def setCode(self):
-        """ Set choosen language code """
+        """ Set chosen language code """
 
         # HACK - wouldn't there be some better way, that to use the
         # environment variable ?
@@ -80,7 +80,7 @@
             self.code = self.getCode(os.getenv("PYWPS_LANGUAGE"))
 
     def initStrings(self):
-        """ Initialize self.strings object accoring to known codces from
+        """ Initialize self.strings object according to known codes from
         Lang.py
 
         It can be used later like:

Modified: trunk/pywps/Process/Process.py
===================================================================
--- trunk/pywps/Process/Process.py	2008-09-12 14:01:07 UTC (rev 591)
+++ trunk/pywps/Process/Process.py	2008-09-12 23:50:22 UTC (rev 592)
@@ -118,7 +118,7 @@
         Optional parameters:
         abstract {String} process description
                 default: None
-        metadata List of {Dict} aditional metadata.  See
+        metadata List of {Dict} additional metadata.  See
                     http://www.opengeospatial.org/standards/common, table 32 on page 65
                 E.g. {"foo":"bar"}
                 default: None
@@ -126,13 +126,13 @@
                 default: None
         version {String} process version
                 default: None
-        statusSupported {Boolean} this process can be run assynchronously
+        statusSupported {Boolean} this process can be run asynchronously
                 default: True
         storeSupported {Boolean} outputs from this process can be stored
-                for later dowload
+                for later download
                 default: True
         grassLocation {String} or {Boolean} name of GRASS Location within
-                "grassdbase" directory (from pywps.cfg configuration file).
+                "gisdbase" directory (from pywps.cfg configuration file).
                 If set to True, temporary GRASS Location will be created
                 and grass environment will be started. If None or False, no
                 GRASS environment will be started.
@@ -205,9 +205,9 @@
                     default: None
         uoms List of {String} value units
                     default: ()
-        minOccurs {Integer} minimum number of occurencies. 
+        minOccurs {Integer} minimum number of occurrences. 
                     default: 1
-        maxOccurs {Integer} maximum number of occurencies. 
+        maxOccurs {Integer} maximum number of occurrences. 
                     default: 1
         allowedValues  List of {String} or {List} list of allowed values,
                     which can be used with this input. You can set interval
@@ -225,7 +225,7 @@
                     default: types.IntType
         default {Any} default value.
                     default: None
-        metadata List of {Dict} Aditional metadata. E.g. {"foo":"bar"}
+        metadata List of {Dict} Additional metadata. E.g. {"foo":"bar"}
                     default: None
         """
 
@@ -251,9 +251,9 @@
                 default: None
         metadata List of {Dict} {key:value} pairs. 
                 default: None
-        minOccurs {Integer} minimum number of occurencies. 
+        minOccurs {Integer} minimum number of occurrences. 
                 default: 1
-        maxOccurs {Integer} maximum number of occurencies. 
+        maxOccurs {Integer} maximum number of occurrences. 
                 default: 1
         formats List of {Dict} according to table 23 (page 25). E.g.
                     [
@@ -293,9 +293,9 @@
                 default: None
         metadata List of {Dict} {key:value} pairs. 
                 default: None
-        minOccurs {Integer} minimum number of occurencies. 
+        minOccurs {Integer} minimum number of occurrences. 
                 default: 1
-        maxOccurs {Integer} maximum number of occurencies. 
+        maxOccurs {Integer} maximum number of occurrences. 
                 default: 1
         crss List of {String} supported coordinate systems.
                 default: ["EPSG:4326"]
@@ -389,7 +389,7 @@
         """Runs GRASS command, fetches all GRASS_MESSAGE and
         GRASS_PERCENT messages and sets self.status according to them, so
         the client application can track the progress information, when
-        runing with Status=True
+        running with Status=True
 
         This module is supposed to be used instead of 'os.system()', while
         running GRASS modules

Modified: trunk/pywps/Wps/DescribeProcess.py
===================================================================
--- trunk/pywps/Wps/DescribeProcess.py	2008-09-12 14:01:07 UTC (rev 591)
+++ trunk/pywps/Wps/DescribeProcess.py	2008-09-12 23:50:22 UTC (rev 592)
@@ -86,7 +86,7 @@
                 # process identifier must be == package name 
                 if process.identifier != processName:
                     raise ImportError(
-                            "Process indentifier \"%s\" != package name \"%s\": File name has to be the same, as the identifier is!" %\
+                            "Process identifier \"%s\" != package name \"%s\": File name has to be the same, as the identifier is!" %\
                             (process.identifier, processName))
 
                 processData["processok"] = 1
@@ -133,7 +133,7 @@
             if input.type == "ComplexValue":
                 processInput["complexvalue"] = 1
                 self.complexValue(input,processInput)
-            if input.type == "BoudningBoxValue":
+            if input.type == "BoundingBoxValue":
                 processInput["boundingboxvalue"] = 1
                 self.bboxValue(input,processInput)
             processInputs.append(processInput)

Modified: trunk/pywps/Wps/Execute.py
===================================================================
--- trunk/pywps/Wps/Execute.py	2008-09-12 14:01:07 UTC (rev 591)
+++ trunk/pywps/Wps/Execute.py	2008-09-12 23:50:22 UTC (rev 592)
@@ -30,7 +30,7 @@
 
 class Execute(Response):
     """
-    This class performes the Execute request of WPS specification
+    This class performs the Execute request of WPS specification
 
     In the class, fork of the  processes has to be done, if the client
     requested asynchronous request performance (status=true)
@@ -45,7 +45,7 @@
     paused = "processpaused"
     failed = "processfailed"
 
-    # runnig process id
+    # running process id
     pid = None
 
     # session ID
@@ -57,7 +57,7 @@
     statusFiles = [sys.stdout]
     
     # process status
-    statusRequired = False # should the request run assynchronously?
+    statusRequired = False # should the request run asynchronously?
     status = None
     statusMessage = None
     percent = 0
@@ -146,7 +146,7 @@
             # init environment variable
             self.initEnv()
 
-            # donwload and consolidate data
+            # download and consolidate data
             self.consolidateInputs()
 
             # set output data attributes defined in the request
@@ -190,7 +190,7 @@
 
     def initProcess(self):
         """
-        Setting and controling input values, set by the client. Also the
+        Setting and controlling input values, set by the client. Also the
         processes from PYWPS_PROCESS directory or default directory is
         imported.
         """
@@ -214,7 +214,7 @@
                     self.wps.inputs["identifier"])
 
 
-        # set propper method for status change
+        # set proper method for status change
         self.process.wps = self.wps
         self.process.status.onStatusChanged = self.onStatusChanged
         self.process.debug = self.wps.getConfigValue("server","debug")
@@ -237,7 +237,7 @@
             # exceptions handler
             input.onProblem = self.onInputProblem
 
-            # maximum input file size mut not be grater, then the one,
+            # maximum input file size must not be greater, than the one,
             # defined in the global config file
             if input.type == "ComplexValue":
                 if not input.maxFileSize or input.maxFileSize > maxFileSize:
@@ -296,7 +296,7 @@
 
     def executeProcess(self):
         """
-        Calls 'execute' method of the process, catches possible exeptions
+        Calls 'execute' method of the process, catches possible exceptions
         and raise error, if needed
         """
         try:
@@ -335,8 +335,8 @@
         {String} status -  name of the status
         {String} statusMessage - message, which should appear in output xml file
         {Float} percent - percent done message
-        {String} exceptioncode - eventualy exception
-        {String} locator - where the problem occured
+        {String} exceptioncode - eventually exception
+        {String} locator - where the problem occurred
         """
 
         self.process.status.percentCompleted, self.process.status.value,\
@@ -448,7 +448,7 @@
         """
         Fill reference input
 
-        wpsInput - asociative field of self.wps.inputs["datainputs"]
+        wpsInput - associative field of self.wps.inputs["datainputs"]
         processInput - self.process.inputs
         """
         complexInput["reference"] = wpsInput["value"]
@@ -535,7 +535,7 @@
         return bboxOutput
 
     def processOutputs(self):
-        """Fill <ProcessOutputs> part in the ouput XML document
+        """Fill <ProcessOutputs> part in the output XML document
         This method is called if, self.status == ProcessSucceeded
         """
 

Modified: trunk/pywps/Wps/GetCapabilities.py
===================================================================
--- trunk/pywps/Wps/GetCapabilities.py	2008-09-12 14:01:07 UTC (rev 591)
+++ trunk/pywps/Wps/GetCapabilities.py	2008-09-12 23:50:22 UTC (rev 592)
@@ -148,7 +148,7 @@
                 # process identifier must be == package name 
                 if process.identifier != processName:
                     raise ImportError(
-                            "Process indentifier \"%s\" != package name \"%s\": File name has to be the same, as the identifier is!" %\
+                            "Process identifier \"%s\" != package name \"%s\": File name has to be the same, as the identifier is!" %\
                             (process.identifier, processName))
                 processData["processok"] = 1
                 processData["identifier"] = process.identifier

Modified: trunk/pywps/__init__.py
===================================================================
--- trunk/pywps/__init__.py	2008-09-12 14:01:07 UTC (rev 591)
+++ trunk/pywps/__init__.py	2008-09-12 23:50:22 UTC (rev 592)
@@ -1,11 +1,11 @@
 """PyWPS main package.
 
 This package contains classes necessary for input parsing and request
-performing. The output is done via python's htmltmpl templating system.
+performing. The output is done via python's htmltmpl template system.
 
 Here is also the default package with WPS Processes.
 
 $Id$
 """
 
-__all__ = [ "Parser","processes", "Process", "Exceptions", "WPS", "Templates"]
+__all__ = [ "Parser","processes", "Process", "Exceptions", "Wps", "Templates"]

Modified: trunk/pywps/processes/exampleXSLTProcess.py
===================================================================
--- trunk/pywps/processes/exampleXSLTProcess.py	2008-09-12 14:01:07 UTC (rev 591)
+++ trunk/pywps/processes/exampleXSLTProcess.py	2008-09-12 23:50:22 UTC (rev 592)
@@ -13,7 +13,7 @@
     def __init__(self):
         """Process initialization"""
 
-        # initializa the process with minimal inputs
+        # initialize the process with minimal inputs
         # in this case, only process identifier is really needed
         WPSProcess.__init__(self,"exampleXSLTProcess")
 

Modified: trunk/wps.py
===================================================================
--- trunk/wps.py	2008-09-12 14:01:07 UTC (rev 591)
+++ trunk/wps.py	2008-09-12 23:50:22 UTC (rev 592)
@@ -94,7 +94,7 @@
     DEFAULT_WPS_VERSION = "1.0.0"
 
     def __init__(self):
-        """Class contrustor
+        """Class constructor
 
         Will load configuration files, parse the input parameters and
         perform the request.



More information about the Pywps-commits mailing list