Skip to content

Commit

Permalink
rename ioc to cmds
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesknap committed Feb 9, 2024
1 parent 6ad720e commit 86a9382
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/ec_cli/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import typer

import ec_cli.globals as globals
from ec_cli.ioc.ioc_cli import cli
from ec_cli.cmds.ioc_cli import cli

from . import __version__
from .logging import init_logging
Expand Down
2 changes: 1 addition & 1 deletion src/ec_cli/autocomplete.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

import ec_cli.globals as globals
import ec_cli.shell as shell
from ec_cli.cmds.k8s_commands import check_namespace
from ec_cli.docker import Docker
from ec_cli.git import create_ioc_graph
from ec_cli.ioc.k8s_commands import check_namespace
from ec_cli.logging import log
from ec_cli.utils import cleanup_temp

Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/ec_cli/ioc/ioc_cli.py → src/ec_cli/cmds/ioc_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
force_plain_completion,
running_iocs,
)
from ec_cli.cmds.k8s_commands import IocK8sCommands
from ec_cli.cmds.local_commands import IocLocalCommands
from ec_cli.git import create_ioc_graph
from ec_cli.ioc.k8s_commands import IocK8sCommands
from ec_cli.ioc.local_commands import IocLocalCommands
from ec_cli.logging import log
from ec_cli.utils import cleanup_temp, drop_ioc_path

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

import ec_cli.globals as globals
import ec_cli.shell as shell
from ec_cli.ioc.helm import Helm
from ec_cli.ioc.kubectl import json_service_info, json_service_types
from ec_cli.cmds.helm import Helm
from ec_cli.cmds.kubectl import json_service_info, json_service_types
from ec_cli.logging import log


Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

import ec_cli.globals as globals
import ec_cli.shell as shell
from ec_cli.cmds.k8s_commands import check_namespace
from ec_cli.docker import Docker
from ec_cli.ioc.k8s_commands import check_namespace
from ec_cli.logging import log
from ec_cli.shell import check_services_repo
from ec_cli.utils import (
Expand Down
7 changes: 2 additions & 5 deletions src/ec_cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,8 @@ def check_instance_path(ioc_path: Path):

log.info(f"checking IOC instance {ioc_name} at {ioc_path}")
if ioc_path.is_dir():
if (
not (ioc_path / "values.yaml").exists()
or not (ioc_path / globals.CONFIG_FOLDER).is_dir()
):
log.error("IOC instance requires values.yaml and config")
if not (ioc_path / "values.yaml").exists():
log.error("IOC instance requires values.yaml")
raise typer.Exit(1)
else:
log.error(f"IOC instance path {ioc_path} does not exist")
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from typer import Context
from typer.testing import CliRunner

from ec_cli.ioc.ioc_cli import cli
from ec_cli.__main__ import cli
from ec_cli.logging import log

TMPDIR = Path("/tmp/ec_tests")
Expand Down
2 changes: 1 addition & 1 deletion tests/data/iocs/bl45p-ea-ioc-01/config/ioc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# yaml-language-server: $schema=https://github.com/epics-containers/ioc-adaravis/releases/download/23.9.4/ibek.ioc.schema.json
# yaml-language-server: $schema=https://github.com/epics-containers/ioc-adaravis/releases/download/23.9.4/ibek.cmds.schema.json

ioc_name: bl45p-ea-ioc-01
description: Sample and overview cameras IOC for BL45P
Expand Down

0 comments on commit 86a9382

Please sign in to comment.