feat: add description field to check config (#164)#165
Open
ramananayak wants to merge 1 commit into
Open
Conversation
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.
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.
Adds an optional
descriptionfield 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 | Nonefield 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:
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_sqlare 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 forcustom_sqlchecks 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
uv run pytestpassesruff checkandruff formatpassnewsfragments/(see CONTRIBUTING.md)