Skip to content

docs: add focused process job lifecycle example - #192

Merged
mikemcdougall merged 1 commit into
trunkfrom
agent/cross-sdk-job-examples
Aug 9, 2026
Merged

docs: add focused process job lifecycle example#192
mikemcdougall merged 1 commit into
trunkfrom
agent/cross-sdk-job-examples

Conversation

@mikemcdougall

Copy link
Copy Markdown
Contributor

Summary

  • add a focused, real Python OGC process submit/wait/results example
  • keep process inputs caller-supplied because registered process schemas are server-defined
  • add a bounded mock-transport contract test and generated API-reference admission
  • document that custom Python batch authoring is not exposed by the Python SDK or current Studio workflow

Validation

  • PYTHONPATH=packages/honua-sdk:packages/honua-admin:. python -m pytest tests/test_geoprocessing_job_lifecycle_example.py -q
  • python -m ruff check examples/geoprocessing_job_lifecycle.py tests/test_geoprocessing_job_lifecycle_example.py
  • python -m mypy examples/geoprocessing_job_lifecycle.py

Cross-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)

@mikemcdougall
mikemcdougall marked this pull request as ready for review August 9, 2026 03:22
@mikemcdougall
mikemcdougall merged commit 149612e into trunk Aug 9, 2026
26 of 27 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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}'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant