Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions concore_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from .commands.stop import stop_all
from .commands.inspect import inspect_workflow
from .commands.watch import watch_study
from .commands.doctor import doctor_check
from . import __version__

console = Console()
Expand Down Expand Up @@ -118,5 +119,17 @@ def watch(study_dir, interval, once):
sys.exit(1)


@cli.command()
def doctor():
"""Check system readiness for running concore studies"""
try:
ok = doctor_check(console)
if not ok:
sys.exit(1)
except Exception as e:
console.print(f"[red]Error:[/red] {str(e)}")
sys.exit(1)


if __name__ == "__main__":
cli()
2 changes: 2 additions & 0 deletions concore_cli/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from .status import show_status
from .stop import stop_all
from .watch import watch_study
from .doctor import doctor_check

__all__ = [
"init_project",
Expand All @@ -12,4 +13,5 @@
"show_status",
"stop_all",
"watch_study",
"doctor_check",
]
Loading