MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / ensure_runtime_dirs

Function ensure_runtime_dirs

scripts/runtime_bootstrap.py:28–45  ·  view source on GitHub ↗
(root_dir: Path = PROJECT_ROOT)

Source from the content-addressed store, hash-verified

26
27
28def ensure_runtime_dirs(root_dir: Path = PROJECT_ROOT) -> Dict[str, Path]:
29 data_dir = root_dir / "data"
30 models_dir = root_dir / "models"
31 paths = {
32 "data_dir": data_dir,
33 "db_backups_dir": data_dir / "db_backups",
34 "embeddings_cache_dir": data_dir / "embeddings_cache",
35 "webhook_task_locks_dir": data_dir / "webhook_task_locks",
36 "models_dir": models_dir,
37 }
38
39 for path in paths.values():
40 path.mkdir(parents=True, exist_ok=True)
41
42 for keep_path in (data_dir / ".gitkeep", models_dir / ".gitkeep"):
43 keep_path.touch(exist_ok=True)
44
45 return paths
46
47
48def ensure_roles_file(root_dir: Path = PROJECT_ROOT) -> Path:

Callers 1

bootstrap_runtimeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected