Giter Club home page Giter Club logo

pywps's Introduction

geopython

Vanity package for geopython projects

pip install geopython
>>> import geopython

pywps's People

Contributors

adamsteer avatar cehbrecht avatar davidcaron avatar elemoine avatar eran-pinhas avatar fmigneault avatar gschwind avatar huard avatar idanmiara avatar jachym avatar jonas-eberle avatar jorgejesus avatar kalxas avatar khosrow avatar ldesousa avatar mgax avatar noctalin avatar orhygine avatar pesekon2 avatar pka avatar ricardogsilva avatar sbar13 avatar sebastic avatar siggyf avatar tlvu avatar tobiaskipp avatar tomkralidis avatar tommygod3 avatar treuherz avatar zeitsperre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pywps's Issues

base64.decode error

Hello,

I have a process I define the ComplexInputType as follow

    self.dataIn = self.addComplexInput(identifier = "variable",title="variable to average",formats = [{"mimeType":"application/json"}], minOccurs=1, maxOccurs=10)
    self.domain = self.addComplexInput(identifier = "domain",title="domain over which to average",formats = [{"mimeType":"application/json","encoding":"utf-8","schema":None},])

I would lime to send json

right now my execute does nothing

  def execute(self):
    self.status.set("Starting %i, %i" % (0,0),0)
    return

The url I'm sending is:

http://localhost:8000/wps/?version=1.0.0&service=wps&request=Execute&identifier=ensemble_averager&datainputs=[domain={'longitude': {'start': -180.0, 'end': 180.0}, 'time': {'start': '1980', 'end': '1982'}};variable={'url':'file://lgm/uvcdat/2015-01-26/sample_data/clt.nc','id':'clt'}]

The process errors with the following:

PyWPS [2015-02-04 00:50:00,386] WARNING: Could not import processes from 'processes': ImportError('No module named icclim',)
PyWPS [2015-02-04 00:50:00,388] INFO: Following processes are imported: ['ensemble_averager', 'test_process']
PyWPS [2015-02-04 00:50:00,396] INFO: Status [processpaused]: Getting input variable of process ensemble_averager
Traceback (most recent call last):
  File "/lgm/uvcdat/2015-01-26/lib/python2.7/site-packages/pywps-3.2.2-py2.7.egg/pywps/Wps/Execute/__init__.py", line 382, in
 __init__
    self.consolidateInputs()
  File "/lgm/uvcdat/2015-01-26/lib/python2.7/site-packages/pywps-3.2.2-py2.7.egg/pywps/Wps/Execute/__init__.py", line 530, in
 consolidateInputs
    resp = input.setValue(inp)
  File "/lgm/uvcdat/2015-01-26/lib/python2.7/site-packages/pywps-3.2.2-py2.7.egg/pywps/Process/InAndOutputs.py", line 393, in
 setValue
    self.storeData(input["value"])
  File "/lgm/uvcdat/2015-01-26/lib/python2.7/site-packages/pywps-3.2.2-py2.7.egg/pywps/Process/InAndOutputs.py", line 470, in
 storeData
    os.remove(fout.name+".base64")
OSError: [Errno 2] No such file or directory: './pywpsInputWPjsM5.base64'
PyWPS [2015-02-04 00:50:00,401] INFO: Status [processfailed]: [Errno 2] No such file or directory: './pywpsInputWPjsM5.base64
'

I did a tracking on this, it dies on the finally, but it really died in the try bit on this line:

                   base64.decode(f1, f2)

The exception says:

Incorrect padding

I'm not sure how to fix this, I'm hoping it's something in my url

Thanks

setup demo instance

It would be valuable to setup something like demo.pywps.org to provide a canonical demo based on master, etc. in support of OGC compliance and as we strive to become a reference implementation.

add live deployments listing

Implement live deployments listing that can be managed/edited over time by the community to help demonstrate adoption and implementation.

Add support for more languages

Issue by jachym
Sunday Jan 03, 2016 at 20:57 GMT
Originally opened as https://github.com/PyWPS/pywps-4/issues/79


Currently, in PyWPS language "en-US" is hardcoded. For adding support for more languages we need:

Should be relatively easy, guessed time: 40 hours

clarify contributors

Overview

There seem to be numerous places for documenting contributors:

  1. http://pywps.org/contributors/
  2. https://github.com/geopython/pywps/blob/master/CONTRIBUTORS.md
  3. in the codebase in https://github.com/geopython/pywps. Running git log|grep "Author: "|sort -u shows a historical list (some duplicates)

Requirement

OSGeo Incubation will require us to get contributor agreements in place for present and past contributors to the project. Sorting this out also makes good sense to reduce duplication and manage a central contribution manifest.

Proposal

  1. update http://pywps.org/contributors/#individuals to simply refer to https://github.com/geopython/pywps/blob/master/CONTRIBUTORS.md as the authoritative individual contributors list. Everything else (i.e. Institutions) stays the same
  2. update https://github.com/geopython/pywps/blob/master/CONTRIBUTORS.md to have a structured table of contributors past and present. The list will be made up from grepping codebase git logs as well as https://github.com/geopython/pywps/graphs/contributors. https://github.com/geopython/pywps/blob/master/CONTRIBUTORS.md will then also form the basis for gathering contribution agreements over time

Unclosed file handlers lead to OSError when used in wsgi

I am getting

OSError: [Errno 24] Too many open files

After leaving my pywps server running for a few days. I am running pywps under wsgi and calling it ~1500 times per day.

After investigating, it seems that everytime that pywps calls tempfile.mkstemp an open file handler is left lying around unclosed[1].

According to python's documentation, mkstemp returns a tuple with an already opened file and the path to the file. In pywps we are never using the file handlers (only the file paths) and we never close these open files!

