add_condition_to_spec
Preview adding a quality condition to a specification by reusing an existing descriptor. Returns the updated spec XML for review, without modifying any files.
Instructions
Preview adding a new QualityCondition to a spec, reusing an existing descriptor.
Builds the condition through the same prosuite factory as run_verification, resolves a matching (never synthesizes one), and returns the full updated spec XML with the condition appended and wired into target_specification_name. Preview only: never writes to a file. Call describe_spec first for valid specification/workspace/dataset names.
Args: target_specification_name: QualitySpecification to wire the condition into. name: Human-readable condition name; must not already exist in the spec. condition_request: {condition: method name from list_conditions, params: dict}. datasets: Feature classes/tables used by condition_request, each with 'name' and an optional 'filter_expression'. workspace_id: Logical workspace id to bind datasets to (e.g. "DATA_OSM"). allow_errors: Whether issues from this condition are tolerated. description: Optional description element. spec_xml: Spec XML text; defaults to reading the active spec (the one load_spec was last called with, otherwise PROSUITE_SPEC_PATH). category: Which category to file the condition under. Only needed when the spec nests QualityConditions under more than one.
Returns 'status': 'ok' with 'spec_xml' holding the updated spec, ready to review and persist yourself, or 'status': 'error'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| category | No | ||
| datasets | Yes | ||
| spec_xml | No | ||
| description | No | ||
| allow_errors | No | ||
| workspace_id | Yes | ||
| condition_request | Yes | ||
| target_specification_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||