Migration to Truthound 2.0¶
What Stays the Same¶
th.check(),th.scan(),th.mask(),th.profile(), andth.learn()remain available- CLI data validation still begins with
truthound check - legacy
Reportoutput remains usable
What Changed¶
- validation execution now routes through
truthound.core report.validation_runexposes the structuredValidationRunResult- built-in reporters and validation datadocs now consume
ValidationRunResultdirectly - top-level exports are intentionally smaller
PluginManageris the single lifecycle runtimeEnterprisePluginManageris an async facade, not a second manager implementationuse_engineand--use-engineare removed- the CLI plugin group is
plugins
Recommended Upgrade Path¶
1. Keep the Existing Facade¶
This is still the recommended default.
2. Start Reading Structured Results¶
run = report.validation_run
print(run.planned_execution_mode)
print(run.execution_mode)
print(run.to_dict())
3. Move Reporting and Validation Docs to the Result Model¶
from truthound.datadocs import generate_validation_report
from truthound.reporters import get_reporter
run = report.validation_run
json_report = get_reporter("json").render(run)
validation_docs = generate_validation_report(run)
Legacy helpers such as generate_html_report(report) still work, but passing Report or persisted validation DTOs directly to reporters is now a compatibility path rather than the preferred contract.
4. Move Extension Code to the Kernel¶
from truthound.core import ScanPlanner, ValidationRuntime, ValidationSuite, build_validation_asset
suite = ValidationSuite.from_legacy(validators=["null", "unique"])
asset = build_validation_asset(data)
plan = ScanPlanner().plan(suite=suite, asset=asset, parallel=True)
run = ValidationRuntime().execute(asset=asset, plan=plan)
5. Update Plugin Integrations¶
Prefer manager ports such as:
register_check_factory()register_data_asset_provider()register_reporter()register_hook()
Reporter plugins should target ValidationRunResult as the canonical input contract.
Breaking Changes¶
use_engineargument removed fromth.check()--use-engineremoved fromtruthound check- root exports narrowed around the main facade and kernel result types
truthound.stores.results.ValidationResultis no longer the canonical reporter input