Skip to content

Commit

Permalink
re-add inspect command and information
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldcampbelljr committed Mar 12, 2024
1 parent 3d277c8 commit 98ef5f2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
10 changes: 4 additions & 6 deletions looper/cli_pydantic.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import logmuse
import pydantic2_argparse
import yaml
from eido import inspect_project
from pephubclient import PEPHubClient
from pydantic2_argparse.argparse.parser import ArgumentParser

Expand Down Expand Up @@ -288,12 +289,9 @@ def run_looper(args: TopLevelParser, parser: ArgumentParser, test_args=None):
return Cleaner(prj)(subcommand_args)

if subcommand_name == "inspect":
from warnings import warn

warn(
"The inspect feature has moved to eido."
"Use `eido inspect` from now on.",
)
# Inspects project from eido
inspect_project(p, args.sample_names, args.attr_limit)
# TODO add inspecting looper config: https://github.com/pepkit/looper/issues/462


def main(test_args=None) -> None:
Expand Down
2 changes: 1 addition & 1 deletion looper/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def _get_apperance_dict(type, templ=APPEARANCE_BY_FLAG):
"destroy": "Remove output files of the project.",
"check": "Check flag status of current runs.",
"clean": "Run clean scripts of already processed jobs.",
"inspect": "Deprecated. Use `eido inspect` instead. Print information about a project.",
"inspect": "Print information about a project.",
"init": "Initialize looper config file.",
"init-piface": "Initialize generic pipeline interface.",
"link": "Create directory of symlinks for reported results.",
Expand Down
13 changes: 13 additions & 0 deletions tests/smoketests/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,3 +527,16 @@ def test_including_toggle_attr(
subs_list = [os.path.join(sd, f) for f in os.listdir(sd) if f.endswith(".sub")]

assert len(subs_list) == 3


@pytest.mark.skip(reason="Functionality not implemented.")
class TestLooperInspect:
@pytest.mark.parametrize("cmd", ["inspect"])
def test_inspect_config(self, prep_temp_pep, cmd):
"Checks inspect command"
tp = prep_temp_pep
x = [cmd, "--looper-config", tp]
try:
results = main(test_args=x)
except Exception:
raise pytest.fail("DID RAISE {0}".format(Exception))

0 comments on commit 98ef5f2

Please sign in to comment.