In a wsgi application this becomes a serious problem, because wsgi does some caching of running processes.

When using apache's mod_wsgi, the process is eventually restarted, causing all file descriptors to be closed. However, if your usage happens to be intensive (as seems to be my use case) there is a chance that you'll run out of file handlers to use.

I'll provide a Pull Request for solving this in the coming days.

[1] - To reproduce the problem, and assuming you get pywps running under wsgi, try the following:

# reload apache in order to start fresh
sudo service reload apache2

# extract the pid of the wsgi process
ps aux | grep [w]sgi

# check that there are no tmp* files opened by the wsgi process
sudo lsof -p <wsgi_process_pid> | grep tmp

# now run one of your WPS processes

# recheck if there are any tmp* files opened by the wsgi process
sudo lsof -p <wsgi_process_pid> | grep tmp

# there should now be one more tmp* file still open
# everytime you re-run a WPS process another tmp* file will be opened
# until sometime when apache's mod_wsgi decides to clean its cache

add PyWPS to OSGeo Live

cc @kalxas

Description

Add PyWPS to the OSGeo Live project. Requirements:

  • implementation/packaging/setup script(s)/configuration(s)
  • documentation (overview, quickstart)

Environment

  • operating system:
  • Python version:
  • PyWPS version:
  • source/distribution
    • git clone
    • Debian
    • PyPI
    • zip/tar.gz
    • other (please specify): OSGeo Live
  • web server
    • Apache/mod_wsgi
    • CGI
    • other (please specify):

Steps to Reproduce

NA

Additional Information

Related issue #114, we can start with 3.x and move towards 4.0.0 when final/stable.

Initial implementation:

Support of WPS 2.0 standard

With recent release of 2.0 standard, I am mainly interested in async support which is currently completely missing in 1.0. It is based on a statefull (persistent?) processing queue with query/status/result capabilities and a multi-processing/threads pattern. Is there anyone already worked/working on such an improvement?

logging initialisation does not work for async processes

when running an async process the logger does not log to the configured logfile.

In Pywps.setLogFile() method logging.basicConfig() is called according to the configuration. But in the async case somehow the logger has already a logging handler and calling basicConfig() has no effect.

Patch #49 provides a workaround to remove logging handlers in the async case before calling basicConfig()

See also #28.

use of logging is imperfect

logging is made via

logging.error("bla")

I would suggest adding the capability to use "loggers" rather than logging directly.

I'm trying to use pywps with multiple instance of pywps on the server and it gets confised

I would recommend replacing the logFile in the init with a logger keyword that would the be used to log, allowing to log simultaneously to multiple logs.

A string with the logger name is actually sufficient you can retrieve the logger via

logging.getLogger(name)

Let me know if this makes sense. Thanks for the great work!

pywps constructor broken (#39)

It seems to me that 52379c5 completely breaks pywps. It produces

Traceback (most recent call last):
  File "/home/landamar/src/PyWPS/wps.py", line 86, in <module>
    wps = pywps.Pywps(method)
  File "/home/landamar/src/PyWPS/pywps/__init__.py", line 179, in __init__
    config.loadConfiguration(configFiles, environ)
  File "/home/landamar/src/PyWPS/pywps/config.py", line 90, in loadConfiguration
    _overrideConfigFromConfigDict({k.split("_",2)[-1]:v for k,v in environ.iteritems() if k.startswith('PYWPS_CONFIG_')})
AttributeError: 'str' object has no attribute 'iteritems'

fix safe file handling in unit tests

Description

Unit tests in a Python 3 environment yield ResourceWarning warnings like:

/home/travis/build/geopython/pywps/tests/test_inout.py:64: ResourceWarning: unclosed file <_io.FileIO name='/tmp/tmpwbpvbq0c' mode='rb'>

Environment

  • operating system: Ubuntu
  • Python version: 3.4
  • PyWPS version: master
  • source/distribution
    • git clone
    • Debian
    • PyPI
    • zip/tar.gz
    • other (please specify):
  • web server
    • Apache/mod_wsgi
    • CGI
    • other (please specify): unit test runner

Steps to Reproduce

# in a Python 3 virtualenv
python -m unittest tests

Additional Information

Initial discussion in #106.

Example can be found in current travis builds: https://travis-ci.org/geopython/pywps/jobs/111190874#L360

3.2.3 needs a real tag

When going to http://pywps.org/download/ and clicking All Releases 3.2.3 does not show up on GitHub releases.

I believe this is because there is no release tag per se against 3.2.3, and that the download links:

https://github.com/geopython/pywps/archive/pywps-3.2.3.tar.gz
https://github.com/geopython/pywps/archive/pywps-3.2.3.zip

are actually based off the 3.2.3 BRANCH, not TAG.

Can we tag 3.2.3 off the 3.2.3 branch to make it a true GitHub release?

Moving forward, once we merge pywps-4 branch into master, we can branch pywps-4.0 once 4.0.0 is final.

setCode not called

Lang.setCode is not used, process does not know anything about language, the client is requiring

Writing large XML files efficiently

Issue by mgax
Monday Oct 21, 2013 at 18:50 GMT
Originally opened as https://github.com/PyWPS/pywps-4/issues/6


I'm experimenting with handling the contents of an Execute request in an iterative fashion, so that we can handle requests with a large embedded data file. My idea is to parse the request iteratively, save any ComplexInput in a temporary file, remove it fron the XML, and build an in-memory document out of everything else.

I've hit on this roadblock: how to write XML files efficiently, as a stream, from Python? lxml has nice support for iterative parsing, but not for writing. There's the built-in xml.sax.saxutils.XMLGenerator but it's incredibly slow, writing just over 1MB/s on an Intel I7 machine.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.