meeg_utils.testing.check_check#

meeg_utils.testing.check_check(check, raw)[source]#

Check that a quality check honours the meeg-utils check contract.

The checks are:

  1. Parameters survive get_params / set_params and clone().

  2. plot before compute raises NotFittedError.

  3. compute returns the check itself and does not modify the data.

  4. metrics_ and the findings are JSON-serializable, every finding belongs to the check and has a valid level.

  5. Every kind in plot_kinds draws a figure.

Parameters:
  • check (Check) – A check that has not been computed.

  • raw (Raw) – Preloaded data the check applies to.

Raises:

AssertionError – If a check fails.