(root_dir: Path = PROJECT_ROOT, verbose: bool = True)
| 158 | |
| 159 | |
| 160 | def 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 | |
| 183 | if __name__ == "__main__": |
no test coverage detected