NekUpload.validate.output module

class NekUpload.validate.output.OutputSchemaHDF5Validator(f: File)[source]

Bases: object

Class for handling output HDF5 schema validation

BASE_GROUPS = (HDF5GroupDefinition(path='NEKTAR', attributes=['FORMAT_VERSION']), HDF5GroupDefinition(path='NEKTAR/Metadata', attributes=['ChkFileNum']), HDF5GroupDefinition(path='NEKTAR/Metadata/Provenance', attributes=['GitBranch', 'GitSHA1', 'Hostname', 'NektarVersion', 'Timestamp']))
EXPECTED_DATASETS = (HDF5DatasetDefinition(path='NEKTAR/DECOMPOSITION', dataset_shape=(-1,)),)
NO_DIM_CONSTRAINTS = -1
validate()[source]

Check whether specified file conforms to the HDF5 output schema

class NekUpload.validate.output.ValidateOutput(file_path: str)[source]

Bases: object

Class responsible for all output file validation checks

check_checkpoint_from_filter_schema(session_file: str, geometry_file: str, solver, filter_checkpoint_list: list[str], chkpoint_file_list: list[str]) bool[source]
check_checkpoint_schema(filter_checkpoint_list: list[str], chkpoint_file_list: list[str]) bool[source]
check_chkpoint_filter_shape_only_vars(session_file: str, geometry_file: str, solver, chkpoint_file: str)[source]

Assumes number of fields in chkpoint file are from VARIABLES list

Parameters:
  • session_file (str) – _description_

  • geometry_file (str) – _description_

  • solver (_type_) – _description_

  • chkpoint_file (str) – _description_

Raises:

ExperimentalException – _description_

check_commit_is_public() bool[source]

Check that the GitSHA in the file is public

Returns:

_description_

Return type:

bool

check_schema() bool[source]

Check Output file conforms to HDF5 schema

Raises:

OutputSchemaHDF5Validator – _description_

Returns:

Passed

Return type:

bool

get_gitsha() str[source]