From fcbf1bf32a3868fe3d85063d4140c31b1f47a623 Mon Sep 17 00:00:00 2001 From: Christoph Kuhnke Date: Tue, 19 Nov 2024 16:01:59 +0100 Subject: [PATCH] Refactoring/#217 rename dataflow abstraction files (#218) * #217: Renamed dataflow abstraction files * Renamed class SQLStageTrainQueryHandler to SQLStageQueryHandler --- doc/changes/changes_0.1.1.md | 1 + .../{ => graph}/execution_graph.py | 0 .../sql/{execution => }/data_partition.py | 2 +- .../stage/sql/{execution => }/dataset.py | 2 +- .../stage/sql/{execution => }/dependency.py | 0 .../graph/stage/sql/execution/input.py | 2 +- .../stage/sql/execution/query_handler.py | 2 +- .../sql/execution/query_handler_state.py | 4 ++-- .../stage/sql/{execution => }/input_output.py | 4 ++-- .../graph/stage/sql/sql_stage.py | 4 ++-- .../graph/stage/sql/sql_stage_graph.py | 2 +- ..._handler.py => sql_stage_query_handler.py} | 4 ++-- .../query_handler/graph/stage/stage_graph.py | 2 +- noxconfig.py | 2 +- .../assert_helper.py | 6 +++--- .../state_test_setup.py | 8 ++++---- .../test_query_handler_integration.py | 20 +++++++++---------- .../test_query_handler_using_mock_state.py | 8 ++++---- .../test_state_diamond.py | 2 +- .../test_state_reference_counting.py | 2 +- .../test_state_single_stage.py | 2 +- .../test_state_two_stage.py | 2 +- .../sql_stage_graph/test_data_partition.py | 4 ++-- .../sql_stage_graph/test_dataset.py | 6 +++--- .../sql_stage_graph/test_dependency.py | 2 +- .../test_find_object_proxies.py | 2 +- .../test_object_proxy_reference_counter.py | 2 +- ...proxy_reference_counting_bag_with_mocks.py | 2 +- .../test_sql_stage_input_output.py | 8 ++++---- ...est_sql_stage_train_query_handler_input.py | 4 ++-- version.py | 10 ++++++++++ 31 files changed, 66 insertions(+), 55 deletions(-) rename exasol/analytics/query_handler/{ => graph}/execution_graph.py (100%) rename exasol/analytics/query_handler/graph/stage/sql/{execution => }/data_partition.py (91%) rename exasol/analytics/query_handler/graph/stage/sql/{execution => }/dataset.py (95%) rename exasol/analytics/query_handler/graph/stage/sql/{execution => }/dependency.py (100%) rename exasol/analytics/query_handler/graph/stage/sql/{execution => }/input_output.py (83%) rename exasol/analytics/query_handler/graph/stage/sql/{sql_stage_train_query_handler.py => sql_stage_query_handler.py} (83%) create mode 100644 version.py diff --git a/doc/changes/changes_0.1.1.md b/doc/changes/changes_0.1.1.md index 0a45d6ec..636ab35e 100644 --- a/doc/changes/changes_0.1.1.md +++ b/doc/changes/changes_0.1.1.md @@ -17,3 +17,4 @@ Code name: * #188: Renamed global pytest fixtures to avoid name clashes * #208: Replaced access to private attribute by public * #203: Cleaned-up package names and directory structure +* #217: Rename dataflow abstraction files diff --git a/exasol/analytics/query_handler/execution_graph.py b/exasol/analytics/query_handler/graph/execution_graph.py similarity index 100% rename from exasol/analytics/query_handler/execution_graph.py rename to exasol/analytics/query_handler/graph/execution_graph.py diff --git a/exasol/analytics/query_handler/graph/stage/sql/execution/data_partition.py b/exasol/analytics/query_handler/graph/stage/sql/data_partition.py similarity index 91% rename from exasol/analytics/query_handler/graph/stage/sql/execution/data_partition.py rename to exasol/analytics/query_handler/graph/stage/sql/data_partition.py index 11a31691..06a6a48d 100644 --- a/exasol/analytics/query_handler/graph/stage/sql/execution/data_partition.py +++ b/exasol/analytics/query_handler/graph/stage/sql/data_partition.py @@ -4,7 +4,7 @@ from exasol.analytics.utils.data_classes_runtime_type_check import check_dataclass_types -from exasol.analytics.query_handler.graph.stage.sql.execution.dependency import Dependencies +from exasol.analytics.query_handler.graph.stage.sql.dependency import Dependencies @dataclasses.dataclass(frozen=True) diff --git a/exasol/analytics/query_handler/graph/stage/sql/execution/dataset.py b/exasol/analytics/query_handler/graph/stage/sql/dataset.py similarity index 95% rename from exasol/analytics/query_handler/graph/stage/sql/execution/dataset.py rename to exasol/analytics/query_handler/graph/stage/sql/dataset.py index 83e03ceb..7930c80a 100644 --- a/exasol/analytics/query_handler/graph/stage/sql/execution/dataset.py +++ b/exasol/analytics/query_handler/graph/stage/sql/dataset.py @@ -6,7 +6,7 @@ from exasol.analytics.utils.data_classes_runtime_type_check import check_dataclass_types -from exasol.analytics.query_handler.graph.stage.sql.execution.data_partition import DataPartition +from exasol.analytics.query_handler.graph.stage.sql.data_partition import DataPartition DataPartitionName = Union[Enum, Tuple[Enum, int]] diff --git a/exasol/analytics/query_handler/graph/stage/sql/execution/dependency.py b/exasol/analytics/query_handler/graph/stage/sql/dependency.py similarity index 100% rename from exasol/analytics/query_handler/graph/stage/sql/execution/dependency.py rename to exasol/analytics/query_handler/graph/stage/sql/dependency.py diff --git a/exasol/analytics/query_handler/graph/stage/sql/execution/input.py b/exasol/analytics/query_handler/graph/stage/sql/execution/input.py index f9ae68f8..04ed601a 100644 --- a/exasol/analytics/query_handler/graph/stage/sql/execution/input.py +++ b/exasol/analytics/query_handler/graph/stage/sql/execution/input.py @@ -3,7 +3,7 @@ from exasol_bucketfs_utils_python.abstract_bucketfs_location import AbstractBucketFSLocation from exasol.analytics.query_handler.graph.stage.sql.sql_stage_graph import SQLStageGraph -from exasol.analytics.query_handler.graph.stage.sql.execution.input_output import SQLStageInputOutput +from exasol.analytics.query_handler.graph.stage.sql.input_output import SQLStageInputOutput @dataclasses.dataclass(frozen=True, eq=True) diff --git a/exasol/analytics/query_handler/graph/stage/sql/execution/query_handler.py b/exasol/analytics/query_handler/graph/stage/sql/execution/query_handler.py index bd67691c..a524f188 100644 --- a/exasol/analytics/query_handler/graph/stage/sql/execution/query_handler.py +++ b/exasol/analytics/query_handler/graph/stage/sql/execution/query_handler.py @@ -7,7 +7,7 @@ from exasol.analytics.query_handler.graph.stage.sql.execution.input import SQLStageGraphExecutionInput from exasol.analytics.query_handler.graph.stage.sql.execution.query_handler_state import SQLStageGraphExecutionQueryHandlerState, ResultHandlerReturnValue -from exasol.analytics.query_handler.graph.stage.sql.execution.input_output import SQLStageInputOutput +from exasol.analytics.query_handler.graph.stage.sql.input_output import SQLStageInputOutput SQLStageGraphExecutionQueryHandlerStateFactory = \ Callable[ diff --git a/exasol/analytics/query_handler/graph/stage/sql/execution/query_handler_state.py b/exasol/analytics/query_handler/graph/stage/sql/execution/query_handler_state.py index dcaca2b4..1a07aa6e 100644 --- a/exasol/analytics/query_handler/graph/stage/sql/execution/query_handler_state.py +++ b/exasol/analytics/query_handler/graph/stage/sql/execution/query_handler_state.py @@ -9,8 +9,8 @@ from exasol.analytics.query_handler.graph.stage.sql.execution.find_object_proxies import find_object_proxies from exasol.analytics.query_handler.graph.stage.sql.execution.object_proxy_reference_counting_bag import ObjectProxyReferenceCountingBag from exasol.analytics.query_handler.graph.stage.sql.execution.input import SQLStageGraphExecutionInput -from exasol.analytics.query_handler.graph.stage.sql.execution.input_output import SQLStageInputOutput -from exasol.analytics.query_handler.graph.stage.sql.sql_stage_train_query_handler import SQLStageTrainQueryHandlerInput +from exasol.analytics.query_handler.graph.stage.sql.input_output import SQLStageInputOutput +from exasol.analytics.query_handler.graph.stage.sql.sql_stage_query_handler import SQLStageTrainQueryHandlerInput from exasol.analytics.query_handler.graph.stage.sql.sql_stage import SQLStage diff --git a/exasol/analytics/query_handler/graph/stage/sql/execution/input_output.py b/exasol/analytics/query_handler/graph/stage/sql/input_output.py similarity index 83% rename from exasol/analytics/query_handler/graph/stage/sql/execution/input_output.py rename to exasol/analytics/query_handler/graph/stage/sql/input_output.py index bb6dde85..066ea88f 100644 --- a/exasol/analytics/query_handler/graph/stage/sql/execution/input_output.py +++ b/exasol/analytics/query_handler/graph/stage/sql/input_output.py @@ -2,8 +2,8 @@ from exasol.analytics.utils.data_classes_runtime_type_check import check_dataclass_types -from exasol.analytics.query_handler.graph.stage.sql.execution.dataset import Dataset -from exasol.analytics.query_handler.graph.stage.sql.execution.dependency import Dependencies +from exasol.analytics.query_handler.graph.stage.sql.dataset import Dataset +from exasol.analytics.query_handler.graph.stage.sql.dependency import Dependencies @dataclasses.dataclass(frozen=True, eq=True) diff --git a/exasol/analytics/query_handler/graph/stage/sql/sql_stage.py b/exasol/analytics/query_handler/graph/stage/sql/sql_stage.py index f45d6286..b3f5823f 100644 --- a/exasol/analytics/query_handler/graph/stage/sql/sql_stage.py +++ b/exasol/analytics/query_handler/graph/stage/sql/sql_stage.py @@ -2,7 +2,7 @@ from exasol.analytics.query_handler.context.scope import ScopeQueryHandlerContext from exasol.analytics.query_handler.graph.stage.stage import Stage -from exasol.analytics.query_handler.graph.stage.sql.sql_stage_train_query_handler import SQLStageTrainQueryHandler, SQLStageTrainQueryHandlerInput +from exasol.analytics.query_handler.graph.stage.sql.sql_stage_query_handler import SQLStageQueryHandler, SQLStageTrainQueryHandlerInput class SQLStage(Stage): @abc.abstractmethod @@ -10,5 +10,5 @@ def create_train_query_handler( self, stage_input: SQLStageTrainQueryHandlerInput, query_handler_context: ScopeQueryHandlerContext, - ) -> SQLStageTrainQueryHandler: + ) -> SQLStageQueryHandler: pass diff --git a/exasol/analytics/query_handler/graph/stage/sql/sql_stage_graph.py b/exasol/analytics/query_handler/graph/stage/sql/sql_stage_graph.py index b02e1278..7514f3b2 100644 --- a/exasol/analytics/query_handler/graph/stage/sql/sql_stage_graph.py +++ b/exasol/analytics/query_handler/graph/stage/sql/sql_stage_graph.py @@ -1,4 +1,4 @@ -from exasol.analytics.query_handler.execution_graph import ExecutionGraph +from exasol.analytics.query_handler.graph.execution_graph import ExecutionGraph from exasol.analytics.query_handler.graph.stage.sql.sql_stage import SQLStage SQLStageGraph = ExecutionGraph[SQLStage] diff --git a/exasol/analytics/query_handler/graph/stage/sql/sql_stage_train_query_handler.py b/exasol/analytics/query_handler/graph/stage/sql/sql_stage_query_handler.py similarity index 83% rename from exasol/analytics/query_handler/graph/stage/sql/sql_stage_train_query_handler.py rename to exasol/analytics/query_handler/graph/stage/sql/sql_stage_query_handler.py index 4e869181..9b2fe470 100644 --- a/exasol/analytics/query_handler/graph/stage/sql/sql_stage_train_query_handler.py +++ b/exasol/analytics/query_handler/graph/stage/sql/sql_stage_query_handler.py @@ -5,7 +5,7 @@ from exasol.analytics.query_handler.query_handler import QueryHandler from exasol_bucketfs_utils_python.abstract_bucketfs_location import AbstractBucketFSLocation -from exasol.analytics.query_handler.graph.stage.sql.execution.input_output import SQLStageInputOutput +from exasol.analytics.query_handler.graph.stage.sql.input_output import SQLStageInputOutput def is_empty(obj: Sized): @@ -22,6 +22,6 @@ def __post_init__(self): raise AssertionError("Empty sql_stage_inputs not allowed.") -class SQLStageTrainQueryHandler( +class SQLStageQueryHandler( QueryHandler[SQLStageTrainQueryHandlerInput, SQLStageInputOutput], ABC): pass diff --git a/exasol/analytics/query_handler/graph/stage/stage_graph.py b/exasol/analytics/query_handler/graph/stage/stage_graph.py index 01eed10f..ce1eb8a0 100644 --- a/exasol/analytics/query_handler/graph/stage/stage_graph.py +++ b/exasol/analytics/query_handler/graph/stage/stage_graph.py @@ -1,4 +1,4 @@ -from exasol.analytics.query_handler.execution_graph import ExecutionGraph +from exasol.analytics.query_handler.graph.execution_graph import ExecutionGraph from exasol.analytics.query_handler.graph.stage.stage import Stage StageGraph = ExecutionGraph[Stage] diff --git a/noxconfig.py b/noxconfig.py index 3be7ad41..91a064a5 100644 --- a/noxconfig.py +++ b/noxconfig.py @@ -9,7 +9,7 @@ class Config: root: Path = ROOT_DIR doc: Path = ROOT_DIR / "doc" - # version_file: Path = ROOT_DIR / "version.py" + version_file: Path = ROOT_DIR / "version.py" path_filters: Iterable[str] = ("dist", ".eggs", "venv") diff --git a/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/assert_helper.py b/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/assert_helper.py index e653a812..fad501cb 100644 --- a/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/assert_helper.py +++ b/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/assert_helper.py @@ -1,8 +1,8 @@ from typing import List -from exasol.analytics.query_handler.graph.stage.sql.execution.input_output import SQLStageInputOutput -from exasol.analytics.query_handler.graph.stage.sql.sql_stage_train_query_handler import SQLStageTrainQueryHandlerInput -from tests.unit_tests.sql_stage_graph.mock_cast import mock_cast +from exasol.analytics.query_handler.graph.stage.sql.input_output import SQLStageInputOutput +from exasol.analytics.query_handler.graph.stage.sql.sql_stage_query_handler import SQLStageTrainQueryHandlerInput +from tests.mock_cast import mock_cast from tests.unit_tests.sql_stage_graph.stage_graph_execution_query_handler.state_test_setup import TestSetup diff --git a/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/state_test_setup.py b/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/state_test_setup.py index a3bc2fbe..0068086c 100644 --- a/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/state_test_setup.py +++ b/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/state_test_setup.py @@ -12,13 +12,13 @@ from exasol.analytics.query_handler.graph.stage.sql.execution.object_proxy_reference_counting_bag import ObjectProxyReferenceCountingBag from exasol.analytics.query_handler.graph.stage.sql.execution.input import SQLStageGraphExecutionInput from exasol.analytics.query_handler.graph.stage.sql.execution.query_handler_state import SQLStageGraphExecutionQueryHandlerState -from exasol.analytics.query_handler.graph.stage.sql.execution.input_output import SQLStageInputOutput +from exasol.analytics.query_handler.graph.stage.sql.input_output import SQLStageInputOutput from exasol.analytics.query_handler.graph.stage.sql.sql_stage import SQLStage -from exasol.analytics.query_handler.graph.stage.sql.sql_stage_train_query_handler import SQLStageTrainQueryHandler -from tests.unit_tests.sql_stage_graph.mock_cast import mock_cast +from exasol.analytics.query_handler.graph.stage.sql.sql_stage_query_handler import SQLStageQueryHandler +from tests.mock_cast import mock_cast MockScopeQueryHandlerContext = Union[ScopeQueryHandlerContext, MagicMock] -MockSQLStageTrainQueryHandler = Union[SQLStageTrainQueryHandler, MagicMock] +MockSQLStageTrainQueryHandler = Union[SQLStageQueryHandler, MagicMock] MockQueryHandlerResult = Union[Continue, Finish, MagicMock] MockSQLStageInputOutput = Union[SQLStageInputOutput, MagicMock] MockSQLStage = Union[SQLStage, MagicMock] diff --git a/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_query_handler_integration.py b/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_query_handler_integration.py index 9fb28d58..0058376e 100644 --- a/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_query_handler_integration.py +++ b/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_query_handler_integration.py @@ -23,16 +23,16 @@ ColumnNameBuilder, ) from exasol.analytics.query_handler.graph.stage.sql.sql_stage_graph import SQLStageGraph -from exasol.analytics.query_handler.graph.stage.sql.execution.data_partition import DataPartition -from exasol.analytics.query_handler.graph.stage.sql.execution.dataset import Dataset +from exasol.analytics.query_handler.graph.stage.sql.data_partition import DataPartition +from exasol.analytics.query_handler.graph.stage.sql.dataset import Dataset from exasol.analytics.query_handler.graph.stage.sql.execution.input import SQLStageGraphExecutionInput from exasol.analytics.query_handler.graph.stage.sql.execution.query_handler import SQLStageGraphExecutionQueryHandler -from exasol.analytics.query_handler.graph.stage.sql.execution.input_output import SQLStageInputOutput -from exasol.analytics.query_handler.graph.stage.sql.sql_stage_train_query_handler import SQLStageTrainQueryHandler, SQLStageTrainQueryHandlerInput +from exasol.analytics.query_handler.graph.stage.sql.input_output import SQLStageInputOutput +from exasol.analytics.query_handler.graph.stage.sql.sql_stage_query_handler import SQLStageQueryHandler, SQLStageTrainQueryHandlerInput from exasol.analytics.query_handler.graph.stage.sql.sql_stage import SQLStage -class StartOnlyForwardInputTestSQLStageTrainQueryHandler(SQLStageTrainQueryHandler): +class StartOnlyForwardInputTestSQLStageTrainQueryHandler(SQLStageQueryHandler): def __init__(self, parameter: SQLStageTrainQueryHandlerInput, query_handler_context: ScopeQueryHandlerContext): @@ -47,7 +47,7 @@ def handle_query_result(self, query_result: QueryResult) \ raise NotImplementedError() -class StartOnlyCreateNewOutputTestSQLStageTrainQueryHandler(SQLStageTrainQueryHandler): +class StartOnlyCreateNewOutputTestSQLStageTrainQueryHandler(SQLStageQueryHandler): def __init__(self, parameter: SQLStageTrainQueryHandlerInput, query_handler_context: ScopeQueryHandlerContext): @@ -71,7 +71,7 @@ def handle_query_result(self, query_result: QueryResult) \ raise NotImplementedError() -class HandleQueryResultCreateNewOutputTestSQLStageTrainQueryHandler(SQLStageTrainQueryHandler): +class HandleQueryResultCreateNewOutputTestSQLStageTrainQueryHandler(SQLStageQueryHandler): def __init__(self, parameter: SQLStageTrainQueryHandlerInput, query_handler_context: ScopeQueryHandlerContext): @@ -102,7 +102,7 @@ def handle_query_result(self, query_result: QueryResult) \ TrainQueryHandlerFactory = Callable[ - [SQLStageTrainQueryHandlerInput, ScopeQueryHandlerContext], SQLStageTrainQueryHandler] + [SQLStageTrainQueryHandlerInput, ScopeQueryHandlerContext], SQLStageQueryHandler] class TestSQLStage(SQLStage): @@ -112,11 +112,11 @@ def __init__(self, *, index: int, train_query_handler_factory: TrainQueryHandlerFactory): self._train_query_handler_factory = train_query_handler_factory - self.sql_stage_train_query_handler: Optional[SQLStageTrainQueryHandler] = None + self.sql_stage_train_query_handler: Optional[SQLStageQueryHandler] = None self._index = index def create_train_query_handler(self, query_handler_input: SQLStageTrainQueryHandlerInput, - query_handler_context: ScopeQueryHandlerContext) -> SQLStageTrainQueryHandler: + query_handler_context: ScopeQueryHandlerContext) -> SQLStageQueryHandler: self.sql_stage_train_query_handler = self._train_query_handler_factory(query_handler_input, query_handler_context) return self.sql_stage_train_query_handler diff --git a/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_query_handler_using_mock_state.py b/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_query_handler_using_mock_state.py index dec9b129..c0f187d6 100644 --- a/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_query_handler_using_mock_state.py +++ b/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_query_handler_using_mock_state.py @@ -10,13 +10,13 @@ from exasol.analytics.query_handler.graph.stage.sql.execution.input import SQLStageGraphExecutionInput from exasol.analytics.query_handler.graph.stage.sql.execution.query_handler import SQLStageGraphExecutionQueryHandler, SQLStageGraphExecutionQueryHandlerStateFactory from exasol.analytics.query_handler.graph.stage.sql.execution.query_handler_state import SQLStageGraphExecutionQueryHandlerState, ResultHandlerReturnValue -from exasol.analytics.query_handler.graph.stage.sql.execution.input_output import SQLStageInputOutput -from exasol.analytics.query_handler.graph.stage.sql.sql_stage_train_query_handler import SQLStageTrainQueryHandler -from tests.unit_tests.sql_stage_graph.mock_cast import mock_cast +from exasol.analytics.query_handler.graph.stage.sql.input_output import SQLStageInputOutput +from exasol.analytics.query_handler.graph.stage.sql.sql_stage_query_handler import SQLStageQueryHandler +from tests.mock_cast import mock_cast MockSQLStageGraphExecutionQueryHandlerState = Union[SQLStageGraphExecutionQueryHandlerState, MagicMock] MockScopeQueryHandlerContext = Union[ScopeQueryHandlerContext, MagicMock] -MockSQLStageTrainQueryHandler = Union[SQLStageTrainQueryHandler, MagicMock] +MockSQLStageTrainQueryHandler = Union[SQLStageQueryHandler, MagicMock] MockQueryHandlerResult = Union[Continue, Finish, MagicMock] MockSQLStageGraphExecutionInput = Union[SQLStageGraphExecutionInput, MagicMock] MockSQLStageInputOutput = Union[SQLStageInputOutput, MagicMock] diff --git a/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_state_diamond.py b/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_state_diamond.py index c2723955..7de767b8 100644 --- a/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_state_diamond.py +++ b/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_state_diamond.py @@ -7,7 +7,7 @@ from exasol.analytics.query_handler.graph.stage.sql.sql_stage_graph import SQLStageGraph from exasol.analytics.query_handler.graph.stage.sql.execution.query_handler_state import ResultHandlerReturnValue -from exasol.analytics.query_handler.graph.stage.sql.execution.input_output import SQLStageInputOutput +from exasol.analytics.query_handler.graph.stage.sql.input_output import SQLStageInputOutput from tests.unit_tests.sql_stage_graph.stage_graph_execution_query_handler.assert_helper import \ assert_reference_counting_bag_creation, assert_stage_train_query_handler_created, assert_stage_not_called, \ assert_reference_counting_bag_not_called, assert_release_on_query_handler_context_for_stage, \ diff --git a/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_state_reference_counting.py b/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_state_reference_counting.py index 20ae8c8f..1013be95 100644 --- a/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_state_reference_counting.py +++ b/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_state_reference_counting.py @@ -7,7 +7,7 @@ from exasol.analytics.query_handler.graph.stage.sql.sql_stage_graph import SQLStageGraph from exasol.analytics.query_handler.graph.stage.sql.execution.query_handler_state import ResultHandlerReturnValue -from tests.unit_tests.sql_stage_graph.mock_cast import mock_cast +from tests.mock_cast import mock_cast from tests.unit_tests.sql_stage_graph.stage_graph_execution_query_handler.state_test_setup import TestSetup, \ create_mocks_for_stage, create_execution_query_handler_state_setup diff --git a/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_state_single_stage.py b/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_state_single_stage.py index 763524d8..fbf297b8 100644 --- a/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_state_single_stage.py +++ b/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_state_single_stage.py @@ -7,7 +7,7 @@ from exasol.analytics.query_handler.graph.stage.sql.sql_stage_graph import SQLStageGraph from exasol.analytics.query_handler.graph.stage.sql.execution.query_handler_state import ResultHandlerReturnValue -from exasol.analytics.query_handler.graph.stage.sql.execution.input_output import SQLStageInputOutput +from exasol.analytics.query_handler.graph.stage.sql.input_output import SQLStageInputOutput from tests.unit_tests.sql_stage_graph.stage_graph_execution_query_handler.assert_helper import assert_stage_not_called, \ assert_reference_counting_bag_not_called, assert_reference_counting_bag_creation, \ assert_stage_train_query_handler_created, \ diff --git a/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_state_two_stage.py b/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_state_two_stage.py index 4a6def84..0dacc930 100644 --- a/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_state_two_stage.py +++ b/tests/unit_tests/sql_stage_graph/stage_graph_execution_query_handler/test_state_two_stage.py @@ -7,7 +7,7 @@ from exasol.analytics.query_handler.graph.stage.sql.sql_stage_graph import SQLStageGraph from exasol.analytics.query_handler.graph.stage.sql.execution.query_handler_state import ResultHandlerReturnValue -from exasol.analytics.query_handler.graph.stage.sql.execution.input_output import SQLStageInputOutput +from exasol.analytics.query_handler.graph.stage.sql.input_output import SQLStageInputOutput from tests.unit_tests.sql_stage_graph.stage_graph_execution_query_handler.assert_helper import \ assert_reference_counting_bag_creation, \ assert_stage_train_query_handler_created, assert_stage_not_called, \ diff --git a/tests/unit_tests/sql_stage_graph/test_data_partition.py b/tests/unit_tests/sql_stage_graph/test_data_partition.py index 99c7a4a7..1b81174d 100644 --- a/tests/unit_tests/sql_stage_graph/test_data_partition.py +++ b/tests/unit_tests/sql_stage_graph/test_data_partition.py @@ -12,8 +12,8 @@ ColumnType, ) -from exasol.analytics.query_handler.graph.stage.sql.execution.data_partition import DataPartition -from exasol.analytics.query_handler.graph.stage.sql.execution.dependency import Dependency +from exasol.analytics.query_handler.graph.stage.sql.data_partition import DataPartition +from exasol.analytics.query_handler.graph.stage.sql.dependency import Dependency class TestEnum(Enum): diff --git a/tests/unit_tests/sql_stage_graph/test_dataset.py b/tests/unit_tests/sql_stage_graph/test_dataset.py index d9d732ba..acf26ba5 100644 --- a/tests/unit_tests/sql_stage_graph/test_dataset.py +++ b/tests/unit_tests/sql_stage_graph/test_dataset.py @@ -11,9 +11,9 @@ ColumnType, ) -from exasol.analytics.query_handler.graph.stage.sql.execution.data_partition import DataPartition -from exasol.analytics.query_handler.graph.stage.sql.execution.dataset import Dataset -from exasol.analytics.query_handler.graph.stage.sql.execution.dependency import Dependencies +from exasol.analytics.query_handler.graph.stage.sql.data_partition import DataPartition +from exasol.analytics.query_handler.graph.stage.sql.dataset import Dataset +from exasol.analytics.query_handler.graph.stage.sql.dependency import Dependencies class TestEnum(Enum): diff --git a/tests/unit_tests/sql_stage_graph/test_dependency.py b/tests/unit_tests/sql_stage_graph/test_dependency.py index 34eebfe3..74b07c4b 100644 --- a/tests/unit_tests/sql_stage_graph/test_dependency.py +++ b/tests/unit_tests/sql_stage_graph/test_dependency.py @@ -1,6 +1,6 @@ from enum import Enum, auto -from exasol.analytics.query_handler.graph.stage.sql.execution.dependency import Dependency +from exasol.analytics.query_handler.graph.stage.sql.dependency import Dependency class TestEnum(Enum): diff --git a/tests/unit_tests/sql_stage_graph/test_find_object_proxies.py b/tests/unit_tests/sql_stage_graph/test_find_object_proxies.py index a27ab471..1f82291b 100644 --- a/tests/unit_tests/sql_stage_graph/test_find_object_proxies.py +++ b/tests/unit_tests/sql_stage_graph/test_find_object_proxies.py @@ -11,7 +11,7 @@ ColumnType, ColumnNameBuilder, ) -from exasol.analytics.query_handler.graph.stage.sql.execution.dependency import Dependency +from exasol.analytics.query_handler.graph.stage.sql.dependency import Dependency from exasol.analytics.query_handler.graph.stage.sql.execution.find_object_proxies import find_object_proxies BUCKETFS_LOCATION = "BUCKETFS_LOCATION" diff --git a/tests/unit_tests/sql_stage_graph/test_object_proxy_reference_counter.py b/tests/unit_tests/sql_stage_graph/test_object_proxy_reference_counter.py index b87a6401..21be428a 100644 --- a/tests/unit_tests/sql_stage_graph/test_object_proxy_reference_counter.py +++ b/tests/unit_tests/sql_stage_graph/test_object_proxy_reference_counter.py @@ -7,7 +7,7 @@ from exasol.analytics.query_handler.context.scope import ScopeQueryHandlerContext from exasol.analytics.query_handler.graph.stage.sql.execution.object_proxy_reference_counter import ObjectProxyReferenceCounter, ReferenceCounterStatus -from tests.unit_tests.sql_stage_graph.mock_cast import mock_cast +from tests.mock_cast import mock_cast MockScopeQueryHandlerContext = Union[ScopeQueryHandlerContext, MagicMock] MockObjectProxy = Union[ObjectProxy, MagicMock] diff --git a/tests/unit_tests/sql_stage_graph/test_object_proxy_reference_counting_bag_with_mocks.py b/tests/unit_tests/sql_stage_graph/test_object_proxy_reference_counting_bag_with_mocks.py index c5fd648a..13dc1aa4 100644 --- a/tests/unit_tests/sql_stage_graph/test_object_proxy_reference_counting_bag_with_mocks.py +++ b/tests/unit_tests/sql_stage_graph/test_object_proxy_reference_counting_bag_with_mocks.py @@ -8,7 +8,7 @@ from exasol.analytics.query_handler.graph.stage.sql.execution.object_proxy_reference_counter import ObjectProxyReferenceCounter, ReferenceCounterStatus from exasol.analytics.query_handler.graph.stage.sql.execution.object_proxy_reference_counting_bag import ObjectProxyReferenceCountingBag, ObjectProxyReferenceCounterFactory -from tests.unit_tests.sql_stage_graph.mock_cast import mock_cast +from tests.mock_cast import mock_cast MockObjectProxyReferenceCounter = Union[ObjectProxyReferenceCounter, MagicMock] MockObjectProxyReferenceCounterFactory = Union[ObjectProxyReferenceCounterFactory, Mock] diff --git a/tests/unit_tests/sql_stage_graph/test_sql_stage_input_output.py b/tests/unit_tests/sql_stage_graph/test_sql_stage_input_output.py index 63c157a6..31d13547 100644 --- a/tests/unit_tests/sql_stage_graph/test_sql_stage_input_output.py +++ b/tests/unit_tests/sql_stage_graph/test_sql_stage_input_output.py @@ -12,10 +12,10 @@ TableNameBuilder, ColumnType, ) -from exasol.analytics.query_handler.graph.stage.sql.execution.data_partition import DataPartition -from exasol.analytics.query_handler.graph.stage.sql.execution.dataset import Dataset -from exasol.analytics.query_handler.graph.stage.sql.execution.dependency import Dependencies, Dependency -from exasol.analytics.query_handler.graph.stage.sql.execution.input_output import SQLStageInputOutput +from exasol.analytics.query_handler.graph.stage.sql.data_partition import DataPartition +from exasol.analytics.query_handler.graph.stage.sql.dataset import Dataset +from exasol.analytics.query_handler.graph.stage.sql.dependency import Dependencies, Dependency +from exasol.analytics.query_handler.graph.stage.sql.input_output import SQLStageInputOutput class TestEnum(Enum): diff --git a/tests/unit_tests/sql_stage_graph/test_sql_stage_train_query_handler_input.py b/tests/unit_tests/sql_stage_graph/test_sql_stage_train_query_handler_input.py index 4be53114..24ac86cb 100644 --- a/tests/unit_tests/sql_stage_graph/test_sql_stage_train_query_handler_input.py +++ b/tests/unit_tests/sql_stage_graph/test_sql_stage_train_query_handler_input.py @@ -4,8 +4,8 @@ import pytest from exasol_bucketfs_utils_python.abstract_bucketfs_location import AbstractBucketFSLocation -from exasol.analytics.query_handler.graph.stage.sql.execution.input_output import SQLStageInputOutput -from exasol.analytics.query_handler.graph.stage.sql.sql_stage_train_query_handler import SQLStageTrainQueryHandlerInput +from exasol.analytics.query_handler.graph.stage.sql.input_output import SQLStageInputOutput +from exasol.analytics.query_handler.graph.stage.sql.sql_stage_query_handler import SQLStageTrainQueryHandlerInput def test_empty_stage_inputs(): diff --git a/version.py b/version.py new file mode 100644 index 00000000..9da99632 --- /dev/null +++ b/version.py @@ -0,0 +1,10 @@ +# ATTENTION: +# This file is generated by exasol/toolbox/pre_commit_hooks/package_version.py when using: +# * either "poetry run nox -s fix" +# * or "poetry run version-check --fix" +# Do not edit this file manually! +# If you need to change the version, do so in the project.toml, e.g. by using `poetry version X.Y.Z`. +MAJOR = 0 +MINOR = 1 +PATCH = 0 +VERSION = f"{MAJOR}.{MINOR}.{PATCH}"