Initial commit: a0_software_orchestrator v1.0
- Auto-Registration-Bug behoben (register_project/get_project_id/resolve_project Trennung) - 25 Tests gruen (Pytest) - block_compactor-Tool refactored (Option B: Soft-Check statt Hard-Block) - 4 Restbaustellen gefixt - DB-Schema: plugin_settings-Tabelle hinzugefuegt - 3 Schattenprojekte aus DB geloescht - Plan v3 + Refactor-Plan + Worklog dokumentiert
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
"""Quality gate validation and scoring."""
|
||||
from typing import Dict, Any, List
|
||||
|
||||
|
||||
def check_gate(gate_name: str, project_root: str) -> Dict[str, Any]:
|
||||
"""Check a single quality gate. Stub for v0.1."""
|
||||
# In v0.1, this is a simple placeholder that returns pending.
|
||||
return {"gate": gate_name, "status": "pending", "reason": "not yet checked"}
|
||||
|
||||
|
||||
def calculate_score(check_results: List[Dict[str, Any]]) -> int:
|
||||
"""Calculate a simple score from gate results."""
|
||||
if not check_results:
|
||||
return 0
|
||||
passed = sum(1 for r in check_results if r.get("status") == "passed")
|
||||
return int((passed / len(check_results)) * 100)
|
||||
|
||||
|
||||
def is_release_ready(score: int, min_score: int = 80) -> bool:
|
||||
"""Check if the project score meets the minimum for release."""
|
||||
return score >= min_score
|
||||
Reference in New Issue
Block a user