Rename imports

This commit is contained in:
David Boreham 2023-11-06 21:37:54 -07:00
parent 0e2224f275
commit 813fcbc20d
21 changed files with 58 additions and 57 deletions

View File

@ -15,7 +15,7 @@
import os import os
from abc import ABC, abstractmethod 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 from decouple import config

View File

@ -27,8 +27,8 @@ import subprocess
import click import click
import importlib.resources import importlib.resources
from pathlib import Path from pathlib import Path
from app.util import include_exclude_check, get_parsed_stack_config from stack_orchestrator.util import include_exclude_check, get_parsed_stack_config
from app.base import get_npm_registry_url from stack_orchestrator.base import get_npm_registry_url
# TODO: find a place for this # 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)" # epilog="Config provided either in .env or settings.ini or env vars: CERC_REPO_BASE_DIR (defaults to ~/cerc)"

View File

@ -25,8 +25,8 @@ from decouple import config
import click import click
import importlib.resources import importlib.resources
from python_on_whales import docker, DockerException from python_on_whales import docker, DockerException
from app.base import get_stack from stack_orchestrator.base import get_stack
from app.util import include_exclude_check, get_parsed_stack_config from stack_orchestrator.util import include_exclude_check, get_parsed_stack_config
builder_js_image_name = "cerc/builder-js:local" builder_js_image_name = "cerc/builder-js:local"

View File

@ -13,11 +13,11 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http:#www.gnu.org/licenses/>. # along with this program. If not, see <http:#www.gnu.org/licenses/>.
from app.util import get_yaml from stack_orchestrator.util import get_yaml
from app.deploy.deploy_types import DeployCommandContext, LaconicStackSetupCommand, DeploymentContext from stack_orchestrator.deploy.deploy_types import DeployCommandContext, LaconicStackSetupCommand, DeploymentContext
from app.deploy.stack_state import State from stack_orchestrator.deploy.stack_state import State
from app.deploy.deploy_util import VolumeMapping, run_container_command from stack_orchestrator.deploy.deploy_util import VolumeMapping, run_container_command
from app.command_types import CommandOptions from stack_orchestrator.command_types import CommandOptions
from enum import Enum from enum import Enum
from pathlib import Path from pathlib import Path
from shutil import copyfile, copytree from shutil import copyfile, copytree

View File

@ -13,10 +13,10 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http:#www.gnu.org/licenses/>. # along with this program. If not, see <http:#www.gnu.org/licenses/>.
from app.util import get_yaml from stack_orchestrator.util import get_yaml
from app.deploy.deploy_types import DeployCommandContext from stack_orchestrator.deploy.deploy_types import DeployCommandContext
from app.deploy.stack_state import State from stack_orchestrator.deploy.stack_state import State
from app.deploy.deploy_util import VolumeMapping, run_container_command from stack_orchestrator.deploy.deploy_util import VolumeMapping, run_container_command
from pathlib import Path from pathlib import Path
default_spec_file_content = """config: default_spec_file_content = """config:

View File

@ -15,7 +15,7 @@
from pathlib import Path from pathlib import Path
from python_on_whales import DockerClient, DockerException 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): class DockerDeployer(Deployer):

View File

@ -24,13 +24,13 @@ from importlib import resources
import subprocess import subprocess
import click import click
from pathlib import Path from pathlib import Path
from app.util import include_exclude_check, get_parsed_stack_config, global_options2, get_dev_root_path from stack_orchestrator.util import include_exclude_check, get_parsed_stack_config, global_options2, get_dev_root_path
from app.deploy.deployer import Deployer, DeployerException from stack_orchestrator.deploy.deployer import Deployer, DeployerException
from app.deploy.deployer_factory import getDeployer from stack_orchestrator.deploy.deployer_factory import getDeployer
from app.deploy.deploy_types import ClusterContext, DeployCommandContext from stack_orchestrator.deploy.deploy_types import ClusterContext, DeployCommandContext
from app.deploy.deployment_create import create as deployment_create from stack_orchestrator.deploy.deployment_create import create as deployment_create
from app.deploy.deployment_create import init as deployment_init from stack_orchestrator.deploy.deployment_create import init as deployment_init
from app.deploy.deployment_create import setup as deployment_setup from stack_orchestrator.deploy.deployment_create import setup as deployment_setup
@click.group() @click.group()

View File

@ -16,8 +16,8 @@
from typing import List from typing import List
from dataclasses import dataclass from dataclasses import dataclass
from pathlib import Path from pathlib import Path
from app.command_types import CommandOptions from stack_orchestrator.command_types import CommandOptions
from app.deploy.deployer import Deployer from stack_orchestrator.deploy.deployer import Deployer
@dataclass @dataclass

View File

@ -15,8 +15,8 @@
import os import os
from typing import List from typing import List
from app.deploy.deploy_types import DeployCommandContext, VolumeMapping from stack_orchestrator.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.util import get_parsed_stack_config, get_yaml, get_compose_file_dir, get_pod_list
def _container_image_from_service(stack: str, service: str): def _container_image_from_service(stack: str, service: str):

View File

@ -13,8 +13,8 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http:#www.gnu.org/licenses/>. # along with this program. If not, see <http:#www.gnu.org/licenses/>.
from app.deploy.k8s.deploy_k8s import K8sDeployer, K8sDeployerConfigGenerator from stack_orchestrator.deploy.k8s.deploy_k8s import K8sDeployer, K8sDeployerConfigGenerator
from app.deploy.compose.deploy_docker import DockerDeployer, DockerDeployerConfigGenerator from stack_orchestrator.deploy.compose.deploy_docker import DockerDeployer, DockerDeployerConfigGenerator
def getDeployerConfigGenerator(type: str): def getDeployerConfigGenerator(type: str):

