geopython / pywps-flask

Demo service for PyWPS 4 with Flask
MIT License
21 stars 31 forks source link

Issue 16 #51

Open jorgejesus opened 5 years ago

jorgejesus commented 5 years ago

Overview

Implements issue #16 (Implementaition of PYWPS_CFG and PYWPS_PROCESSES). The demo.py script will pick up the variables from system env and use it. Unitests was write and located in tests/test_variables.py

Related Issue / Discussion

@tomkralidis Is it necessary for the directory in PYWPS_PROCESSES to be checked for changes and automatically reloaded or is it enough to restart pywps4-flask with a new PYWPS_PROCESSES

There is also a #11 request that needs evaluation based on changed of #51

Additional Information

test_variables.py doesn't used a live server, and will just make some requests to wps() on demo.py and check that temporary PYWPS_PROCESSES and PYWPS_CFG were accepted

Travis was updated but requires a bit more attention

Contribution Agreement

(as per https://github.com/geopython/pywps/blob/master/CONTRIBUTING.rst#contributions-and-licensing)

tomkralidis commented 5 years ago

Thanks @jorgejesus. It's enough to restart pywps4-flask with a new PYWPS_PROCESSES.

cehbrecht commented 5 years ago

@jorgejesus The feature to load processes from a directory is useful in general and we might want to have it in pywps itself (again) ... could be added as an option. It would be kind of a plugin mechanism. A simple implementation to start with is fine.

Also we could move the usage of PYWPS_CFG environment variable to pywps.

jorgejesus commented 5 years ago

@jorgejesus The feature to load processes from a directory is useful in general and we might want to have it in pywps itself (again) ... could be added as an option. It would be kind of a plugin mechanism. A simple implementation to start with is fine.

Also we could move the usage of PYWPS_CFG environment variable to pywps.

I can open a ticket on pywps for introducing a plugin structure for processes and reintegration of PYWPS_CFG

cehbrecht commented 4 years ago

@jachym @jorgejesus @tomkralidis Should we merge this PR? ... or take it as an example and implement it pywps https://github.com/geopython/pywps/issues/118.

It has a new example process TotalLength ... but could be added in another PR.

jachym commented 4 years ago

this is an oldone - don't we have already code for automatic process import in the master branch ? processes configuration option, which is pointing to Python module?

cehbrecht commented 4 years ago

this is an oldone - don't we have already code for automatic process import in the master branch ? processes configuration option, which is pointing to Python module?

yes. We could extend it to load processes from a file path, like done in this PR.

jorgejesus commented 4 years ago

@cehbrecht, @jachym is this PR still valid/important or we can trash it ?

cehbrecht commented 4 years ago

I think we don't want to merge it but keep it as reference for the implementation of the processes_path (https://github.com/geopython/pywps/issues/118).