From 56769571ac0a29eaa754dcaf8b51d41da8ba1290 Mon Sep 17 00:00:00 2001 From: Nathan Freeman Date: Tue, 24 Sep 2024 14:53:42 -0500 Subject: [PATCH] refactor --- src/engine/src/{core => }/Server.py | 4 ++-- src/engine/src/core/daos/__init__.py | 2 -- src/engine/src/core/expressions/__init__.py | 2 -- src/engine/src/core/ioc/__init__.py | 2 -- src/engine/src/core/mappers/__init__.py | 6 ------ .../src/core/middleware/archivers/__init__.py | 4 ---- src/engine/src/core/repositories/__init__.py | 8 -------- src/engine/src/core/state/__init__.py | 2 -- .../tasks/executors/builders/kaniko/__init__.py | 1 - .../executors/builders/singularity/__init__.py | 1 - src/engine/src/core/templating/__init__.py | 1 - src/engine/src/core/workers/__init__.py | 2 -- src/engine/src/core/workflows/__init__.py | 4 ---- src/engine/src/{core => }/daos/FileSystemDAO.py | 0 .../{core => }/daos/WorkflowExecutorStateDAO.py | 2 +- src/engine/src/daos/__init__.py | 2 ++ .../ConditionalExpressionEvaluator.py | 2 +- .../{core => }/expressions/OperandResolver.py | 2 +- src/engine/src/expressions/__init__.py | 2 ++ src/engine/src/{core => }/ioc/IOCContainer.py | 0 .../src/{core => }/ioc/IOCContainerFactory.py | 16 ++++++++-------- src/engine/src/ioc/__init__.py | 2 ++ src/engine/src/main.py | 2 +- src/engine/src/{core => }/mappers/ArgMapper.py | 2 +- .../src/{core => }/mappers/ArgValueFileMapper.py | 2 +- src/engine/src/{core => }/mappers/EnvMapper.py | 2 +- .../{core => }/mappers/EnvVarValueFileMapper.py | 2 +- src/engine/src/{core => }/mappers/TaskMapper.py | 2 +- .../src/{core => }/mappers/TaskOutputMapper.py | 2 +- src/engine/src/mappers/__init__.py | 6 ++++++ .../middleware/archivers/IRODSArchiver.py | 0 .../middleware/archivers/S3Archiver.py | 0 src/engine/src/middleware/archivers/__init__.py | 4 ++++ .../{core => }/middleware/backends/__init__.py | 0 src/engine/src/owe_python_sdk/TaskExecutor.py | 2 +- .../src/{core => }/repositories/ArgRepository.py | 2 +- .../repositories/ArgValueFileRepository.py | 2 +- .../src/{core => }/repositories/EnvRepository.py | 2 +- .../repositories/EnvVarValueFileRepository.py | 2 +- .../repositories/GitCacheRepository.py | 0 .../repositories/TaskOutputRepository.py | 2 +- .../{core => }/repositories/TaskRepository.py | 2 +- .../repositories/TemplateRepository.py | 2 +- src/engine/src/repositories/__init__.py | 8 ++++++++ src/engine/src/{core => }/resources/__init__.py | 0 src/engine/src/{core => }/state/Hook.py | 0 src/engine/src/{core => }/state/ReactiveState.py | 2 +- src/engine/src/state/__init__.py | 2 ++ .../src/{core => }/tasks/BaseBuildExecutor.py | 2 +- .../tasks/BuildTaskExecutorResolver.py | 0 src/engine/src/{core => }/tasks/Flavor.py | 0 .../src/{core => }/tasks/TaskExecutorFactory.py | 8 ++++---- .../tasks/TaskInputFileStagingService.py | 2 +- .../{core => }/tasks/executors/Application.py | 2 +- .../src/{core => }/tasks/executors/Function.py | 6 +++--- .../builders/helpers/ContextResolver.py | 0 .../tasks/executors/builders/kaniko/Kaniko.py | 4 ++-- .../tasks/executors/builders/kaniko/__init__.py | 1 + .../builders/singularity/Singularity.py | 6 +++--- .../executors/builders/singularity/__init__.py | 1 + .../singularity/helpers/ContainerBuilder.py | 0 .../tasks/executors/requesters/HTTP.py | 0 .../src/{core => }/tasks/function_bootstrap.py | 0 .../src/{core => }/templating/TemplateMapper.py | 2 +- src/engine/src/templating/__init__.py | 1 + .../tests/TestConditionalExpressionEvaluator.py | 2 +- src/engine/src/tests/TestIOCContainerFactory.py | 4 ++-- src/engine/src/tests/TestReactiveState.py | 4 ++-- src/engine/src/tests/TestTaskRepository.py | 2 +- src/engine/src/tests/testserver.py | 2 +- src/engine/src/utils/__init__.py | 2 +- src/engine/src/utils/k8s.py | 2 +- src/engine/src/{core => }/workers/Worker.py | 0 src/engine/src/{core => }/workers/WorkerPool.py | 2 +- src/engine/src/workers/__init__.py | 2 ++ .../src/{core => }/workflows/GraphValidator.py | 0 .../src/{core => }/workflows/ValueFromService.py | 2 +- .../src/{core => }/workflows/WorkflowExecutor.py | 14 +++++++------- src/engine/src/workflows/__init__.py | 4 ++++ .../src/{core => }/workflows/params_validator.py | 0 80 files changed, 98 insertions(+), 98 deletions(-) rename src/engine/src/{core => }/Server.py (99%) delete mode 100644 src/engine/src/core/daos/__init__.py delete mode 100644 src/engine/src/core/expressions/__init__.py delete mode 100644 src/engine/src/core/ioc/__init__.py delete mode 100644 src/engine/src/core/mappers/__init__.py delete mode 100644 src/engine/src/core/middleware/archivers/__init__.py delete mode 100644 src/engine/src/core/repositories/__init__.py delete mode 100644 src/engine/src/core/state/__init__.py delete mode 100644 src/engine/src/core/tasks/executors/builders/kaniko/__init__.py delete mode 100644 src/engine/src/core/tasks/executors/builders/singularity/__init__.py delete mode 100644 src/engine/src/core/templating/__init__.py delete mode 100644 src/engine/src/core/workers/__init__.py delete mode 100644 src/engine/src/core/workflows/__init__.py rename src/engine/src/{core => }/daos/FileSystemDAO.py (100%) rename src/engine/src/{core => }/daos/WorkflowExecutorStateDAO.py (81%) create mode 100644 src/engine/src/daos/__init__.py rename src/engine/src/{core => }/expressions/ConditionalExpressionEvaluator.py (98%) rename src/engine/src/{core => }/expressions/OperandResolver.py (97%) create mode 100644 src/engine/src/expressions/__init__.py rename src/engine/src/{core => }/ioc/IOCContainer.py (100%) rename src/engine/src/{core => }/ioc/IOCContainerFactory.py (93%) create mode 100644 src/engine/src/ioc/__init__.py rename src/engine/src/{core => }/mappers/ArgMapper.py (87%) rename src/engine/src/{core => }/mappers/ArgValueFileMapper.py (82%) rename src/engine/src/{core => }/mappers/EnvMapper.py (84%) rename src/engine/src/{core => }/mappers/EnvVarValueFileMapper.py (82%) rename src/engine/src/{core => }/mappers/TaskMapper.py (87%) rename src/engine/src/{core => }/mappers/TaskOutputMapper.py (90%) create mode 100644 src/engine/src/mappers/__init__.py rename src/engine/src/{core => }/middleware/archivers/IRODSArchiver.py (100%) rename src/engine/src/{core => }/middleware/archivers/S3Archiver.py (100%) create mode 100644 src/engine/src/middleware/archivers/__init__.py rename src/engine/src/{core => }/middleware/backends/__init__.py (100%) rename src/engine/src/{core => }/repositories/ArgRepository.py (88%) rename src/engine/src/{core => }/repositories/ArgValueFileRepository.py (80%) rename src/engine/src/{core => }/repositories/EnvRepository.py (85%) rename src/engine/src/{core => }/repositories/EnvVarValueFileRepository.py (80%) rename src/engine/src/{core => }/repositories/GitCacheRepository.py (100%) rename src/engine/src/{core => }/repositories/TaskOutputRepository.py (89%) rename src/engine/src/{core => }/repositories/TaskRepository.py (84%) rename src/engine/src/{core => }/repositories/TemplateRepository.py (97%) create mode 100644 src/engine/src/repositories/__init__.py rename src/engine/src/{core => }/resources/__init__.py (100%) rename src/engine/src/{core => }/state/Hook.py (100%) rename src/engine/src/{core => }/state/ReactiveState.py (99%) create mode 100644 src/engine/src/state/__init__.py rename src/engine/src/{core => }/tasks/BaseBuildExecutor.py (96%) rename src/engine/src/{core => }/tasks/BuildTaskExecutorResolver.py (100%) rename src/engine/src/{core => }/tasks/Flavor.py (100%) rename src/engine/src/{core => }/tasks/TaskExecutorFactory.py (89%) rename src/engine/src/{core => }/tasks/TaskInputFileStagingService.py (98%) rename src/engine/src/{core => }/tasks/executors/Application.py (98%) rename src/engine/src/{core => }/tasks/executors/Function.py (98%) rename src/engine/src/{core => }/tasks/executors/builders/helpers/ContextResolver.py (100%) rename src/engine/src/{core => }/tasks/executors/builders/kaniko/Kaniko.py (98%) create mode 100644 src/engine/src/tasks/executors/builders/kaniko/__init__.py rename src/engine/src/{core => }/tasks/executors/builders/singularity/Singularity.py (96%) create mode 100644 src/engine/src/tasks/executors/builders/singularity/__init__.py rename src/engine/src/{core => }/tasks/executors/builders/singularity/helpers/ContainerBuilder.py (100%) rename src/engine/src/{core => }/tasks/executors/requesters/HTTP.py (100%) rename src/engine/src/{core => }/tasks/function_bootstrap.py (100%) rename src/engine/src/{core => }/templating/TemplateMapper.py (98%) create mode 100644 src/engine/src/templating/__init__.py rename src/engine/src/{core => }/workers/Worker.py (100%) rename src/engine/src/{core => }/workers/WorkerPool.py (98%) create mode 100644 src/engine/src/workers/__init__.py rename src/engine/src/{core => }/workflows/GraphValidator.py (100%) rename src/engine/src/{core => }/workflows/ValueFromService.py (97%) rename src/engine/src/{core => }/workflows/WorkflowExecutor.py (99%) create mode 100644 src/engine/src/workflows/__init__.py rename src/engine/src/{core => }/workflows/params_validator.py (100%) diff --git a/src/engine/src/core/Server.py b/src/engine/src/Server.py similarity index 99% rename from src/engine/src/core/Server.py rename to src/engine/src/Server.py index 9436254f..bea1528a 100644 --- a/src/engine/src/core/Server.py +++ b/src/engine/src/Server.py @@ -34,8 +34,8 @@ ) from owe_python_sdk.schema import WorkflowSubmissionRequest, EmptyObject -from core.workers import WorkerPool -from core.workflows import WorkflowExecutor +from workers import WorkerPool +from workflows import WorkflowExecutor from utils import serialize_request, load_plugins, lbuffer_str as lbuf from errors import NoAvailableWorkers, WorkflowTerminated diff --git a/src/engine/src/core/daos/__init__.py b/src/engine/src/core/daos/__init__.py deleted file mode 100644 index 33de9732..00000000 --- a/src/engine/src/core/daos/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from core.daos.FileSystemDAO import FileSystemDAO -from core.daos.WorkflowExecutorStateDAO import WorkflowExecutorStateDAO \ No newline at end of file diff --git a/src/engine/src/core/expressions/__init__.py b/src/engine/src/core/expressions/__init__.py deleted file mode 100644 index f83bd921..00000000 --- a/src/engine/src/core/expressions/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from core.expressions.ConditionalExpressionEvaluator import ConditionalExpressionEvaluator -from core.expressions.OperandResolver import OperandResolver \ No newline at end of file diff --git a/src/engine/src/core/ioc/__init__.py b/src/engine/src/core/ioc/__init__.py deleted file mode 100644 index c9c172d5..00000000 --- a/src/engine/src/core/ioc/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from core.ioc.IOCContainer import IOCContainer -from core.ioc.IOCContainerFactory import IOCContainerFactory \ No newline at end of file diff --git a/src/engine/src/core/mappers/__init__.py b/src/engine/src/core/mappers/__init__.py deleted file mode 100644 index 2f3e8d32..00000000 --- a/src/engine/src/core/mappers/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -from core.mappers.ArgMapper import ArgMapper -from core.mappers.ArgValueFileMapper import ArgValueFileMapper -from core.mappers.EnvVarValueFileMapper import EnvVarValueFileMapper -from core.mappers.EnvMapper import EnvMapper -from core.mappers.TaskMapper import TaskMapper -from core.mappers.TaskOutputMapper import TaskOutputMapper diff --git a/src/engine/src/core/middleware/archivers/__init__.py b/src/engine/src/core/middleware/archivers/__init__.py deleted file mode 100644 index 74f47ea6..00000000 --- a/src/engine/src/core/middleware/archivers/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -from core.middleware.archivers.S3Archiver import S3Archiver -from core.middleware.archivers.IRODSArchiver import IRODSArchiver - - diff --git a/src/engine/src/core/repositories/__init__.py b/src/engine/src/core/repositories/__init__.py deleted file mode 100644 index 88829762..00000000 --- a/src/engine/src/core/repositories/__init__.py +++ /dev/null @@ -1,8 +0,0 @@ -from core.repositories.EnvRepository import EnvRepository -from core.repositories.GitCacheRepository import GitCacheRepository -from core.repositories.ArgRepository import ArgRepository -from core.repositories.ArgValueFileRepository import ArgValueFileRepository -from core.repositories.EnvVarValueFileRepository import EnvVarValueFileRepository -from core.repositories.TaskOutputRepository import TaskOutputRepository -from core.repositories.TaskRepository import TaskRepository -from core.repositories.TemplateRepository import TemplateRepository \ No newline at end of file diff --git a/src/engine/src/core/state/__init__.py b/src/engine/src/core/state/__init__.py deleted file mode 100644 index 94ff3680..00000000 --- a/src/engine/src/core/state/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from core.state.Hook import Hook, method_hook -from core.state.ReactiveState import ReactiveState \ No newline at end of file diff --git a/src/engine/src/core/tasks/executors/builders/kaniko/__init__.py b/src/engine/src/core/tasks/executors/builders/kaniko/__init__.py deleted file mode 100644 index fcfa1ccf..00000000 --- a/src/engine/src/core/tasks/executors/builders/kaniko/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from core.tasks.executors.builders.kaniko.Kaniko import Kaniko \ No newline at end of file diff --git a/src/engine/src/core/tasks/executors/builders/singularity/__init__.py b/src/engine/src/core/tasks/executors/builders/singularity/__init__.py deleted file mode 100644 index 330b877d..00000000 --- a/src/engine/src/core/tasks/executors/builders/singularity/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from core.tasks.executors.builders.singularity.Singularity import Singularity \ No newline at end of file diff --git a/src/engine/src/core/templating/__init__.py b/src/engine/src/core/templating/__init__.py deleted file mode 100644 index b6c23577..00000000 --- a/src/engine/src/core/templating/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from core.templating.TemplateMapper import TemplateMapper \ No newline at end of file diff --git a/src/engine/src/core/workers/__init__.py b/src/engine/src/core/workers/__init__.py deleted file mode 100644 index a7123f0d..00000000 --- a/src/engine/src/core/workers/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ -from core.workers.Worker import Worker -from core.workers.WorkerPool import WorkerPool \ No newline at end of file diff --git a/src/engine/src/core/workflows/__init__.py b/src/engine/src/core/workflows/__init__.py deleted file mode 100644 index 36b83465..00000000 --- a/src/engine/src/core/workflows/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -from core.workflows.GraphValidator import GraphValidator -from core.workflows.params_validator import params_validator -from core.workflows.ValueFromService import ValueFromService -from core.workflows.WorkflowExecutor import WorkflowExecutor \ No newline at end of file diff --git a/src/engine/src/core/daos/FileSystemDAO.py b/src/engine/src/daos/FileSystemDAO.py similarity index 100% rename from src/engine/src/core/daos/FileSystemDAO.py rename to src/engine/src/daos/FileSystemDAO.py diff --git a/src/engine/src/core/daos/WorkflowExecutorStateDAO.py b/src/engine/src/daos/WorkflowExecutorStateDAO.py similarity index 81% rename from src/engine/src/core/daos/WorkflowExecutorStateDAO.py rename to src/engine/src/daos/WorkflowExecutorStateDAO.py index 68d62bc3..a2373dc9 100644 --- a/src/engine/src/core/daos/WorkflowExecutorStateDAO.py +++ b/src/engine/src/daos/WorkflowExecutorStateDAO.py @@ -1,4 +1,4 @@ -from core.state import ReactiveState +from state import ReactiveState class WorkflowExecutorStateDAO: diff --git a/src/engine/src/daos/__init__.py b/src/engine/src/daos/__init__.py new file mode 100644 index 00000000..192c0cf8 --- /dev/null +++ b/src/engine/src/daos/__init__.py @@ -0,0 +1,2 @@ +from daos.FileSystemDAO import FileSystemDAO +from daos.WorkflowExecutorStateDAO import WorkflowExecutorStateDAO \ No newline at end of file diff --git a/src/engine/src/core/expressions/ConditionalExpressionEvaluator.py b/src/engine/src/expressions/ConditionalExpressionEvaluator.py similarity index 98% rename from src/engine/src/core/expressions/ConditionalExpressionEvaluator.py rename to src/engine/src/expressions/ConditionalExpressionEvaluator.py index 21d4ae33..753f2dce 100644 --- a/src/engine/src/core/expressions/ConditionalExpressionEvaluator.py +++ b/src/engine/src/expressions/ConditionalExpressionEvaluator.py @@ -9,7 +9,7 @@ ConditionalExpression, ConditionalExpressions ) -from core.expressions import OperandResolver +from expressions import OperandResolver from errors.tasks import ConditionalExpressionEvalError, OperandResolutionError diff --git a/src/engine/src/core/expressions/OperandResolver.py b/src/engine/src/expressions/OperandResolver.py similarity index 97% rename from src/engine/src/core/expressions/OperandResolver.py rename to src/engine/src/expressions/OperandResolver.py index 97a1fae9..b212ea60 100644 --- a/src/engine/src/core/expressions/OperandResolver.py +++ b/src/engine/src/expressions/OperandResolver.py @@ -1,6 +1,6 @@ from owe_python_sdk.schema import Operand -from core.workflows import ValueFromService +from workflows import ValueFromService from errors.tasks import OperandResolutionError diff --git a/src/engine/src/expressions/__init__.py b/src/engine/src/expressions/__init__.py new file mode 100644 index 00000000..e893425c --- /dev/null +++ b/src/engine/src/expressions/__init__.py @@ -0,0 +1,2 @@ +from expressions.ConditionalExpressionEvaluator import ConditionalExpressionEvaluator +from expressions.OperandResolver import OperandResolver \ No newline at end of file diff --git a/src/engine/src/core/ioc/IOCContainer.py b/src/engine/src/ioc/IOCContainer.py similarity index 100% rename from src/engine/src/core/ioc/IOCContainer.py rename to src/engine/src/ioc/IOCContainer.py diff --git a/src/engine/src/core/ioc/IOCContainerFactory.py b/src/engine/src/ioc/IOCContainerFactory.py similarity index 93% rename from src/engine/src/core/ioc/IOCContainerFactory.py rename to src/engine/src/ioc/IOCContainerFactory.py index 67ddaac0..7945fa42 100644 --- a/src/engine/src/core/ioc/IOCContainerFactory.py +++ b/src/engine/src/ioc/IOCContainerFactory.py @@ -1,13 +1,13 @@ from typing import List from owe_python_sdk.Plugin import Plugin -from core.ioc import IOCContainer -from core.state import ReactiveState -from core.daos import ( +from ioc import IOCContainer +from state import ReactiveState +from daos import ( WorkflowExecutorStateDAO, FileSystemDAO ) -from core.mappers import ( +from mappers import ( ArgMapper, ArgValueFileMapper, EnvMapper, @@ -15,7 +15,7 @@ TaskMapper, TaskOutputMapper ) -from core.repositories import ( +from repositories import ( ArgRepository, ArgValueFileRepository, EnvRepository, @@ -25,12 +25,12 @@ TaskRepository, TemplateRepository ) -from core.tasks.TaskInputFileStagingService import TaskInputFileStagingService -from core.workflows import ( +from tasks.TaskInputFileStagingService import TaskInputFileStagingService +from workflows import ( GraphValidator, ValueFromService ) -from core.expressions import ( +from expressions import ( ConditionalExpressionEvaluator, OperandResolver ) diff --git a/src/engine/src/ioc/__init__.py b/src/engine/src/ioc/__init__.py new file mode 100644 index 00000000..06cad684 --- /dev/null +++ b/src/engine/src/ioc/__init__.py @@ -0,0 +1,2 @@ +from ioc.IOCContainer import IOCContainer +from ioc.IOCContainerFactory import IOCContainerFactory \ No newline at end of file diff --git a/src/engine/src/main.py b/src/engine/src/main.py index 1f619c2b..92ce1aaf 100644 --- a/src/engine/src/main.py +++ b/src/engine/src/main.py @@ -1,6 +1,6 @@ import sys, logging -from core.Server import Server +from Server import Server # Set all third-party library loggers to critical diff --git a/src/engine/src/core/mappers/ArgMapper.py b/src/engine/src/mappers/ArgMapper.py similarity index 87% rename from src/engine/src/core/mappers/ArgMapper.py rename to src/engine/src/mappers/ArgMapper.py index eba9e801..c16dece1 100644 --- a/src/engine/src/core/mappers/ArgMapper.py +++ b/src/engine/src/mappers/ArgMapper.py @@ -1,4 +1,4 @@ -from core.daos import WorkflowExecutorStateDAO +from daos import WorkflowExecutorStateDAO class ArgMapper: diff --git a/src/engine/src/core/mappers/ArgValueFileMapper.py b/src/engine/src/mappers/ArgValueFileMapper.py similarity index 82% rename from src/engine/src/core/mappers/ArgValueFileMapper.py rename to src/engine/src/mappers/ArgValueFileMapper.py index 778cd9a8..381739ff 100644 --- a/src/engine/src/core/mappers/ArgValueFileMapper.py +++ b/src/engine/src/mappers/ArgValueFileMapper.py @@ -1,4 +1,4 @@ -from core.daos import FileSystemDAO +from daos import FileSystemDAO class ArgValueFileMapper: diff --git a/src/engine/src/core/mappers/EnvMapper.py b/src/engine/src/mappers/EnvMapper.py similarity index 84% rename from src/engine/src/core/mappers/EnvMapper.py rename to src/engine/src/mappers/EnvMapper.py index 8e5fe820..200e8700 100644 --- a/src/engine/src/core/mappers/EnvMapper.py +++ b/src/engine/src/mappers/EnvMapper.py @@ -1,4 +1,4 @@ -from core.daos import WorkflowExecutorStateDAO +from daos import WorkflowExecutorStateDAO class EnvMapper: diff --git a/src/engine/src/core/mappers/EnvVarValueFileMapper.py b/src/engine/src/mappers/EnvVarValueFileMapper.py similarity index 82% rename from src/engine/src/core/mappers/EnvVarValueFileMapper.py rename to src/engine/src/mappers/EnvVarValueFileMapper.py index 31c444cc..fd691a9c 100644 --- a/src/engine/src/core/mappers/EnvVarValueFileMapper.py +++ b/src/engine/src/mappers/EnvVarValueFileMapper.py @@ -1,4 +1,4 @@ -from core.daos import FileSystemDAO +from daos import FileSystemDAO class EnvVarValueFileMapper: diff --git a/src/engine/src/core/mappers/TaskMapper.py b/src/engine/src/mappers/TaskMapper.py similarity index 87% rename from src/engine/src/core/mappers/TaskMapper.py rename to src/engine/src/mappers/TaskMapper.py index f407de30..2b23567f 100644 --- a/src/engine/src/core/mappers/TaskMapper.py +++ b/src/engine/src/mappers/TaskMapper.py @@ -1,4 +1,4 @@ -from core.daos import WorkflowExecutorStateDAO +from daos import WorkflowExecutorStateDAO class TaskMapper: diff --git a/src/engine/src/core/mappers/TaskOutputMapper.py b/src/engine/src/mappers/TaskOutputMapper.py similarity index 90% rename from src/engine/src/core/mappers/TaskOutputMapper.py rename to src/engine/src/mappers/TaskOutputMapper.py index a26f38ee..4f992b32 100644 --- a/src/engine/src/core/mappers/TaskOutputMapper.py +++ b/src/engine/src/mappers/TaskOutputMapper.py @@ -1,6 +1,6 @@ import os -from core.daos import FileSystemDAO +from daos import FileSystemDAO class TaskOutputMapper: diff --git a/src/engine/src/mappers/__init__.py b/src/engine/src/mappers/__init__.py new file mode 100644 index 00000000..a5a64779 --- /dev/null +++ b/src/engine/src/mappers/__init__.py @@ -0,0 +1,6 @@ +from mappers.ArgMapper import ArgMapper +from mappers.ArgValueFileMapper import ArgValueFileMapper +from mappers.EnvVarValueFileMapper import EnvVarValueFileMapper +from mappers.EnvMapper import EnvMapper +from mappers.TaskMapper import TaskMapper +from mappers.TaskOutputMapper import TaskOutputMapper diff --git a/src/engine/src/core/middleware/archivers/IRODSArchiver.py b/src/engine/src/middleware/archivers/IRODSArchiver.py similarity index 100% rename from src/engine/src/core/middleware/archivers/IRODSArchiver.py rename to src/engine/src/middleware/archivers/IRODSArchiver.py diff --git a/src/engine/src/core/middleware/archivers/S3Archiver.py b/src/engine/src/middleware/archivers/S3Archiver.py similarity index 100% rename from src/engine/src/core/middleware/archivers/S3Archiver.py rename to src/engine/src/middleware/archivers/S3Archiver.py diff --git a/src/engine/src/middleware/archivers/__init__.py b/src/engine/src/middleware/archivers/__init__.py new file mode 100644 index 00000000..3b6c1c67 --- /dev/null +++ b/src/engine/src/middleware/archivers/__init__.py @@ -0,0 +1,4 @@ +from middleware.archivers.S3Archiver import S3Archiver +from middleware.archivers.IRODSArchiver import IRODSArchiver + + diff --git a/src/engine/src/core/middleware/backends/__init__.py b/src/engine/src/middleware/backends/__init__.py similarity index 100% rename from src/engine/src/core/middleware/backends/__init__.py rename to src/engine/src/middleware/backends/__init__.py diff --git a/src/engine/src/owe_python_sdk/TaskExecutor.py b/src/engine/src/owe_python_sdk/TaskExecutor.py index 2c812cfb..84d6b9b5 100644 --- a/src/engine/src/owe_python_sdk/TaskExecutor.py +++ b/src/engine/src/owe_python_sdk/TaskExecutor.py @@ -9,7 +9,7 @@ from owe_python_sdk.TaskOutputFile import TaskOutputFile from owe_python_sdk.constants import STDERR, STDOUT from utils import lbuffer_str as lbuf -from core.resources import Resource, ResourceType +from resources import Resource, ResourceType from conf.constants import ( DEFAULT_POLLING_INTERVAL, KUBERNETES_NAMESPACE, diff --git a/src/engine/src/core/repositories/ArgRepository.py b/src/engine/src/repositories/ArgRepository.py similarity index 88% rename from src/engine/src/core/repositories/ArgRepository.py rename to src/engine/src/repositories/ArgRepository.py index 9e4fdd92..f46e35a5 100644 --- a/src/engine/src/core/repositories/ArgRepository.py +++ b/src/engine/src/repositories/ArgRepository.py @@ -1,4 +1,4 @@ -from core.mappers import ArgMapper +from mappers import ArgMapper class ArgRepository: diff --git a/src/engine/src/core/repositories/ArgValueFileRepository.py b/src/engine/src/repositories/ArgValueFileRepository.py similarity index 80% rename from src/engine/src/core/repositories/ArgValueFileRepository.py rename to src/engine/src/repositories/ArgValueFileRepository.py index 86a7def2..aab92d16 100644 --- a/src/engine/src/core/repositories/ArgValueFileRepository.py +++ b/src/engine/src/repositories/ArgValueFileRepository.py @@ -1,4 +1,4 @@ -from core.mappers import ArgValueFileMapper +from mappers import ArgValueFileMapper class ArgValueFileRepository: diff --git a/src/engine/src/core/repositories/EnvRepository.py b/src/engine/src/repositories/EnvRepository.py similarity index 85% rename from src/engine/src/core/repositories/EnvRepository.py rename to src/engine/src/repositories/EnvRepository.py index db5376d0..173046f3 100644 --- a/src/engine/src/core/repositories/EnvRepository.py +++ b/src/engine/src/repositories/EnvRepository.py @@ -1,4 +1,4 @@ -from core.mappers import EnvMapper +from mappers import EnvMapper class EnvRepository: diff --git a/src/engine/src/core/repositories/EnvVarValueFileRepository.py b/src/engine/src/repositories/EnvVarValueFileRepository.py similarity index 80% rename from src/engine/src/core/repositories/EnvVarValueFileRepository.py rename to src/engine/src/repositories/EnvVarValueFileRepository.py index a9973c0a..9ea74b22 100644 --- a/src/engine/src/core/repositories/EnvVarValueFileRepository.py +++ b/src/engine/src/repositories/EnvVarValueFileRepository.py @@ -1,4 +1,4 @@ -from core.mappers import EnvVarValueFileMapper +from mappers import EnvVarValueFileMapper class EnvVarValueFileRepository: diff --git a/src/engine/src/core/repositories/GitCacheRepository.py b/src/engine/src/repositories/GitCacheRepository.py similarity index 100% rename from src/engine/src/core/repositories/GitCacheRepository.py rename to src/engine/src/repositories/GitCacheRepository.py diff --git a/src/engine/src/core/repositories/TaskOutputRepository.py b/src/engine/src/repositories/TaskOutputRepository.py similarity index 89% rename from src/engine/src/core/repositories/TaskOutputRepository.py rename to src/engine/src/repositories/TaskOutputRepository.py index c3ff0a63..93431d14 100644 --- a/src/engine/src/core/repositories/TaskOutputRepository.py +++ b/src/engine/src/repositories/TaskOutputRepository.py @@ -1,4 +1,4 @@ -from core.mappers import TaskOutputMapper +from mappers import TaskOutputMapper from owe_python_sdk.schema import Task diff --git a/src/engine/src/core/repositories/TaskRepository.py b/src/engine/src/repositories/TaskRepository.py similarity index 84% rename from src/engine/src/core/repositories/TaskRepository.py rename to src/engine/src/repositories/TaskRepository.py index 07c99a1c..07c5c26e 100644 --- a/src/engine/src/core/repositories/TaskRepository.py +++ b/src/engine/src/repositories/TaskRepository.py @@ -1,4 +1,4 @@ -from core.mappers import TaskMapper +from mappers import TaskMapper class TaskRepository: diff --git a/src/engine/src/core/repositories/TemplateRepository.py b/src/engine/src/repositories/TemplateRepository.py similarity index 97% rename from src/engine/src/core/repositories/TemplateRepository.py rename to src/engine/src/repositories/TemplateRepository.py index 7e217c37..12fa39e8 100644 --- a/src/engine/src/core/repositories/TemplateRepository.py +++ b/src/engine/src/repositories/TemplateRepository.py @@ -2,7 +2,7 @@ from urllib.parse import urlparse -from core.repositories import GitCacheRepository +from repositories import GitCacheRepository from owe_python_sdk.schema import Uses diff --git a/src/engine/src/repositories/__init__.py b/src/engine/src/repositories/__init__.py new file mode 100644 index 00000000..96914661 --- /dev/null +++ b/src/engine/src/repositories/__init__.py @@ -0,0 +1,8 @@ +from repositories.EnvRepository import EnvRepository +from repositories.GitCacheRepository import GitCacheRepository +from repositories.ArgRepository import ArgRepository +from repositories.ArgValueFileRepository import ArgValueFileRepository +from repositories.EnvVarValueFileRepository import EnvVarValueFileRepository +from repositories.TaskOutputRepository import TaskOutputRepository +from repositories.TaskRepository import TaskRepository +from repositories.TemplateRepository import TemplateRepository \ No newline at end of file diff --git a/src/engine/src/core/resources/__init__.py b/src/engine/src/resources/__init__.py similarity index 100% rename from src/engine/src/core/resources/__init__.py rename to src/engine/src/resources/__init__.py diff --git a/src/engine/src/core/state/Hook.py b/src/engine/src/state/Hook.py similarity index 100% rename from src/engine/src/core/state/Hook.py rename to src/engine/src/state/Hook.py diff --git a/src/engine/src/core/state/ReactiveState.py b/src/engine/src/state/ReactiveState.py similarity index 99% rename from src/engine/src/core/state/ReactiveState.py rename to src/engine/src/state/ReactiveState.py index 071edddd..cf9cc627 100644 --- a/src/engine/src/core/state/ReactiveState.py +++ b/src/engine/src/state/ReactiveState.py @@ -3,7 +3,7 @@ from typing import Any from threading import Lock -from core.state import Hook +from state import Hook class ReactiveState(object): diff --git a/src/engine/src/state/__init__.py b/src/engine/src/state/__init__.py new file mode 100644 index 00000000..c33a6606 --- /dev/null +++ b/src/engine/src/state/__init__.py @@ -0,0 +1,2 @@ +from state.Hook import Hook, method_hook +from state.ReactiveState import ReactiveState \ No newline at end of file diff --git a/src/engine/src/core/tasks/BaseBuildExecutor.py b/src/engine/src/tasks/BaseBuildExecutor.py similarity index 96% rename from src/engine/src/core/tasks/BaseBuildExecutor.py rename to src/engine/src/tasks/BaseBuildExecutor.py index 70dbde2c..0bec8e9b 100644 --- a/src/engine/src/core/tasks/BaseBuildExecutor.py +++ b/src/engine/src/tasks/BaseBuildExecutor.py @@ -1,6 +1,6 @@ import json, base64, os -from core.tasks.executors.builders.helpers.ContextResolver import context_resolver +from tasks.executors.builders.helpers.ContextResolver import context_resolver from errors.credentials import CredentialsError from owe_python_sdk.TaskExecutor import TaskExecutor diff --git a/src/engine/src/core/tasks/BuildTaskExecutorResolver.py b/src/engine/src/tasks/BuildTaskExecutorResolver.py similarity index 100% rename from src/engine/src/core/tasks/BuildTaskExecutorResolver.py rename to src/engine/src/tasks/BuildTaskExecutorResolver.py diff --git a/src/engine/src/core/tasks/Flavor.py b/src/engine/src/tasks/Flavor.py similarity index 100% rename from src/engine/src/core/tasks/Flavor.py rename to src/engine/src/tasks/Flavor.py diff --git a/src/engine/src/core/tasks/TaskExecutorFactory.py b/src/engine/src/tasks/TaskExecutorFactory.py similarity index 89% rename from src/engine/src/core/tasks/TaskExecutorFactory.py rename to src/engine/src/tasks/TaskExecutorFactory.py index d52322a3..e46d6aa8 100644 --- a/src/engine/src/core/tasks/TaskExecutorFactory.py +++ b/src/engine/src/tasks/TaskExecutorFactory.py @@ -1,10 +1,10 @@ import logging from owe_python_sdk.events import EventExchange -from core.tasks.BuildTaskExecutorResolver import build_task_executor_resolver -from core.tasks.executors.requesters.HTTP import HTTP -from core.tasks.executors.Function import Function -from core.tasks.executors.Application import Application +from tasks.BuildTaskExecutorResolver import build_task_executor_resolver +from tasks.executors.requesters.HTTP import HTTP +from tasks.executors.Function import Function +from tasks.executors.Application import Application from errors.tasks import InvalidTaskTypeError diff --git a/src/engine/src/core/tasks/TaskInputFileStagingService.py b/src/engine/src/tasks/TaskInputFileStagingService.py similarity index 98% rename from src/engine/src/core/tasks/TaskInputFileStagingService.py rename to src/engine/src/tasks/TaskInputFileStagingService.py index 371f6963..810dcba3 100644 --- a/src/engine/src/core/tasks/TaskInputFileStagingService.py +++ b/src/engine/src/tasks/TaskInputFileStagingService.py @@ -1,6 +1,6 @@ import os -from core.workflows import ValueFromService +from workflows import ValueFromService from owe_python_sdk.schema import Task from errors.tasks import TaskInputStagingError from owe_python_sdk.utils import select_field diff --git a/src/engine/src/core/tasks/executors/Application.py b/src/engine/src/tasks/executors/Application.py similarity index 98% rename from src/engine/src/core/tasks/executors/Application.py rename to src/engine/src/tasks/executors/Application.py index 7cd2cda6..597ee4da 100644 --- a/src/engine/src/core/tasks/executors/Application.py +++ b/src/engine/src/tasks/executors/Application.py @@ -6,7 +6,7 @@ from owe_python_sdk.TaskExecutor import TaskExecutor from conf.constants import KUBERNETES_NAMESPACE -from core.resources import PodResource +from resources import PodResource from utils import get_flavor from utils.k8s import flavor_to_k8s_resource_reqs, gen_resource_name diff --git a/src/engine/src/core/tasks/executors/Function.py b/src/engine/src/tasks/executors/Function.py similarity index 98% rename from src/engine/src/core/tasks/executors/Function.py rename to src/engine/src/tasks/executors/Function.py index 318883ab..381a0003 100644 --- a/src/engine/src/core/tasks/executors/Function.py +++ b/src/engine/src/tasks/executors/Function.py @@ -10,11 +10,11 @@ KUBERNETES_NAMESPACE, OWE_PYTHON_SDK_DIR, ) -from core.resources import JobResource +from resources import JobResource from utils import get_flavor from utils.k8s import flavor_to_k8s_resource_reqs, gen_resource_name -from core.tasks import function_bootstrap -from core.repositories import GitCacheRepository +from tasks import function_bootstrap +from repositories import GitCacheRepository class ContainerDetails: diff --git a/src/engine/src/core/tasks/executors/builders/helpers/ContextResolver.py b/src/engine/src/tasks/executors/builders/helpers/ContextResolver.py similarity index 100% rename from src/engine/src/core/tasks/executors/builders/helpers/ContextResolver.py rename to src/engine/src/tasks/executors/builders/helpers/ContextResolver.py diff --git a/src/engine/src/core/tasks/executors/builders/kaniko/Kaniko.py b/src/engine/src/tasks/executors/builders/kaniko/Kaniko.py similarity index 98% rename from src/engine/src/core/tasks/executors/builders/kaniko/Kaniko.py rename to src/engine/src/tasks/executors/builders/kaniko/Kaniko.py index b17f51f1..c3dd0531 100644 --- a/src/engine/src/core/tasks/executors/builders/kaniko/Kaniko.py +++ b/src/engine/src/tasks/executors/builders/kaniko/Kaniko.py @@ -8,8 +8,8 @@ KANIKO_IMAGE_URL, KANIKO_IMAGE_TAG ) -from core.tasks.BaseBuildExecutor import BaseBuildExecutor -from core.resources import ConfigMapResource, JobResource +from tasks.BaseBuildExecutor import BaseBuildExecutor +from resources import ConfigMapResource, JobResource from utils import get_flavor, lbuffer_str as lbuf from utils.k8s import flavor_to_k8s_resource_reqs, gen_resource_name from errors import WorkflowTerminated diff --git a/src/engine/src/tasks/executors/builders/kaniko/__init__.py b/src/engine/src/tasks/executors/builders/kaniko/__init__.py new file mode 100644 index 00000000..a84df007 --- /dev/null +++ b/src/engine/src/tasks/executors/builders/kaniko/__init__.py @@ -0,0 +1 @@ +from tasks.executors.builders.kaniko.Kaniko import Kaniko \ No newline at end of file diff --git a/src/engine/src/core/tasks/executors/builders/singularity/Singularity.py b/src/engine/src/tasks/executors/builders/singularity/Singularity.py similarity index 96% rename from src/engine/src/core/tasks/executors/builders/singularity/Singularity.py rename to src/engine/src/tasks/executors/builders/singularity/Singularity.py index b7d72e16..cc54a95b 100644 --- a/src/engine/src/core/tasks/executors/builders/singularity/Singularity.py +++ b/src/engine/src/tasks/executors/builders/singularity/Singularity.py @@ -13,9 +13,9 @@ ) from conf.constants import KUBERNETES_NAMESPACE, WORKFLOW_NFS_SERVER -from core.resources import JobResource -from core.tasks.BaseBuildExecutor import BaseBuildExecutor -from core.tasks.executors.builders.singularity.helpers.ContainerBuilder import container_builder +from resources import JobResource +from tasks.BaseBuildExecutor import BaseBuildExecutor +from tasks.executors.builders.singularity.helpers.ContainerBuilder import container_builder from errors import WorkflowTerminated from utils.k8s import gen_resource_name diff --git a/src/engine/src/tasks/executors/builders/singularity/__init__.py b/src/engine/src/tasks/executors/builders/singularity/__init__.py new file mode 100644 index 00000000..1b3e57e2 --- /dev/null +++ b/src/engine/src/tasks/executors/builders/singularity/__init__.py @@ -0,0 +1 @@ +from tasks.executors.builders.singularity.Singularity import Singularity \ No newline at end of file diff --git a/src/engine/src/core/tasks/executors/builders/singularity/helpers/ContainerBuilder.py b/src/engine/src/tasks/executors/builders/singularity/helpers/ContainerBuilder.py similarity index 100% rename from src/engine/src/core/tasks/executors/builders/singularity/helpers/ContainerBuilder.py rename to src/engine/src/tasks/executors/builders/singularity/helpers/ContainerBuilder.py diff --git a/src/engine/src/core/tasks/executors/requesters/HTTP.py b/src/engine/src/tasks/executors/requesters/HTTP.py similarity index 100% rename from src/engine/src/core/tasks/executors/requesters/HTTP.py rename to src/engine/src/tasks/executors/requesters/HTTP.py diff --git a/src/engine/src/core/tasks/function_bootstrap.py b/src/engine/src/tasks/function_bootstrap.py similarity index 100% rename from src/engine/src/core/tasks/function_bootstrap.py rename to src/engine/src/tasks/function_bootstrap.py diff --git a/src/engine/src/core/templating/TemplateMapper.py b/src/engine/src/templating/TemplateMapper.py similarity index 98% rename from src/engine/src/core/templating/TemplateMapper.py rename to src/engine/src/templating/TemplateMapper.py index 6d49369a..b39f62ce 100644 --- a/src/engine/src/core/templating/TemplateMapper.py +++ b/src/engine/src/templating/TemplateMapper.py @@ -1,6 +1,6 @@ from typing import Union -from core.repositories import TemplateRepository +from repositories import TemplateRepository from owe_python_sdk.schema import ( Uses, Pipeline, diff --git a/src/engine/src/templating/__init__.py b/src/engine/src/templating/__init__.py new file mode 100644 index 00000000..151737d8 --- /dev/null +++ b/src/engine/src/templating/__init__.py @@ -0,0 +1 @@ +from templating.TemplateMapper import TemplateMapper \ No newline at end of file diff --git a/src/engine/src/tests/TestConditionalExpressionEvaluator.py b/src/engine/src/tests/TestConditionalExpressionEvaluator.py index 96414c00..383817e7 100644 --- a/src/engine/src/tests/TestConditionalExpressionEvaluator.py +++ b/src/engine/src/tests/TestConditionalExpressionEvaluator.py @@ -2,7 +2,7 @@ from unittest.mock import Mock -from core.expressions import ( +from expressions import ( ConditionalExpressionEvaluator, ) diff --git a/src/engine/src/tests/TestIOCContainerFactory.py b/src/engine/src/tests/TestIOCContainerFactory.py index 14f59518..d731ca23 100644 --- a/src/engine/src/tests/TestIOCContainerFactory.py +++ b/src/engine/src/tests/TestIOCContainerFactory.py @@ -1,7 +1,7 @@ import unittest -from core.ioc import IOCContainerFactory -from core.daos import WorkflowExecutorStateDAO +from ioc import IOCContainerFactory +from daos import WorkflowExecutorStateDAO class TestIOCContainerFactory(unittest.TestCase): diff --git a/src/engine/src/tests/TestReactiveState.py b/src/engine/src/tests/TestReactiveState.py index 4f1b9e91..fe0787be 100644 --- a/src/engine/src/tests/TestReactiveState.py +++ b/src/engine/src/tests/TestReactiveState.py @@ -1,7 +1,7 @@ import unittest -from core.ioc import IOCContainerFactory -from core.daos import WorkflowExecutorStateDAO +from ioc import IOCContainerFactory +from daos import WorkflowExecutorStateDAO class TestIOCContainerFactory(unittest.TestCase): diff --git a/src/engine/src/tests/TestTaskRepository.py b/src/engine/src/tests/TestTaskRepository.py index 61e71954..cf89d9f1 100644 --- a/src/engine/src/tests/TestTaskRepository.py +++ b/src/engine/src/tests/TestTaskRepository.py @@ -2,7 +2,7 @@ from unittest.mock import Mock -from core.repositories import TaskRepository +from repositories import TaskRepository class TestTaskRepository(unittest.TestCase): diff --git a/src/engine/src/tests/testserver.py b/src/engine/src/tests/testserver.py index fbb6d7e7..15b485c4 100644 --- a/src/engine/src/tests/testserver.py +++ b/src/engine/src/tests/testserver.py @@ -1,6 +1,6 @@ import unittest -from core.Server import Server +from Server import Server class TestServer(unittest.TestCase): diff --git a/src/engine/src/utils/__init__.py b/src/engine/src/utils/__init__.py index 9fc81d45..3dda5a1d 100644 --- a/src/engine/src/utils/__init__.py +++ b/src/engine/src/utils/__init__.py @@ -4,7 +4,7 @@ from conf.constants import FLAVORS # from errors import InvalidFlavorError -from core.tasks.Flavor import Flavor +from tasks.Flavor import Flavor from utils.CompositeLogger import CompositeLogger # NOTE imported to re-export diff --git a/src/engine/src/utils/k8s.py b/src/engine/src/utils/k8s.py index 5f06a028..4ec17af9 100644 --- a/src/engine/src/utils/k8s.py +++ b/src/engine/src/utils/k8s.py @@ -2,7 +2,7 @@ from uuid import uuid4 -from core.tasks.Flavor import Flavor +from tasks.Flavor import Flavor from conf.constants import IS_LOCAL diff --git a/src/engine/src/core/workers/Worker.py b/src/engine/src/workers/Worker.py similarity index 100% rename from src/engine/src/core/workers/Worker.py rename to src/engine/src/workers/Worker.py diff --git a/src/engine/src/core/workers/WorkerPool.py b/src/engine/src/workers/WorkerPool.py similarity index 98% rename from src/engine/src/core/workers/WorkerPool.py rename to src/engine/src/workers/WorkerPool.py index 4ae302ea..714581d2 100644 --- a/src/engine/src/core/workers/WorkerPool.py +++ b/src/engine/src/workers/WorkerPool.py @@ -2,7 +2,7 @@ from threading import Lock from errors import WorkerLimitExceed, NoAvailableWorkers -from core.workers import Worker +from workers import Worker class WorkerPool: diff --git a/src/engine/src/workers/__init__.py b/src/engine/src/workers/__init__.py new file mode 100644 index 00000000..126276f9 --- /dev/null +++ b/src/engine/src/workers/__init__.py @@ -0,0 +1,2 @@ +from workers.Worker import Worker +from workers.WorkerPool import WorkerPool \ No newline at end of file diff --git a/src/engine/src/core/workflows/GraphValidator.py b/src/engine/src/workflows/GraphValidator.py similarity index 100% rename from src/engine/src/core/workflows/GraphValidator.py rename to src/engine/src/workflows/GraphValidator.py diff --git a/src/engine/src/core/workflows/ValueFromService.py b/src/engine/src/workflows/ValueFromService.py similarity index 97% rename from src/engine/src/core/workflows/ValueFromService.py rename to src/engine/src/workflows/ValueFromService.py index 201bff55..e78f98c4 100644 --- a/src/engine/src/core/workflows/ValueFromService.py +++ b/src/engine/src/workflows/ValueFromService.py @@ -1,7 +1,7 @@ from typing import List from owe_python_sdk.Plugin import Plugin -from core.repositories import ( +from repositories import ( TaskOutputRepository, TaskRepository, EnvRepository, diff --git a/src/engine/src/core/workflows/WorkflowExecutor.py b/src/engine/src/workflows/WorkflowExecutor.py similarity index 99% rename from src/engine/src/core/workflows/WorkflowExecutor.py rename to src/engine/src/workflows/WorkflowExecutor.py index 856e66ae..892b556c 100644 --- a/src/engine/src/core/workflows/WorkflowExecutor.py +++ b/src/engine/src/workflows/WorkflowExecutor.py @@ -4,7 +4,7 @@ from uuid import uuid4 from pathlib import Path -from core.tasks.TaskExecutorFactory import task_executor_factory as factory +from tasks.TaskExecutorFactory import task_executor_factory as factory from owe_python_sdk.TaskResult import TaskResult from owe_python_sdk.TaskExecutor import TaskExecutor from owe_python_sdk.constants import STDERR, STDOUT @@ -20,7 +20,7 @@ PIPELINE_STAGING, TASK_STAGING, TASK_ACTIVE, TASK_COMPLETED, TASK_FAILED, TASK_SKIPPED ) -from core.templating import TemplateMapper +from templating import TemplateMapper from errors.tasks import ( InvalidTaskTypeError, MissingInitialTasksError, @@ -29,13 +29,13 @@ ConditionalExpressionEvalError, TaskInputStagingError ) -from core.middleware.archivers import S3Archiver, IRODSArchiver +from middleware.archivers import S3Archiver, IRODSArchiver from conf.constants import BASE_WORK_DIR -from core.workers import Worker -from core.state import Hook, method_hook +from workers import Worker +from state import Hook, method_hook -from core.workflows import params_validator -from core.ioc import IOCContainerFactory +from workflows import params_validator +from ioc import IOCContainerFactory from utils import lbuffer_str as lbuf, CompositeLogger diff --git a/src/engine/src/workflows/__init__.py b/src/engine/src/workflows/__init__.py new file mode 100644 index 00000000..21c38cc5 --- /dev/null +++ b/src/engine/src/workflows/__init__.py @@ -0,0 +1,4 @@ +from workflows.GraphValidator import GraphValidator +from workflows.params_validator import params_validator +from workflows.ValueFromService import ValueFromService +from workflows.WorkflowExecutor import WorkflowExecutor \ No newline at end of file diff --git a/src/engine/src/core/workflows/params_validator.py b/src/engine/src/workflows/params_validator.py similarity index 100% rename from src/engine/src/core/workflows/params_validator.py rename to src/engine/src/workflows/params_validator.py