Update project files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
ANDREW HOSFORD
2026-04-07 11:59:48 -05:00
parent dd227be9b0
commit 0e8978f48c
50 changed files with 5878 additions and 241 deletions

View File

@@ -25,6 +25,7 @@ def get_stats(project_id: int | None = None, db: Session = Depends(get_db)):
quality_passing = 0
leaves_with_tests = 0
total_leaves = 0
orphaned = 0
for n in nodes:
by_type[n.node_type.value] = by_type.get(n.node_type.value, 0) + 1
@@ -39,6 +40,9 @@ def get_stats(project_id: int | None = None, db: Session = Depends(get_db)):
if n.test_spec:
leaves_with_tests += 1
if n.node_type != NodeType.pillar and not n.parent_id:
orphaned += 1
coverage = (leaves_with_tests / total_leaves * 100) if total_leaves > 0 else 0.0
return StatsResponse(
@@ -47,6 +51,7 @@ def get_stats(project_id: int | None = None, db: Session = Depends(get_db)):
requirements=by_type.get("requirement", 0),
sub_requirements=by_type.get("sub_requirement", 0),
leaves=by_type.get("leaf", 0),
orphaned=orphaned,
by_status=by_status,
by_priority=by_priority,
quality_passing=quality_passing,