-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add GWLF-E Endpoint to Geoprocessing API #3483
Conversation
da56754
to
3242012
Compare
We've been using string values for a long time, which have thankfully not diverged. By wrapping them in constants we ensure their standard use throughout.
For modeling, sometimes an endpoint depends on the output of a preceding preparatory action. To handle cases when a gwlf-e/run is given a job that is not ready yet, or has failed, we add errors. They use the precondition required and precondition failed HTTP status codes.
3242012
to
9616046
Compare
This takes the output of gwlf-e/prepare and runs it. If the prepare job is not ready or has failed, returns an error. This endpoint is based on the internal start_gwlfe endpoint. Currently, it does not handle modifications. These will be added at a later date.
9616046
to
85168da
Compare
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.
This endpoint works very well and the description is clear and helpful!
The current description for gwlf-e/prepare
is when talking about the next step
The result should be used with the gwlf-e/run endpoint.
Since gwlf-e/run
and take both result
and job_uuid
from gwlf-e/prepare
, I think it is helpful to update the description section for gwlf-e/prepare
so that users know they can also use the easier-to-paste job_uuid
to run the job as well.
Excellent idea. Will implement this. |
Added in 991e6df. |
These are passing now.
The new description looks great! |
Thanks. I've been trying to get the CI to pass, but it keeps failing at the same spot, which I'm not able to recreate locally. In the interest of time I'm going to merge this PR. We have #3442 for fixing tests down the line if we need to. |
Thanks for reviewing! |
Overview
Adds a public endpoint to run GWLF-E via the geoprocessing API. The input is the output of the endpoint added in #3480, either the
result
JSON or thejob_uuid
. In case the job is not ready or has failed, this returns an error.This builds upon the work done in #3480.
Connects #3473
Demo
xh --verbose :8000/api/modeling/gwlf-e/prepare/ Authorization:"Token b0c671e1424f37e58c81670ce8118e8eff0f0c14" wkaoi=huc12__55174
xh --verbose :8000/api/modeling/gwlf-e/run/ Authorization:"Token b0c671e1424f37e58c81670ce8118e8eff0f0c14" job_uuid=ba67198e-4d43-4675-b308-3d1e21f8779f
xh --verbose :8000/api/jobs/eb1a233f-b52f-41e5-bc8f-2e8912d831f0/ Authorization:"Token b0c671e1424f37e58c81670ce8118e8eff0f0c14"
Notes
This currently does not have support for validation of the input #3484, or for modifications to the input. Modifications can be made to the JSON directly and submitted, but the modifications + job_uuid support will arrive in the future #3485.
Testing Instructions
gwlf-e/prepare
jobresult
asinput
togwlf-e/run
job_uuid
togwlf-e/run