Promotion docs name the configured reports

This commit is contained in:
Roberto Treviño
2026-11-29 01:40:55 -06:00
parent ae4638e4dd
commit 11c648ac36
+5 -3
View File
@@ -56,7 +56,8 @@ def read_report(domain: Domain, name: str, version: int, report: str) -> Respons
@router.post("/{domain}/{name}/versions/{version}/reports/clinical_validation")
def add_clinical_validation(domain: Domain, name: str, version: int, file: UploadFile) -> dict:
"""The clinical team's validation of a version: the third report promotion needs."""
"""The clinical team's validation of a version: the third report, which promotion needs
unless the site left it out of PROMOTION_REPORTS."""
registry.add_report(f"{domain.value}.{name}", version, "clinical_validation",
file.filename or "report", file.file.read()) # fmt: skip
return {"reports": sorted(registry.reports(f"{domain.value}.{name}", version))}
@@ -64,8 +65,9 @@ def add_clinical_validation(domain: Domain, name: str, version: int, file: Uploa
@router.post("/{domain}/{name}/versions/{version}/promote")
def promote(domain: Domain, name: str, version: int) -> dict:
"""The version risk batches come from from now on; refused (409) without its three
reports: technical validation, interpretability and clinical validation."""
"""The version risk batches come from from now on; refused (409) without the reports
the site requires (PROMOTION_REPORTS; default: technical validation, interpretability
and clinical validation)."""
try:
registry.promote(f"{domain.value}.{name}", version)
except registry.MissingReports as e: