From 86cb3c8f96419d5225b4c6118637a3d329687273 Mon Sep 17 00:00:00 2001 From: ChengHui Chen <27797326+chenghuichen@users.noreply.github.com> Date: Sun, 23 Feb 2025 19:07:42 +0800 Subject: [PATCH 1/2] #42 Simplify Import Paths by Exposing Core Classes at Package Root --- pypaimon/__init__.py | 32 +++++++++++++++++++++++++++++++- pypaimon/py4j/__init__.py | 3 ++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/pypaimon/__init__.py b/pypaimon/__init__.py index 0cd0eb5..c41cdf4 100644 --- a/pypaimon/__init__.py +++ b/pypaimon/__init__.py @@ -17,5 +17,35 @@ ################################################################################# from .api import Schema +from .py4j import Catalog +from .py4j import CommitMessage +from .py4j import Predicate +from .py4j import PredicateBuilder +from .py4j import ReadBuilder +from .py4j import RowType +from .py4j import Split +from .py4j import Table +from .py4j import BatchTableCommit +from .py4j import TableRead +from .py4j import TableScan +from .py4j import Plan +from .py4j import BatchTableWrite +from .py4j import BatchWriteBuilder -__all__ = ['Schema'] +__all__ = [ + 'Schema', + 'Catalog', + 'CommitMessage', + 'Predicate', + 'PredicateBuilder', + 'ReadBuilder', + 'RowType', + 'Split', + 'Table', + 'BatchTableCommit', + 'TableRead', + 'TableScan', + 'Plan', + 'BatchTableWrite', + 'BatchWriteBuilder' +] diff --git a/pypaimon/py4j/__init__.py b/pypaimon/py4j/__init__.py index c3b70ff..9152d3a 100644 --- a/pypaimon/py4j/__init__.py +++ b/pypaimon/py4j/__init__.py @@ -18,7 +18,7 @@ from .util import constants from .java_implementation import \ - (Catalog, Table, ReadBuilder, TableScan, Plan, Split, + (Catalog, Table, ReadBuilder, TableScan, Plan, RowType, Split, TableRead, BatchWriteBuilder, BatchTableWrite, CommitMessage, BatchTableCommit, Predicate, PredicateBuilder) @@ -29,6 +29,7 @@ 'ReadBuilder', 'TableScan', 'Plan', + 'RowType', 'Split', 'TableRead', 'BatchWriteBuilder', From 33f5b76431b3dea992d0eea1366739dd74b9510c Mon Sep 17 00:00:00 2001 From: ChengHui Chen <27797326+chenghuichen@users.noreply.github.com> Date: Thu, 20 Mar 2025 14:05:10 +0800 Subject: [PATCH 2/2] #42 Simplify Import Paths by Exposing Core Classes at Package Root --- dev/lint-python.sh | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/dev/lint-python.sh b/dev/lint-python.sh index e9d3e5e..687998c 100755 --- a/dev/lint-python.sh +++ b/dev/lint-python.sh @@ -643,26 +643,6 @@ function flake8_check() { print_function "STAGE" "flake8 checks... [SUCCESS]" fi } - - -# mypy check -function mypy_check() { - print_function "STAGE" "mypy checks" - - # the return value of a pipeline is the status of the last command to exit - # with a non-zero status or zero if no command exited with a non-zero status - set -o pipefail - - (${MYPY_PATH} --install-types --non-interactive --config-file tox.ini) 2>&1 | tee -a ${LOG_FILE} - TYPE_HINT_CHECK_STATUS=$? - if [ ${TYPE_HINT_CHECK_STATUS} -ne 0 ]; then - print_function "STAGE" "mypy checks... [FAILED]" - # Stop the running script. - exit 1; - else - print_function "STAGE" "mypy checks... [SUCCESS]" - fi -} ###############################################################All Checks Definitions############################################################### # CURRENT_DIR is "paimon-python/dev/"