Skip to content

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

Closed

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

Activity

  1. martinkilbinger commented on Jul 5, 2026

    @martinkilbinger
    Contributor

    yes, an exception should be raised. And check whether VALIDATION is ever used in the code.

  2. added a commit that references this issue on Jul 6, 2026
    bac6081
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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions