diff --git a/dolphinscheduler-python/pydolphinscheduler/DEVELOP.md b/dolphinscheduler-python/pydolphinscheduler/DEVELOP.md index bdd041667588973aecadfb548db6feb92ab59e73..d09363ae65283db77a82f99109e1c18dede18d54 100644 --- a/dolphinscheduler-python/pydolphinscheduler/DEVELOP.md +++ b/dolphinscheduler-python/pydolphinscheduler/DEVELOP.md @@ -34,7 +34,7 @@ Now, we should install all dependence to make sure we could run test or check co ```shell cd dolphinscheduler/dolphinscheduler-python/pydolphinscheduler -python -m pip install .[dev] +python -m pip install -e '.[dev]' ``` Next, we have to open pydolphinscheduler project in you editor. We recommend you use [pycharm][pycharm] diff --git a/dolphinscheduler-python/pydolphinscheduler/docs/source/api.rst b/dolphinscheduler-python/pydolphinscheduler/docs/source/api.rst index 8e55ea5583f71782ebf3b4ff9ef563010386975c..570e06d6e9a7b9c395b37b431c9b306abce138ad 100644 --- a/dolphinscheduler-python/pydolphinscheduler/docs/source/api.rst +++ b/dolphinscheduler-python/pydolphinscheduler/docs/source/api.rst @@ -27,7 +27,7 @@ Core Sides ----- -.. automodule:: pydolphinscheduler.side +.. automodule:: pydolphinscheduler.models :inherited-members: Tasks diff --git a/dolphinscheduler-python/pydolphinscheduler/docs/source/config.rst b/dolphinscheduler-python/pydolphinscheduler/docs/source/config.rst index feb147a92e1206334d09086eb3b8f08e32780740..29a143d71376299e52845b50c8cf1eae88ad835d 100644 --- a/dolphinscheduler-python/pydolphinscheduler/docs/source/config.rst +++ b/dolphinscheduler-python/pydolphinscheduler/docs/source/config.rst @@ -200,7 +200,7 @@ All Configurations in File Here are all our configurations for pydolphinscheduler. -.. literalinclude:: ../../src/pydolphinscheduler/core/default_config.yaml +.. literalinclude:: ../../src/pydolphinscheduler/default_config.yaml :language: yaml :lines: 18- diff --git a/dolphinscheduler-python/pydolphinscheduler/setup.py b/dolphinscheduler-python/pydolphinscheduler/setup.py index e216d8d34eca8d1b30b6d92f889ea5ad88792cbc..5a181223e43f931f1ab307177cffa4ac86017e3e 100644 --- a/dolphinscheduler-python/pydolphinscheduler/setup.py +++ b/dolphinscheduler-python/pydolphinscheduler/setup.py @@ -147,7 +147,7 @@ setup( package_dir={"": "src"}, include_package_data=True, package_data={ - "pydolphinscheduler": ["core/default_config.yaml"], + "pydolphinscheduler": ["default_config.yaml"], }, platforms=["any"], classifiers=[ diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/cli/commands.py b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/cli/commands.py index e2ca86b573c06b527f4a239337e7eb517e57e584..19f673e48f524bf2ddc2c7ff7901d0066f9e3c11 100644 --- a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/cli/commands.py +++ b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/cli/commands.py @@ -21,7 +21,7 @@ import click from click import echo from pydolphinscheduler import __version__ -from pydolphinscheduler.core.configuration import ( +from pydolphinscheduler.configuration import ( get_single_config, init_config_file, set_single_config, diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/configuration.py b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/configuration.py similarity index 100% rename from dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/configuration.py rename to dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/configuration.py diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/__init__.py b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/__init__.py index 7497d1f2895841db93043ab825017afb88042b3a..b997c3e9dee5ac4c434c71881a28f1fc8966f85b 100644 --- a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/__init__.py +++ b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/__init__.py @@ -23,8 +23,8 @@ from pydolphinscheduler.core.process_definition import ProcessDefinition from pydolphinscheduler.core.task import Task __all__ = [ + "Database", "Engine", "ProcessDefinition", "Task", - "Database", ] diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/process_definition.py b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/process_definition.py index dd18dafa0faadb59ffa5b194f0d832f7df361ceb..31d1e6124b3d42b81496afb7c2e25abd39af8a8c 100644 --- a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/process_definition.py +++ b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/process_definition.py @@ -21,12 +21,11 @@ import json from datetime import datetime from typing import Any, Dict, List, Optional, Set +from pydolphinscheduler import configuration from pydolphinscheduler.constants import TaskType -from pydolphinscheduler.core import configuration -from pydolphinscheduler.core.base import Base from pydolphinscheduler.exceptions import PyDSParamException, PyDSTaskNoFoundException from pydolphinscheduler.java_gateway import launch_gateway -from pydolphinscheduler.side import Project, Tenant, User +from pydolphinscheduler.models import Base, Project, Tenant, User from pydolphinscheduler.utils.date import MAX_DATETIME, conv_from_str, conv_to_schedule @@ -170,7 +169,7 @@ class ProcessDefinition(Base): def user(self) -> User: """Get user object. - For now we just get from python side but not from java gateway side, so it may not correct. + For now we just get from python models but not from java gateway models, so it may not correct. """ return User(name=self._user, tenant=self._tenant) @@ -358,10 +357,10 @@ class ProcessDefinition(Base): self.start() def _ensure_side_model_exists(self): - """Ensure process definition side model exists. + """Ensure process definition models model exists. - For now, side object including :class:`pydolphinscheduler.side.project.Project`, - :class:`pydolphinscheduler.side.tenant.Tenant`, :class:`pydolphinscheduler.side.user.User`. + For now, models object including :class:`pydolphinscheduler.models.project.Project`, + :class:`pydolphinscheduler.models.tenant.Tenant`, :class:`pydolphinscheduler.models.user.User`. If these model not exists, would create default value in :class:`pydolphinscheduler.constants.ProcessDefinitionDefault`. """ diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/resource.py b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/resource.py index bd4ffd4bd755d1524243fe95deae3519044b02c5..a3aab81d170a61752211a19aec8da85d548b52c0 100644 --- a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/resource.py +++ b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/resource.py @@ -19,7 +19,7 @@ from typing import Optional -from pydolphinscheduler.core.base import Base +from pydolphinscheduler.models import Base class Resource(Base): diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/task.py b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/task.py index 90c0e890871e5153adaf12862cac1fac81a4318f..4d4e67e3235352cbdf0ae1869edc535359c93624 100644 --- a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/task.py +++ b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/task.py @@ -20,6 +20,7 @@ from logging import getLogger from typing import Dict, List, Optional, Sequence, Set, Tuple, Union +from pydolphinscheduler import configuration from pydolphinscheduler.constants import ( Delimiter, ResourceKey, @@ -27,13 +28,12 @@ from pydolphinscheduler.constants import ( TaskPriority, TaskTimeoutFlag, ) -from pydolphinscheduler.core import configuration -from pydolphinscheduler.core.base import Base from pydolphinscheduler.core.process_definition import ( ProcessDefinition, ProcessDefinitionContext, ) from pydolphinscheduler.java_gateway import launch_gateway +from pydolphinscheduler.models import Base logger = getLogger(__name__) diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/default_config.yaml b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/default_config.yaml similarity index 99% rename from dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/default_config.yaml rename to dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/default_config.yaml index 5541af7b7920f5458f344101bd68cd51f077f224..98d7b99fdc6fcd69ae7464b15e3289e040486dae 100644 --- a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/default_config.yaml +++ b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/default_config.yaml @@ -22,7 +22,7 @@ java_gateway: address: 127.0.0.1 # The port of Python gateway server start. Define which port you could connect to Python gateway server from - # Python API side. + # Python API models. port: 25333 # Whether automatically convert Python objects to Java Objects. Default value is ``True``. There is some diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/examples/task_dependent_example.py b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/examples/task_dependent_example.py index 88d6ea2322050d96efdc6c3d1daa29f37e7181b8..db53bcc9f38e389a0a112ef23da01791a9b06e86 100644 --- a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/examples/task_dependent_example.py +++ b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/examples/task_dependent_example.py @@ -35,7 +35,7 @@ task_dependent: task_dependent(this task dependent on task_dependent_external.task_1 and task_dependent_external.task_2). """ -from pydolphinscheduler.core import configuration +from pydolphinscheduler import configuration from pydolphinscheduler.core.process_definition import ProcessDefinition from pydolphinscheduler.tasks.dependent import And, Dependent, DependentItem, Or from pydolphinscheduler.tasks.shell import Shell diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/java_gateway.py b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/java_gateway.py index 85606382ddc854d7f86e087cf811d436a5d53af1..7b85902f9a808017a9868b3b9f94fb09ba9528b3 100644 --- a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/java_gateway.py +++ b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/java_gateway.py @@ -22,8 +22,8 @@ from typing import Any, Optional from py4j.java_collections import JavaMap from py4j.java_gateway import GatewayParameters, JavaGateway +from pydolphinscheduler import configuration from pydolphinscheduler.constants import JavaGatewayDefault -from pydolphinscheduler.core import configuration from pydolphinscheduler.exceptions import PyDSJavaGatewayException diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/side/__init__.py b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/__init__.py similarity index 70% rename from dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/side/__init__.py rename to dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/__init__.py index c4479ddf24e026d2a7ecacce38e8da5cedfb1f24..42594002a31f6961a67bb53628c160d3df9664f7 100644 --- a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/side/__init__.py +++ b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/__init__.py @@ -17,13 +17,17 @@ """Init Side package, Side package keep object related to DolphinScheduler but not in the Core part.""" -from pydolphinscheduler.side.project import Project -from pydolphinscheduler.side.queue import Queue -from pydolphinscheduler.side.tenant import Tenant -from pydolphinscheduler.side.user import User -from pydolphinscheduler.side.worker_group import WorkerGroup +from pydolphinscheduler.models.base import Base +from pydolphinscheduler.models.base_side import BaseSide +from pydolphinscheduler.models.project import Project +from pydolphinscheduler.models.queue import Queue +from pydolphinscheduler.models.tenant import Tenant +from pydolphinscheduler.models.user import User +from pydolphinscheduler.models.worker_group import WorkerGroup __all__ = [ + "Base", + "BaseSide", "Project", "Tenant", "User", diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/base.py b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/base.py similarity index 98% rename from dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/base.py rename to dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/base.py index 690351ab2ff54e583d6c2734325ef1f6f46d5fc4..2647714af0b3347b067de8a66bccffd1657ff10c 100644 --- a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/base.py +++ b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/base.py @@ -19,7 +19,7 @@ from typing import Dict, Optional -# from pydolphinscheduler.side.user import User +# from pydolphinscheduler.models.user import User from pydolphinscheduler.utils.string import attr2camel diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/base_side.py b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/base_side.py similarity index 86% rename from dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/base_side.py rename to dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/base_side.py index dca1f12c6c84aed8e51af27fcd9a6b41f7d8dd1b..67ac88d96bf34d767eba3ecb61d3ce7382ca1da6 100644 --- a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/core/base_side.py +++ b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/base_side.py @@ -15,16 +15,16 @@ # specific language governing permissions and limitations # under the License. -"""Module for side object.""" +"""Module for models object.""" from typing import Optional -from pydolphinscheduler.core import configuration -from pydolphinscheduler.core.base import Base +from pydolphinscheduler import configuration +from pydolphinscheduler.models import Base class BaseSide(Base): - """Base class for side object, it declare base behavior for them.""" + """Base class for models object, it declare base behavior for them.""" def __init__(self, name: str, description: Optional[str] = None): super().__init__(name, description) diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/side/project.py b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/project.py similarity index 93% rename from dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/side/project.py rename to dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/project.py index 750e3b8793a492c0e9c7e7e15d66e1975d12c5cf..ad7221108a5d68e3b9b855f947394631b673674c 100644 --- a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/side/project.py +++ b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/project.py @@ -19,9 +19,9 @@ from typing import Optional -from pydolphinscheduler.core import configuration -from pydolphinscheduler.core.base_side import BaseSide +from pydolphinscheduler import configuration from pydolphinscheduler.java_gateway import launch_gateway +from pydolphinscheduler.models import BaseSide class Project(BaseSide): diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/side/queue.py b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/queue.py similarity index 93% rename from dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/side/queue.py rename to dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/queue.py index e7c68e15fd719d82461520c522222bae865d15b1..3f8f81d1264dcfd9f0a6c657444a6015b409aac1 100644 --- a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/side/queue.py +++ b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/queue.py @@ -19,9 +19,9 @@ from typing import Optional -from pydolphinscheduler.core import configuration -from pydolphinscheduler.core.base_side import BaseSide +from pydolphinscheduler import configuration from pydolphinscheduler.java_gateway import gateway_result_checker, launch_gateway +from pydolphinscheduler.models import BaseSide class Queue(BaseSide): diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/side/tenant.py b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/tenant.py similarity index 93% rename from dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/side/tenant.py rename to dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/tenant.py index 6aaabfe1298454f3bdc5e31bb968d6c098ecc915..148a8f65213bdb1983afcc3b7f692a9cff3d31b1 100644 --- a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/side/tenant.py +++ b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/tenant.py @@ -19,9 +19,9 @@ from typing import Optional -from pydolphinscheduler.core import configuration -from pydolphinscheduler.core.base_side import BaseSide +from pydolphinscheduler import configuration from pydolphinscheduler.java_gateway import launch_gateway +from pydolphinscheduler.models import BaseSide class Tenant(BaseSide): diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/side/user.py b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/user.py similarity index 94% rename from dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/side/user.py rename to dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/user.py index 510e3a8b369eeed6d733791fc0867333eb02a004..de2d8b159a34235a4f12ea35b1801fb22a17efab 100644 --- a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/side/user.py +++ b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/user.py @@ -19,10 +19,9 @@ from typing import Optional -from pydolphinscheduler.core import configuration -from pydolphinscheduler.core.base_side import BaseSide +from pydolphinscheduler import configuration from pydolphinscheduler.java_gateway import launch_gateway -from pydolphinscheduler.side.tenant import Tenant +from pydolphinscheduler.models import BaseSide, Tenant class User(BaseSide): diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/side/worker_group.py b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/worker_group.py similarity index 95% rename from dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/side/worker_group.py rename to dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/worker_group.py index ed50ec66309101d3f590934bb38dda75eca6f787..bc55eafc34540c8c02884a5723eaa8bcee8bbc8b 100644 --- a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/side/worker_group.py +++ b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/models/worker_group.py @@ -19,7 +19,7 @@ from typing import Optional -from pydolphinscheduler.core.base_side import BaseSide +from pydolphinscheduler.models import BaseSide class WorkerGroup(BaseSide): diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/condition.py b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/condition.py index 50aac251d8c86ae17d5a45860b19d8a847794460..cb139f15879d5dadd7ebc2435a42e964e1f9c961 100644 --- a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/condition.py +++ b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/condition.py @@ -20,9 +20,9 @@ from typing import Dict, List from pydolphinscheduler.constants import TaskType -from pydolphinscheduler.core.base import Base from pydolphinscheduler.core.task import Task from pydolphinscheduler.exceptions import PyDSParamException +from pydolphinscheduler.models.base import Base class Status(Base): diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/dependent.py b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/dependent.py index 7cff24c8411c2d7e5eafc0c98ae59fcc5ec63cf5..cc6d25b0a269e51fda7725fc768576746cccadce 100644 --- a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/dependent.py +++ b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/dependent.py @@ -20,10 +20,10 @@ from typing import Dict, Optional, Tuple from pydolphinscheduler.constants import TaskType -from pydolphinscheduler.core.base import Base from pydolphinscheduler.core.task import Task from pydolphinscheduler.exceptions import PyDSJavaGatewayException, PyDSParamException from pydolphinscheduler.java_gateway import launch_gateway +from pydolphinscheduler.models.base import Base DEPENDENT_ALL_TASK_IN_WORKFLOW = "0" @@ -31,8 +31,8 @@ DEPENDENT_ALL_TASK_IN_WORKFLOW = "0" class DependentDate(str): """Constant of Dependent date value. - These values set according to Java server side, if you want to add and change it, - please change Java server side first. + These values set according to Java server models, if you want to add and change it, + please change Java server models first. """ # TODO Maybe we should add parent level to DependentDate for easy to use, such as diff --git a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/switch.py b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/switch.py index 0c9a2b82b3df5ccbfc979426895a8757abd3daf9..2206a06e42fd07dc257bcf72d5e749e0649e70eb 100644 --- a/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/switch.py +++ b/dolphinscheduler-python/pydolphinscheduler/src/pydolphinscheduler/tasks/switch.py @@ -20,9 +20,9 @@ from typing import Dict, Optional from pydolphinscheduler.constants import TaskType -from pydolphinscheduler.core.base import Base from pydolphinscheduler.core.task import Task from pydolphinscheduler.exceptions import PyDSParamException +from pydolphinscheduler.models.base import Base class SwitchBranch(Base): diff --git a/dolphinscheduler-python/pydolphinscheduler/tests/cli/test_config.py b/dolphinscheduler-python/pydolphinscheduler/tests/cli/test_config.py index d913277b2e4921cc222ad7f7fb1c065b07d97892..516ad754a20cecc925011373b9f07e6b1ad30fd5 100644 --- a/dolphinscheduler-python/pydolphinscheduler/tests/cli/test_config.py +++ b/dolphinscheduler-python/pydolphinscheduler/tests/cli/test_config.py @@ -23,7 +23,7 @@ from pathlib import Path import pytest from pydolphinscheduler.cli.commands import cli -from pydolphinscheduler.core.configuration import BUILD_IN_CONFIG_PATH, config_path +from pydolphinscheduler.configuration import BUILD_IN_CONFIG_PATH, config_path from tests.testing.cli import CliTestWrapper from tests.testing.constants import DEV_MODE, ENV_PYDS_HOME from tests.testing.file import get_file_content diff --git a/dolphinscheduler-python/pydolphinscheduler/tests/core/test_configuration.py b/dolphinscheduler-python/pydolphinscheduler/tests/core/test_configuration.py index c7e217a46f347647a01730ba6c2f44adea4ea3c1..b9dc8cb656450301e1fc618dbc4ef51ab34d3458 100644 --- a/dolphinscheduler-python/pydolphinscheduler/tests/core/test_configuration.py +++ b/dolphinscheduler-python/pydolphinscheduler/tests/core/test_configuration.py @@ -24,8 +24,8 @@ from typing import Any import pytest -from pydolphinscheduler.core import configuration -from pydolphinscheduler.core.configuration import ( +from pydolphinscheduler import configuration +from pydolphinscheduler.configuration import ( BUILD_IN_CONFIG_PATH, config_path, get_single_config, diff --git a/dolphinscheduler-python/pydolphinscheduler/tests/core/test_process_definition.py b/dolphinscheduler-python/pydolphinscheduler/tests/core/test_process_definition.py index 5cb6dabdc0e4d7d910938319377755f02bfbb548..30445bfbf3565b15c85c568ca2ebd62b7098b3b3 100644 --- a/dolphinscheduler-python/pydolphinscheduler/tests/core/test_process_definition.py +++ b/dolphinscheduler-python/pydolphinscheduler/tests/core/test_process_definition.py @@ -24,11 +24,11 @@ from unittest.mock import patch import pytest from freezegun import freeze_time -from pydolphinscheduler.core import configuration +from pydolphinscheduler import configuration from pydolphinscheduler.core.process_definition import ProcessDefinition from pydolphinscheduler.core.resource import Resource from pydolphinscheduler.exceptions import PyDSParamException -from pydolphinscheduler.side import Project, Tenant, User +from pydolphinscheduler.models import Project, Tenant, User from pydolphinscheduler.tasks.switch import Branch, Default, Switch, SwitchCondition from pydolphinscheduler.utils.date import conv_to_schedule from tests.testing.task import Task diff --git a/dolphinscheduler-python/pydolphinscheduler/tests/testing/path.py b/dolphinscheduler-python/pydolphinscheduler/tests/testing/path.py index d1e520b3bde0385ff866a29d8105b8ae8b43755b..68d93c404b51accd0c65fbaca60206f299b91518 100644 --- a/dolphinscheduler-python/pydolphinscheduler/tests/testing/path.py +++ b/dolphinscheduler-python/pydolphinscheduler/tests/testing/path.py @@ -26,7 +26,7 @@ path_code_tasks = project_root.joinpath("src", "pydolphinscheduler", "tasks") path_example = project_root.joinpath("src", "pydolphinscheduler", "examples") path_doc_tasks = project_root.joinpath("docs", "source", "tasks") path_default_config_yaml = project_root.joinpath( - "src", "pydolphinscheduler", "core", "default_config.yaml" + "src", "pydolphinscheduler", "default_config.yaml" )