Skip to content

Commit 9c66f95

Browse files
committed
chore: updated CHANGELOG.md
1 parent 52bcd73 commit 9c66f95

File tree

1 file changed

+32
-3
lines changed

1 file changed

+32
-3
lines changed

CHANGELOG.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,42 @@
55

66
### Features
77

8-
* add suite_result and tagging ([e36becd](https://github.com/getyourguide/dataframe-expectations/commit/e36becd82141ad38e122d1d5209a12c2d0971b46))
9-
* add suite_result and tagging ([e0857b4](https://github.com/getyourguide/dataframe-expectations/commit/e0857b4ae906c297431b21cfafa4166653c9d413))
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
1037

1138

1239
### Documentation
1340

14-
* updated documentation ([6a08bd9](https://github.com/getyourguide/dataframe-expectations/commit/6a08bd9166d10cbf252e5f9a0e50a0e7bf192602))
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
1544

1645
## [0.4.0](https://github.com/getyourguide/dataframe-expectations/compare/v0.3.0...v0.4.0) (2025-11-10)
1746

0 commit comments

Comments
 (0)