Return the configured baseline PDF for the given user.
(user_id: str)
| 369 | |
| 370 | |
| 371 | def resolve_baseline_pdf_path(user_id: str) -> Optional[str]: |
| 372 | """Return the configured baseline PDF for the given user.""" |
| 373 | candidate_paths: List[Path] = [] |
| 374 | |
| 375 | configured = os.environ.get(BASELINE_PDF_ENV_VAR) |
| 376 | if configured: |
| 377 | candidate_paths.append(Path(configured).expanduser()) |
| 378 | |
| 379 | if user_id == "user_rolea": |
| 380 | candidate_paths.append(Path.home() / "Desktop" / "Research Infra.pdf") |
| 381 | |
| 382 | for candidate in candidate_paths: |
| 383 | if candidate.exists(): |
| 384 | return str(candidate) |
| 385 | |
| 386 | return None |
| 387 | |
| 388 | |
| 389 | def _blend_weight( |
no test coverage detected