Skip to content

Commit ae39be0

Browse files
feat: add concore doctor command for system readiness checks
Implements a new 'concore doctor' CLI command that performs comprehensive system readiness diagnostics including: - Core checks: Python version, concore installation, CONCOREPATH - Tool detection: C++, Python, Verilog, Octave, MATLAB, Docker - Configuration file validation (concore.tools, .octave, .mcr, .sudo) - Environment variable detection for tool overrides - Dependency checks for required and optional packages Includes 23 unit tests covering all diagnostic functions. Closes #495
1 parent b63d04a commit ae39be0

4 files changed

Lines changed: 665 additions & 0 deletions

File tree

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)