From 7ec11c93f9d971b4f905f8f553f2f08417fbde2c Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Sat, 16 May 2026 14:48:10 +0100 Subject: [PATCH] feat: GitHub Actions for lint + profile re-run + dashboard refresh (Phase 5) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 5 (final) of the autolens_profiling z_feature roadmap. Wires up two GitHub Actions workflows + threads AUTOLENS_PROFILING_SMOKE=1 into every profile script so the lint workflow's smoke step short-circuits cheaply. What lands in this PR --------------------- 1. ruff.toml — repo-root ruff config (the repo isn't a Python package so there's no pyproject.toml). Conservative rule selection: E/F/W/I/UP/B with E501/E402/F401/B008 ignored for scientific code. 2. .github/workflows/lint.yml — Workflow 1, PR + push-to-main gate. Target wall time <5 min on CPU-only ubuntu-latest. Steps: - ruff check . + ruff format --check . - python scripts/build_readme.py --check (dashboard idempotence) - lychee markdown link-rot across every README.md - Smoke: one script per section with AUTOLENS_PROFILING_SMOKE=1 (catches import-graph breakage without running the full profile) 3. .github/workflows/profile.yml — Workflow 2, manual + on release. - workflow_dispatch with optional `sections` input - release: published trigger - Runs every script under likelihood/, simulators/, searches/nautilus/ with continue-on-error per section (single regression doesn't block the dashboard refresh for the other 16) - Skips simulators/point_source.py in the loop (its default dataset_name="simple" overwrites Phase 1's tracked likelihood JSONs) - Runs scripts/build_readme.py to refresh dashboard tables - Commits diff back to main as github-actions[bot] with [skip ci] 4. .github/workflows/README.md — documents both workflows + design decisions captured for future maintainers. 5. AUTOLENS_PROFILING_SMOKE=1 short-circuit threaded into 17 scripts: - likelihood/imaging/{mge,pixelization,delaunay}.py - likelihood/interferometer/{mge,pixelization,delaunay}.py - likelihood/point_source/{image_plane,source_plane}.py - likelihood/datacube/delaunay.py - simulators/{imaging,interferometer,point_source,cluster,group,multi}.py - searches/nautilus/{simple,jax}.py Inserted via AST-driven helper at the first non-import top-level statement of each script (after the module docstring + initial imports, before any module-level execution). Verified end-to-end: AUTOLENS_PROFILING_SMOKE=1 python