List all registered projects.
()
| 114 | |
| 115 | @router.get("", response_model=list[ProjectSummary]) |
| 116 | async def list_projects(): |
| 117 | """List all registered projects.""" |
| 118 | _init_imports() |
| 119 | assert _check_spec_exists is not None # guaranteed by _init_imports() |
| 120 | (_, _, _, list_registered_projects, validate_project_path, |
| 121 | get_project_concurrency, _) = _get_registry_functions() |
| 122 | |
| 123 | projects = list_registered_projects() |
| 124 | result = [] |
| 125 | |
| 126 | for name, info in projects.items(): |
| 127 | project_dir = Path(info["path"]) |
| 128 | |
| 129 | # Skip if path no longer exists |
| 130 | is_valid, _ = validate_project_path(project_dir) |
| 131 | if not is_valid: |
| 132 | continue |
| 133 | |
| 134 | has_spec = _check_spec_exists(project_dir) |
| 135 | stats = get_project_stats(project_dir) |
| 136 | |
| 137 | result.append(ProjectSummary( |
| 138 | name=name, |
| 139 | path=info["path"], |
| 140 | has_spec=has_spec, |
| 141 | stats=stats, |
| 142 | default_concurrency=info.get("default_concurrency", 3), |
| 143 | )) |
| 144 | |
| 145 | return result |
| 146 | |
| 147 | |
| 148 | @router.post("", response_model=ProjectSummary) |
nothing calls this directly
no test coverage detected