Skip to content

Commit d4c52e8

Browse files
committed
docs: updated CHANGELOG.md with migration example
1 parent c432ca3 commit d4c52e8

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

CHANGELOG.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,28 @@
55

66
### ⚠ BREAKING CHANGES
77

8-
* The DataFrameExpectationsSuite API has changed. Users must now call .build() before .run().
8+
* ‼️ BREAKING CHANGE: The DataFrameExpectationsSuite API has changed. Users must now call .build() before .run().
9+
10+
**Migration guide:**
11+
```python
12+
# Before
13+
suite.run(df)
14+
15+
# After
16+
runner = suite.build()
17+
runner.run(df)
18+
```
19+
20+
**New decorator feature:**
21+
```python
22+
@runner.validate
23+
def load_data():
24+
return pd.read_csv(\"data.csv\")
25+
26+
@runner.validate(allow_none=True)
27+
def optional_load():
28+
return None # Skip validation when None
29+
```
930

1031
### Features
1132

0 commit comments

Comments
 (0)