Skip to content

feat: add description field to check config (#164)#165

Open
ramananayak wants to merge 1 commit into
provero-org:mainfrom
ramananayak:feature/description-addition
Open

feat: add description field to check config (#164)#165
ramananayak wants to merge 1 commit into
provero-org:mainfrom
ramananayak:feature/description-addition

Conversation

@ramananayak

Copy link
Copy Markdown

Adds an optional description field on CheckConfig that flows through to CheckResult and the HTML report. Particularly valuable for custom_sql checks and other cases where the existing check identifier is opaque. Mirrors the existing description field on ColumnContract.

What

Adds an optional description: str | None field on CheckConfig (parsed from YAML), surfaced on CheckResult , and rendered in the HTML report. The field is plumbed through both the per-check execution path ( _run_single_check ) and the batched-execution path ( plan_batch / execute_batch / _run_suite_inner ), including the per-column expansion of multi-column not_null checks.

YAML usage:

  checks:
    - range:
        column: amount
        min: 0
        max: 1000
        description: Order amount must be between $0 and $1000
    - custom_sql:
        query: SELECT MIN(created_at) > NOW() - INTERVAL '1 day' FROM orders
        description: All orders must have been created in the last 24h

The HTML report gains a new "Description" column in the results table and renders the description as a sub-heading on each failing-check block.

Why

Check identifiers like custom_sql are often opaque to anyone reading a report who didn't author the suite. A free-form one-line summary makes reports self-documenting without requiring readers to cross-reference the YAML config. This is especially useful for custom_sql checks where the displayed name is just the literal string custom_sql .

The naming and shape mirror the existing description field on ColumnContract , keeping Provero's vocabulary consistent across YAML config objects.

Closes #164

Checklist

  • Tests added or updated
  • uv run pytest passes
  • ruff check and ruff format pass
  • News fragment added in newsfragments/ (see CONTRIBUTING.md)
  • Documentation updated (if applicable)
  • Apache license header present on new files

Adds an optional `description` field on CheckConfig that flows through
to CheckResult and the HTML report. Particularly valuable for custom_sql
checks and other cases where the existing check identifier is opaque.
Mirrors the existing description field on ColumnContract.
@github-actions github-actions Bot added area/core Engine, compiler, optimizer, results area/tests Test suite labels Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/core Engine, compiler, optimizer, results area/tests Test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

one line description addition

1 participant