Promotion docs name the configured reports
This commit is contained in:
+5
-3
@@ -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")
|
@router.post("/{domain}/{name}/versions/{version}/reports/clinical_validation")
|
||||||
def add_clinical_validation(domain: Domain, name: str, version: int, file: UploadFile) -> dict:
|
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",
|
registry.add_report(f"{domain.value}.{name}", version, "clinical_validation",
|
||||||
file.filename or "report", file.file.read()) # fmt: skip
|
file.filename or "report", file.file.read()) # fmt: skip
|
||||||
return {"reports": sorted(registry.reports(f"{domain.value}.{name}", version))}
|
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")
|
@router.post("/{domain}/{name}/versions/{version}/promote")
|
||||||
def promote(domain: Domain, name: str, version: int) -> dict:
|
def promote(domain: Domain, name: str, version: int) -> dict:
|
||||||
"""The version risk batches come from from now on; refused (409) without its three
|
"""The version risk batches come from from now on; refused (409) without the reports
|
||||||
reports: technical validation, interpretability and clinical validation."""
|
the site requires (PROMOTION_REPORTS; default: technical validation, interpretability
|
||||||
|
and clinical validation)."""
|
||||||
try:
|
try:
|
||||||
registry.promote(f"{domain.value}.{name}", version)
|
registry.promote(f"{domain.value}.{name}", version)
|
||||||
except registry.MissingReports as e:
|
except registry.MissingReports as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user