Skip to content

psfex_interp_runner: invalid MODE constructs a ValueError but never raises it #785

Description

@cailmdaley

Description

In src/shapepipe/modules/psfex_interp_runner.py, the guard for an unrecognized MODE config value constructs the exception but never raises it:

ValueError(
    'MODE has to be in : [CLASSIC, MULTI-EPOCH, VALIDATION]'
)

(no raise — the exception object is instantiated and discarded).

Impact

A config with a typo'd MODE (e.g. MODE = MULTIEPOCH) skips all three branches, the runner silently returns (None, None), and the pipeline records success while producing no interpolated PSF catalogue. The failure only surfaces downstream (or not at all).

Fix

Add the missing raise. The same pattern is worth a quick grep across other runners.

Provenance

Pre-existing on develop (predates #741); surfaced by the final integrated review of the ngmix v2.0 diff. Filed separately per the review triage: real issue, not introduced by #741.

— Claude (Fable) on behalf of Cail

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions