removed TUI and others

This commit is contained in:
2026-05-14 20:47:20 -07:00
parent 036977832b
commit 717cb13dda
31 changed files with 378 additions and 7790 deletions
+7 -66
View File
@@ -222,72 +222,13 @@ def _run_cli(clean_args: List[str]) -> int:
def _run_gui(clean_args: List[str]) -> int:
"""Run the TUI runner (PipelineHubApp).
The TUI is imported lazily; if Textual or the TUI code is unavailable we
give a helpful error message and exit nonzero.
"""
try:
repo_root = _ensure_repo_root_on_sys_path()
tui_mod: Optional[ModuleType] = None
selected_module: Optional[str] = None
last_exc: Optional[Exception] = None
def _load_from_file(path: Path) -> ModuleType:
spec = importlib.util.spec_from_file_location(
"medeia_tui_entry",
path,
submodule_search_locations=[str(path.parent)],
)
if spec is None or spec.loader is None:
raise ModuleNotFoundError(f"Cannot load TUI from {path}")
module = importlib.util.module_from_spec(spec)
sys.modules[spec.name] = module
spec.loader.exec_module(module) # type: ignore[attr-defined]
return module
if repo_root is not None:
tui_file = repo_root / "TUI.py"
if tui_file.exists():
try:
tui_mod = _load_from_file(tui_file)
selected_module = str(tui_file)
except Exception as exc:
last_exc = exc
if tui_mod is None:
for candidate in ("TUI.tui", "TUI"):
try:
tui_mod = importlib.import_module(candidate)
selected_module = candidate
break
except ModuleNotFoundError as exc:
last_exc = exc
if tui_mod is None:
raise last_exc or ModuleNotFoundError("No TUI module could be imported")
except Exception as exc:
print(
"Error: Unable to import TUI (Textual may not be installed):",
exc,
file=sys.stderr,
)
return 2
try:
PipelineHubApp = getattr(tui_mod, "PipelineHubApp")
except AttributeError:
module_hint = selected_module or "TUI"
print(
f"Error: '{module_hint}' does not expose 'PipelineHubApp'",
file=sys.stderr,
)
return 2
try:
app = PipelineHubApp()
app.run()
return 0
except SystemExit as exc:
return int(getattr(exc, "code", 0) or 0)
"""Report that the discontinued GUI/TUI mode is no longer available."""
_ = clean_args
print(
"Error: GUI/TUI mode has been discontinued and is no longer available.",
file=sys.stderr,
)
return 2
def main(argv: Optional[List[str]] = None) -> int: