diff --git a/docs/sphinx_api_docs_source/public_api_excludes.py b/docs/sphinx_api_docs_source/public_api_excludes.py index 13648c5ae9f0..feba54b8fd41 100644 --- a/docs/sphinx_api_docs_source/public_api_excludes.py +++ b/docs/sphinx_api_docs_source/public_api_excludes.py @@ -38,11 +38,6 @@ reason="Exclude code from __init__.py", filepath=pathlib.Path("great_expectations/types/__init__.py"), ), - IncludeExcludeDefinition( - reason="ValidationActions are now run from Checkpoints: https://docs.greatexpectations.io/docs/guides/miscellaneous/migration_guide#manually-migrate-v2-checkpoints-to-v3-checkpoints", - name="run", - filepath=pathlib.Path("great_expectations/checkpoint/actions.py"), - ), IncludeExcludeDefinition( reason="False match for from datasource_configuration_test_utilities import is_subset", name="is_subset", diff --git a/great_expectations/checkpoint/actions.py b/great_expectations/checkpoint/actions.py index e7d3e94d9113..3d032f20656f 100644 --- a/great_expectations/checkpoint/actions.py +++ b/great_expectations/checkpoint/actions.py @@ -105,7 +105,17 @@ def data(self) -> list[tuple[ValidationAction, dict]]: def update(self, action: ValidationAction, action_result: dict) -> None: self._data.append((action, action_result)) + @public_api def filter_results(self, class_: Type[ValidationAction]) -> list[dict]: + """ + Filter the results of the actions in the context by class. + + Args: + class_: The class to filter by. + + Returns: + A list of action results. + """ return [action_result for action, action_result in self._data if isinstance(action, class_)] @@ -202,9 +212,20 @@ class Config: def _using_cloud_context(self) -> bool: return project_manager.is_using_cloud() + @public_api def run( self, checkpoint_result: CheckpointResult, action_context: ActionContext | None = None ) -> dict: + """ + Run the action. + + Args: + checkpoint_result: The result of the checkpoint run. + action_context: The context in which the action is run. + + Returns: + A dictionary containing the result of the action. + """ raise NotImplementedError def _get_data_docs_pages_from_prior_action(