c2743251e9
Self-evolving AI scientist framework built on LangGraph/LangChain with CLI/TUI core, FastAPI gateway, and Next.js frontend. Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
24 lines
836 B
Python
24 lines
836 B
Python
"""One-time cleanup: delete old `~/.evoscientist/runs/` directories.
|
|
|
|
Run after migration to confirm all threads use ``data/`` instead of ``runs/``.
|
|
"""
|
|
import shutil
|
|
from pathlib import Path
|
|
|
|
runs_dir = Path.home() / ".evoscientist" / "runs"
|
|
if not runs_dir.exists():
|
|
print("No old runs/ directory found. Nothing to clean.")
|
|
else:
|
|
total = sum(1 for d in runs_dir.iterdir() if d.is_dir())
|
|
print(f"Found {total} user directories in runs/")
|
|
for user_dir in runs_dir.iterdir():
|
|
if user_dir.is_dir():
|
|
n_threads = sum(1 for t in user_dir.iterdir() if t.is_dir())
|
|
print(f" {user_dir.name}: {n_threads} threads")
|
|
confirm = input(f"\nDelete entire {runs_dir}? [y/N] ")
|
|
if confirm.lower() == "y":
|
|
shutil.rmtree(runs_dir)
|
|
print("Done.")
|
|
else:
|
|
print("Skipped.")
|