Skip to content

Commit d62ce0b

Browse files
authored
Merge pull request #28 from getyourguide/release-please--branches--main--components--dataframe-expectations
chore(main): release 0.5.0
2 parents e36becd + 9c66f95 commit d62ce0b

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.4.0"
2+
".": "0.5.0"
33
}

CHANGELOG.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,47 @@
11
# Changelog
22

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+
345
## [0.4.0](https://github.com/getyourguide/dataframe-expectations/compare/v0.3.0...v0.4.0) (2025-11-10)
446

547

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "dataframe-expectations"
3-
version = "0.4.0"
3+
version = "0.5.0"
44
description = "Python library designed to validate Pandas and PySpark DataFrames using customizable, reusable expectations"
55
readme = "README.md"
66
requires-python = ">=3.10"

0 commit comments

Comments
 (0)