diff --git a/dev/scripts/bootstrap_sso.py b/dev/scripts/bootstrap_sso.py index f14fc50..6ccc7ea 100644 --- a/dev/scripts/bootstrap_sso.py +++ b/dev/scripts/bootstrap_sso.py @@ -278,6 +278,7 @@ SUBDOMAINS = [ "bcda", # BCDA manager (P52) — Streamlit behind git-sso "lead", # LEAD public-data explorer — Streamlit behind git-sso "reach", # same public-data explorer, at reach.fhirworx.io + "lex", # legal-epidemiology workbench (code-family dossiers) — static page via Gitea custom/public behind git-sso ] diff --git a/dev/scripts/dossier_page/build.py b/dev/scripts/dossier_page/build.py index 6e3538d..4b630df 100644 --- a/dev/scripts/dossier_page/build.py +++ b/dev/scripts/dossier_page/build.py @@ -1,8 +1,10 @@ -"""Build the HOME-VISITS dossier page: a static snapshot with its data inlined. +"""Build the lex dossier page (HOME-VISITS): a static snapshot, data inlined. -Served by Gitea from its bind-mounted custom directory at -``git./dossier`` (Traefik router ``dossier``, behind ``git-sso``; -see infra/traefik/dynamic/services.yml). Run from the primary checkout, +lex (Latin for law) is the legal-epidemiology workbench. The page is served +by Gitea from its bind-mounted custom directory at ``lex./`` +(Traefik routers ``lex*``, behind ``git-sso``; the old address +``git./dossier`` redirects there; see +infra/traefik/dynamic/services.yml). Run from the primary checkout, never a worktree (the replica and bib.sqlite live in its data/): bash -c 'cd /home/kert/stack && set -a && . ./.env && set +a && \ @@ -52,6 +54,7 @@ from pfs.valuation import ( HERE = Path(__file__).resolve().parent ROOT = HERE.parents[2] +DOMAIN = os.environ.get("DOMAIN", "fhirworx.io") FAMILY = "HOME-VISITS" DOCKET = "CMS-2022-0113" @@ -794,10 +797,10 @@ if args.json: print(f"wrote {args.json} ({args.json.stat().st_size:,} bytes)", file=sys.stderr) -def _fill(tpl: str, marker: str, value: str) -> str: - if tpl.count(marker) != 1: +def _fill(tpl: str, marker: str, value: str, count: int = 1) -> str: + if tpl.count(marker) != count: raise SystemExit( - f"template.html: expected one {marker!r}, found {tpl.count(marker)}" + f"template.html: expected {count} {marker!r}, found {tpl.count(marker)}" ) return tpl.replace(marker, value) @@ -806,6 +809,8 @@ def _fill(tpl: str, marker: str, value: str) -> str: # string in it can close or confuse the