Get detailed information about a project.
(name: str)
| 228 | |
| 229 | @router.get("/{name}", response_model=ProjectDetail) |
| 230 | async def get_project(name: str): |
| 231 | """Get detailed information about a project.""" |
| 232 | _init_imports() |
| 233 | assert _check_spec_exists is not None # guaranteed by _init_imports() |
| 234 | assert _get_project_prompts_dir is not None # guaranteed by _init_imports() |
| 235 | (_, _, get_project_path, _, _, get_project_concurrency, _) = _get_registry_functions() |
| 236 | |
| 237 | name = validate_project_name(name) |
| 238 | project_dir = get_project_path(name) |
| 239 | |
| 240 | if not project_dir: |
| 241 | raise HTTPException(status_code=404, detail=f"Project '{name}' not found in registry") |
| 242 | |
| 243 | if not project_dir.exists(): |
| 244 | raise HTTPException(status_code=404, detail=f"Project directory no longer exists: {project_dir}") |
| 245 | |
| 246 | has_spec = _check_spec_exists(project_dir) |
| 247 | stats = get_project_stats(project_dir) |
| 248 | prompts_dir = _get_project_prompts_dir(project_dir) |
| 249 | |
| 250 | return ProjectDetail( |
| 251 | name=name, |
| 252 | path=project_dir.as_posix(), |
| 253 | has_spec=has_spec, |
| 254 | stats=stats, |
| 255 | prompts_dir=str(prompts_dir), |
| 256 | default_concurrency=get_project_concurrency(name), |
| 257 | ) |
| 258 | |
| 259 | |
| 260 | @router.delete("/{name}") |
nothing calls this directly
no test coverage detected