@@ -250,7 +250,7 @@ Thresholds(warning: 'int | float | bool | None' = None, error: 'int | float | bo
250250 (in the [`Validate`](`pointblank.Validate`) class).
251251
252252
253- Actions(warning: 'str | Callable | list[str | Callable] | None' = None, error: 'str | Callable | list[str | Callable] | None' = None, critical: 'str | Callable | list[str | Callable] | None' = None) -> None
253+ Actions(warning: 'str | Callable | list[str | Callable] | None' = None, error: 'str | Callable | list[str | Callable] | None' = None, critical: 'str | Callable | list[str | Callable] | None' = None, default: 'str | Callable | list[str | Callable] | None' = None, highest_only: 'bool' = True ) -> None
254254
255255 Definition of action values.
256256
@@ -263,7 +263,9 @@ Actions(warning: 'str | Callable | list[str | Callable] | None' = None, error: '
263263 to different levels of severity when a threshold is reached. Those thresholds can be defined
264264 using the [`Thresholds`](`pointblank.Thresholds`) class or various shorthand forms. Actions
265265 don't have to be defined for all threshold levels; if an action is not defined for a level in
266- exceedance, no action will be taken.
266+ exceedance, no action will be taken. Likewise, there is no negative consequence (other than a
267+ no-op) for defining actions for thresholds that don't exist (e.g., setting an action for the
268+ 'critical' level when no corresponding 'critical' threshold has been set).
267269
268270 Parameters
269271 ----------
@@ -276,6 +278,14 @@ Actions(warning: 'str | Callable | list[str | Callable] | None' = None, error: '
276278 critical
277279 A string, `Callable`, or list of `Callable`/string values for the 'critical' level. Using
278280 `None` means no action should be performed at the 'critical' level.
281+ default
282+ A string, `Callable`, or list of `Callable`/string values for all threshold levels. This
283+ parameter can be used to set the same action for all threshold levels. If an action is
284+ defined for a specific threshold level, it will override the action set for all levels.
285+ highest_only
286+ A boolean value that, when set to `True` (the default), results in executing only the action
287+ for the highest threshold level that is exceeded. Useful when you want to ensure that only
288+ the most severe action is taken when multiple threshold levels are exceeded.
279289
280290 Returns
281291 -------
@@ -4268,12 +4278,12 @@ get_tabular_report(self, title: 'str | None' = ':default:', incl_header: 'bool'
42684278 to provide a more descriptive title for the report.
42694279
42704280
4271- get_step_report(self, i: 'int') -> 'GT'
4281+ get_step_report(self, i: 'int', columns_subset: 'str | list[str] | Column | None' = None, header: 'str' = ':default:', limit: 'int | None' = 10 ) -> 'GT'
42724282
42734283 Get a detailed report for a single validation step.
42744284
4275- The `get_step_report()` method returns a report of what went well, or what failed
4276- spectacularly, for a given validation step. The report includes a summary of the validation
4285+ The `get_step_report()` method returns a report of what went well--- or what failed
4286+ spectacularly--- for a given validation step. The report includes a summary of the validation
42774287 step and a detailed breakdown of the interrogation results. The report is presented as a GT
42784288 table object, which can be displayed in a notebook or exported to an HTML file.
42794289
@@ -4285,7 +4295,24 @@ get_step_report(self, i: 'int') -> 'GT'
42854295 Parameters
42864296 ----------
42874297 i
4288- The step number for which to get a detailed report.
4298+ The step number for which to get the report.
4299+ columns_subset
4300+ The columns to display in a step report that shows errors in the input table. By default
4301+ all columns are shown (`None`). If a subset of columns is desired, we can provide a list
4302+ of column names, a string with a single column name, a `Column` object, or a
4303+ `ColumnSelector` object. The last two options allow for more flexible column selection
4304+ using column selector functions. Errors are raised if the column names provided don't
4305+ match any columns in the table (when provided as a string or list of strings) or if
4306+ column selector expressions don't resolve to any columns.
4307+ header
4308+ Options for customizing the header of the step report. The default is the `":default:"`
4309+ value which produces a generic header. Aside from this default, text can be provided for
4310+ the header. This will be interpreted as Markdown text and transformed internally to
4311+ HTML.
4312+ limit
4313+ The number of rows to display for those validation steps that check values in rows (the
4314+ `col_vals_*()` validation steps). The default is `10` rows and the limit can be removed
4315+ entirely by setting `limit=None`.
42894316
42904317 Returns
42914318 -------
@@ -4342,6 +4369,25 @@ get_step_report(self, i: 'int') -> 'GT'
43424369 validation.get_step_report(i=4)
43434370 ```
43444371
4372+ If you'd like to trim down the number of columns shown in the report, you can provide a
4373+ subset of columns to display. For example, if you only want to see the columns `a`, `b`, and
4374+ `c`, you can provide those column names as a list.
4375+
4376+ ```python
4377+ validation.get_step_report(i=1, columns_subset=["a", "b", "c"])
4378+ ```
4379+
4380+ If you'd like to increase or reduce the maximum number of rows shown in the report, you can
4381+ provide a different value for the `limit` parameter. For example, if you'd like to see only
4382+ up to 5 rows, you can set `limit=5`.
4383+
4384+ ```python
4385+ validation.get_step_report(i=3, limit=5)
4386+ ```
4387+
4388+ Step 3 actually had 7 failing test units, but only the first 5 rows are shown in the step
4389+ report because of the `limit=5` parameter.
4390+
43454391
43464392get_json_report(self, use_fields: 'list[str] | None' = None, exclude_fields: 'list[str] | None' = None) -> 'str'
43474393
@@ -5435,7 +5481,7 @@ DataScan(data: 'FrameT | Any', tbl_name: 'str | None' = None) -> None
54355481 A DataScan object.
54365482
54375483
5438- preview(data: 'FrameT | Any', columns_subset: 'str | list[str] | Column | None' = None, n_head: 'int' = 5, n_tail: 'int' = 5, limit: 'int | None ' = 50, show_row_numbers: 'bool' = True, max_col_width: 'int | None' = 250 , incl_header: 'bool' = None) -> 'GT'
5484+ preview(data: 'FrameT | Any', columns_subset: 'str | list[str] | Column | None' = None, n_head: 'int' = 5, n_tail: 'int' = 5, limit: 'int' = 50, show_row_numbers: 'bool' = True, max_col_width: 'int' = 250, min_tbl_width: 'int' = 500 , incl_header: 'bool' = None) -> 'GT'
54395485
54405486 Display a table preview that shows some rows from the top, some from the bottom.
54415487
@@ -5470,12 +5516,18 @@ preview(data: 'FrameT | Any', columns_subset: 'str | list[str] | Column | None'
54705516 The number of rows to show from the end of the table. Set to `5` by default.
54715517 limit
54725518 The limit value for the sum of `n_head=` and `n_tail=` (the total number of rows shown).
5473- If the sum of `n_head=` and `n_tail=` exceeds the limit, an error is raised.
5519+ If the sum of `n_head=` and `n_tail=` exceeds the limit, an error is raised. The default
5520+ value is `50`.
54745521 show_row_numbers
54755522 Should row numbers be shown? The numbers shown reflect the row numbers of the head and tail
5476- in the full table.
5523+ in the input `data=` table. By default, this is set to `True` .
54775524 max_col_width
5478- The maximum width of the columns in pixels. This is `250` (`"250px"`) by default.
5525+ The maximum width of the columns (in pixels) before the text is truncated. The default value
5526+ is `250` (`"250px"`).
5527+ min_tbl_width
5528+ The minimum width of the table in pixels. If the sum of the column widths is less than this
5529+ value, the all columns are sized up to reach this minimum width value. The default value is
5530+ `500` (`"500px"`).
54795531 incl_header
54805532 Should the table include a header with the table type and table dimensions? Set to `True` by
54815533 default.
0 commit comments