FHIR, follow-up lists and model jobs by domain; CaMa gate; report download for governance
This commit is contained in:
+14
-9
@@ -1,6 +1,7 @@
|
||||
"""Phase 3 gate, the WebApp: every page loads from the new API. The platform runs as in
|
||||
production (API, Dagster), loaded with the synthetic CaCu hospital and the messy site;
|
||||
Playwright drives the real pages against it (WebApp/e2e)."""
|
||||
"""Phase 3 and 4 gate, the WebApp: every page loads from the new API. The platform runs as
|
||||
in production (API, Dagster), loaded with the synthetic CaCu and CaMa hospitals (CaMa's
|
||||
models trained, none promoted) and the messy site; Playwright drives the real pages against
|
||||
it (WebApp/e2e)."""
|
||||
|
||||
import json
|
||||
import os
|
||||
@@ -8,22 +9,26 @@ import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
from test_conectar import ok, run
|
||||
from test_conectar import ok, run, wait_for
|
||||
|
||||
from conftest import put_concept_map
|
||||
|
||||
ROOT = Path(__file__).parents[2]
|
||||
HOSPITAL = ROOT / "tests" / "fixtures" / "hospital"
|
||||
PIPELINE = ROOT / "tests" / "fixtures" / "pipelines" / "hospital_cacu.json"
|
||||
PIPELINES = ROOT / "tests" / "fixtures" / "pipelines"
|
||||
|
||||
|
||||
@pytest.mark.webapp
|
||||
@pytest.mark.parametrize("platform", ["sqlite"], indirect=True) # pages read one API either way
|
||||
def test_every_page_loads_from_the_api(api, platform, messy_site):
|
||||
hospital = json.loads(PIPELINE.read_text().replace("{hospital}", str(HOSPITAL)))
|
||||
put_concept_map(api, "hospital_cacu")
|
||||
ok(api.put("/ingest/pipelines/cacu", json=hospital))
|
||||
run(api, "cacu")
|
||||
for domain in ("cacu", "cama"):
|
||||
drawn = (PIPELINES / f"hospital_{domain}.json").read_text()
|
||||
put_concept_map(api, f"hospital_{domain}")
|
||||
ok(api.put(f"/ingest/pipelines/{domain}", json=json.loads(
|
||||
drawn.replace("{hospital}", str(HOSPITAL))))) # fmt: skip
|
||||
run(api, domain)
|
||||
# A trained CaMa version, unpromoted: what the governance page shows and refuses.
|
||||
wait_for(api, ok(api.post("/models/cama/train", json={"as_of": "2026-11-24"}))["run_id"])
|
||||
put_concept_map(api, "messy_site")
|
||||
ok(api.put("/ingest/pipelines/site", json=json.loads(messy_site.drawn)))
|
||||
run(api, "site")
|
||||
|
||||
Reference in New Issue
Block a user