Restructure example notebooks and add cross-table merge support#45
Open
Jamestth wants to merge 3 commits into
Open
Restructure example notebooks and add cross-table merge support#45Jamestth wants to merge 3 commits into
Jamestth wants to merge 3 commits into
Conversation
Split the monolithic examples/vowl_usage_patterns_demo.ipynb (91 cells) into three focused, self-contained notebooks under their own folders: - 1_core_tutorial/ setup, running a validation, understanding results - 2_multiple_sources/ validating one contract across multiple sources - 3_real_databases/ server-side validation with Testcontainers Each notebook resolves the shared dataset paths on its own (repo-root walk-up), imports what it needs, and writes generated artifacts to a local outputs/ folder. Section numbering/titles are scoped per notebook, and doc links in README.md and docs/usage-patterns.md are updated to the new paths. Also lands the cross-table-merge annotated-output work: a subquery-projected referential check now merges onto its anchor table instead of becoming a residue (src/vowl/validation/result.py), with expanded tests and expected outputs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Apply `prettier --write` to the three files the lint CI job flagged: table column-padding and `*emphasis*` → `_emphasis_` normalization. No content changes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Mark get_consolidated_output_dfs() and output_mode="failed_rows"/"both" as deprecated, steering users to get_annotated_output() / output_mode="annotated". - get_consolidated_output_dfs() now emits a DeprecationWarning and delegates to a private _get_consolidated_output_dfs() so internal callers (save() in failed_rows/both mode) reuse the grouping without warning. - save() warns on the deprecated paths: implicit default (upcoming flip to "annotated"), explicit "failed_rows", and the failed-rows half of "both". "annotated" stays silent. All warnings use stacklevel=2. - ValidationConfig.output_mode docstring notes the default will change. - Tests assert the warnings fire and that the private helper stays silent; internal/golden callers switched to the private helper. - CHANGELOG Deprecated entry; README/getting-started/known-issues updated. - Notebook TOC anchor-link fixes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
Three related changes to the examples and annotated-output feature:
1. Example notebook restructuring
The monolithic
examples/vowl_usage_patterns_demo.ipynb(91 cells, ~357 KB) grew unwieldy. Split it into three focused, self-contained notebooks, each in its own folder:1_core_tutorial/core_tutorial.ipynbValidationResult, annotated output)2_multiple_sources/multiple_sources.ipynb3_real_databases/real_databases.ipynbsave()calls write to a per-notebook localoutputs/folder; pre-generated reference artifacts moved there viagit mv(history preserved).../docs→../../docsnow that notebooks sit one level deeper) and repaired 3 corrupted source cells from the original notebook.README.md,docs/usage-patterns.md, and rewroteexamples/README.md.2. Cross-table merge for annotated output
A subquery-projected referential check now merges onto its anchor table's
check_infocolumn instead of becoming a residue (src/vowl/validation/result.py), since its failed-rows query projects only the anchor table's columns. Bare-JOIN referential checks still correctly become residues. Includes expanded tests and expected outputs, and a clarifyingdocs/known-issues.mdupdate.3. Deprecate consolidated failed-rows output
get_consolidated_output_dfs()and theoutput_mode="failed_rows"/"both"save modes (the legacy consolidated failed-rows CSVs) are now deprecated in favour of annotated output (get_annotated_output()/output_mode="annotated").get_consolidated_output_dfs()emits aDeprecationWarningand delegates to a private_get_consolidated_output_dfs(), so internal callers (save()infailed_rows/bothmode) reuse the grouping without warning.save()warns on the deprecated paths: the implicit default (which will flip to"annotated"in a future minor release), explicit"failed_rows", and the failed-rows half of"both"."annotated"stays silent. All warnings usestacklevel=2so they point at the caller.ValidationConfig.output_modedocstring notes the upcoming default change. No behaviour changes yet — existing calls still work, they just warn.CHANGELOG.mdgains aDeprecatedentry;README.md,docs/getting-started.md, anddocs/known-issues.mdupdated.Test plan
pytest tests/test_annotated_output.py tests/test_check_reference_variations.py tests/test_usage_patterns.py tests/test_readme_examples.py→ 237 passed, 17 skipped (skips are Docker/Java-gated)DeprecationWarningfires for each deprecated entry point and that the private_get_consolidated_output_dfs()helper stays silentcore_tutorial.ipynbandmultiple_sources.ipynbend-to-end via nbconvert — no error cells; outputs regenerate into the correctoutputs/foldersruff check,ruff format --check,prettier --check "**/*.md")real_databases.ipynbrequires Docker (not run in this environment)🤖 Generated with Claude Code