pelagos_py.steps.input_output.format_check#
- pelagos_py.steps.input_output.format_check.console_summary(checker_name, result, passed)[source]#
Build a compact console summary for one checker’s result.
- Parameters:
- Returns:
Lines to log. Kept deliberately short: a pass/fail header, the missing mandatory global attributes and variables, then a count of everything else so the console is not flooded with detail (that goes to the file).
- Return type:
- class pelagos_py.steps.input_output.format_check.FormatCheck(name, parameters=None, diagnostics=False, context=None)[source]#
Bases:
pelagos_py.steps.base_step.BaseStepRun the IOOS file-format compliance checker and report the result.
Does not run on the in-memory dataset; it re-reads the file from disk (its own loading routine). A short pass/fail summary is always printed to the console. JSON and/or RST report files are written only when requested via
output_typeand anout_directoryis set.- Parameters:
src (path or str, optional) – File to check. If omitted, falls back to the file loaded by a preceding
Load OG1step.standards (list of str) – Standards to check, e.g.
['cf', 'og'](og= OG1).output_type (str or list of str, optional) – Report file(s) to save in addition to the console summary:
'json','rst', or a list of both. Omit (default) for console only. Saving requiresout_directoryto be set in the pipeline config.proceed_on_fail (bool) – If False, halt the pipeline when the file fails the checks.