View File

@ -16,10 +16,10 @@
import click import click
from pathlib import Path from pathlib import Path
import sys import sys
from app.deploy.deploy import up_operation, down_operation, ps_operation, port_operation from stack_orchestrator.deploy.deploy import up_operation, down_operation, ps_operation, port_operation
from app.deploy.deploy import exec_operation, logs_operation, create_deploy_context from stack_orchestrator.deploy.deploy import exec_operation, logs_operation, create_deploy_context
from app.deploy.stack import Stack from stack_orchestrator.deploy.stack import Stack
from app.deploy.spec import Spec from stack_orchestrator.deploy.spec import Spec
class DeploymentContext: class DeploymentContext:

View File

@ -21,10 +21,11 @@ from typing import List
import random import random
from shutil import copy, copyfile, copytree from shutil import copy, copyfile, copytree
import sys import sys
from app.util import (get_stack_file_path, get_parsed_deployment_spec, get_parsed_stack_config, global_options, get_yaml, from stack_orchestrator.util import (get_stack_file_path, get_parsed_deployment_spec, get_parsed_stack_config,
get_pod_list, get_pod_file_path, pod_has_scripts, get_pod_script_paths, get_plugin_code_paths) global_options, get_yaml, get_pod_list, get_pod_file_path, pod_has_scripts,
from app.deploy.deploy_types import DeploymentContext, DeployCommandContext, LaconicStackSetupCommand get_pod_script_paths, get_plugin_code_paths)
from app.deploy.deployer_factory import getDeployerConfigGenerator from stack_orchestrator.deploy.deploy_types import DeploymentContext, DeployCommandContext, LaconicStackSetupCommand
from stack_orchestrator.deploy.deployer_factory import getDeployerConfigGenerator
def _make_default_deployment_dir(): def _make_default_deployment_dir():

View File

@ -16,9 +16,9 @@
from kubernetes import client from kubernetes import client
from typing import Any, List, Set from typing import Any, List, Set
from app.opts import opts from stack_orchestrator.opts import opts
from app.deploy.k8s.helpers import named_volumes_from_pod_files, volume_mounts_for_service, volumes_for_pod_files from stack_orchestrator.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.deploy.k8s.helpers import parsed_pod_files_map_from_file_names
class ClusterInfo: class ClusterInfo:

View File

@ -16,11 +16,11 @@
from pathlib import Path from pathlib import Path
from kubernetes import client, config from kubernetes import client, config
from app.deploy.deployer import Deployer, DeployerConfigGenerator from stack_orchestrator.deploy.deployer import Deployer, DeployerConfigGenerator
from app.deploy.k8s.helpers import create_cluster, destroy_cluster, load_images_into_kind from stack_orchestrator.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 stack_orchestrator.deploy.k8s.helpers import pods_in_deployment, log_stream_from_string, generate_kind_config
from app.deploy.k8s.cluster_info import ClusterInfo from stack_orchestrator.deploy.k8s.cluster_info import ClusterInfo
from app.opts import opts from stack_orchestrator.opts import opts
class K8sDeployer(Deployer): class K8sDeployer(Deployer):

View File

@ -18,8 +18,8 @@ from pathlib import Path
import subprocess import subprocess
from typing import Any, Set from typing import Any, Set
from app.opts import opts from stack_orchestrator.opts import opts
from app.util import get_yaml from stack_orchestrator.util import get_yaml
def _run_command(command: str): def _run_command(command: str):

View File

@ -15,7 +15,7 @@
from pathlib import Path from pathlib import Path
import typing import typing
from app.util import get_yaml from stack_orchestrator.util import get_yaml
class Spec: class Spec:

View File

@ -15,7 +15,7 @@
from pathlib import Path from pathlib import Path
import typing import typing
from app.util import get_yaml from stack_orchestrator.util import get_yaml
class Stack: class Stack:

View File

@ -15,13 +15,13 @@
import click import click
from app.command_types import CommandOptions from stack_orchestrator.command_types import CommandOptions
from app.repos import setup_repositories from stack_orchestrator.repos import setup_repositories
from app.build import build_containers from stack_orchestrator.build import build_containers
from app.build import build_npms from stack_orchestrator.build import build_npms
from app.deploy import deploy from stack_orchestrator.deploy import deploy
from app import version from app import version
from app.deploy import deployment from stack_orchestrator.deploy import deployment
from app import opts from app import opts
from app import update from app import update

View File

@ -13,7 +13,7 @@
# You should have received a copy of the GNU Affero General Public License # You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http:#www.gnu.org/licenses/>. # along with this program. If not, see <http:#www.gnu.org/licenses/>.
from app.command_types import CommandOptions from stack_orchestrator.command_types import CommandOptions
class opts: class opts:

View File

@ -25,7 +25,7 @@ import click
import importlib.resources import importlib.resources
from pathlib import Path from pathlib import Path
import yaml import yaml
from app.util import include_exclude_check from stack_orchestrator.util import include_exclude_check
class GitProgress(git.RemoteProgress): class GitProgress(git.RemoteProgress):

View File

@ -23,7 +23,7 @@ import sys
import stat import stat
import shutil import shutil
import validators import validators
from app.util import get_yaml from stack_orchestrator.util import get_yaml
def _download_url(url: str, file_path: Path): def _download_url(url: str, file_path: Path):