-
Notifications
You must be signed in to change notification settings - Fork 118
Define rational to handle exception #358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define rational to handle exception #358
Conversation
|
To pass some unit test this patch series require #361 . I working on this patch series to pass units missing tests Best regards |
dc2fc88 to
65077f4
Compare
|
I updated the branch to pass unit tests with #361 |
cehbrecht
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unit tests pass ... but pep8 checks fail. Please update the files accordingly.
|
@gschwind I have made a quick check with your PR but I'm running into an exception (post request). I'm using your patched pywps with my Emu WPS: When I run an excecute post process (birdy, owslib) with the I suppose there are still methods that need to be converted for the status handling. |
|
Thank you for the review I will have a closer look at it this evening (CET) |
65077f4 to
c6b7570
Compare
|
Should be fine now :) Best regards |
|
Sorry ... I still need to complain. Tried it with the |
|
Hello, Do not be sorry for that, this is the point of review. Thanks for your review. The patch break the API of update_status, I choose to break the API instead of keeping the old one. I can write a code that somehow map the old API to the new one, but does it wanted ? If it is wanted I can update the code to keep the old API. in your case the line of the old API Best regard |
|
does that mean the user defined process has to decide which status the process execution currently has? I think that should be handled by pywps internally .... the process code just gives progress information. |
|
Yes it was the idea, in particular to set it to paused or failed. It was my understanding because the user can change the status with the old API, using the status argument. But maybe I'm wrong :) |
|
Changing it is trivial, so just tell me what is preferred |
|
I would prefer if the process can optionally set job status. But by default pywps should handle the states internally. @jachym should have the final word :) |
|
Sorry for long time take me to review this (FOSS4G syndrome), but I would like to say, that this patch is very well needed, thank you @gschwind you dived into this. I agree with @cehbrecht that the process itself should not set Reasoning:
In the future Only two statuses, which could be considered, is that the process could explicetly state Do you agree? |
|
Hello, @jachym: I'm fine with your explanation, with few comment, I agree to limit the control of user over the response status, I that case I would remove the status from the public API. About the life time of the request I would describe it as follow:
In the current version, I expect that the process is successful if no exception is raised. I do not consider the return value of the handler, I want to avoid that the user instantiate it's own response by mistake. @cehbrecht : Yes I will do this :), just wait for the week-end ;) Best regards |
The current status management is a custom list of status that also define the behaviour of the storage of the status file. This newer version of status management drop the old scheme and reuse the status defined by WPS standard, i.e. accepted, started, succeeded, and failed. It also separate the management of behaviour of the status file.
This patch defineand implement the rational of exception handle in Service.call function.
c6b7570 to
7c6c972
Compare
|
Hello, updated according previous discussion :) Best regards |
jachym
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
|
Thanks a lot @gschwind I do not fully understand, what was your motivation to dive into this, but it was needed - you are my hero. |
|
Hello, I use PyWPS to serve some of our WPS, having a better code base for pywps is helping for future improvement, like the support of WPS 2.0.0. Basically it's the way of open souces/free software. You are my hero to maintain this codes :) |
Overview
This patch series propose to define clearly how to handle Exception to ensure they are correctly reported by a standard WPS.
The first patch redefine the process status to match the definition given by WPS standard. The second patch depend on it.
The second patch actually define how Exception should be handled, and what each functions must do to ensure the proper output of the services. It's also implement the rational.
Best regards
Contribution Agreement
(as per https://github.com/geopython/pywps/blob/master/CONTRIBUTING.rst#contributions-and-licensing)