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

Function bootstrap_runtime

scripts/runtime_bootstrap.py:160–180  ·  view source on GitHub ↗
(root_dir: Path = PROJECT_ROOT, verbose: bool = True)

Source from the content-addressed store, hash-verified

158
159
160def bootstrap_runtime(root_dir: Path = PROJECT_ROOT, verbose: bool = True) -> Dict[str, Any]:
161 ensure_runtime_dirs(root_dir)
162 roles_path = ensure_roles_file(root_dir)
163 db_path = ensure_database(root_dir)
164 profile_result = ensure_role_profiles(root_dir)
165
166 result = {
167 "root_dir": root_dir,
168 "roles_path": roles_path,
169 "db_path": db_path,
170 "profile_result": profile_result,
171 }
172
173 if verbose:
174 print(f"[OK] Runtime directories ready: {root_dir}")
175 print(f"[OK] Roles config ready: {roles_path}")
176 print(f"[OK] Database ready: {db_path}")
177 if profile_result["created"]:
178 print(f"[OK] Created role profiles: {', '.join(profile_result['created'])}")
179
180 return result
181
182
183if __name__ == "__main__":

Callers 1

Calls 4

ensure_roles_fileFunction · 0.85
ensure_databaseFunction · 0.85
ensure_role_profilesFunction · 0.85
ensure_runtime_dirsFunction · 0.70

Tested by

no test coverage detected