(
run_dir: Path,
status: str,
validation: dict[str, Any],
resource_plan: dict[str, Any] | None,
)
| 218 | |
| 219 | |
| 220 | def write_summary( |
| 221 | run_dir: Path, |
| 222 | status: str, |
| 223 | validation: dict[str, Any], |
| 224 | resource_plan: dict[str, Any] | None, |
| 225 | ) -> None: |
| 226 | lines = [ |
| 227 | "# nf-core Pipeline Run Summary", |
| 228 | "", |
| 229 | f"Status: `{status}`", |
| 230 | f"Pipeline: `{validation.get('workflow')}`", |
| 231 | f"Profile: `{validation.get('profile') or 'not provided'}`", |
| 232 | "", |
| 233 | "## Key Artifacts", |
| 234 | "", |
| 235 | "- `workflow/params.generated.json`", |
| 236 | "- `workflow/nfcore_command.json`", |
| 237 | "- `resources/resource_plan.json`, `resource_manifest.tsv`, `resource_env.sh`, `resource_readiness.md`, and resource setup-plan artifacts", |
| 238 | "- `commands.sh`", |
| 239 | "- `workflow/nextflow_report.html`, `timeline.html`, `trace.txt`, and `dag.html` when executed", |
| 240 | "- `results/` published outputs when execution completes", |
| 241 | "- `visualizations/index.html`", |
| 242 | "- `run_manifest.json` and `artifact_index.json`", |
| 243 | "", |
| 244 | ] |
| 245 | if validation.get("warnings"): |
| 246 | lines.extend(["## Warnings", ""]) |
| 247 | lines.extend(f"- {item}" for item in validation["warnings"]) |
| 248 | lines.append("") |
| 249 | if resource_plan is not None: |
| 250 | lines.extend(["## Resource Readiness", ""]) |
| 251 | lines.append(f"Ready: `{str(resource_plan.get('ok')).lower()}`") |
| 252 | lines.append(f"Resource contract: `{resource_plan.get('pipeline')}`") |
| 253 | lines.append( |
| 254 | f"Setup plan: `{resource_plan.get('outputs', {}).get('resource_setup_summary', 'resources/resource_setup_plan.md')}`" |
| 255 | ) |
| 256 | for item in resource_plan.get("resources", []): |
| 257 | state = "ready" if item.get("ok") else "missing" |
| 258 | required = "required" if item.get("required") else "optional" |
| 259 | lines.append(f"- `{item.get('bundle')}` ({item.get('kind')}, {required}): {state}") |
| 260 | lines.append("") |
| 261 | if validation.get("errors"): |
| 262 | lines.extend(["## Blockers", ""]) |
| 263 | lines.extend(f"- {item}" for item in validation["errors"]) |
| 264 | write_text(run_dir / "summary.md", "\n".join(lines) + "\n") |
| 265 | |
| 266 | |
| 267 | def write_visuals( |
no test coverage detected