From ebe651d24c84e012e42697ccc1335dd95c09556e Mon Sep 17 00:00:00 2001 From: Owen Kephart Date: Thu, 10 Oct 2024 16:08:44 -0700 Subject: [PATCH] Export AutomationContext and AutomationResult --- python_modules/dagster/dagster/__init__.py | 4 ++++ .../test_user_defined_automation_condition.py | 11 ++++++++--- .../scenario_utils/automation_condition_scenario.py | 3 +-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/python_modules/dagster/dagster/__init__.py b/python_modules/dagster/dagster/__init__.py index f603a47e94c0f..b851750da400f 100644 --- a/python_modules/dagster/dagster/__init__.py +++ b/python_modules/dagster/dagster/__init__.py @@ -165,10 +165,14 @@ ) from dagster._core.definitions.declarative_automation.automation_condition import ( AutomationCondition as AutomationCondition, + AutomationResult as AutomationResult, ) from dagster._core.definitions.declarative_automation.automation_condition_tester import ( evaluate_automation_conditions as evaluate_automation_conditions, ) +from dagster._core.definitions.declarative_automation.automation_context import ( + AutomationContext as AutomationContext, +) from dagster._core.definitions.decorators.asset_check_decorator import ( asset_check as asset_check, multi_asset_check as multi_asset_check, diff --git a/python_modules/dagster/dagster_tests/definitions_tests/declarative_automation_tests/automation_condition_tests/user_defined/test_user_defined_automation_condition.py b/python_modules/dagster/dagster_tests/definitions_tests/declarative_automation_tests/automation_condition_tests/user_defined/test_user_defined_automation_condition.py index 459ff6847978c..bb551cc5747bd 100644 --- a/python_modules/dagster/dagster_tests/definitions_tests/declarative_automation_tests/automation_condition_tests/user_defined/test_user_defined_automation_condition.py +++ b/python_modules/dagster/dagster_tests/definitions_tests/declarative_automation_tests/automation_condition_tests/user_defined/test_user_defined_automation_condition.py @@ -1,8 +1,13 @@ import logging -from dagster import AutomationCondition, DagsterInstance, asset, evaluate_automation_conditions -from dagster._core.definitions.declarative_automation.automation_condition import AutomationResult -from dagster._core.definitions.declarative_automation.automation_context import AutomationContext +from dagster import ( + AutomationCondition, + AutomationContext, + AutomationResult, + DagsterInstance, + asset, + evaluate_automation_conditions, +) def test_cursoring() -> None: diff --git a/python_modules/dagster/dagster_tests/definitions_tests/declarative_automation_tests/scenario_utils/automation_condition_scenario.py b/python_modules/dagster/dagster_tests/definitions_tests/declarative_automation_tests/scenario_utils/automation_condition_scenario.py index 0422a83384197..38c7bf26f4fc9 100644 --- a/python_modules/dagster/dagster_tests/definitions_tests/declarative_automation_tests/scenario_utils/automation_condition_scenario.py +++ b/python_modules/dagster/dagster_tests/definitions_tests/declarative_automation_tests/scenario_utils/automation_condition_scenario.py @@ -4,7 +4,7 @@ from typing import Mapping, Optional, Sequence, Tuple import dagster._check as check -from dagster import AssetKey +from dagster import AssetKey, AutomationContext from dagster._core.asset_graph_view.asset_graph_view import AssetGraphView from dagster._core.asset_graph_view.entity_subset import EntitySubset from dagster._core.definitions.asset_daemon_cursor import AssetDaemonCursor @@ -16,7 +16,6 @@ from dagster._core.definitions.declarative_automation.automation_condition_evaluator import ( AutomationConditionEvaluator, ) -from dagster._core.definitions.declarative_automation.automation_context import AutomationContext from dagster._core.definitions.declarative_automation.operators.boolean_operators import ( AndAutomationCondition, )