Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.4.0"
".": "0.5.0"
}
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down