docs: add focused process job lifecycle example - #192
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b7e53cc06a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| poll_interval=poll_interval, | ||
| timeout=deadline_seconds, | ||
| ) | ||
| return geoprocessing.results(terminal.job_id) |
There was a problem hiding this comment.
Reject failed terminal jobs before fetching results
When the server transitions a job to failed or dismissed, wait() returns that terminal status, but this example immediately requests /results and either surfaces an unrelated HTTP error or treats partial error output as success. Check terminal.succeeded and raise GeoprocessingJobError, matching the SDK's existing execute* helpers, before fetching results.
Useful? React with 👍 / 👎.
| ```bash | ||
| python examples/geoprocessing_job_lifecycle.py \ | ||
| --process-id geometry.buffer \ | ||
| --inputs-json '{"inputGeoJson":"{}","distance":100}' |
There was a problem hiding this comment.
Provide a valid FeatureCollection in the runnable command
When this documented command is copied for geometry.buffer, inputGeoJson decodes only to {}, whereas the process contract requires a serialized GeoJSON FeatureCollection. The real server will therefore fail the showcased job instead of demonstrating the successful lifecycle; use at least an empty {"type":"FeatureCollection","features":[]} value or make the payload an explicit placeholder.
Useful? React with 👍 / 👎.
Summary
Validation
PYTHONPATH=packages/honua-sdk:packages/honua-admin:. python -m pytest tests/test_geoprocessing_job_lifecycle_example.py -qpython -m ruff check examples/geoprocessing_job_lifecycle.py tests/test_geoprocessing_job_lifecycle_example.pypython -m mypy examples/geoprocessing_job_lifecycle.pyCross-repository integration
The canonical server-first task/reference matrices are on honua-io/honua-samples branch
agent/cross-sdk-job-pages; this PR supplies only the truthful Python tab and focused executable example.PR Issue Disposition
Refs honua-io/honua-samples#21 (Python source for the cross-SDK process lifecycle task; samples gallery integration remains follow-up)