libera_utils.footprint_matching.sources.require_mode_reader_keys#
- libera_utils.footprint_matching.sources.require_mode_reader_keys(mode: OperationalMode, keys: Iterable[str], argument: str) None#
Check that
keysare exactly the readers active inmode.A source left out would leave its product columns at fill and score coverage over fewer sources than the product declares; a source the mode does not use would aggregate variables the product does not carry.
- Parameters:
mode (OperationalMode) – Operational mode whose active readers the keys must match.
keys (collections.abc.Iterable[str]) – Reader registry keys a caller supplied.
argument (str) – Name of the caller’s argument that holds the keys, for the error message.
- Raises:
KeyError – If
keysholds a key for a sourcemodedoes not use, or is missing a reader active inmode.