Skip to content

Analysis UX: smoke-test every plot in CI to prevent staleness #327

Done

Description

@matt-pharr

Motivation

The plotting functions in src/Analysis/ go stale because nothing exercises them. When an HDF5 dataset is renamed or a stage's output layout changes, the corresponding plot_* function keeps its hardcoded path and silently breaks — the failure surfaces later in a user's notebook, not in CI.

The examples/*/analyze_example.jl scripts already build the summary plots, but they are not run in any enforced test, so drift is invisible until someone runs them by hand.

Proposed change

Add a test that:

  1. Loads a small reference gpec.h5 (an existing example/regression output, or one generated in the test).
  2. Iterates the plot registry (see companion issue on GPECResult) and, for every plot whose preconditions are satisfied by that h5, builds it and asserts it returns a Plots.Plot without error.
  3. Ties each plot's required-dataset list to the actual h5 schema, so a renamed/moved dataset fails loudly in CI rather than silently at runtime.

This is a cheap, high-leverage guard: it catches API drift and h5-path drift for all ~30 plot functions at once.

Notes

  • Best built on top of the plot registry from the GPECResult companion issue, so "which plots are available for this h5" is a single source of truth shared by the tests and the runtime catalog.
  • Keep the reference h5 small so the test stays fast; prefer reusing a Solovev example output.
  • This satisfies (and formalizes) the spirit of the CLAUDE.md regression policy for the plotting layer specifically — the regression harness tracks numbers; this tracks that the plots still build.

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions