Skip to content

Commit 700560c

Browse files
committed
Update thresholds.qmd
1 parent 26af20c commit 700560c

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

docs/user-guide/thresholds.qmd

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Thresholds
2+
title: Setting Failure Thresholds
33
jupyter: python3
44
html-table-processing: none
55
---
@@ -27,10 +27,8 @@ particular column):
2727
import pointblank as pb
2828
2929
validation_1 = (
30-
pb.Validate(data=pb.load_dataset(dataset="small_table"))
31-
.col_vals_not_null(
32-
columns="c", thresholds=(1, 0.2)
33-
)
30+
pb.Validate(data=pb.load_dataset(dataset="small_table", tbl_type="polars"))
31+
.col_vals_not_null(columns="c", thresholds=(1, 0.2))
3432
.interrogate()
3533
)
3634
@@ -61,14 +59,17 @@ with a value of `5`, then 5 failing test units will result in an exceedance.
6159

6260
## Using the `Validation(thresholds=)` Argument
6361

64-
We can also define thresholds globally. This means that every validation step will re-use the same
65-
set of threshold values.
62+
We can also define thresholds globally (within the `Validate` call). This means that every
63+
validation step will re-use the same set of threshold values.
6664

6765
```python
6866
import pointblank as pb
6967

7068
validation_2 = (
71-
pb.Validate(data=pb.load_dataset(dataset="small_table"), thresholds=(1, 0.1))
69+
pb.Validate(
70+
data=pb.load_dataset(dataset="small_table", tbl_type="polars"),
71+
thresholds=(1, 0.1)
72+
)
7273
.col_vals_not_null(columns="a")
7374
.col_vals_gt(columns="b", value=2)
7475
.interrogate()
@@ -82,7 +83,7 @@ and [`col_vals_gt()`](https://posit-dev.github.io/pointblank/reference/Validate.
8283
steps will use the `thresholds=` value set in the
8384
[`Validate`](https://posit-dev.github.io/pointblank/reference/Validate.html) call. Now, if you want
8485
to override these global threshold values for a given validation step, you can always use the
85-
`threshold=` argument when calling a validation method (this argument is present within every
86+
`thresholds=` argument when calling a validation method (this argument is present within every
8687
validation method).
8788

8889
## Ways to Define Thresholds
@@ -120,7 +121,7 @@ express thresholds without these constraints.
120121

121122
Using the [`Thresholds`](https://posit-dev.github.io/pointblank/reference/Thresholds.html) class
122123
lets you define the threshold levels using the `warning=`, `error=`, and `critical=` arguments. And
123-
unlike the method of setting thresholds with a tuple, any of the threshold levels can be unset.
124+
unlike the method of setting thresholds with a tuple, any of the threshold levels can be left unset.
124125
Here's an example where you might want to set the 'error' and 'critical' levels (leaving the
125126
'warning' level unset):
126127

0 commit comments

Comments
 (0)