SWXDataValidator

class swxsoc.util.validation.SWXDataValidator(schema: SWXSchema | None = None)[source]

Bases: ABC

Abstract base class for heliophysics data validators.

Parameters:

schema (SWXSchema, optional) – optional custom SWXSchema object to use for validation.

Methods Summary

validate(file_path)

Validate the heliophysics data file.

Methods Documentation

abstract validate(file_path: Path) list[str][source]

Validate the heliophysics data file.

Parameters:

file_path (pathlib.Path) – A fully specified file path of the data file to validate.

Returns:

errors (list[str]) – A list of validation errors returned. A valid file will result in an empty list being returned.