MCPcopy Create free account
hub / github.com/AutoForgeAI/autoforge / get_project

Function get_project

server/routers/projects.py:230–257  ·  view source on GitHub ↗

Get detailed information about a project.

(name: str)

Source from the content-addressed store, hash-verified

228
229@router.get("/{name}", response_model=ProjectDetail)
230async 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}")

Callers

nothing calls this directly

Calls 7

get_project_pathFunction · 0.90
get_project_concurrencyFunction · 0.90
_init_importsFunction · 0.85
_get_registry_functionsFunction · 0.85
get_project_statsFunction · 0.85
validate_project_nameFunction · 0.70
ProjectDetailClass · 0.50

Tested by

no test coverage detected