[Pywps-dev] process discovery

Luí­s de Sousa luis.de.sousa at protonmail.ch
Tue Aug 9 23:48:05 PDT 2016


Thanks Tom, this indeed clarifies things.

As it stands now, this functionality must be implemented in the demo application (or some such). I am not very satisfied with this solution, but on the other hand I do not see this going into the pywps library.

This requires some rethinking of the whole ecosystem. Once this is done, pywps-demo becomes a far more relevant element, contrary to what was originally intended. It might need to be renamed to something like pywps-server and promoted differently - say, as an advanced development platform. Of course we then have to reconsider the development cycle.

We must sort this out during the conference.

Luís


-------- Original Message --------
Subject: Re: [Pywps-dev] process discovery
Local Time: 3 August 2016 8:28 PM
UTC Time: 3 August 2016 18:28
From: tomkralidis at gmail.com
To: luis.de.sousa at protonmail.ch
CC: pywps-dev at lists.osgeo.org

Hi Luís: consider this PyWPS 4 based application wrapper:
https://github.com/geopython/demo.pywps.org/blob/master/PyWPS/wps.wsgi.
I specifically have to call out the processes when initializing the
application, i.e.:

from pywps.app import Service
from cite.processes import HelloWorld
os.environ['PYWPS_CFG'] = 'cite/cite.cfg'
application = Service(processes=[HelloWorld()])

I would much rather do:

from pywps.app import Service
from cite.processes import HelloWorld
os.environ['PYWPS_CFG'] = 'cite/cite.cfg'
os.environ['PYWPS_PROCESSES'] = '/path/to/a/dir/of/processes' # or
this could also be specified in the configuration if desired

application = Service() # PYWPS_CFG and PYWPS_PROCESSES drive the application

This way I don't have to update any application code if I add
processes via some other workflow. In addition, I can use this single
WSGI file setup and have, say, Apache settings like:

WSGIScriptAlias /wps1 /osgeo/demo.pycsw.org/pycsw/csw.wsgi
WSGIScriptAlias /wps2 /osgeo/demo.pycsw.org/pycsw/csw.wsgi
...
WSGIScriptAlias /wps1000 /osgeo/demo.pycsw.org/pycsw/csw.wsgi


SetEnvIf Request_URI "/wps1" PYCSW_CONFIG=/path/to/wps1.cfg
SetEnvIf Request_URI "/wps2" PYCSW_CONFIG=/path/to/wps2.cfg
...
SetEnvIf Request_URI "/wps1000" PYCSW_CONFIG=/path/to/wps1000.cfg

Hope this helps clarify things?

..Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pywps-dev/attachments/20160810/66f17ddb/attachment.html>


More information about the pywps-dev mailing list