diff --git a/stack_orchestrator/base.py b/stack_orchestrator/base.py index ba3504ba..811d085d 100644 --- a/stack_orchestrator/base.py +++ b/stack_orchestrator/base.py @@ -15,7 +15,7 @@ import os from abc import ABC, abstractmethod -from app.deploy.deploy import get_stack_status +from stack_orchestrator.deploy.deploy import get_stack_status from decouple import config diff --git a/stack_orchestrator/build/build_containers.py b/stack_orchestrator/build/build_containers.py index ee74b807..31ed2efc 100644 --- a/stack_orchestrator/build/build_containers.py +++ b/stack_orchestrator/build/build_containers.py @@ -27,8 +27,8 @@ import subprocess import click import importlib.resources from pathlib import Path -from app.util import include_exclude_check, get_parsed_stack_config -from app.base import get_npm_registry_url +from stack_orchestrator.util import include_exclude_check, get_parsed_stack_config +from stack_orchestrator.base import get_npm_registry_url # TODO: find a place for this # epilog="Config provided either in .env or settings.ini or env vars: CERC_REPO_BASE_DIR (defaults to ~/cerc)" diff --git a/stack_orchestrator/build/build_npms.py b/stack_orchestrator/build/build_npms.py index 2ffbea1b..9e6390ac 100644 --- a/stack_orchestrator/build/build_npms.py +++ b/stack_orchestrator/build/build_npms.py @@ -25,8 +25,8 @@ from decouple import config import click import importlib.resources from python_on_whales import docker, DockerException -from app.base import get_stack -from app.util import include_exclude_check, get_parsed_stack_config +from stack_orchestrator.base import get_stack +from stack_orchestrator.util import include_exclude_check, get_parsed_stack_config builder_js_image_name = "cerc/builder-js:local" diff --git a/stack_orchestrator/data/stacks/mainnet-laconic/deploy/commands.py b/stack_orchestrator/data/stacks/mainnet-laconic/deploy/commands.py index 030200f1..b611a0d6 100644 --- a/stack_orchestrator/data/stacks/mainnet-laconic/deploy/commands.py +++ b/stack_orchestrator/data/stacks/mainnet-laconic/deploy/commands.py @@ -13,11 +13,11 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -from app.util import get_yaml -from app.deploy.deploy_types import DeployCommandContext, LaconicStackSetupCommand, DeploymentContext -from app.deploy.stack_state import State -from app.deploy.deploy_util import VolumeMapping, run_container_command -from app.command_types import CommandOptions +from stack_orchestrator.util import get_yaml +from stack_orchestrator.deploy.deploy_types import DeployCommandContext, LaconicStackSetupCommand, DeploymentContext +from stack_orchestrator.deploy.stack_state import State +from stack_orchestrator.deploy.deploy_util import VolumeMapping, run_container_command +from stack_orchestrator.command_types import CommandOptions from enum import Enum from pathlib import Path from shutil import copyfile, copytree diff --git a/stack_orchestrator/data/stacks/test/deploy/commands.py b/stack_orchestrator/data/stacks/test/deploy/commands.py index 2eebeea2..e6601eae 100644 --- a/stack_orchestrator/data/stacks/test/deploy/commands.py +++ b/stack_orchestrator/data/stacks/test/deploy/commands.py @@ -13,10 +13,10 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -from app.util import get_yaml -from app.deploy.deploy_types import DeployCommandContext -from app.deploy.stack_state import State -from app.deploy.deploy_util import VolumeMapping, run_container_command +from stack_orchestrator.util import get_yaml +from stack_orchestrator.deploy.deploy_types import DeployCommandContext +from stack_orchestrator.deploy.stack_state import State +from stack_orchestrator.deploy.deploy_util import VolumeMapping, run_container_command from pathlib import Path default_spec_file_content = """config: diff --git a/stack_orchestrator/deploy/compose/deploy_docker.py b/stack_orchestrator/deploy/compose/deploy_docker.py index e8ee4b9f..1e5f5f81 100644 --- a/stack_orchestrator/deploy/compose/deploy_docker.py +++ b/stack_orchestrator/deploy/compose/deploy_docker.py @@ -15,7 +15,7 @@ from pathlib import Path from python_on_whales import DockerClient, DockerException -from app.deploy.deployer import Deployer, DeployerException, DeployerConfigGenerator +from stack_orchestrator.deploy.deployer import Deployer, DeployerException, DeployerConfigGenerator class DockerDeployer(Deployer): diff --git a/stack_orchestrator/deploy/deploy.py b/stack_orchestrator/deploy/deploy.py index a2d7cc01..b70ea989 100644 --- a/stack_orchestrator/deploy/deploy.py +++ b/stack_orchestrator/deploy/deploy.py @@ -24,13 +24,13 @@ from importlib import resources import subprocess import click from pathlib import Path -from app.util import include_exclude_check, get_parsed_stack_config, global_options2, get_dev_root_path -from app.deploy.deployer import Deployer, DeployerException -from app.deploy.deployer_factory import getDeployer -from app.deploy.deploy_types import ClusterContext, DeployCommandContext -from app.deploy.deployment_create import create as deployment_create -from app.deploy.deployment_create import init as deployment_init -from app.deploy.deployment_create import setup as deployment_setup +from stack_orchestrator.util import include_exclude_check, get_parsed_stack_config, global_options2, get_dev_root_path +from stack_orchestrator.deploy.deployer import Deployer, DeployerException +from stack_orchestrator.deploy.deployer_factory import getDeployer +from stack_orchestrator.deploy.deploy_types import ClusterContext, DeployCommandContext +from stack_orchestrator.deploy.deployment_create import create as deployment_create +from stack_orchestrator.deploy.deployment_create import init as deployment_init +from stack_orchestrator.deploy.deployment_create import setup as deployment_setup @click.group() diff --git a/stack_orchestrator/deploy/deploy_types.py b/stack_orchestrator/deploy/deploy_types.py index 16b5c313..b0c59380 100644 --- a/stack_orchestrator/deploy/deploy_types.py +++ b/stack_orchestrator/deploy/deploy_types.py @@ -16,8 +16,8 @@ from typing import List from dataclasses import dataclass from pathlib import Path -from app.command_types import CommandOptions -from app.deploy.deployer import Deployer +from stack_orchestrator.command_types import CommandOptions +from stack_orchestrator.deploy.deployer import Deployer @dataclass diff --git a/stack_orchestrator/deploy/deploy_util.py b/stack_orchestrator/deploy/deploy_util.py index 4a1ffbfe..9829490d 100644 --- a/stack_orchestrator/deploy/deploy_util.py +++ b/stack_orchestrator/deploy/deploy_util.py @@ -15,8 +15,8 @@ import os from typing import List -from app.deploy.deploy_types import DeployCommandContext, VolumeMapping -from app.util import get_parsed_stack_config, get_yaml, get_compose_file_dir, get_pod_list +from stack_orchestrator.deploy.deploy_types import DeployCommandContext, VolumeMapping +from stack_orchestrator.util import get_parsed_stack_config, get_yaml, get_compose_file_dir, get_pod_list def _container_image_from_service(stack: str, service: str): diff --git a/stack_orchestrator/deploy/deployer_factory.py b/stack_orchestrator/deploy/deployer_factory.py index 0c0ef69d..262fa2dd 100644 --- a/stack_orchestrator/deploy/deployer_factory.py +++ b/stack_orchestrator/deploy/deployer_factory.py @@ -13,8 +13,8 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -from app.deploy.k8s.deploy_k8s import K8sDeployer, K8sDeployerConfigGenerator -from app.deploy.compose.deploy_docker import DockerDeployer, DockerDeployerConfigGenerator +from stack_orchestrator.deploy.k8s.deploy_k8s import K8sDeployer, K8sDeployerConfigGenerator +from stack_orchestrator.deploy.compose.deploy_docker import DockerDeployer, DockerDeployerConfigGenerator def getDeployerConfigGenerator(type: str): diff --git a/stack_orchestrator/deploy/deployment.py b/stack_orchestrator/deploy/deployment.py index b1b4a486..c6656b01 100644 --- a/stack_orchestrator/deploy/deployment.py +++ b/stack_orchestrator/deploy/deployment.py @@ -16,10 +16,10 @@ import click from pathlib import Path import sys -from app.deploy.deploy import up_operation, down_operation, ps_operation, port_operation -from app.deploy.deploy import exec_operation, logs_operation, create_deploy_context -from app.deploy.stack import Stack -from app.deploy.spec import Spec +from stack_orchestrator.deploy.deploy import up_operation, down_operation, ps_operation, port_operation +from stack_orchestrator.deploy.deploy import exec_operation, logs_operation, create_deploy_context +from stack_orchestrator.deploy.stack import Stack +from stack_orchestrator.deploy.spec import Spec class DeploymentContext: diff --git a/stack_orchestrator/deploy/deployment_create.py b/stack_orchestrator/deploy/deployment_create.py index 4f297286..8a2237a8 100644 --- a/stack_orchestrator/deploy/deployment_create.py +++ b/stack_orchestrator/deploy/deployment_create.py @@ -21,10 +21,11 @@ from typing import List import random from shutil import copy, copyfile, copytree import sys -from app.util import (get_stack_file_path, get_parsed_deployment_spec, get_parsed_stack_config, global_options, get_yaml, - get_pod_list, get_pod_file_path, pod_has_scripts, get_pod_script_paths, get_plugin_code_paths) -from app.deploy.deploy_types import DeploymentContext, DeployCommandContext, LaconicStackSetupCommand -from app.deploy.deployer_factory import getDeployerConfigGenerator +from stack_orchestrator.util import (get_stack_file_path, get_parsed_deployment_spec, get_parsed_stack_config, + global_options, get_yaml, get_pod_list, get_pod_file_path, pod_has_scripts, + get_pod_script_paths, get_plugin_code_paths) +from stack_orchestrator.deploy.deploy_types import DeploymentContext, DeployCommandContext, LaconicStackSetupCommand +from stack_orchestrator.deploy.deployer_factory import getDeployerConfigGenerator def _make_default_deployment_dir(): diff --git a/stack_orchestrator/deploy/k8s/cluster_info.py b/stack_orchestrator/deploy/k8s/cluster_info.py index dfb1ef53..5d785a01 100644 --- a/stack_orchestrator/deploy/k8s/cluster_info.py +++ b/stack_orchestrator/deploy/k8s/cluster_info.py @@ -16,9 +16,9 @@ from kubernetes import client from typing import Any, List, Set -from app.opts import opts -from app.deploy.k8s.helpers import named_volumes_from_pod_files, volume_mounts_for_service, volumes_for_pod_files -from app.deploy.k8s.helpers import parsed_pod_files_map_from_file_names +from stack_orchestrator.opts import opts +from stack_orchestrator.deploy.k8s.helpers import named_volumes_from_pod_files, volume_mounts_for_service, volumes_for_pod_files +from stack_orchestrator.deploy.k8s.helpers import parsed_pod_files_map_from_file_names class ClusterInfo: diff --git a/stack_orchestrator/deploy/k8s/deploy_k8s.py b/stack_orchestrator/deploy/k8s/deploy_k8s.py index 16b5f0b4..a5167185 100644 --- a/stack_orchestrator/deploy/k8s/deploy_k8s.py +++ b/stack_orchestrator/deploy/k8s/deploy_k8s.py @@ -16,11 +16,11 @@ from pathlib import Path from kubernetes import client, config -from app.deploy.deployer import Deployer, DeployerConfigGenerator -from app.deploy.k8s.helpers import create_cluster, destroy_cluster, load_images_into_kind -from app.deploy.k8s.helpers import pods_in_deployment, log_stream_from_string, generate_kind_config -from app.deploy.k8s.cluster_info import ClusterInfo -from app.opts import opts +from stack_orchestrator.deploy.deployer import Deployer, DeployerConfigGenerator +from stack_orchestrator.deploy.k8s.helpers import create_cluster, destroy_cluster, load_images_into_kind +from stack_orchestrator.deploy.k8s.helpers import pods_in_deployment, log_stream_from_string, generate_kind_config +from stack_orchestrator.deploy.k8s.cluster_info import ClusterInfo +from stack_orchestrator.opts import opts class K8sDeployer(Deployer): diff --git a/stack_orchestrator/deploy/k8s/helpers.py b/stack_orchestrator/deploy/k8s/helpers.py index 6194ac5e..8536a521 100644 --- a/stack_orchestrator/deploy/k8s/helpers.py +++ b/stack_orchestrator/deploy/k8s/helpers.py @@ -18,8 +18,8 @@ from pathlib import Path import subprocess from typing import Any, Set -from app.opts import opts -from app.util import get_yaml +from stack_orchestrator.opts import opts +from stack_orchestrator.util import get_yaml def _run_command(command: str): diff --git a/stack_orchestrator/deploy/spec.py b/stack_orchestrator/deploy/spec.py index a23bc167..9ee893b9 100644 --- a/stack_orchestrator/deploy/spec.py +++ b/stack_orchestrator/deploy/spec.py @@ -15,7 +15,7 @@ from pathlib import Path import typing -from app.util import get_yaml +from stack_orchestrator.util import get_yaml class Spec: diff --git a/stack_orchestrator/deploy/stack.py b/stack_orchestrator/deploy/stack.py index 1f94acdf..e0d33851 100644 --- a/stack_orchestrator/deploy/stack.py +++ b/stack_orchestrator/deploy/stack.py @@ -15,7 +15,7 @@ from pathlib import Path import typing -from app.util import get_yaml +from stack_orchestrator.util import get_yaml class Stack: diff --git a/stack_orchestrator/main.py b/stack_orchestrator/main.py index 38bdddd9..6fe62b09 100644 --- a/stack_orchestrator/main.py +++ b/stack_orchestrator/main.py @@ -15,13 +15,13 @@ import click -from app.command_types import CommandOptions -from app.repos import setup_repositories -from app.build import build_containers -from app.build import build_npms -from app.deploy import deploy +from stack_orchestrator.command_types import CommandOptions +from stack_orchestrator.repos import setup_repositories +from stack_orchestrator.build import build_containers +from stack_orchestrator.build import build_npms +from stack_orchestrator.deploy import deploy from app import version -from app.deploy import deployment +from stack_orchestrator.deploy import deployment from app import opts from app import update diff --git a/stack_orchestrator/opts.py b/stack_orchestrator/opts.py index 193637c2..665da535 100644 --- a/stack_orchestrator/opts.py +++ b/stack_orchestrator/opts.py @@ -13,7 +13,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -from app.command_types import CommandOptions +from stack_orchestrator.command_types import CommandOptions class opts: diff --git a/stack_orchestrator/repos/setup_repositories.py b/stack_orchestrator/repos/setup_repositories.py index 0ce11670..a32fa4ea 100644 --- a/stack_orchestrator/repos/setup_repositories.py +++ b/stack_orchestrator/repos/setup_repositories.py @@ -25,7 +25,7 @@ import click import importlib.resources from pathlib import Path import yaml -from app.util import include_exclude_check +from stack_orchestrator.util import include_exclude_check class GitProgress(git.RemoteProgress): diff --git a/stack_orchestrator/update.py b/stack_orchestrator/update.py index 9f70b06e..a41eabae 100644 --- a/stack_orchestrator/update.py +++ b/stack_orchestrator/update.py @@ -23,7 +23,7 @@ import sys import stat import shutil import validators -from app.util import get_yaml +from stack_orchestrator.util import get_yaml def _download_url(url: str, file_path: Path):