Skip to content

Commit a57666b

Browse files
authored
Merge pull request #499 from GaneshPatil7517/feature/concore-doctor-command
feat: add `concore doctor` command for system readiness checks
2 parents b63d04a + 888f143 commit a57666b

File tree

4 files changed

+639
-0
lines changed

4 files changed

+639
-0
lines changed

concore_cli/cli.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from .commands.stop import stop_all
1111
from .commands.inspect import inspect_workflow
1212
from .commands.watch import watch_study
13+
from .commands.doctor import doctor_check
1314
from . import __version__
1415

1516
console = Console()
@@ -118,5 +119,17 @@ def watch(study_dir, interval, once):
118119
sys.exit(1)
119120

120121

122+
@cli.command()
123+
def doctor():
124+
"""Check system readiness for running concore studies"""
125+
try:
126+
ok = doctor_check(console)
127+
if not ok:
128+
sys.exit(1)
129+
except Exception as e:
130+
console.print(f"[red]Error:[/red] {str(e)}")
131+
sys.exit(1)
132+
133+
121134
if __name__ == "__main__":
122135
cli()

concore_cli/commands/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
from .status import show_status
55
from .stop import stop_all
66
from .watch import watch_study
7+
from .doctor import doctor_check
78

89
__all__ = [
910
"init_project",
@@ -12,4 +13,5 @@
1213
"show_status",
1314
"stop_all",
1415
"watch_study",
16+
"doctor_check",
1517
]

0 commit comments

Comments
 (0)