Repository navigation
Use custom runners for compute tasks and honor schema extra-field rules - #410
Draft
amirabbas-jalali-bentley wants to merge 2 commits into
Conversation
Add the evo.compute.overrides seam and a Kriging custom runner so tasks with cross-field checks, folded filter/diagnostic parameters, or rich result wrappers share ComputeClient's discovery, validation, and reference resolution while keeping their native surface across both attribute access and arun(). Also align unknown-field handling with each schema's additionalProperties rule and update generated stubs accordingly.
This was referenced Nov 14, 2026
amirabbas-jalali-bentley
changed the base branch from
main
to
add-compute-engine-type-stubs
November 16, 2026 20:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Most compute tasks need no task-specific client code beyond their published JSON Schemas, while a few tasks have cross-field invariants JSON Schema cannot express, folded filter/diagnostic parameters, or rich result helpers. This PR adds the
evo.compute.overridesseam so those tasks plug intoComputeClient(bothclient.<topic>.<task>.run(...)andclient.arun(...)) while still routing discovery, validation, reference resolution, and submission through the shared engine, and refines unknown/extra-field handling to follow each schema'sadditionalPropertiesrule.Changes
evo.compute.overrides):load_override(topic, task)resolvesevo.compute.overrides.<topic>.<task>on demand without touching the network on attribute access, andoverridden_tasks()enumerates packaged overrides for_stubgensoengine.pyiimports the custom runner's signature directly instead of emitting a duplicate generated stub.client.<topic>.<task>.run(...)andclient.arun(topic, task, parameters)dispatch through the override when registered.evo.compute.overrides.geostatistics.kriging.KrigingOverride):KrigingParametersergonomics (source_filter,target_filter,diagnostics,search/neighborhood,method/kriging_method, andblock_discretization/block_discretisationadaptation to the live catalogue's parameter spelling), returns nativeKrigingResult, and enforces cross-field checks (preventing target updates from overwriting the source attribute on the same object, and checkingmin_samples <= max_samples).additionalProperties: falsereject unknown fields withParameterValidationError; schema-valuedadditionalPropertiesvalidate unknown values;additionalProperties: trueaccepts them silently; and unspecifiedadditionalPropertieslog a warning oncompute.validationand forward values unchanged so newer service fields are never silently dropped.No breaking changes to existing
evo.compute.tasksAPIs.Testing
test_overrides.py(31 tests) verifies three-way payload parity acrossKrigingRunner,KrigingOverride, and generic_run_generic, cross-field refusal rules (including case/fragment-variedObjectReferencespellings),arunparity, and parameter-spelling adaptation.test_engine.py,test_validation.py, andtest_stubgen.pycover extra-field policies across nested containers and stub generation for overridden tasks.evo-computetests: 825 passed, 2 skipped (49 new, 670 subtests).ruff check,ruff format --check,mypy,pyright, and pre-commit hooks pass.Checklist