Closed idanmiara closed 3 years ago
@idanmiara Thanks for working on the ogcapi processes implementation :)
I would prefer to merge this work to a dev branch. Name dev-ogcapi
?
There is already work done for this in pygeoapi: https://github.com/geopython/pygeoapi/tree/master/pygeoapi/process
Did you have a look at it?
I would prefer if we could make make pywps a plugin of pygeoapi. If the rest ogcapi implementation is ready we might even skip the WPS xml one.
There is also work done for ogcapi as a proxy to an existing wps 1.0.0 implementation: https://github.com/crim-ca/weaver/tree/master/weaver/wps_restapi
We have also started prototyping on the OWSLib client side: https://github.com/geopython/OWSLib/issues/749
Hi MacPingu!
Sure, I'll reopen it on a dev branch, but maybe we better have a proper master branch to rebase on? Currently master is way behind, could someone take care of it please?
I didn't know about pygeoapi or how to make a plugin as you suggested.
I see that I'll need to do some work to get all the tests to pass again and maybe add some tests of the new api.
After the tests pass would someone want to help me take it from there ?
Idan
On Sun, 28 Mar 2021, 20:29 MacPingu, @.***> wrote:
@idanmiara https://github.com/idanmiara Thanks for working on the ogcapi processes implementation :)
I would prefer to merge this work to a dev branch. Name dev-ogcapi?
There is already work done for this in pygeoapi: https://github.com/geopython/pygeoapi/tree/master/pygeoapi/process
Did you have a look at it?
I would prefer if could make make pywps a plugin of pygeoapi. If the rest ogcapi implementation is ready we might even skip the WPS xml one.
There is also work done for ogcapi as a proxy to an existing wps 1.0.0 implementation: https://github.com/crim-ca/weaver/tree/master/weaver/wps_restapi
We have also started prototyping on the OWSLib client side: geopython/OWSLib#749 https://github.com/geopython/OWSLib/issues/749
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/geopython/pywps/pull/588#issuecomment-808928721, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGJBBLONFARD5ODN236LVADTF5YR7ANCNFSM4Z52CB4Q .
I see that the pygeoapi is a separate implementation from pywps. If I had known it before I started this work I might have joint that effort instead...
How good is pygeoapi in comparison to pywps? Is it ready for production?
I already use a previous version of this implementation in production and it's working well enough for my needs. So I hope I can get this PR through fast with the hope it can help also for pygeoapi.
I'm not sure what you ment by saying: "If the rest ogcapi implementation is ready we might even skip the WPS xml one." Skip where?
Idan
On Sun, 28 Mar 2021, 21:02 Idan Miara, @.***> wrote:
Hi MacPingu!
Sure, I'll reopen it on a dev branch, but maybe we better have a proper master branch to rebase on? Currently master is way behind, could someone take care of it please?
I didn't know about pygeoapi or how to make a plugin as you suggested.
I see that I'll need to do some work to get all the tests to pass again and maybe add some tests of the new api.
After the tests pass would someone want to help me take it from there ?
Idan
On Sun, 28 Mar 2021, 20:29 MacPingu, @.***> wrote:
@idanmiara https://github.com/idanmiara Thanks for working on the ogcapi processes implementation :)
I would prefer to merge this work to a dev branch. Name dev-ogcapi?
There is already work done for this in pygeoapi: https://github.com/geopython/pygeoapi/tree/master/pygeoapi/process
Did you have a look at it?
I would prefer if could make make pywps a plugin of pygeoapi. If the rest ogcapi implementation is ready we might even skip the WPS xml one.
There is also work done for ogcapi as a proxy to an existing wps 1.0.0 implementation: https://github.com/crim-ca/weaver/tree/master/weaver/wps_restapi
We have also started prototyping on the OWSLib client side: geopython/OWSLib#749 https://github.com/geopython/OWSLib/issues/749
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/geopython/pywps/pull/588#issuecomment-808928721, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGJBBLONFARD5ODN236LVADTF5YR7ANCNFSM4Z52CB4Q .
Sure, I'll reopen it on a dev branch, but maybe we better have a proper master branch to rebase on? Currently master is way behind, could someone take care of it please?
The master will be enabled again ... see #590
The current pywps-4.4 version will become the master version.
How good is pygeoapi in comparison to pywps? Is it ready for production?
pygeoapi is implementing the ogcapi protocols on the server side. It is meant to handle the service protocol but the real work can be handled in plugins. It has only a "dummy" implementation for processes.
I thought the 5.x version of pywps could be pygeoapi plugin. We want to keep the process integration, the output handling, different queuing systems (multiprocessing, slurm, ...). But the protocol is handled by pygeoapi.
The 5.x version of pywps would then be a ogcapi only release. The WPS 1.0.0 stays in 4.x.
Thanks for the explanation. I suggest to merge this PR once its ready to v 4.6 then continue to a plugin 5.0 if it makes sence.
On Mon, 29 Mar 2021, 13:06 MacPingu, @.***> wrote:
How good is pygeoapi in comparison to pywps? Is it ready for production?
pygeoapi is implementing the ogcapi protocols on the server side. It is meant to handle the service protocol but the real work can be handled in plugins. It has only a "dummy" implementation for processes.
I thought the 5.x version of pywps could be pygeoapi plugin. We want to keep the process integration, the output handling, different queuing systems (multiprocessing, slurm, ...). But the protocol is handled by pygeoapi.
The 5.x version of pywps would then be a ogcapi only release. The WPS 1.0.0 stays in 4.x.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/geopython/pywps/pull/588#issuecomment-809253095, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGJBBLJF2OSVPDRB5TYECVDTGBNLLANCNFSM4Z52CB4Q .
pygeoapi is implementing the ogcapi protocols on the server side. It is meant to handle the service protocol but the real work can be handled in plugins. It has only a "dummy" implementation for processes.
The dummy implementation is default support for job management. processes themselves are implemented as plugins (see https://docs.pygeoapi.io/en/latest/plugins.html#featured-plugins for examples).
Having said this, it would be great to also have PyWPS as a processing backend concept for pygeoapi (happy to discuss).
I would prefer to merge this work to a dev branch. Name
dev-ogcapi
?
@cehbrecht Please create dev-ogcapi
from 4.4/master, I think cannot create it myself.
I would prefer to merge this work to a dev branch. Name
dev-ogcapi
?@cehbrecht Please create
dev-ogcapi
from 4.4/master, I think cannot create it myself.
Can I create it when master is ready? Hopefully over easter. Otherwise I will make it from the pywps.4.4 branch.
I would prefer to merge this work to a dev branch. Name
dev-ogcapi
?@cehbrecht Please create
dev-ogcapi
from 4.4/master, I think cannot create it myself.Can I create it when master is ready? Hopefully over easter. Otherwise I will make it from the pywps.4.4 branch.
Sure. Hopefully it will be ready to be merged by that time.
Hi all,
First thank you @idanmiara from contributing to PyWPS, much appreciated.
I am sick at the moment, I won't be able to do an in-depth review at least in the coming days. PyWPS and pygeoapi are not really alternatives at the moment, so I would favour merging as soon as the tests pass. I see there are relevant changes to the core, so not a bad idea to create a separate branch.
I like the idea of PyWPS 5.0 becoming a plug-in to pygeoapi. On the other hand I would not like to drop support to WPS 2.0 already. I think the PSC needs to give a bit of thought to this.
Cheers.
I think it's great that PyWPS can implement the OGC API during the development of the Processes specifications. One thing I'm a bit worried about is that the specs are still changing, so more work will probably be required to keep PyWPS in sync with the specs until they are finalized.
I only took a very superficial look to the code but didn't see any unit tests. Now since the specs are moving, I'm not sure it's such a good idea to invest time in unit tests, but this is a discussion worth having I think.
I've rebased it on https://github.com/geopython/pywps/pull/594, as I'm testing it on Windows. All the tests pass now :)
Hi all,
First thank you @idanmiara from contributing to PyWPS, much appreciated.
I am sick at the moment, I won't be able to do an in-depth review at least in the coming days. PyWPS and pygeoapi are not really alternatives at the moment, so I would favour merging as soon as the tests pass. I see there are relevant changes to the core, so not a bad idea to create a separate branch.
I like the idea of PyWPS 5.0 becoming a plug-in to pygeoapi. On the other hand I would not like to drop support to WPS 2.0 already. I think the PSC needs to give a bit of thought to this.
Cheers.
Thanks, get well soon 👍
I think it's great that PyWPS can implement the OGC API during the development of the Processes specifications. One thing I'm a bit worried about is that the specs are still changing, so more work will probably be required to keep PyWPS in sync with the specs until they are finalized.
I've tried to implement the core features of the spec. I didn't go over the top to implement the things I didn't use, but we need to start somewhere...
I only took a very superficial look to the code but didn't see any unit tests. Now since the specs are moving, I'm not sure it's such a good idea to invest time in unit tests, but this is a discussion worth having I think.
Are there some tests that we can use from pygeoapi or other source?
Please review/approve https://github.com/geopython/pywps/pull/594 before you review this PR as I've rebased on it.
Don't get me wrong, I'm super glad you are working on this, I'm only suggesting we're advertising this functionality as "experimental - not for production".
For testing, there is a WPSClient
in https://github.com/geopython/pywps/blob/20e1e254a3f7914e555fa89f363d1f6eb5f3895c/pywps/tests.py#L87
I suppose implementing a post_json
method would allow you to test the REST interface, but its more a guess than anything.
Related: we started work on a client a couple of weeks ago: https://github.com/geopython/OWSLib/pull/750 As you'll, there are considerable differences across implementations, but I think it would make sense for the OWSLib client to stay in sync with the WPS implementation.
Hi, Can anyone check why the tests fail? As far as I can see the fail also without this PR.
Hi, Can anyone check why the tests fail? As far as I can see the fail also without this PR.
looks like opendap test server is not available: http://test.opendap.org/opendap/netcdf/examples/sresa1b_ncar_ccsm3_0_run1_200001.nc
I can add add a skip in case it's unavailable. Is the other test failure for the same reason?
On Tue, 27 Apr 2021, 20:09 MacPingu, @.***> wrote:
Hi, Can anyone check why the tests fail? As far as I can see the fail also without this PR.
looks like opendap test server is not available:
http://test.opendap.org/opendap/netcdf/examples/sresa1b_ncar_ccsm3_0_run1_200001.nc
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/geopython/pywps/pull/588#issuecomment-827769257, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGJBBLI455DAJ2UYDJTPBI3TK3VVPANCNFSM4Z52CB4Q .
Looks like that is the only failure at the moment. Try to skip that test, or replace it with a different NetCDF source.
Now all the tests pass and I've added a couple for the REST API. How do you advise to proceed to get it merged ?
I think this is a valuable addition to PyWPS. This PR could use a few more docstrings.
In the future, I would like to see documentation and more tests, but I suggest we open an issue and do this later when the API is finalized.
@huard Thanks very much for your review! I think I've addressed the issues you raised.
@idanmiara can you rebase this PR to the new main
branch?
@idanmiara can you rebase this PR to the new
main
branch?
Done.
@ldesousa @huard ok to merge into main
branch as experimental implementation of ogcapi-processes?
I have seen today that there is a ogcapi-processes workshop this week: https://github.com/opengeospatial/ogcapi-processes/blob/master/workshops/2021_06_Workshop.adoc
@ldesousa @huard ok to merge into
main
branch as experimental implementation of ogcapi-processes?
Yes. I think it might need a few more tests, but we should integrate @idanmiara's contribution now and later improve if necessary.
Thanks guys! I didn't want to invest too much energy into more testing and docs before I get your general approval.
@idanmiara merged. Thanks for your nice work and getting started on the rest-api :)
Thanks @cehbrecht ! Can you make a first 4.5 release to encourage more people to check it out sooner?
@idanmiara Would you like to add an example for the current rest-api to the docs? Not too much ... maybe an example with a "hello" or "sleep" process ... something we can point to. I can prepare the 4.5 release then.
@idanmiara Would you like to add an example for the current rest-api to the docs? Not too much ... maybe an example with a "hello" or "sleep" process ... something we can point to. I can prepare the 4.5 release then.
Sure
@idanmiara Would you like to add an example for the current rest-api to the docs? Not too much ... maybe an example with a "hello" or "sleep" process ... something we can point to. I can prepare the 4.5 release then.
@cehbrecht please let me know if you need further help with this release :)
Overview
This PR adds partial support for the OGC API - Processes / REST API and allows requests and responses in JSON format. I'd be happy to get a review. Full backwards compatibility was maintained to allow both XML and JSON input/output, the correct format is determinate by the
mimetype
/content-type
and theaccept
headers (POST) andf
argument in GET.I've add a
/processes
and/jobs
end points that default to JSON input/output. The original/wps
endpoint defaults to XML as before.I've yet to add an open-api/swagger interface, but I've tried to make it as compatible as possible to these APIs:
ZOO-Project WPS
52°North
Example JSON requests:
I've taken the internal JSON format and tried to make it a valid request (which now work).
Original XML request:
JSON request taken from internal pywps (which now accepted as a valid request):
Then I wanted to make a much more minimalistic request also valid as follows, so the following also works:
It is also possible to set the
identifier
in the endpoint url, so posting to/processes/say_hello
is possible with the following input:Also possible to post to
/processes/say_hello/output
to indicate a raw output (for the output namedoutput
in this case), then such case the following is a valid input:outputs
can be a string (which implies raw output), or a list or a dict. Eachinput
insideinputs
can be a string (which implies literal input) or a dict.Contribution Agreement
(as per https://github.com/geopython/pywps/blob/master/CONTRIBUTING.rst#contributions-and-licensing)