Skip to content

Commit f74223d

Browse files
authored
Merge pull request #148 from posit-dev/fix-update-get-api-text
fix: update `get_api_text()`
2 parents cc32071 + b1a1ef1 commit f74223d

File tree

2 files changed

+993
-234
lines changed

2 files changed

+993
-234
lines changed

pointblank/_utils.py

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,7 @@ def _get_api_text() -> str:
463463
"Validate",
464464
"Thresholds",
465465
"Actions",
466+
"FinalActions",
466467
"Schema",
467468
"DraftValidation",
468469
]
@@ -508,6 +509,7 @@ def _get_api_text() -> str:
508509
"Validate.get_sundered_data",
509510
"Validate.get_data_extracts",
510511
"Validate.all_passed",
512+
"Validate.assert_passing",
511513
"Validate.n",
512514
"Validate.n_passed",
513515
"Validate.n_failed",
@@ -523,11 +525,20 @@ def _get_api_text() -> str:
523525
"preview",
524526
"col_summary_tbl",
525527
"missing_vals_tbl",
528+
"assistant",
529+
"load_dataset",
530+
]
531+
532+
utility_exported = [
526533
"get_column_count",
527534
"get_row_count",
528-
"load_dataset",
535+
"get_action_metadata",
536+
"get_validation_summary",
529537
"config",
530-
"assistant",
538+
]
539+
540+
prebuilt_actions_exported = [
541+
"send_slack_notification",
531542
]
532543

533544
validate_desc = """When peforming data validation, you'll need the `Validate` class to get the
@@ -562,6 +573,17 @@ def _get_api_text() -> str:
562573
`config()` utility lets us set global configuration parameters. Want to chat with an assistant? Use
563574
the `assistant()` function to get help with Pointblank."""
564575

576+
utility_desc = """The Utility Functions group contains functions that are useful for accessing
577+
metadata about the target data. Use `get_column_count()` or `get_row_count()` to get the number of
578+
columns or rows in a table. The `get_action_metadata()` function is useful when building custom
579+
actions since it returns metadata about the validation step that's triggering the action. Lastly,
580+
the `config()` utility lets us set global configuration parameters."""
581+
582+
prebuilt_actions_desc = """The Prebuilt Actions group contains a function that can be used to
583+
send a Slack notification when validation steps exceed failure threshold levels or just to provide a
584+
summary of the validation results, including the status, number of steps, passing and failing steps,
585+
table information, and timing details."""
586+
565587
#
566588
# Add headings (`*_desc` text) and API details for each family of functions/methods
567589
#
@@ -578,9 +600,15 @@ def _get_api_text() -> str:
578600
api_text += f"""\n## The Interrogation and Reporting family\n\n{interrogation_desc}\n\n"""
579601
api_text += get_api_details(module=pointblank, exported_list=interrogation_exported)
580602

581-
api_text += f"""\n## The Utilities family\n\n{inspect_desc}\n\n"""
603+
api_text += f"""\n## The Inspection and Assistance family\n\n{inspect_desc}\n\n"""
582604
api_text += get_api_details(module=pointblank, exported_list=inspect_exported)
583605

606+
api_text += f"""\n## The Utility Functions family\n\n{utility_desc}\n\n"""
607+
api_text += get_api_details(module=pointblank, exported_list=utility_exported)
608+
609+
api_text += f"""\n## The Prebuilt Actions family\n\n{prebuilt_actions_desc}\n\n"""
610+
api_text += get_api_details(module=pointblank, exported_list=prebuilt_actions_exported)
611+
584612
# Modify language syntax in all code cells
585613
api_text = api_text.replace("{python}", "python")
586614

0 commit comments

Comments
 (0)