diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2537c1f..f1c1e58 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.4.0" + ".": "0.5.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index f8b2188..ddfbbc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,47 @@ # Changelog +## [0.5.0](https://github.com/getyourguide/dataframe-expectations/compare/v0.4.0...v0.5.0) (2025-11-22) + + +### Features + +* **Tag-based filtering**: Add support for selective expectation execution using custom tags + - New `TagMatchMode` enum with `ANY` (OR logic) and `ALL` (AND logic) options + - Tag expectations with `"key:value"` format (e.g., `"priority:high"`, `"env:prod"`) + - Filter at build time: `suite.build(tags=["priority:high"], tag_match_mode=TagMatchMode.ANY)` + - All expectations automatically support the `tags` parameter + - Converted `TagSet` to Pydantic `BaseModel` with frozen configuration for immutability + + ```python + # Tag expectations + suite = ( + DataFrameExpectationsSuite() + .expect_value_greater_than(column_name="age", value=18, tags=["priority:high", "env:prod"]) + .expect_value_not_null(column_name="name", tags=["priority:high"]) + .expect_min_rows(min_rows=1, tags=["priority:low", "env:test"]) + ) + + # Run only high-priority checks (OR logic) + runner = suite.build(tags=["priority:high"], tag_match_mode=TagMatchMode.ANY) + + # Run production-critical checks (AND logic) + runner = suite.build(tags=["priority:high", "env:prod"], tag_match_mode=TagMatchMode.ALL) + ``` + +* **Programmatic result inspection**: Enhanced `SuiteExecutionResult` for detailed validation analysis + - Use `raise_on_failure=False` to inspect results without raising exceptions + - Access comprehensive metrics: `total_expectations`, `total_passed`, `total_failed`, `pass_rate`, `total_duration_seconds` + - Inspect individual expectation results with status, violation counts, descriptions, and timing + - View applied tag filters in execution results + - Removed `arbitrary_types_allowed` from Pydantic models for cleaner type validation + + +### Documentation + +- Added tag-based filtering examples to README.md +- Updated Sphinx documentation with API references for `TagMatchMode` and `TagSet` +- Documented programmatic result inspection with metrics access and failure analysis + ## [0.4.0](https://github.com/getyourguide/dataframe-expectations/compare/v0.3.0...v0.4.0) (2025-11-10) diff --git a/pyproject.toml b/pyproject.toml index 8528148..d97f45c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "dataframe-expectations" -version = "0.4.0" +version = "0.5.0" description = "Python library designed to validate Pandas and PySpark DataFrames using customizable, reusable expectations" readme = "README.md" requires-python = ">=3.10"