CDFValidator

class sammi.validation.CDFValidator(api_url: str = 'https://skteditor.heliophysics.net/cgi-bin/checkcdf.cgi')[source]

Bases: object

Python class to leverage the Science Physics Data Facility (SPDF)’s API for validation of International Solar-Terrestrial Physics (ISTP) guidelines.

Parameters:

api_url (str, optional) – The URL of the SPDF validation API. Default is “https://skteditor.heliophysics.net/cgi-bin/checkcdf.cgi”.

Methods Summary

validate(cdf_path)

Function to validate a CDF file against the ISTP guidelines using the SPDF validation API.

validate_raw(cdf_path)

Function to validate a CDF file against the ISTP guidelines using the SPDF validation API.

Methods Documentation

validate(cdf_path: Path) List[str][source]

Function to validate a CDF file against the ISTP guidelines using the SPDF validation API.

Parameters:

cdf_path (pathlib.Path) – The path to the local CDF file to validate.

Returns:

List[str] – A list of error messages from the validation process.

validate_raw(cdf_path: Path) str[source]

Function to validate a CDF file against the ISTP guidelines using the SPDF validation API.

Parameters:

cdf_path (pathlib.Path) – The path to the local CDF file to validate.

Returns:

str – The raw response from the SPDF validation API.