docs(data-quality): add check_output_custom section (#212)#1658
Open
philipljh wants to merge 2 commits into
Open
docs(data-quality): add check_output_custom section (#212)#1658philipljh wants to merge 2 commits into
philipljh wants to merge 2 commits into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Author
|
Hello, made my first oss pr, open to any feedback and guidance. Cheers~ |
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.
Closes #212 - adds documentation for
@check_output_customIt walks through the full lifecycle of a custom validator:
@check_output_customrelative to@check_output's default validators (data type, range, allowed values, ...), with a cross-reference to thecheck_outputAPI reference.AllPositiveValidator, that subclasseshamilton.data_quality.base.DataValidatorand checks a pandas Series for negative values. Each required method is then explained individually:applies_to,description,name,validatereturning aValidationResult(withpasses,message, and the free-formdiagnosticsdict), plus theimportanceconstructor argument.@check_output_customdecorators is not supported.importance="warn"logs through the standardloggingmodule and continues;importance="fail"raisesDataValidationError, with all validators evaluated first so every failure is reported at once.{name}_raw/ per-validator / final-node split, thehamilton.data_quality.contains_dq_resultsandhamilton.data_quality.source_nodetags, and a driver example showing that validator nodes can simply be requested as outputs to inspect theirValidationResult.Changes
Adds a "Custom validators" section to the "Data quality" how-to page (
docs/how-tos/run-data-quality-checks.rst) covering:@check_output's built-in validatorsDataValidatorsubclass example@check_output_custom(and that decorators can't be stacked)importance="warn"(logs, continues) vs"fail"(raisesDataValidationError)How I tested this
sphinx-build -b dirhtml -W; no warnings from the changed page.Notes
Checklist