|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## [0.5.0](https://github.com/getyourguide/dataframe-expectations/compare/v0.4.0...v0.5.0) (2025-11-22) |
| 4 | + |
| 5 | + |
| 6 | +### Features |
| 7 | + |
| 8 | +* **Tag-based filtering**: Add support for selective expectation execution using custom tags |
| 9 | + - New `TagMatchMode` enum with `ANY` (OR logic) and `ALL` (AND logic) options |
| 10 | + - Tag expectations with `"key:value"` format (e.g., `"priority:high"`, `"env:prod"`) |
| 11 | + - Filter at build time: `suite.build(tags=["priority:high"], tag_match_mode=TagMatchMode.ANY)` |
| 12 | + - All expectations automatically support the `tags` parameter |
| 13 | + - Converted `TagSet` to Pydantic `BaseModel` with frozen configuration for immutability |
| 14 | + |
| 15 | + ```python |
| 16 | + # Tag expectations |
| 17 | + suite = ( |
| 18 | + DataFrameExpectationsSuite() |
| 19 | + .expect_value_greater_than(column_name="age", value=18, tags=["priority:high", "env:prod"]) |
| 20 | + .expect_value_not_null(column_name="name", tags=["priority:high"]) |
| 21 | + .expect_min_rows(min_rows=1, tags=["priority:low", "env:test"]) |
| 22 | + ) |
| 23 | + |
| 24 | + # Run only high-priority checks (OR logic) |
| 25 | + runner = suite.build(tags=["priority:high"], tag_match_mode=TagMatchMode.ANY) |
| 26 | + |
| 27 | + # Run production-critical checks (AND logic) |
| 28 | + runner = suite.build(tags=["priority:high", "env:prod"], tag_match_mode=TagMatchMode.ALL) |
| 29 | + ``` |
| 30 | + |
| 31 | +* **Programmatic result inspection**: Enhanced `SuiteExecutionResult` for detailed validation analysis |
| 32 | + - Use `raise_on_failure=False` to inspect results without raising exceptions |
| 33 | + - Access comprehensive metrics: `total_expectations`, `total_passed`, `total_failed`, `pass_rate`, `total_duration_seconds` |
| 34 | + - Inspect individual expectation results with status, violation counts, descriptions, and timing |
| 35 | + - View applied tag filters in execution results |
| 36 | + - Removed `arbitrary_types_allowed` from Pydantic models for cleaner type validation |
| 37 | + |
| 38 | + |
| 39 | +### Documentation |
| 40 | + |
| 41 | +- Added tag-based filtering examples to README.md |
| 42 | +- Updated Sphinx documentation with API references for `TagMatchMode` and `TagSet` |
| 43 | +- Documented programmatic result inspection with metrics access and failure analysis |
| 44 | + |
3 | 45 | ## [0.4.0](https://github.com/getyourguide/dataframe-expectations/compare/v0.3.0...v0.4.0) (2025-11-10) |
4 | 46 |
|
5 | 47 |
|
|
0 commit comments