Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
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
22 changes: 11 additions & 11 deletions docs/docs/re_data/reference/tests/asserts.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ models:
- re_data.assert_greater:
metric: min
value: 200
where: time_window_start >= '2020-05-02'
condition: time_window_start >= '2020-05-02'

```

Expand All @@ -43,23 +43,23 @@ Asserts have a set of standard params with the same meaning in all tests:
- expression: an expression which re_data will evaluate to be true or false. Use `value` to indicate the value of a metric computed. Example expression: `value > 0` asserts that metric is greater than 0
- value - a number to which you would like to compare metric. Example: `value: 5` in the `assert_greater` test would check if all metric values are larger than 5
- min_value, max_value - similarly to `value` re_data will compare metric values to values passed here
- where: (optional) time filter for the metric, if you would like to tests only metric from specific time range. User `time_window_start` or `time_window_end` to compare against time. Example: `time_window_start > '2020-05-02'` will check only metrics computed later than on '2020-05-02'
- condition: (optional) time filter for the metric, if you would like to tests only metric from specific time range. User `time_window_start` or `time_window_end` to compare against time. Example: `time_window_start > '2020-05-02'` will check only metrics computed later than on '2020-05-02'
:::

### assert_true

Accepted params:
- metric
- expression
- where
- condition

Assert that given expression is true for the metric computed.

```
- re_data.assert_true:
metric: nulls_percent
expression: value = 0
where: time_window_start >= '2020-05-02' # (optinal)
condition: time_window_start >= '2020-05-02' # (optinal)
```


Expand All @@ -68,7 +68,7 @@ Assert that given expression is true for the metric computed.
Accepted params:
- metric
- expression
- where
- condition

Assert that given expression is false for the metric computed.

Expand All @@ -84,7 +84,7 @@ Accepted params:
- metric
- min_value
- max_value
- where
- condition

Assert that metric value is between min_value and max_value (inclusive)

Expand All @@ -100,7 +100,7 @@ Assert that metric value is between min_value and max_value (inclusive)
Accepted params:
- metric
- value
- where
- condition

Assert that metric value is equal to specified value

Expand All @@ -115,7 +115,7 @@ Assert that metric value is equal to specified value
Accepted params:
- metric
- value
- where
- condition

Assert that metric value is greater to specified value

Expand All @@ -131,7 +131,7 @@ Assert that metric value is greater to specified value
Accepted params:
- metric
- value
- where
- condition

Assert that metric value is greater or equal specified value

Expand All @@ -146,7 +146,7 @@ Assert that metric value is greater or equal specified value
Accepted params:
- metric
- value
- where
- condition

Assert that metric value is smaller specified value

Expand All @@ -161,7 +161,7 @@ Assert that metric value is smaller specified value
Accepted params:
- metric
- value
- where
- condition

Assert that metric value is smaller or equal to specified value

Expand Down